
The daily reminder, with Draft and Connect more tools buttons

The draft the agent writes, delivered to a teammate in Slack
Setup
You need a Composio API key, a Slack workspace you can install an app into, and Node with tsx. The finished bot deploys to Vercel as two serverless functions, a cron and an interactivity handler, so there’s no long-running server.Make your custom Slack bot
This bot doesn’t post as “Composio”. It posts as my app, with its own name, icon, and (frankly ridiculous) face:
Create the app from scratch
Daily Standup Bot), and pick your workspace.
Create the app from scratch and name it
Add the Bot Token Scopes
chat:write, im:write, channels:history, channels:read, users:read, users:read.email, team:read. Then turn on Interactivity and point its Request URL at your deployment’s /api/interactivity.
Add the bot token scopes
Grab the app credentials

Copy the Client ID and Secret
Auth the bot
The Slack app exists; now connect it through Composio so your code can act as it. You create oneslackbot auth config from your credentials, then a setup script does the OAuth once with Composio’s manual authentication flow.
slackbot vs slackComposio has two Slack toolkits, and this bot uses both:slackbotauthenticates a Slack app and acts as the bot (a bot token). It posts the reminders and drafts as “Daily Standup Bot,” and it’s the one you white-label here.slackauthenticates an individual user and acts as them (a user token). Each teammate connects this so the bot can post their standup under their own name and read their activity for context.
slackbot; doing something as a person uses slack.Create an auth config and pick the @@AUTHOREDINLINE00030@@ toolkit
Slackbot toolkit. In the Composio dashboard, click Create Auth Config and search slackbot. Choose Slackbot, not Slack: Slackbot posts as the bot identity, while Slack acts as an individual user.
Pick Slackbot, not Slack
Use your own credentials
team:read to the user token scopes. This is the white-label step: your app, your name, your face.
Use your own credentials
Save the auth config id
ac_... id into COMPOSIO_SLACKBOT_AUTH_CONFIG_ID. This is the one auth config your app uses to take actions on behalf of your bot.
The created auth config and its ac_ id
Run the setup script to connect the bot
scripts/setup.ts — complete fileIf not connected, session.authorize() returns a Connect Link. Print it, then waitForConnection() resolves once the bot finishes OAuth. That connected account is the identity the bot posts as.
Approve the bot in Slack

Connected
--reconnect.
Talk to Slack
To send and update messages in our deterministic bot workflow, we use Composio’sSLACKBOT_SEND_MESSAGE and SLACKBOT_UPDATES_A_MESSAGE tools via manual tool execution. SLACKBOT_SEND_MESSAGE takes Block Kit blocks, so a message with interactive buttons can go through a tool too.
api/_utils/slack.ts — step 1: Send and update with named tools
Sending and updating are tools: SLACKBOT_SEND_MESSAGE and SLACKBOT_UPDATES_A_MESSAGE both take Block Kit blocks, so even the interactive button menus go through tools, not the proxy.
views.open), it drops to proxyExecute: the escape hatch for anything the named tools don’t cover, hitting any Slack Web API endpoint as a connected account with no token in your code.
api/_utils/slack.ts — step 2: The proxy for the one thing without a tool
Opening a modal (views.open) has no Composio tool, so it drops to proxyExecute as the bot’s connected account: the escape hatch for anything the named tools don’t cover.
Make the buttons work
Our StandUp bot gives the user two options every morning: Draft or Connect more tools. Each message uses Block Kit to create those buttons. For each button we define anaction_id that lets us recognise which button was clicked.

The daily reminder, with Draft and Connect more tools buttons
/api/interactivity handler. Verify the request, ack within Slack’s 3-second window, then route on the action_id:
api/interactivity.ts — complete file
The button carried its context in value. Switch on the action_id and call the right function. Draft launches the subagent; the rest post through the proxy. The flow is deterministic, no model in the loop.

Connect more tools, each button a per-member OAuth link
views.open through the proxy), and Confirm posts the draft into the day’s thread as the member.
Draft the standup
Now this is the cool and magical part, and the easy part: all the background agent needs is a tool-router session and a prompt. When a member taps Draft, you spin up a session scoped to the toolkit catalogue and let the agent research and write.A session writes the draft
A tool-router session gives the agent its tools. Pass the member’s email and your full list of toolkits, hand the tools to the model, and let it investigate and write. You don’t have to check which ones the member set up: the session only exposes tools for the accounts they’ve actually connected, and ignores the rest.api/_utils/agent.ts — step 1: A tool-router session writes the draft
Create a session for the member, scoped to the toolkit catalogue, hand its research tools to the model, and let it investigate and write. You don’t list what they connected: the session just uses whatever they’ve authorized.
Use what’s connected, nothing more
The router can also manage connections, asking the user to authorize any toolkits they haven’t connected yet. During a draft you don’t want that: if the agent reaches for a tool the member hasn’t connected, it should skip it, not prompt them to log in.manageConnections: false removes those meta-tools, so the agent drafts from exactly what’s already connected.
api/_utils/agent.ts — step 2: Keep the agent from connecting mid-draft
manageConnections:false removes the connection meta-tools, so the agent drafts from what the member already connected and never starts an OAuth flow while drafting.

The draft the agent writes, delivered to a teammate in Slack
The whole project
Run it
Editstandup.config.ts with your team (each member’s Slack email and timezone, plus your channel and GitHub org), set your four environment variables, run npx tsx scripts/setup.ts once to connect your bot, then vercel deploy.