This val sends customizable notifications about events on your Attio lists to Slack.
It receives Attio webhooks, enrichs the data via the Attio API, stores that data in a SQLite database, and periodically sends notifications about recent activity to Slack.
This val is a remix of @stevekrouse's attio-slack-summaries val. That val sent many more events through and did not handle comments, which this val now does. In addition, the scope of notifications that you'll receive is much more limited. See DETAILS.md for more information.
- 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 - Configure your lists in
webhook.ts
:- Update the
listIds
array with your Attio list IDs - To find your list's id, navigate to the list and copy the path segment
after
collection
:https://app.attio.com/<workspaceName>/collection/<listId>
- Update the
- Run
setup.ts
to set up the database and Attio webhook - Run
bootstrap.ts
to initialize the database with the current state of your configured lists. - Go trigger some Attio events and see the message in Slack! (If you want them faster, you can run
alert.ts
manually.)
To track additional Attio lists, add their IDs to the listIds
array in webhook.ts
. After adding new lists, run bootstrap.ts
to initialize them in the database
Note that removing a list id from listIds
will not remove existing data from the database, but it will prevent it from being stored in the future.
See CUSTOMIZATION.md for more information on how to customize the formatting of the messages sent to Slack.
attio-slack-summaries/
├── webhook.ts # Main HTTP endpoint - receives Attio webhooks
├── alert.ts # Cron job - processes events & sends Slack messages
├── types.ts # Core type definitions
├── formatters.ts # Attribute value formatters (user-customizable)
├── slack.ts # Slack integration (user-customizable)
├── core/ # Internal system logic
│ ├── alert-processor.ts # Event processing & message creation
│ ├── api-client.ts # Attio API client
│ ├── auth.ts # Webhook authentication & setup
│ ├── database.ts # SQLite operations
│ └── webhook-handler.ts # Event routing & state management
└── scripts/ # Setup & maintenance scripts
├── setup.ts # Creates database & Attio webhook
└── bootstrap.ts # Seeds initial state data
Template Files (designed for user customization):
formatters.ts
- How attribute values displayslack.ts
- Message appearance & templateswebhook.ts
- List configuration
Core Files (internal system logic):
core/
directory - Processing, API, database operationstypes.ts
- Type definitions for the entire system
Setup Files:
scripts/
directory - One-time setup and maintenance
Documentation:
- CUSTOMIZATION.md - Customization options
- DETAILS.md - Details on how the system works
The system uses Attio webhooks to receive real-time notifications about changes to your lists. Each webhook event triggers:
- Event Reception
webhook.ts
- Validates and filters incoming events - State Storage
webhook-handler.ts
- Stores current state in SQLite - Change Detection
alert-processor.ts
- Compares states to detect changes - Message Generation
formatters.ts
- Formats changes into human readable strings - Slack Delivery
slack.ts
- Sends formatted messages to Slack
See DETAILS.md for more information on how the system works, including what types of notifications you will receive.