Skip to main content
Skip table of contents

How-to generate a Webhook URL

States support the integration with Webhooks, in order to get notified if a State Machine/Activity succeeds or fails, or whether a worker is connected or not.

To manage these notifications, States need a webhook URL.

  • This webhook URL is generated by a provider, where you will set a workflow.

  • This workflow defines what happens when States send a message.

Indeed, given a selected event (listed in the previous page), States will send a message to a “webhook URL”.

Then, the actions will depend on the workflow you have set

This how-to aims to easily explain how to generate a webhook URL and create an easy workflow with http://pipedream.com. Of course, there are thousands of providers that you may want to use it.

Step 1: Create an account on Pipedream

Go to http://www.pipedream.com, and create an account.

You will request to validate your email during the process.

Please consider using your professional email address.

Step 2: Log-in on Pipedream and create a Workflow

Log in to Pipedream and go to Workflows. Click on the “Create” button, top left.

Step 3: Do the set-up of the trigger

The following page will be displayed:

You will need to:

  1. Define the title of the workflow (try with something easy and that explains the goal of the webhook)

  2. Choose “HTTP/Webhook” as a trigger

  3. Choose “New Request”

  4. Give a name to the source and click on the “Create source” button.

  5. Pipedream will provide you a link: copy it

  6. Go to States and create a webhook (see how to do it in the previous page). Use the URL provided by Pipedream as a Webhook URL.

  7. In States, trigger the event that should interface the webhook (e.g., launch the executions of a state machine)

  8. In Pipedream, the page will be updated. Click on the “Send test event” button.

  9. Activate the trigger

Step 4: Do the set-up of the next action

Here comes the funniest part, you will need to decide: what happens when the webhook URL receives the trigger?

Would you like to send a message on Teams, WhatsApp, or Telegram? Would you like an email to be sent to your address? Would you like your Philips HUE to be turned on?

There are thousands of actions that are ready to get configured.

For this how-to, we will explain how to receive a message at your address.

  1. Select “Send Yourself” an Email

  2. Fill in the subject and the text. Tip: Pipedream allows you to re-use the input received from States (check in “Event” > “Body”).

  3. You can define to send the email also to your collaborators by clicking “include_collaborators” (collaborators need to have an account on Pipedream too!)

  4. Click on the “Deploy” button to make it work.

  5. Test it! You should be

    1. receiving an email

    2. check on Pipedream that a notification has been sent out

  6. To add collaborators, click on the “Share” button top-right and add collaborators (they also need a Pipedream account!).

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.