Answer channel questions from what was already said
Answers a question posted in Slack using only the messages that channel already contains, in a thread.
What it does
Each integration step this workflow runs, in order, what it is for, and the conditions and loops that decide when it runs.
- 1
SlackNew message triggerStarts a run only when a message containing the ask word is posted in the channel you chose. - 2
SlackGet channel historyReads the channel's most recent messages as context, leaving out empty ones, duplicates and other questions to the bot. - 3
OpenAIQuery modelAsks the AI for a short search phrase, then for an answer drawn only from the quoted channel messages. If
searchPhraseis not empty- 4
SlackFind messagesLooks through the channel's 200 most recent messages for ones containing the search phrase, to widen the evidence.
- 4
If
draftProblemis not empty- 5
SlackSend messagePosts the answer in a thread under the question, or the closest messages found when no safe answer could be drafted.
Otherwise, if
draftis empty,draftis “null” ordraftstarts with “NOT FOUND”- 6
SlackSend message
- 5
- 7
SlackSend message
How it works
What happens on each run, in plain English.
When someone posts a message in your chosen Slack channel that contains the ask word ('!ask' unless you change it), the rest of the message is treated as a question; other messages do not start the workflow at all. The channel's 20 most recent messages are read, the AI works out a short search phrase, the channel's last 200 messages are searched for it, and the AI drafts an answer from the messages found alone.
The answer is posted in a thread under the question, with a line saying how many earlier messages it read. When nothing relevant turns up it says so instead of improvising, and when the draft quotes a figure that appears in none of the messages, the draft is withheld and the closest messages are posted instead. If the AI does not respond, the thread is told it cannot answer right now and the run is marked as failed. Mentions in anything it posts are defused, so nobody is pinged.
You need a Slack connection and an OpenAI connection, the Slack channel to watch, and a line or two describing your team. It only sees messages posted in the channel itself, and only the last 200: replies written inside threads, and anything older, cannot be found.
Start from a workflow that already works.
Add "Answer channel questions from what was already said" to your workspace, connect its apps, and make it yours.
Free plan, no credit card