A message was sent to a channel
The assistant_app_thread
subtype is the subtype of the root message of an assistant thread started by the end user.
This subtype is used with the root messages that are created when a user clicks the AI app entry point (triggering an assistant_thread_started
event) or starts a new chat with the AI app. This subtype is included in other message subtype payloads too, such that filtering it in a message listener would look like this:
message.message.subtype === 'assistant_app_thread'
Here is an example of this payload:
{
type: 'message',
subtype: 'message_changed',
message: {
text: 'Chats from 2024-09-28T00:41:31.923Z',
subtype: 'assistant_app_thread',
user: 'U123456ABCD',
type: 'message',
edited: { user: 'U123456ABCD', ts: '1727484103.000000' },
team: 'T123456ABCD',
thread_ts: '1727484091.821349',
reply_count: 1,
reply_users_count: 1,
latest_reply: '1727484101.719749',
reply_users: [ 'U123456ABCD' ],
is_locked: false,
blocks: [ [Object] ],
assistant_app_thread: {
title: 'Chats from 2024-09-28T00:41:31.923Z',
title_blocks: [Array],
artifacts: []
},
ts: '1727484091.821349'
},
previous_message: {
text: 'Chats from 2024-09-28T00:41:31.923Z',
subtype: 'assistant_app_thread',
user: 'U123456ABCD',
type: 'message',
ts: '1727484091.821349',
team: 'T123456ABCD',
thread_ts: '1727484091.821349',
reply_count: 1,
reply_users_count: 1,
latest_reply: '1727484101.719749',
reply_users: [ 'U123456ABCD' ],
is_locked: false,
blocks: [ [Object] ],
assistant_app_thread: {
title: 'Chats from 2024-09-28T00:41:31.923Z',
title_blocks: [Array],
artifacts: []
}
},
channel: 'D987654ABCD',
hidden: true,
ts: '1727484103.018100',
event_ts: '1727484103.018100',
channel_type: 'im'
}
The assistant_app_thread
subtype message can also be useful for storing metadata about the conversation itself, like an external session ID or pointers to artifacts created during the conversation. Read more about sending message metadata in the Using message metadata guide.
When an event occurs, we will send an HTTP POST request to your Request URL. The outer payload is uniform across all Events API methods, and contains fields like team_id
and event
. Learn more