Tags: list, create or rename, delete, and tag or untag contacts and conversations. Tagging conversations is recorded as the admin in intercom.admin.id.
Context Vars
intercom.tokenintercom.admin.id
Functions
create-tag
fn (name: Str): Any
fn (name: Str, opts: Map): Any
POST /tags - Create a tag by name, or return the existing tag with that name.
Example
tag ::intercom::tags/create-tag("vip")
tag.id
delete-tag
fn (id: Str): Any
fn (id: Str, opts: Map): Any
DELETE /tags/{id} - Delete a tag. Intercom refuses while the tag is used by rules or messages.
Example
::intercom::tags/delete-tag("7522907")
get-tag
fn (id: Str): Any
fn (id: Str, opts: Map): Any
GET /tags/{id} - One tag.
Example
tag ::intercom::tags/get-tag("7522907")
tag.name
list-tags
fn (): Any
fn (opts: Map): Any
GET /tags - Every tag in the workspace: {type: "list", data: [...]}.
Example
tags ::intercom::tags/list-tags()
map(tags.data, %.name)
rename-tag
fn (id: Str, name: Str): Any
fn (id: Str, name: Str, opts: Map): Any
POST /tags with an id - Rename an existing tag.
Example
::intercom::tags/rename-tag("7522907", "enterprise")
tag-contact
fn (contact-id: Str, tag-id: Str): Any
fn (contact-id: Str, tag-id: Str, opts: Map): Any
POST /contacts/{id}/tags - Apply a tag (by tag id) to a contact. Returns the tag.
Example
::intercom::tags/tag-contact("6643703ffae7834d1792fd30", "7522907")
tag-conversation
fn (conversation-id: Str, tag-id: Str): Any
fn (conversation-id: Str, tag-id: Str, opts: Map): Any
POST /conversations/{id}/tags - Apply a tag (by tag id) to a conversation, as the configured admin.
Example
bug ::intercom::tags/create-tag("bug")
::intercom::tags/tag-conversation("215473041", bug.id)
intercom.admin.id
untag-contact
fn (contact-id: Str, tag-id: Str): Any
fn (contact-id: Str, tag-id: Str, opts: Map): Any
DELETE /contacts/{id}/tags/{tag_id} - Remove a tag from a contact. Returns the tag.
Example
::intercom::tags/untag-contact("6643703ffae7834d1792fd30", "7522907")
untag-conversation
fn (conversation-id: Str, tag-id: Str): Any
fn (conversation-id: Str, tag-id: Str, opts: Map): Any
DELETE /conversations/{id}/tags/{tag_id} - Remove a tag from a conversation, as the configured admin.
Example
::intercom::tags/untag-conversation("215473041", "7522907")
intercom.admin.id