webhooks_configure_enrichment
Enable enrichment on an agent's webhook trigger so reference-only webhook payloads are resolved to full data before the agent runs. One tool for every provider — choose provider and pass its config.
Providers & required config:
meta_leadgen (Meta/Facebook Lead Ads): config = {app_id, app_secret, user_access_token}. The user token needs pages_show_list + leads_retrieval (+ pages_manage_metadata; add business_management to auto-discover Business-Manager pages that /me/accounts omits). Stores all page tokens encrypted per workspace and resolves each lead's name/email/phone. Reuses the existing webhook URL (no token rotation); creates a webhook trigger if the agent has none.
tiktok_leadgen (TikTok Instant Form and direct-message leads): config = {access_token, advertiser_ids?}. access_token is a TikTok Marketing API advertiser token issued to DialogBrain's Business app; without advertiser_ids every ad account the token reaches is subscribed. Adds a separate webhook trigger on the agent (a Meta-wired trigger is left alone) and subscribes it to LEAD events; each lead arrives with its answers, signature-verified.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| config | Yes | Provider-specific configuration/credentials. For meta_leadgen: {app_id, app_secret, user_access_token}. For tiktok_leadgen: {access_token, advertiser_ids?}. | |
| agent_id | Yes | ID of the agent whose webhook trigger should be enriched. | |
| provider | Yes | Enrichment provider to configure. | |
| in_workspace | No | Run this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected. |