
Public
Like
attio-slack-summaries
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v326View latest version
This val summarizes recent Attio events on Slack.
It receives webhooks from Attio, stores them in a SQLite database, and periodically sends AI-generated summaries of recent activity to Slack. The system uses OpenAI to transform raw webhook data into human-readable summaries, helping teams stay informed about CRM activity without being overwhelmed by individual notifications.
- Remix this val
- Get a Slack webhook
& set it as
SLACK_WEBHOOK_URL
in this val's Environment variables in the left sidebar - Get an Attio Access Token
(with all read & write permissions) & set it as
ATTIO_API_KEY
in this val's Environment variables in the left sidebar - Go to
setup.ts
and click run to set up the events database and Attio webhook - Go trigger some Attio events and see the message in Slack!
attio/hydrate.ts
- Converts raw webhook events into human-readable descriptionsattio/webhook.ts
- Attio webhook management and secret handlingattio/webhook-payload-types.ts
- Complete TypeScript types for all Attio webhook eventsalert.ts
- Cron job that processes recent events and sends Slack summariesauth.ts
- Webhook signature verification middlewareopenai.ts
- AI-powered event summarization using OpenAIscratch.ts
- Development scratchpad for testing functionssetup.ts
- One-time setup script to initialize database and Attio webhookslack.ts
- Utility to send messages to Slack via webhooksqlite.ts
- Database operations for storing and retrieving Attio eventswebhook.ts
- HTTP endpoint that receives webhooks from Attio
Attio webhooks return thin events, such as:
undefined