For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
SupportDashboard
Getting StartedAPI ReferenceRoadmapBlog
Getting StartedAPI ReferenceRoadmapBlog
  • Getting Started
    • Overview
    • What is Schematic?
    • Concepts
  • Using Schematic
    • Who Uses Schematic
  • Quickstart
    • Quickstart
    • Account Setup
    • Entitling a Feature
    • Tracking Usage
    • Components
    • Identifying Users
    • Setup the SDK
  • Using Feature Flags
    • Overview
    • Flags
    • Features
    • Tracking Feature Usage
    • Company Overrides
    • Feature Types
  • Building Your Catalog
    • Overview
    • Plans
    • Managing Company Plans
    • Configuring the Catalog
    • Add Ons
    • Trials
  • AI Tooling
    • For Developers
  • Setting Up Billing
    • Overview
    • Usage Based Billing Models
    • Seat Based Billing Models
    • Credit burndown
  • Using UI Components
    • Overview
  • Developer Resources
    • Concepts
    • Key Management
    • Environments
    • Entity Relationship Diagram
  • Production Readiness
    • Availability
    • Observability & Support
    • Security
  • Integrations
    • Segment Integration
    • Clerk Integration
    • WorkOS Integration
    • Salesforce Integration
    • Hubspot Integration
  • Playbooks
    • Overview
    • Creating a metered feature
    • Backfills and usage corrections
    • Rolling out beta functionality with Flags
    • Handling customer exceptions and feature trials
    • Automatically provision customers using Stripe
    • Build a slack webhook
LogoLogo
SupportDashboard
On this page
  • Create a Slack Automation
  • Create a Schematic endpoint
  • Configure the Slack Automation
  • Test your webhook
  • Next steps
Playbooks

Build a slack webhook

Was this page helpful?
Previous
Built with

Create a Slack Automation

  1. Navigate to Automations in Slack
  1. Click “New Workflow”
  2. Rename the workflow to “Schematic Webhook”
  3. Start the workflow “From a webhook” and click Continue in the modal (we’ll set up variables later)
  4. 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
  1. Once your webhook is configured, set up a new channel in Slack named “test-slack-alerts” (or anything you like!)
  2. In your workflow, select Messages > Send a message to a channel
  3. 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

You can also try deleting the company to trigger a company.delete.

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.