Send http calls based on Webhooks

Before we build a simple workflow and explain how you can send http calls based on Webhooks, let’s first make clear the concept of a webhook. The need for fast and real-time communication with third-party applications is ever-present. A webhook is an efficient way to share real-time information with third-party applications. A webhook helps you deliver data to other applications in real time, saving you both time and resources. To understand how you can send https calls based on webhooks, let’s first build a simple workflow. Let’s consider the scenario where a lead submits a form and you want to automatically adjust its points and send a follow-up email. Also, you want to deliver leads data to a third-party application you may have, totally independent of the CRM. Say you have a mobile app. First, navigate to Workflows and on the drop-down menu click Manage Workflows.

You should see the following screen:

Go to the upper-right corner of the page and click New.

Since we want to build a workflow upon a lead submitting a form, select Lead as your workflow entity type.

Give it a name and a description, choose a category (optional) and then click Launch Workflow Builder.

Choose Listener as your workflow source.

The listener does exactly what is says: it ‘listens’ for specific events within the CRM. You want the workflow to execute actions upon a lead submitting a form. Go to Watch For events and choose Form submission.

Give it a name, choose Lead Form and then click Add.

Connect it with the Listener.

You want to add 10 points any time a lead submits a form, but you also want to send a follow-up email after 3 hours upon the lead submitting a form. Go to Actions and choose Adjust lead points.

Give it a name, choose When Triggered, set 10 points and then click Add.

Make sure to connect it with the Form submission event.

Next, go to Actions and choose Send email.

Give it a name, go to Set Action Timing and choose Wait. On the left, choose 3 and on the right choose hour(s). Next, choose the email you want to be sent, the email field and then click Add.

Connect it with the Form submission event.

The workflow we’ve built thus fur will do the following: once a lead submits a form, the workflow will automatically add 10 points to it, and it will also send an automatic follow-up email three hours after the lead has submitted the form.

You want to send http calls based on Webhooks. To do this, first go to Actions and Choose Add Webhook.

You will be greeted with the following form:

Let’s say you have a third-party mobile app and you want to send real-time data from the CRM. For example, you want to send the lead’s first name, last name and phone number to your mobile app. Remember, a webhook delivers real-time information with third-party, independent applications. Give it a name, choose When Triggered and then fill in your mobile’s app URL, its domain.

Next, go to Header parameters. Here you can provide a key and a value for that key. Next, go to Request Method and choose POST. Remember, the POST request method delivers data. The other request methods: GET, PUT and DELETE receive, modify and delete data respectively. You can choose either From data or JSON as your request type. Go to parameters and fill in the fields with information you went to send to your third-party application. In our case, we want to add the following lead’s field values: first name, last name and phone number. Once you add them, click the Add button.

Make sure to connect it with the Form submission event.

In addition to the actions described above, the workflow will use the webhook in order to send data to your mobile app. One of the most amazing things about webhooks is that everything will be archived. What does this mean? If you sent some data from the CRM, and for some reason it is not delivered to your third-party app( due to an error, for example), you will get a short and accurate report on why the data wasn’t delivered. With Flexie CRM, nothing will ever fall between the cracks. Notice that you can use webhooks to communicate with any third-party application that you may have.

To stay updated with the latest features, news and how-to articles and videos, please join our group on Facebook, Flexie CRM Academy.