Menu
Preview Webhook Request
Preview Webhook Request
POST
/hubs/{hubId}/webhooks/{webhookId}/requests/{requestId}/previewUse it in a workflow
- Add a step and choose the Amplience connector.
- Pick the Preview Webhook Request action (under Webhooks).
- Fill in the fields below, then reference the result from later steps as
{{previewWebhookRequest.response.data}}.
Request
Path parameters
Request body
Enter the body as JSON in the step's Body field.
{
"url": "http://example.com/webhook",
"method": "POST",
"secret": "my-subscription-secret",
"filters": [
{
"type": "equal",
"arguments": [
{
"jsonPath": "$.payload.id"
},
{
"value": "abc"
}
]
},
{
"type": "in",
"arguments": [
{
"jsonPath": "$.payload.id"
},
{
"value": [
"abc",
"def"
]
}
]
},
{
"type": "equal",
"arguments": [
{
"jsonPath": "$.payload.not_present"
},
{
"value": "123"
}
]
}
],
"headers": [
{
"key": "X-Additional-Header",
"value": "abc123",
"secret": true
}
],
"customPayload": {
"type": "text/x-handlebars-template",
"value": "{{#withDeliveryContentItem contentItemId=payload.rootContentItem.id account=\"account-name\" stagingEnvironment=\"staging-environment-url\"}} ... {/withDeliveryContentItem}}",
"error": {
"message": "string"
}
}
}
Response
Returns 200 with an object. Read it in later steps with {{previewWebhookRequest.response.data.<field>}}.
{
"previewState": "SUCCESS",
"evaluatedFilters": {
"filters": [
{
"type": "equal",
"arguments": [
{
"jsonPath": "$.payload.id"
},
{
"value": "abc"
}
]
},
{
"type": "in",
"arguments": [
{
"jsonPath": "$.payload.id"
},
{
"value": [
"abc",
"def"
]
}
]
},
{
"type": "equal",
"arguments": [
{
"jsonPath": "$.payload.not_present"
},
{
"value": "123"
}
]
}
],
"results": [
{
"status": "UNMATCHED"
},
{
"status": "MATCHED",
"index": 1
},
{
"status": "IGNORED"
}
]
},
"_links": {
"request": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/requests/00112233445566778899aabb"
}
},
"request": {
"url": "string",
"headers": {},
"customHeaders": [
{
"key": "X-Custom-Header",
"value": "123",
"secret": false
}
],
"body": "string"
},
"customPayload": {
"type": "text/x-handlebars-template",
"value": "{{#withDeliveryContentItem contentItemId=payload.rootContentItem.id account=\"account-name\" stagingEnvironment=\"staging-environment-url\"}} ... {/withDeliveryContentItem}}",
"error": {
"message": "string"
}
}
}
Need more? See the Amplience guide for connection setup and behaviour shared by every action.
Was this page helpful?