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 simplification branch: v463View latest version
This val summarizes recent events on Attio lists on Slack.
This project receives Attio webhooks, verifies and processes them, and stores events, messages, and list entry state data in SQLite. A scheduled cron job uses then periodically sends summaries with these stored messages to Slack.
- Remix this val
- Get a Slack webhook
& set it as
SLACK_WEBHOOK_URLin this val's Environment variables in the left sidebar - Get an Attio Access Token
(with all read & write permissions) & set it as
ATTIO_API_KEYin this val's Environment variables in the left sidebar - Configure your lists in
webhook.ts:- Update the
listIdsarray 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.tsto set up the database and Attio webhook - Run
bootstrap.tsto 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.tsmanually.)
There three core areas you can customize:
- Lists: to add a new list, add the list ID to the
listIdsarray inwebhook.ts. Then Runbootstrap.ts. Note that removing a list from thelistIdsarray will not remove it from the database, but you will not longer receive notifications for it. - To customize the formatting of the messages, you can modify the
customExtractorsobject inwebhook.ts.