Use this n8n workflow to implement accurate server-side tracking for Meta Ads (Facebook) Conversions API (CAPI). Securely hash PII and send conversion events.
Download this n8n workflow template and start using it instantly.
Marketing technologists needing resilient conversion tracking.
E-commerce businesses aiming to bypass browser restrictions (ad blockers, iOS privacy).
Developers looking for robust server-side synchronization n8n templates.
Anyone seeking to automate data processing and secure PII handling within an n8n workflow.
Modern privacy regulations and browser limitations (like ad blockers and iOS tracking prevention) severely impact the accuracy of web-based conversion tracking. This specialized n8n workflow provides a solution by implementing the Meta Conversions API (CAPI) via a server-side endpoint.
By leveraging this n8n workflow, you ensure that valuable conversion data (such as leads or purchases) is processed securely. The core value of this n8n template lies in its compliance: it automatically normalizes and hashes Personally Identifiable Information (PII) like email and phone number using SHA256 before transmission, meeting Meta's strict requirements for data privacy. This robust approach drastically improves ad attribution accuracy, enabling better optimization for your Meta advertising campaigns.
The entire process is initiated by an external event sending data to the n8n trigger node.
Webhook n8n trigger. This request must include PII (email, phone, names) and tracking cookies (fbc, fbp).fbp, fbc).Respond to Webhook n8n node.To install and activate this Meta CAPI n8n workflow, follow these steps:
eventname assignment. If your event is not 'SubmitApplication' (e.g., 'Purchase' or 'Lead'), update the string value accordingly.PIXELID_HERE with your actual Meta Pixel ID. Webhook (n8n trigger): This is the starting point, configured to listen for POST requests at a specific path (meta-conversion-api). It receives raw conversion data from your external application.
Edit Normalize PII (Set n8n node): Essential for data quality. It cleans up user inputs (e.g., trimming whitespace and ensuring email/names are lowercase) before hashing.
Crypto - Hash Email/Phone/Name (Crypto n8n node): A series of nodes dedicated to security. They take the normalized PII and apply the mandatory SHA256 hash, preparing the data for compliance with Meta standards.
Set - Compute Timestamps & Map Fields (Set n8n node): Responsible for combining metadata. It computes the current conversion_timestamp and maps fields like fbc, fbp, IP address, and user agent, alongside the newly hashed PII.
Preparing for HTTP Request Payload (Code n8n node): This crucial n8n node uses custom JavaScript to transform the input data into the exact data array structure expected by the Meta Conversions API.
Sending Events To Facebook Pixel (HTTP Request n8n node): The final action node. It executes the POST request to the Meta Graph API, utilizing the Bearer Token credential for authorization and sending the structured conversion payload.
Use this robust n8n workflow to automatically check pending school fees in Microsoft Excel, calculate due dates, generate payment links, and send reminders via both Email and WhatsApp.

Use this powerful n8n workflow to automatically fetch RSS feeds, transform the content into a responsive HTML email digest, and send it on a schedule using the Gmail n8n node.

Automate your financial tracking using this powerful n8n workflow. Schedule daily, weekly, and monthly Telegram digests summarizing Notion expenses, budgets, and liquidity.

Automate severe weather alerts using this n8n workflow. The n8n trigger checks the Visual Crossing API hourly and sends instant safety notifications via the Telegram n8n node.

Use this powerful n8n workflow to monitor AWS IAM access key rotation compliance. Automatically detect keys older than 365 days and send immediate alerts using the Slack n8n node.

Founder of Osinity. I build AI-powered n8n automations that save businesses 10+ hours a week and grow their revenue. We guarantee results with a 30-day risk-free trial—you only pay when we hit your targets.







































