WP Webhooks / Docs / fswa_export_doc
Filter since v2.4.0

fswa_export_doc

Attach top-level blocks to a Build export document before it is serialized.

$

/ Signature

apply_filters( 'fswa_export_doc', $doc, $webhook_ids, $chain_ids )

/ When it fires

Fires once per export, after webhooks, chains, and credentials are collected and just before the JSON is returned. Pro uses it to bolt on an ai_build provenance block (the Build-with-AI transcript) when the exported objects trace back to an AI conversation.

/ Parameters

NameInTypeReqDescription
$docparamarrayyesThe full export document (schema version, credentials, webhooks, chains).
$webhook_idsparamint[]yesWebhook IDs included in this export.
$chain_idsparamint[]yesChain IDs included in this export.

/ Returns

array The export document, optionally with extra top-level blocks added.

/ Examples

Stamp exports with the source site URL

add_filter( 'fswa_export_doc', function ( $doc, $webhook_ids, $chain_ids ) {
    $doc['exported_from'] = home_url();
    return $doc;
}, 10, 3 );

/ Related

Ready

Your next automation is
one sentence away.

$ wp plugin install flowsystems-webhook-actions --activate