cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
805
Views
1
Helpful
3
Replies

Workflow triggered by an alert (webhook)

Marcio Ciano
Level 1
Level 1

Hi @Ed Novak - Cisco Workflows TME ,

I´m watching the Micheal Keohane video series and in the last seconds in this video (https://www.youtube.com/watch?v=ILypflNf3KY&list=PL2tjR1lhWkskZOA6ZgshnNC0-UY460YXJ&index=8) he mentioned the next video would be using a webhook alert to trigger a workflow in Meraki Dashboard. Would you have a JSON with similar example to share, I will have a real case that it would be helpful? Thank you in advance.

3 Replies 3

Hello Marcio, thank you for your question.  Here's an example workflow that can be triggered by a webhook. Notice that it has a single input variable, a string of type JSON.  The first activity in a workflow triggered by a webhook should be to evaluate the body data received and then extract the variables from the JSON.  Please note that for this example, I am not validating the body data received, I am just extracting the variables.
Once you have your workflow created, you create the webhook under the Automation -> Rules -> Webhooks.  You only need to provide a name and description.  Workflows will then generate the Webhook API Key and the Webhook URL for you.  Then under Automation -> Rules -> Automation Rules, you create a new rule of type Webhook Rule.  Select your webhook, then any conditions you would like to apply, and finally select your workflow and then map the Webhook Body to your workflow input variable.

EdNovakCiscoWorkflowsTME_0-1756747274589.pngEdNovakCiscoWorkflowsTME_2-1756747313744.png

You can use a curl command like this to test:

curl -X POST "<Workflows_Webhook_URL>" \

  -H "Content-Type: application/json" \

  -d '{

    "key1": "This is a string",

    "key2": "5",

    "key3": "true"

  }'

To import this example, you will need to change the file extension from .txt to .json

 

 

 

Marcio Ciano
Level 1
Level 1

Thank you for the prompt answer Ed!

I will test and let you know.

mkeohane@cisco.com
Cisco Employee
Cisco Employee

Marcio, thank you very much for the bump reminder on posting that next video in the WebHook Series. I will get this posted ASAP.