Just reading back through a busy channel in the morning can eat up the time after you start work. This article explains how to have AI summarize the previous day's posts and deliver the summary to another channel at a set time.
Summary
- Run a Samurai App workflow on a schedule and chain three steps. In order: the operation that reads Slack history, a summary with "Generate with AI", and "Send to notification target".
- It can read only the channels the connected account can read, and only as much as it can fetch. Thread replies are not included in the history operation.
- The summary uses a model, so every run uses credits. That is true even on days with no posts.
- A scheduled task runs at most once an hour, and times are in Japan Standard Time.
What it can and cannot do
What it can do:
- At a set time, summarize the latest posts in one channel together
- Limit the range it reads by time, by specifying
oldest - Send the summary to a channel other than the original one
Limits on what it reads:
- Avoid channels the account has not joined. Private channels and DMs cannot be read unless the connected account is a member. Slack refuses channels the token has not joined with
not_in_channel, even for bot tokens. - Thread replies are not fetched. The history operation
SLACK_FETCH_CONVERSATION_HISTORYreturns the main posts in the channel. In channels where discussion happens in threads, the summary covers only the parent posts. Threads are read with a separate operation,SLACK_FETCH_MESSAGE_THREAD_FROM_A_CONVERSATION, but you have to read each thread separately. - It fetches 100 posts per call by default. You can specify up to 1,000, but since May 2025, Slack limits
conversations.historyto once a minute and 15 posts per call for new installations of commercial apps distributed outside the Marketplace. Apps built in-house are exempt. If you can only get 15 posts, switch to "Add with your own OAuth client" in "Connectors". - Authors arrive as IDs, not names. The
userin the history is an ID starting withU. Mentions in the text are also in ID form, so to have the summary say "who said what" by name, you need to prepare a separate mapping from IDs to names.
What you need
- A Slack account that has joined the channel to be read
- An Incoming Webhook URL for the channel where the summary will be posted
- Permission to create scheduled tasks in Samurai App (creator, and manager or above)
- Remaining credits (AI steps do not run once the usage limit is reached)
Steps
1. Connect Slack
On the "Connectors" tab of the "Connectors" screen, "Add" Slack and "Link" it with an account that has joined the channel to be read.
2. Register where the summary goes
Create a Slack Incoming Webhook for the channel where the summary will be posted. Register the URL under "Notification targets" in "Settings" → "Notifications", and check it with "Send test".
3. Build the step that reads history
Create a new workflow in "Workflows" and choose Slack's SLACK_FETCH_CONVERSATION_HISTORY from "Add step".
- Enter the channel ID in
channel. If you do not know the ID, you can look it up withSLACK_FIND_CHANNELSin the same Slack connection. - Enter the number of posts in
limit.
Use "Try this step" on the "Test" tab to confirm that posts are returned. It only reads, so trying it does not change anything on the Slack side.
To limit it to the previous day: oldest is a Unix timestamp string. Add a "Code" step ("Isolated") before it that returns the following.
return { oldest: String(Math.floor(Date.now() / 1000) - 86400) };
For oldest, choose this step's result with "Variables". Without a limit, it reads limit posts from the newest, so on days with few posts, posts from before the previous day are mixed in.
4. Build the summary step
Add "Generate with AI" with "Add step". Here is an example of what to ask. Insert the result of the history step with "/" or "Variables".
Summarize the following Slack posts in three parts: decisions, open questions, and actions for today.
Do not write anything that is not in the posts. If there are no posts, reply only "There were no posts."
Match Slack's formatting: write bold as *text*, and do not use # headings.
Keep the whole summary within 2,000 characters.
{{result of the history step}}
Slack's formatting follows different rules from Markdown, so specify the format. The post text contains mentions in the form <@U…>.
5. Build the sending step
Add "Send to notification target" from "Connect" in "Add step", and choose the notification target from step 2. For the "Body", choose the text of the summary step.
6. Publish and add a scheduled task
Press "Publish version N" on the "Versions" tab. Press "Add scheduled task" on the "Triggers" tab, and in "cron (minute hour day month weekday)" under "When to run", enter, for example, 0 8 * * 1-5 for 8:00 every weekday morning.
To build it in chat, you can ask "Build a workflow that summarizes the posts in Slack's #sales every morning at 8:00 and sends them to a notification target." The result is a draft, so check its contents before publishing.
Unattended runs and approval
Reading Slack history, "Generate with AI", and "Send to notification target" have no operations that raise a card. They run as is on a schedule. The exception is when an admin has set the operation to "Confirm every time" or "Forbidden": with nobody there to approve, it is refused.
By default, it runs with the account of the person who started it. A scheduled task reads with the account of the person who registered it, so the content of the channels the registrant can read reaches everyone in the destination channel through the summary. Check this point when summarizing a private channel into a wider channel. If the person in charge changes, you can use "Lend to this workflow" in the step's "Credentials used to run".
When it does not work
- Too few posts. You may be hitting the fetch limit. Check the actual count in the output on the "Runs" tab, and if it stops at 15, try your own OAuth client.
not_in_channelor a permission error appears. Check that the connected account is a member of that channel.- The summary is thin or misses topics. Exchanges in threads are not included. Channels where discussion gathers in threads are not suited to this setup.
- The run itself does not start. It may still be a draft, or the usage limit may have been reached. Look at "Recent runs" on the "Runs" tab.
FAQ
Can I summarize several channels together?
Add a history step for each channel and insert all of them into the summary step, and you get one combined message. The more posts there are, the more credits it uses.
Can I stop the notification on days with no posts?
Add a field to "Output fields" in "Generate with AI" that returns yes / no for whether there were posts, then check that value with a "Condition" and branch "Send to notification target". The AI step still runs, so that run still uses credits.
Can I reply with the summary in the original channel?
A notification target's destination is fixed per Incoming Webhook URL, so it becomes a new post in that channel. Replying in a thread is not possible with "Send to notification target".
Related how-tos
- Share meeting minutes to Slack automatically
- Collect news automatically and send it to Slack
- Send Chatwork posts to Slack