On Saturday August 31st 2024 from 7:30 CET until 7:45 CET our licensing will be briefly unavailable for maintenance. During this period, activation or deactivation licenses will not be possible. Using already active licenses is not affected.
Take the HTTP headers from webhook metadata and inject them into the job's private data.
When a job comes in from a webhook, its HTTP headers are stored by Switch as associated metadata. Map webhook headers allows you to automatically or manually map this header metadata to the job's private data fields. The metadata must be in XML format and the dataset name should be identified using the "Dataset name" property (defaulting to "Webhook"). When "Automatic mapping" is turned on, the HTTP header names are used as the private data keys. If "Automatic mapping prefix" is set, it will be prepended to each HTTP header name to derive the final private data key. If "Automatic mapping" is off, you can manually map headers to private data by matching "Header name X" with "Private data key X".
This app takes a single input connection and a single output connection. The input connection is intended to be routed from a Webhook element. The output connection is used to propagate the newly mapped jobs.
These examples assume an HTTP request is coming in from a Webhook element with the following headers populated:
If you use Map webhook headers with the "Automatic mapping" property set to Yes and leave the "Automatic mapping prefix" blank, the app will set 'file_name', 'file_id', and 'extra_header' in the job's private data to be the values of the given headers.
If you use "Automatic mapping" with an "Automatic mapping prefix" of 'WEBHOOK_', the app will instead set 'WEBHOOK_file_name', 'WEBHOOK_file_id', and 'WEBHOOK_extra_header' in the job's private data.
If you turn "Automatic mapping" to No and set the following properties:
the app will populate 'wh_file_name' and 'wh_file_id' with the corresponding header values, but will leave out the 'extra_header', as it was not manually mapped.