Team.findMember searches the organization that owns the agent for members whose name, email address, or user id matches, and returns the WhatsApp, SMS, and email handles each of them chose to share. Pair it with Channels.send to message a colleague without hard-coding a number. Available in tools, jobs, webhooks, triggers, processors, and workflow code steps.
Verified against lua-cli 3.33.0.
Quick example
A search returns a list; disambiguate when more than one member matches.Methods
findMember(name)
Returns the organization members matching a name, email address, or user id, with their shared handles.string
required
The text to match: a case-insensitive substring of a member’s full name or of any of their email addresses, or an exact user id. Whitespace only returns no matches.
targets only when the member marked it shareable in their profile, so targets can be empty. The organization is derived from the agent; you can’t resolve members of another organization.
Returns
DirectoryResolveResult
interface
DirectoryResolveError with code and statusCode; in lua test it is a plain Error carrying the server’s message, or Directory resolve failed.
name is requiredwhennameis empty.Agent is not linked to an organization.- A 403 when the agent isn’t yours.
Types
DirectoryResolveResult, DirectoryMatch, and DirectoryTarget are exported from lua-cli with the shapes listed under findMember(name).
See also
Channels— send to the handle you resolvedUser— the end user’s own profile, as opposed to organization members- Send proactive messages — cold-start rules per channel

