Admins (teammates): find the id to set as intercom.admin.id, and the ids to assign conversations to.

Context Vars

Optional
  • intercom.token

Functions

find-admin-by-email

fn (email: Str): Any
fn (email: Str, opts: Map): Any

The admin whose email matches (case-insensitive), from list-admins, or null.

Example

admin ::intercom::admins/find-admin-by-email("support@example.com")
if(is-null(admin), "no such admin", admin.id)

get-admin

fn (id: Any): Any
fn (id: Any, opts: Map): Any

GET /admins/{id} - One admin.

Example

admin ::intercom::admins/get-admin("814860")
admin.name

list-admins

fn (): Any
fn (opts: Map): Any

GET /admins - Every admin in the workspace: {type: "admin.list", admins: [...]}.

Example

out ::intercom::admins/list-admins()
map(out.admins, %.email)

list-teams

fn (): Any
fn (opts: Map): Any

GET /teams - The workspace's teams (assignment targets for assign-conversation with type: "team").

Example

out ::intercom::admins/list-teams()
map(out.teams, %.name)

me

fn (): Any
fn (opts: Map): Any

GET /me - The admin the access token acts as, with its workspace (app, including region). Its id is the usual value for intercom.admin.id, and the cheapest token check.

Example

admin ::intercom::admins/me()
admin.id