Skill level: Intermediate
Time required: 10 minutes
This article demonstrates the use and functioning of HTTP in a journey.
Prerequisites
- Access to a cloud-based application (e.g., Zoho Forms) with APIs for data interaction.
- A form or endpoint in the target application that supports webhook integrations.
- A Quickwork account and and familiarity with the platform's GUI.
- Basic knowledge of API concepts such as webhooks, HTTP methods, and JSON payloads.
Why is it needed
The HTTP trigger is essential when your journey involves integration with a cloud-based application that does not have built-in triggers or actions in Quickwork. It allows you to:
- Bridge the gap: Use the HTTP connector to link your target app with Quickwork via APIs.
- Build custom triggers or actions: Extend Quickwork's capabilities by enabling triggers and actions for unsupported applications.
- Enhance workflow efficiency: Ensure seamless data interaction and automation, even when native integrations are unavailable.
How to use the HTTP trigger
The HTTP trigger event is the New Request on HTTP Link. This trigger generates a webhook URL that can capture and process custom events whenever an HTTP request ( GET, PUT, POST, or DELETE) is received.
To demonstrate how this trigger works, let us perform a simple activity. Imagine an application, such as Zoho Forms, whose trigger event API is not yet available. We will create a custom HTTP trigger that activates whenever a form is submitted in Zoho Forms.
Step-by-step guide
1. Configuring HTTP trigger
To set up an HTTP trigger for receiving the form data, follow these steps:
- Under the Event 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. For example, new form submitted.
- Once 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, such as the Contact Us form template.
- Click the Use this template button at the top-right corner of the window to open the Contact Us form dashboard. Then, navigate to the Integrations tab.
- Click the Webhooks tab on the left-hand side panel and click the Configure Webhook button.
-
In the Webhook Configuration window:
- Paste the copied webhook URL into the Webhook URL field.
- Specify the key-value parameters for the form elements (For example, name, email, etc.), as shown in the screenshot.
- Save the form and click the View Response Format button 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. Paste the response in the Request payload (Body) field. Leave the Request header example and Request params example field empty. The HTTP trigger is now fully configured.
13. Get the shareable link of the Contact Us form by clicking the Share tab beside Integrations in your Zoho Form account.
2. 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 Simple 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 John data pill from the Data Tree Output.
- Enter a name for this step in the Step Name field (For example, firstname). This helps in organizing and identifying the step easily.
- Similarly, configure two additional Logger actions for the John@example.com and Happy emailing data pills. Once completed, the Logger actions will be set up and ready for execution.
- Save the changes in a journey and click the Save & Start button.
3. 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 tab.
This custom HTTP trigger successfully fetched form responses from Zoho Forms and passed the data to actions, enabling the seamless execution of the journey. With the HTTP trigger, you can overcome the limitations of unavailable triggers or action APIs and efficiently automate your workflows.
Comments
0 comments
Please sign in to leave a comment.