メンバーへのメンション

Bot が参加するトークルームの特定のメンバー、またはすべてのメンバーにメンションしてメッセージを送信できます。

参考

  • メンション機能に関する詳細は、ガイドページの メンション をご参照ください。
  • 最大 50 名までメンションできます。

メンバーへのメンションに対応しているメッセージ送信タイプと指定可能なパラメータは次のとおりです。

  • Text:text パラメータ
  • Link:contentText パラメータ
  • Button template:contentText パラメータ
  • Flexible template
    • Text : text パラメータ
    • Span : text パラメータ

特定のメンバーへのメンション {#mention-member}

特定のメンバーにメンションするには、次の形式でメッセージを作成します。
メンションされたメンバーの userId は、メンバーの名前に変更して送信されます。
Hello, <m userId="{userId}"> => Hello, @{userName}

"{userId}" として、userId または email が指定できます。

参考

  • メッセージの送信 - トークルーム指定 と メッセージの送信 - ユーザー指定 で利用できます。
  • 多言語のメンションメッセージを送信する場合には、すべての多言語メッセージに同じメンバーがメンションされる必要があります。

すべてのメンバーへのメンション {#mention-all}

すべてのメンバーにメンションするには、次の形式でメッセージを作成します。
Hi, <m userId="all"> => Hi, @All

参考

  • メッセージの送信 - トークルーム指定 で使用できます。
  • 多言語のメンションメッセージを送信する場合には、すべての多言語メッセージにすべてのメンバーがメンションされる必要があります。

Request Example {#mention-example}

Text タイプ {#mention-example-text}

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

Link タイプ {#mention-example-link}

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

Button template タイプ {#mention-example-button-template}

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