What are Webhooks?

Webhooks are HTTP requests for transferring data over the Web. Simply put, they are a way for apps to communicate or send data between them automatically. 

For example, PayPal uses webhooks to notify your accounting app, such as QuickBooks, when your customers pay you. Similarly, Shopify uses webhooks to keep transaction details of your e-commerce store up-to-date preventing you from updating each new transaction manually.

When do I need to use Webhooks on Automate.io?

Webhooks can come in handy whenever you need to use an app or a trigger or an action that isn’t supported by Automate.io. 

Where can I find Webhooks on Automate.io?

On your Bot creation page, go to Select Trigger App, and search for Webhooks. 

What Triggers and Actions Do Webhooks Support?

On Automate.io, Webhooks support the following Triggers and Actions.

Triggers

Incoming Hook

This is triggered when a GET, PUT or POST data is sent to an Automate.io URL.

How to use this?

Click Setup Webhook.

The following window opens. 

Copy the URL and use it to create a webhook in your application. 

For example, let’s create a webhook in JotForm. Go to the form from which you want to send data. Then, go to Integrations -> Settings -> Webhooks

Paste the URL here and click COMPLETE INTEGRATION.

When the integration is ready, click FINISH. Now, come back to Automate.io’s Setup Webhook window and click I’m done. You will be asked to send in some sample data from JotForm.

After sending the sample data, your fields from JotForm will appear here. If everything looks good, click Looks Good. But if you find that some important fields are missing, click Refetch Data. This allows you to try sending the sample data once again. 

The fields will now show up in your Trigger’s Output Fields.

You can map them accordingly further in your Bot.

Actions

POST data

This makes a POST request to a URL.

GET data

This makes a GET request to a URL with query data.

PUT data

This makes a PUT request to a URL.

How to send data as XML?

Here is an example to send data to a URL as XML.

How to send data as JSON?

While sending data as JSON, keys must be strings, written with double-quotes. The entire object should be covered by curly { } brackets. In case you wish to post an array of objects, you will need to wrap them with Square Brackets [].

How to Send URL Encoded data?

Here is the example of sending data in URL-encoded form. Each  (key, value) pair is separated from one another by an & (ampersand) sign, and for each (key, value) pair, the key is separated from the value by an ‘=’ (equals) sign, as shown below.

key1=value1&key2=value2

Using Auth and other headers

When using Basic Auth, provide the valid username and password, separated by a colon.

You can also add any additional HTTP headers as shown in the image below.

Limitations

Currently, if you are sending an array of JSON data, only the first and last key-value pairs will be fetched as output. 

Did this answer your question?