{"id":18141378,"url":"https://github.com/ferrata/schematic-slack-bot-demo","last_synced_at":"2026-02-14T12:02:45.262Z","repository":{"id":258683031,"uuid":"873847821","full_name":"ferrata/schematic-slack-bot-demo","owner":"ferrata","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-01T01:36:04.000Z","size":373,"stargazers_count":2,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T06:11:37.816Z","etag":null,"topics":["boltjs","slack","slack-api","slack-bot","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ferrata.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-16T20:27:39.000Z","updated_at":"2024-11-01T13:53:29.000Z","dependencies_parsed_at":"2024-10-20T17:55:51.932Z","dependency_job_id":null,"html_url":"https://github.com/ferrata/schematic-slack-bot-demo","commit_stats":null,"previous_names":["ferrata/schematic-bot-demo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ferrata%2Fschematic-slack-bot-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ferrata%2Fschematic-slack-bot-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ferrata%2Fschematic-slack-bot-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ferrata%2Fschematic-slack-bot-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ferrata","download_url":"https://codeload.github.com/ferrata/schematic-slack-bot-demo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246201152,"owners_count":20739707,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["boltjs","slack","slack-api","slack-bot","typescript"],"created_at":"2024-11-01T17:06:37.514Z","updated_at":"2026-02-14T12:02:45.257Z","avatar_url":"https://github.com/ferrata.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1\u003e\u003cimg valign=\"middle\" src=\"./assets/demo.png\" width=\"50\" alt=\"Slack Bot\" /\u003e Schematic Slack Bot Demo\u003c/h1\u003e\n\nThis is a demo Slack bot that integrates with the [Schematic API](https://schematichq.com) to show notifications in Slack.\n\n\u003e [!NOTE]\n\u003e This demo was created from the [Bolt for JavaScript (TypeScript) Template App](https://github.com/slack-samples/bolt-ts-starter-template) and uses the [Bolt for JavaScript](https://slack.dev/bolt-js) framework to create a Slack app.\n\n\u003e [!CAUTION]\n\u003e This is a demo application and should not be used in production. It is intended to show how to integrate the Schematic API with Slack.\n\n## Installation\n\n### Create a new Slack app\n\n1. Open [https://api.slack.com/apps/new](https://api.slack.com/apps/new) and choose \"From an app manifest\"\n2. Choose the workspace you want to install the application to\n3. Copy the contents of [manifest.json](./manifest.json) into the text box that says `*Paste your manifest code here*` (within the JSON tab) and click _Next_\n4. Review the configuration and click _Create_\n5. Click _Install to Workspace_ and _Allow_ on the screen that follows. You'll then be redirected to the App Configuration dashboard.\n\n### Environment variables\n\nBefore you can run the app, you'll need to store some environment variables.\n\n1. Copy `env.sample` to `.env`\n2. Open your apps configuration page from [this list](https://api.slack.com/apps), click _OAuth \u0026 Permissions_ in the left hand menu, then copy the _Bot User OAuth Token_ into your `.env` file under `SLACK_BOT_TOKEN`\n3. Click _Basic Information_ from the left hand menu and follow the steps in the _App-Level Tokens_ section to create an app-level token with the `connections:write` scope. Copy that token into your `.env` as `SLACK_APP_TOKEN`.\n\n### Install dependencies\n\n`npm install`\n\n### Run the app\n\n`npm start`\n\n## Setting Up the Schematic API Webhook\n\n### Temporarily expose your local server\n\nTo receive webhooks from the Schematic API, you'll need to expose your local server to the internet, for example, using [`ngrok`](https://ngrok.com/):\n\n```\nngrok http 3000\n```\n\n### Create a new webhook\n\n1. Open the [Schematic dashboard](https://app.schematichq.com/)\n1. Navigate to _More_ \u003e _Integrations_ \u003e _Webhooks_\n1. Click _Create Webhook_\n1. Enter a name for the webhook, e.g. \"Slack Bot\"\n1. Enter the URL provided by `ngrok` in the _URL_ field:\n   - `https://\u003cyour-ngrok-subdomain\u003e.ngrok.io/schematic-webhook`\n1. For the _Events_ field, select the following events:\n   - `plan.entitlement.created`\n   - `plan.entitlement.updated`\n   - `plan.entitlement.deleted`\n1. Click _Save_\n\n### Invite the bot to a channel\n\n1. Open the Slack app and navigate to the channel you want to add the bot to\n1. Type `/` in the channel and select \"Add apps to this channel\"\n1. Search for the app \"Schematic Bot Demo\" you created and click _Add_\n\n## Test the bot\n\n### Subscribe to an event\n\nIn the channel you added the bot to, type `/schematic subscribe \u003cevent\u003e` where `\u003cevent\u003e` is one of the following:\n\n- `plan.entitlement.created`\n- `plan.entitlement.updated`\n- `plan.entitlement.deleted`\n\nFor example, type the following to subscribe to the `plan.entitlement.updated` event:\n\n```\n/schematic subscribe plan.entitlement.updated\n```\n\nYou should see a message from the bot confirming the subscription.\n\n### Make a change in Schematic\n\n1. To to the Schematic Plans dashboard\n2. Create, update, or delete a plan entitlement\n\n### Check the Slack channel\n\nYou should see a message from the bot with details about the event that occurred.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fferrata%2Fschematic-slack-bot-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fferrata%2Fschematic-slack-bot-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fferrata%2Fschematic-slack-bot-demo/lists"}