Mention Users

A bot can mention a specific user or all users to send a message to in a message room.

Note

  • For more information, see Mentions in Product Guide.
  • Up to 50 users can be mentioned, including duplicates.

Message types and parameters available for mentions are as follows:

  • Text: text parameter
  • Link: contentText parameter
  • Button template: contentText parameter
  • Flexible template
    • Text: text parameter
    • Span: text parameter

Mention a specific user {#mention-member}

To mention a specific user in a message room, create a message in the following format.
The userId of the mentioned user is replaced by the user name.
Hello, <m userId="{userId}"> => Hello, @{userName}

Note

  • You can use this in Send messages - to a channel and Send messages - to a user.
  • To send messages in multiple languages, the user must be mentioned in every multilingual message.

Mention all users {#mention-all}

To mention all the users in a message room, create a message in the following format:
Hi, <m userId="all"> => Hi, @All

Note

  • You can use this in Send messages - to a channel.
  • To send messages in multiple languages, all the users must be mentioned in every multilingual message.

Request example {#mention-example}

Text type {#mention-example-text}

{  "content": {    "type": "text",    "text": "Hello, m userId=\"admin@example.com\">"  }}

Link type {#mention-example-link}

{  "content": {    "type": "link",    "contentText": "m userId=\"admin@example.com\">, please refer to the link.",    "linkText": "link text",    "link": "http://www.worksmobile.com"  }}

Button template type {#mention-example-button-template}

{  "content": {    "type": "button_template",    "contentText": "m userId=\"admin@example.com\">, please refer to the link.",    "actions": [{      "type": "uri",      "label": "Homepage",      "uri": "https://example.com"    }, {      "type": "message",      "label": "FAQ",      "postback": "ButtonTemplate_FAQ"    }]  }}