# Automation Flow - Triggering Flow by webhook actions

You have an external form that sends data to SprintHub via Webhook. Based on the received information, you want to set up a flow that sends different messages: one for leads who contacted you through the shortened URL in your website's WhatsApp button, and another for those who did not.

* To learn how to configure a shortened URL,[ **click here.**](https://docs.sprinthub.com/topicos/relacionar/encurtadores-de-url)

Follow the step-by-step below:<br>

1 - Go to Automation Flow<br>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdrhcrvhB-Lo0CxJxyqdCC9u7L9o4_Zpz4eftw2dE2u_LTIoHA_gK3VJlqGZcDLftYdAA7p-6EuPC_sCRWtf_1BhhT9z33Xl3d4MrQZvA-XIut2YzO5oqos5ZdGJjG_77yWbfpG9WbakdXjeSQKrhkHbt4?key=4Lg67sSv5hhubkRz-5AJQA" alt=""><figcaption></figcaption></figure>

2 - Click + New, add a&#x20;

* Name, enable “Allow leads to restart the flow?”,&#x20;
* Select YES in “Published” to publish the flow.&#x20;
* Click Open Builder.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfziDT-Y1tB-pEiam6jlkSNy92FBsbwAr3GJLaSubKrU3QHcVpzvuphSscxQFHzhUEfQ_3ocpfFh4LjgELU-6fmo7dqhvund4NO6d8mSsLVMBdQF-1vByCG8OPgR4ZvuX8d5o-lJVVRicI7Fk7MK6Kt1T8a?key=4Lg67sSv5hhubkRz-5AJQA" alt=""><figcaption></figcaption></figure>

3 - In the builder, add the blocks:

* Trigger: “Did the lead open a shortener?”. It is worth noting that the trigger will wait for the lead to open the shortener, that is, it is about waiting for a future action from the lead.
* On the trigger's positive output, add the condition: “Does the lead have a service request in SAC?” >> YES,&#x20;
* Action: Add a specific Tag, and send a WhatsApp message.
* On the trigger's negative output, add the actions: modify the lead's tags to add a specific tag, and send another WhatsApp message.\
  Click Apply, then Save and Close

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfHwSis3nXvJzdSFCh17rp9xaZrPQjXUdFPoz6mrciihPAuhOqIQazmLVcTWGNFsHZK-MPPr2-wONK_ERACL1--UQGbeePjFtAM2K4pNkWT0pBO6NWbyK5iBOzFr3ao5V-hDjdiM0Kder00pG8Og0wJ0Ful?key=4Lg67sSv5hhubkRz-5AJQA" alt=""><figcaption></figcaption></figure>

Finally, we will activate this flow through webhook actions.

1 - To do this, go to Integrated Webhooks

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdaBvP17dgkA8MJZQQ79EePKJhHl-9Y_ls5GPBfpHqGsJxq3lzQraEV4su3nh9LG196PcgA3Q5SaugHUt9ZCMTSHUy0jlZOqZZ4b5z3Qdu7gcPWHbzFbkQeFls928ybW_UfHxrYMH4_WJBL4flJn30rp_Y?key=4Lg67sSv5hhubkRz-5AJQA" alt=""><figcaption></figcaption></figure>

2 - Choose the Webhook, click Edit, and on the Extra Actions tab, click + New Action, and search for Change Automation Flows.

Choose the Flow created earlier, click Save and Close.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfaCfCf68x42WlmoanNsNzWZjU2GDTz9nMOTT8AUD33LgFhKq9w_PKJkWN7QcdP4t2S8NJdW7EnI1GC0SPrWPkjzqbhFrjBz2v7TCjv8Lpzpyp73nmoRLasTPlaosD9o5Q0Eeq8ZKffNYkpQcNR6IXPJck?key=4Lg67sSv5hhubkRz-5AJQA" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
To learn more about Webhook, [**click here.**](https://docs.sprinthub.com/topicos/analisar/webhooks-integrados/webhooks-integrados-duvidas-comuns)
{% endhint %}
