You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the approach using dispatch_action_config and app.action is solid! I'm finding that setStatus can be called from the url_text_input handler using a few details from the body argument:
app.action('url_text_input',async({ action, body, client, ack })=>{awaitack();// https://api.slack.com/methods/assistant.threads.setTitleawaitclient.assistant.threads.setTitle({channel_id: body.channel.id,title: 'chats about a link',thread_ts: body.message.thread_ts,});// https://api.slack.com/methods/assistant.threads.setStatusawaitclient.assistant.threads.setStatus({channel_id: body.channel.id,status: 'surfing the web',thread_ts: body.message.thread_ts,});// https://api.slack.com/methods/chat.postMessageawaitclient.chat.postMessage({channel: body.channel.id,text: `this link was shared: ${action.value}`,thread_ts: body.message.thread_ts,});});
This does still use the action handler and requires more setup to call the API methods, but I'm wondering if it's an alright approach for the calls you're making?
Some unexpected behavior seems to happen when setting a status or posting a message before the user does - the suggested prompts remain present and the status text might not show. Wanted to share this here, but will report back with more findings on this! Setting a title and posting responses are all happening as expected too 👾
@slack/bolt
version4.2.0
My App and Receiver Configuration
Question
Hi, is it possible to handle interactive blocks in Slack Assistant conversation?
My case is like that, I want to send a welcome message on
assistant_thread_started
with interactive text input block:I see in the docs that I can create a separate action middleware like that:
However, using this approach, I cannot use setStatus function. Is there any other way to handle interactive elements when using Slack Assistants?
The text was updated successfully, but these errors were encountered: