Feature Pro since v1.7.0
Code Glue
Attach short PHP snippets per webhook+trigger to enrich payloads before dispatch.
$
Write a pre-dispatch PHP snippet in the admin panel and attach it to a webhook+trigger combination. The snippet runs after payload mapping and can read WordPress data, look up post meta, call internal functions, or reshape fields without touching theme or plugin files.
Available variables
$payload — the mapped payload array. $args — shortcut to $payload['args'], the original hook arguments.
Shorthand syntax
Curly-brace placeholders resolve to array access for any variable: {{ $args.0.field }} → $args[0]['field'], {{ $payload.key }} → $payload['key'].
Return value
Must return $payload; — the returned array replaces the payload before dispatch.
/ Examples
Look up and inject a HubSpot deal ID from post meta
// Available: $payload (mapped array), $args ($payload['args']) $order_id = $payload['order_id'] ?? 0; $hs_deal_id = get_post_meta( $order_id, '_hs_deal_id', true ); $payload['hs_deal_id'] = $hs_deal_id; return $payload;
/ Related
Ready Your next automation is
Your next automation is
one sentence away.
$ wp plugin install flowsystems-webhook-actions --activate