Trigger a Slack workflow with a webhook from axiom.ai


How to trigger a Slack workflow with a webhook from axiom.ai: install the Chrome extension, click Build with Browser agent, tell the agent what you want, and follow its prompts. A working bot is built and tested in minutes.

Here is how the automation works. To trigger a Slack workflow from an automation, start the workflow in Slack Workflow Builder with the From a webhook event, then add a Trigger webhook step to your automation with the workflow's web request URL as Endpoint. Data from the run goes in the Payload, and the workflow uses it as variables, for example in a message to a channel.

Author
Alex Barlow
Published

Build the Slack workflow trigger from a description


Describe it and click the button: the agent builds and tests the automation in your Chrome extension. It asks for the workflow's web request URL, which comes from a workflow you make in Slack Workflow Builder.

  1. Get today's date
  2. Create a new Google Sheet named with it
  3. Send the date and sheet link to my Slack
Click to launch the Chrome extension. Not installed? You can create an account and try it free.Opens the Chrome extension. Free account to try.

You need a Slack account with Workflow Builder and a published workflow that starts From a webhook, with two text variables, date and url, that posts them to a channel; making it is in the questions below.

Build the Slack workflow trigger step by step


The steps the agent builds, as the Builder shows them: each step by its name, with the fields to set under it. Add them yourself in this order in the step-by-step builder, or open the agent's result there to adjust it.

  • 1.0 Date and time
    • Select format: the date format you want in the sheet name
  • 2.0 Create a new Google Sheet
    • Sheet name: [date-and-time]
  • 3.0 Trigger webhook
    • Endpoint: the workflow's Web request URL
    • Payload: [date-and-time] as date and [new-google-sheet-url] as url, in the format the workflow shows

Common questions about triggering a Slack workflow


How do I create the Slack workflow that starts from a webhook?

In Slack Workflow Builder, with the From a webhook event:

  1. In the Slack app, open Workflow Builder and click + New workflow.
  2. Click Choose an event and select From a webhook.
  3. Click Set up variables and add two text variables, date and url. The variables are what let the workflow receive data.
  4. Add a Send a message to a channel step from the Messages section, and pick the channel in Select a channel.
  5. Write the message, using Insert a variable to add date.
  6. Click + Add button, add a Button label, set Behaviour to Open Link and use the button to insert url, so the team opens the sheet with a click.
  7. Click Finish up, follow Slack's steps, and click Publish.
  8. Open the workflow again, click the Starts with a webhook trigger and copy the Web request URL. The same screen shows the payload format the Trigger webhook step follows.

Setting up a Slack workflow that starts from a webhook

Why does the Slack workflow not run?

Check the workflow is published and Endpoint holds its Web request URL, then read the error the run reports. When a run fails, hand it to the agent and it repairs the step.

How do I send automation run notifications to Slack?

Point the automation's webhook notifications at a Slack workflow. Create the workflow as in the first question, with two text variables, status and log, then in the automation:

  1. Open Settings and the Set up notifications section.
  2. Toggle the runs you want to hear about: when a run fails, finishes with warnings, or succeeds.
  3. Turn on Notify by webhook and paste the workflow's Web request URL.

See run notifications for every option.

How do I add more detail to the failure log sent to Slack?

Add an Add error metadata step before the step that may fail. Its metadata appears in the log sent when the automation fails. For more on debugging, see how to debug.

Can I send scraped data to a Slack workflow?

Yes. Add Trigger webhook after the scraping step and insert the scraped data into Payload, in the format the workflow shows. Use it for custom data even when run notifications are on; the two work together. Slack limits how often its API can be called: see Slack's rate limits.

Can I post the Google Sheet to Slack every day on a schedule?

Yes. Open Settings, then Schedule, and set the time, if your plan includes scheduling. Each run creates that day's sheet and posts its link.

Can I trigger a Slack workflow from axiom.ai without code?

Yes. The workflow's webhook takes a plain POST, and the Trigger webhook step sends it with the run's data in Payload; there is no script and no Slack app to build.

Where do I get help?

Get in touch with support, or ask in the axiom.ai community.

Related guides