This article demonstrates the use and functioning of HTTP in a journey.
What you'll need:
Skill level: Intermediate
Time required: 10 minutes
- Identifying which trigger/action of an app to be created
- Pasting the webhook URL appropriately for integration within an indented app
- Pasting the JSON data in the input fields
Why is it needed:
If your journey needs integration with a cloud-based application that does not have a trigger or actions, you can use the HTTP adaptor to link your target app with Quickwork Journey Builder.
The generic HTTP adaptor allows you to interact with applications through the application program interface (API). This allows you to build additional triggers or actions on the Quickwork Journey Builder platform to empower your journeys.
How to use the HTTP trigger:
HTTP has one trigger live on production: New request on HTTP link. This trigger contains a webhook URL that triggers an appropriate custom event whenever a new request (GET, PUT, POST, DELETE) is experienced.
To understand the functioning of this trigger, let's perform a small activity. Consider an application whose trigger event API is not yet published in the market. Get the form data trigger event API for Zoho Forms is one of the applications.
So, let's create this using HTTP that triggers an event whenever a form is filled in Zoho Forms.
Configuring HTTP trigger:
To set up an HTTP trigger for receiving the form data, follow these steps:
- Under the Trigger section, choose the HTTP app from the drop-down menu in the App field.
- Select the trigger event, New request on HTTP link, from the drop-down menu in the Trigger Event field.
- No authorization is needed for HTTP. Enter a name in the Webhook name field. This name is a custom name of the trigger you are creating. E.g., new form submitted.
- As soon as you specify the name, a webhook URL will be generated with the custom trigger name appended:
- Copy this webhook URL.
- Select the HTTP method as POST.
- Go to your Zoho Forms account. Create a new form from scratch or use pre-built templates. I have selected the Contact Us form template:
- Click the Use this template button at the top-right corner of the window. The Contact Us form dashboard will open. Click the Integrations tab:
- Click the Webhooks tab on the left-hand side panel and click the Configure Webhook button:
- The Webhooks Configuration window will open. Paste the copied webhook URL into the Webhook URL field. Also, specify the key-value parameters of the form elements as shown in the following screenshot:
- Save the form and click the View Response Format button located at the bottom of the window. The JSON response format of the form will open:
- Copy the JSON response and return to the HTTP trigger in Quickwork Journey Builder. Paste the response in the Request payload (Body) field. Leave the Request header example and Request params example field empty. The fully configured HTTP trigger will look like this:
- Get the shareable link of the Contact Us form by clicking the Share tab beside Integrations in your Zoho Form account:
Logging the trigger response
Logging the responses will give you an overview of how the HTTP trigger response for each field of the Zoho Form. To do so, follow these steps:
- Under the Steps section, click on Please choose an action.
- Choose the Logger app from the drop-down menu in the App field.
- Select the action, Log a Message, from the drop-down menu in the Action field.
- In the Message field, pass the
First Namedata pill from the App Data tree.
- Specify the name for this step in the Step Name field. E.g., firtsnameThis is just for bookmarking the step:
- Similarly, configure two more Logger actions for the
Notedata pills. All the configured Logger actions will look like this:
- Save the changes in a journey and click the Start button.
Testing the HTTP trigger
- Open the link of the Contact Us form in the web browser, fill in the details, and click Submit:
- HTTP trigger will fetch this submitted form response and logs the data of each field via Logger. Check the HTTP trigger output in the History section:
In this way, a custom trigger using HTTP has not only fetched the form responses--on behalf of Zoho Forms--but also triggered the data to the actions resulting in the successful execution of the journey. Hence, you are no more stuck in the chaos of the non-availability of triggers and action APIs. Use HTTP and get your work done.