powered by

Post to Slack when a record is created

Updated Sep 30, 2026
In about ten minutes, connect Slack to your project and build a workflow that posts a message to a channel every time a new order is created.

You'll connect a Slack workspace to your project, then add an Integration step to a workflow that posts to #orders whenever an order is created. Along the way you'll see how a step chooses its connection and how to check the message was sent.

Before you start

You need:

  • A project with an orders entity that has customer_email (text) and total (decimal) fields. If you haven't created entities before, see Data modelling.
  • A Slack workspace where you can install apps, with an #orders channel.
  • Project administrator access. The Settings › Integrations page is for administrators, and connecting needs the anythink_integrations:create and anythink_integrations:update permissions.

1. Register a Slack app

  1. At api.slack.com/apps, select Create New App › From scratch, name it and choose your workspace.
  2. Under OAuth & Permissions, add the bot token scopes Anythink requests: chat:write, chat:write.public, channels:read, groups:read, users:read, users:read.email, im:write, reactions:write, files:write and channels:history.
  3. Keep the tab open. You'll add a redirect URL in the next step, then copy the Client ID and Client Secret from Basic Information.

Connect Slack to send messages from workflows explains the scopes and covers private channels and direct messages.

2. Connect Slack to your project

In the Anythink dashboard

  1. Go to Settings › Integrations and open the Integrations tab.
  2. On the Slack card, select Configure & Connect.
  3. Copy the callback URL from the dialog and add it under OAuth & Permissions › Redirect URLs in your Slack app.
  4. Paste the Slack app's Client ID and Client Secret, then select Save.
  5. The Anythink dashboard sends you to Slack. Approve the app for your workspace. The Slack card now shows Connected.

With the CLI

The CLI completes the OAuth flow through a listener on your machine, so add http://localhost:8745/callback to your Slack app's Redirect URLs first.

bash
anythink integrations oauth configure slack --client-id <CLIENT_ID> --client-secret <CLIENT_SECRET>
anythink integrations oauth connect slack --name "Team workspace"

oauth connect opens your browser at Slack. When you approve the app, it prints the new connection's ID.

With an AI assistant (MCP)

text
Connect Slack to this project with the anythink CLI. The OAuth client is already configured.

The assistant calls the cli tool with integrations oauth connect slack, which opens your browser for you to approve the app, and returns the connection ID. This needs the Anythink MCP server running locally in stdio mode, so the browser opens on your machine.

Run oauth configure yourself in a terminal rather than through the assistant, so the Slack client secret doesn't pass through your conversation.

3. Build the workflow

  1. Go to Workflows and select New Workflow. Name it Notify Slack on new order and select Create Workflow.
  2. Select Workflow Settings and add a trigger with type Event, event EntityCreated and entity orders. Save the settings.
  3. Select Add Step, open the Integrations tab and choose Slack.
  4. Set the key to notify_slack, then set:
    • Operation: Send Message
    • Credential Source: System (shared connection)
    • Channel: choose #orders from the list of your workspace's channels
    • Message: New order from {{ $anythink.trigger.data.customer_email }}: £{{ $anythink.trigger.data.total }}
  5. Connect the Start node to the step, select Save Workflow, then enable the workflow.

System (shared connection) uses the project connection you made in step 2. How integrations work explains the other credential sources.

4. Check it worked

  1. Create an order in the orders entity with customer_email sam@example.com and total 149.50.
  2. The message "New order from sam@example.com: £149.5" appears in #orders.
  3. In the workflow, select View Job History and open the job. The notify_slack step's output shows Slack's reply: ok, channel and ts.

If the step fails with "No credentials found for slack", the connection is missing or disabled — check Settings › Integrations. See Monitoring and testing for reading jobs and debugging failed steps.

Next steps

Post to Slack when a record is created | Anythink Docs