Webhook export

Webhook is an HTTP call made by the IO service after digger finishes work. During this call, the collected data will be transferred to the URL provided by Webhook with the parameters specified when setting up the export config.

To configure the Webhook export, select the appropriate config in the list and click the - Add config button.

Let's look at the options for setting up a Webhook export.

Send data as: Dataset

  1. The name of the export config.
  2. The URL to the webhook endpoint.
  3. HTTP request method.
  4. Request content-type.
  5. Send data as (Dataset).
  6. Output data format (CSV).
  7. Show / hide the root element.
  8. Separator for columns (CSV format).
  9. The order of the fields.
  10. Add fields to the request header.
  11. Save config.
  12. Delete config.
  13. Additional information.
  14. Change indicator.

The name of the export config - you can use any export config name that is convenient for you (the field is required).

Webhook URL - link to the request receiving endpoint on your side (the field is required).

HTTP request method - HTTP methods POST, PUT, PATCH. More information about the methods you can find by clicking on this link.

Request content-type - list of available MIME types.

Send data as - defines if the data will be sent in the form of the gathered dataset, or you want to use a template to remap the data.

Output data format - exported dataset format. Currently available: CSV, JSON/NDJSON, HTML. Each format has its own set of parameters.

Show / hide the root element - every dataset has a root element. It's a name of the root object you set in your digger. Here you can enable or disable it. If you disable it, your root object will not be enclosed in the object name element.

Separator for columns - a set of standard separators for CSV format. You can select what character you want to use as fields separator.

The order of the fields - here you can set the order how dataset fields should be placed to the resulting dataset. If you leave this field blank, all the available fields will be listed in alphabetical order in the output dataset. You can read more about the order rules in this section.

Add fields to the request header - with this option, you can add additional parameters to the HTTP request header.

Send data as: Template

  1. Request method.
  2. Request content-type.
  3. Send data as (Template).
  4. Template editor.

Template editor - allows you to set up the structured document using any markup language (XML, HTML etc). You can read more about it in this section.

Webhook Testing

Now let's see how you can test data transfer to webhook using a third-party service Requestbin.com.

By clicking on the link you will be asked to create a request. You can disable the checkbox Private, if you do not want to register in this service. Now press the button Create a Request Bin.

In this section you need to copy the link on the top to the clipboard and paste it into your diggernaut IO webhook config form. Set additional webhook paremeters that you need and save the config. Next, attach the created config to the digger you need, run the digger and wait until it finishes working.

If everything is configured correctly, then at the end of work of the digger you will see the following (click on the POST line on the left):

Here you can see all the request headers, as well as the data itself sent by the IO service.

In the next section, we will learn how export the data to the Google Spreadsheet.