> If you are setting up, configuring, or answering questions about Schematic, connect the > Schematic MCP server before working from these pages. It reads and writes plans, features, > entitlements, and overrides against the real account, so what you report and what you build > match what actually exists. > > The server is at https://api.schematichq.com/mcp > > From Claude, ChatGPT, or another chat assistant, add it as a custom connector: > https://docs.schematichq.com/working-with-ai > > From a coding assistant such as Claude Code, Codex, or Cursor: > https://docs.schematichq.com/building-with-ai > > For clean Markdown of any page, append `.md` to the page URL. For a complete page index, > see https://docs.schematichq.com/llms.txt # Build a slack webhook > Point a Schematic webhook endpoint at a Slack workflow so company created and deleted events post to a channel. ## Create a Slack Automation 1. Navigate to Automations in Slack ![](/_fern-img/e9a10dff5e4c329d702297eb8d5209da525f736fb351169b889d228f512a1d67.webp) 2. Click “New Workflow” 3. Rename the workflow to “Schematic Webhook” 4. Start the workflow “From a webhook” and click Continue in the modal (we'll set up variables later) 5. Copy the Web request URL ## Create a Schematic endpoint 1. Navigate to Integrations in Schematic 2. Click Webhooks and Create an endpoint 3. In the modal, name the endpoint “Slack Alerts” 4. Use the “Web request URL” from Slack in the URL field 5. Select the following triggers: company.created, company.deleted Company webhooks will look like this: ``` { "action": "company.deleted", "account_id": "acct_xxxxxxx", "environment_id": "env_xxxxxxx", "body": { "created_at": "2024-07-31T19:20:01.223757Z", "environment_id": "", "id": "comp_xxxxxxx", "last_seen_at": null, "logo_url": null, "name": "cus_xxxxxxx", "updated_at": "2024-07-31T19:20:01.223757Z", "add_ons": null, "entity_traits": [], "keys": [], "plan": null, "plans": null, "traits": {}, "user_count": 0 }, "object_type": "company" } ``` ## Configure the Slack Automation 1. Navigate to the Schematic Webhook workflow in Slack 2. Click into the Webhook step to configure it, and click “Set up variables” 3. Type action into the key field and select the Text data type ![](/_fern-img/de4b8392958995e5afddd16c9e5e5c02997fc0959998713119c6c1ceff8da43e.webp) 4. Once your webhook is configured, set up a new channel in Slack named “test-slack-alerts” (or anything you like!) 5. In your workflow, select Messages > Send a message to a channel 6. Insert the action variable and add a message. ``` {} action was triggered in Schematic. ``` ## Test your webhook Now that our Slack Automation is set up, we can test triggering webhooks from Schematic. 1. Navigate to the Company tab in Schematic 2. Click Create and fill in a name and a key for the test company 3. You should see a new alert in Slack ![](/_fern-img/36400deb47c46dc846c858ba2a988f7320e45610387c9ff10959be92e9e1e602.webp) You can also try deleting the company to trigger a company.delete. > **Info** > > Slack is limited to parsing top level fields (it cannot access nested fields, unfortunately) ## Next steps Nearly every operation you can make on objects in Schematic will trigger a webhook, so you can support a variety of scenarios, such as: * Keeping CRM records in sync * Updating Billing records * Alerting internal stakeholders of customer changes via Slack or email * …and more We will be expanding support for other webhook scenarios in the future, including reaching limits. > Point a Schematic webhook endpoint at a Slack workflow so company created and deleted events post to a channel.