×

Warning message

Questo contenuto è disponibile solo in inglese.

Map webhook headers

0

Download for free
Get it now

Map webhook headers

Description

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".

Connections

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.

Examples

These examples assume an HTTP request is coming in from a Webhook element with the following headers populated:

  • file_name
  • file_id
  • extra_header

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:

  • Header name 1 = file_name
  • Private data key 1 = wh_file_name
  • Header name 2 = file_id
  • Private data key 2 = wh_file_id

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.

Compatibility
Switch Version Required:2022 Spring or higher
Platform:Windows, Mac

App creator

Navistar Direct Marketing
Support
+14102912100
Online support

App creator

Navistar Direct Marketing
Support
+14102912100
Online support