@ovehbe/n8n-nodes-ads-conversions
v0.1.9
Published
n8n community node for sending conversion events to Facebook (Meta) Conversions API and Google Ads Offline Conversions
Maintainers
Readme
n8n-nodes-ads-conversions
A community node for n8n that sends conversion events to Facebook (Meta) Conversions API and Google Ads Offline Conversions — with automatic PII hashing, just like Zapier's dedicated conversion nodes.
No more manually constructing JSON payloads, normalizing data, or SHA256-hashing fields. Fill in the form fields and the node handles the rest.
Features
Facebook Conversions API (CAPI)
- Send Purchase, Lead, CompleteRegistration, or Custom events
- All PII fields (email, phone, name, city, etc.) are automatically normalized and SHA256-hashed
- Non-PII fields (fbc, fbp, IP, user agent) are passed through unhashed
- Test Event Code support for validation in Events Manager
- Data Processing Options (LDU) support
Google Ads Offline Conversions
- Upload click conversions with GCLID, GBRAID, or WBRAID
- Enhanced conversions with auto-hashed user identifiers
- Consent fields for ad user data and ad personalization
- Partial failure handling
Installation
In n8n (Community Nodes)
- Go to Settings → Community Nodes
- Select Install a community node
- Enter
n8n-nodes-ads-conversions - Agree to the risks and click Install
Manual Installation
cd ~/.n8n/custom
npm install n8n-nodes-ads-conversionsThen restart n8n.
Development
git clone https://github.com/ovehbe/n8n-nodes-ads-conversions.git
cd n8n-nodes-ads-conversions
npm install --ignore-scripts
npm run buildTo link for local development:
npm link
cd ~/.n8n
npm link n8n-nodes-ads-conversionsSetup
Facebook Conversions API
- Create a System User in Meta Business Manager
- Generate an Access Token with
ads_managementpermission - In n8n, create a new Facebook Conversions API credential with this token
- Find your Pixel ID in Events Manager → Data Sources
Google Ads OAuth2
- Create an OAuth2 application in Google Cloud Console
- Enable the Google Ads API in your project
- Get a Developer Token from your Google Ads Manager account → API Center
- In n8n, create a new Google Ads OAuth2 API credential:
- Client ID and Secret from GCP
- Developer Token
- (Optional) Login Customer ID if using an MCC
Usage
Facebook: Send Purchase Event
- Add the Ads Conversions node to your workflow
- Select Facebook Conversions as the resource
- Choose Send Purchase Event
- Fill in:
- Pixel ID — your Facebook Pixel
- Action Source — where the conversion happened (e.g.
website) - Event Time — when it occurred
- User Data — email, phone, name, etc. (auto-hashed)
- Purchase Data — value, currency, content name
Facebook: Send Lead Event
Same as above but select Send Lead Event. No purchase data needed.
Google Ads: Send Offline Conversion
- Select Google Ads as the resource
- Choose Send Offline Conversion
- Fill in:
- Customer ID — your Google Ads account ID (no dashes)
- Conversion Action — resource name from your account
- Conversion Date Time — format:
yyyy-mm-dd hh:mm:ss+|-hh:mm - Click Identifiers — GCLID from the ad click
- Consent — GRANTED / DENIED for EU compliance
- Value and Currency
- Enhanced Conversions — email, phone, address (auto-hashed)
How Auto-Hashing Works
The node automatically handles the data normalization and SHA256 hashing required by both platforms:
| Field | Normalization | Hashed? | |-------|--------------|---------| | Email | trim, lowercase | Yes | | Phone | strip non-digits | Yes | | First/Last Name | trim, lowercase | Yes | | City | trim, lowercase, strip non-alpha | Yes | | State | trim, lowercase | Yes | | Zip | trim, lowercase, strip spaces/dashes | Yes | | Country | trim, lowercase | Yes | | Gender | first char, lowercase | Yes | | Date of Birth | strip non-digits | Yes | | External ID | — | Yes | | fbc / fbp | — | No | | Client IP / User Agent | — | No |
API Versions
- Facebook Graph API: v21.0
- Google Ads API: v19
These are configured as constants in the source and easy to update.
License
MIT
