Quick Overview
This workflow runs every weekday morning to pull recent messages from a Slack channel, uses OpenAI (via LangChain) to generate a structured daily digest, saves it as a new page in a Notion database, and posts a confirmation back to Slack.
How it works
- Runs every weekday at 9:00 AM based on a cron schedule.
- Loads the digest configuration (Slack channel IDs, Notion database ID, lookback window, and timezone) and fetches the last N hours of message history from the selected Slack channel.
- Removes bot messages, system events, and very short posts, then builds a timestamped transcript for summarization.
- If no human messages remain, posts a “no activity” note to the confirmation Slack channel and stops.
- If messages exist, sends the transcript to an OpenAI chat model to produce JSON containing a summary, decisions, blockers, and action items with owners.
- Formats the AI output into Markdown and creates a dated page in the target Notion database.
- Posts a Slack confirmation message with the Notion page link and message count.
Setup
- Connect Slack OAuth2 credentials with permissions to read channel history and post messages, and invite the Slack app to the source and confirmation channels.
- Connect your Notion integration credential, share the target Notion database with that integration, and ensure the database has a title property named “Name.”
- Add an OpenAI API credential (used by the LangChain OpenAI Chat Model node) and verify the selected model is available to your account.
- Update the placeholders in the digest configuration (Slack channel ID, confirmation channel ID, Notion database ID, lookback hours, and timezone) before activating the workflow.