![[Template] Meta Conversion API](/workflows/images/6331.webp)
[Template] Meta Conversion API
説明
Categories
⚙️ Automation
Nodes Used
n8n-nodes-base.ifn8n-nodes-base.setn8n-nodes-base.setn8n-nodes-base.noOpn8n-nodes-base.crypton8n-nodes-base.stickyNoten8n-nodes-base.stickyNoten8n-nodes-base.stickyNoten8n-nodes-base.httpRequestn8n-nodes-base.googleCalendarTrigger
Price無料
Views0
最終更新11/28/2025
workflow.json
{
"name": "[Template] Meta Conversion API",
"nodes": [
{
"id": "5b569d35-f4fc-44ca-bdb5-87ede5ae4b9d",
"name": "Google Calendar Trigger",
"type": "n8n-nodes-base.googleCalendarTrigger",
"position": [
140,
0
],
"parameters": {
"options": {},
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
},
"triggerOn": "eventCreated",
"calendarId": {
"__rl": true,
"mode": "list",
"value": "[email protected]",
"cachedResultName": "[email protected]"
}
},
"credentials": {
"googleCalendarOAuth2Api": {
"id": "FYaXEXCuzrj6vHQ6",
"name": "Google account"
}
},
"typeVersion": 1
},
{
"id": "110ee9bc-5592-4b3b-9397-c10ac54dd6ca",
"name": "If",
"type": "n8n-nodes-base.if",
"position": [
560,
0
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "or",
"conditions": [
{
"id": "b128a6f2-74fd-45d9-828e-083b5e46fff2",
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.summary }}",
"rightValue": "={{ $json.event_name_filter }}"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "23224570-ea11-42f0-8d88-2823c471c9b4",
"name": "No Operation, do nothing",
"type": "n8n-nodes-base.noOp",
"position": [
820,
200
],
"parameters": {},
"typeVersion": 1
},
{
"id": "decd0bf8-ef4e-4070-990c-76d507248ef2",
"name": "HTTP Request - Meta Conversion API",
"type": "n8n-nodes-base.httpRequest",
"position": [
1220,
-100
],
"parameters": {
"url": "=https://graph.facebook.com/{{$('Config').item.json.FB_API_VERSION}}/{{$('Config').item.json.FB_PIXEL_ID}}/events",
"method": "POST",
"options": {},
"sendBody": true,
"contentType": "multipart-form-data",
"sendHeaders": true,
"bodyParameters": {
"parameters": [
{
"name": "data",
"value": "=[\n {\n event_name: \"Schedule\",\n event_time: {{ $json.event_time }},\n action_source: \"website\",\n event_source_url: \"{{$('Config').item.json.source_url}}\",\n user_data: {\n em: [\"{{ $json.em }}\"],\n client_ip_address: \"{{ $json.client_ip_address }}\",\n client_user_agent: \"{{ $json.client_user_agent }}\"\n },\n attribution_data: {\n attribution_share: \"1.0\"\n },\n original_event_data: {\n event_name: \"Schedule\",\n event_time: {{ $json.event_time }}\n }\n }\n]"
},
{
"name": "access_token",
"value": "={{$('Config').item.json.FB_ACCESS_TOKEN}}"
}
]
},
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "9d3d13ff-b3a8-40bd-95bc-ac2f11ad4852",
"name": "Crypto",
"type": "n8n-nodes-base.crypto",
"position": [
780,
-100
],
"parameters": {
"type": "SHA256",
"value": "={{ $json.attendees[1].email }}",
"dataPropertyName": "hashedEmail"
},
"typeVersion": 1
},
{
"id": "b7f75d45-e2d0-4afd-a023-2b9fdfbad958",
"name": "Params",
"type": "n8n-nodes-base.set",
"position": [
1000,
-100
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "cc2c20cc-d4f7-4bb3-b435-f2b719736a66",
"name": "em",
"type": "string",
"value": "={{ $json.hashedEmail }}"
},
{
"id": "8fad81a5-4a22-4190-a199-7c2ebccd9893",
"name": "client_ip_address",
"type": "string",
"value": "={{$json.clientIp || '0.0.0.0'}}"
},
{
"id": "44afb80a-3cbb-4df6-baab-cd79991967d8",
"name": "client_user_agent",
"type": "string",
"value": "={{$json.userAgent || 'n8n/MetaCAPI'}}"
},
{
"id": "c4502ba7-bcb8-4abe-9629-1811addf419e",
"name": "event_time",
"type": "string",
"value": "={{Math.floor(Date.now() / 1000)}}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "cd525037-3aed-4e4a-9f21-bb7e368e3ad7",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-400,
-220
],
"parameters": {
"width": 460,
"height": 520,
"content": "# Welcome to Meta Conversion API Workflow!\n\nIf you want to send a conversion event to Meta Conversion API every time a new lead schedules a demo meeting with you, this workflow is for you! 😉\n\n**This workflow has the following sequence:**\n1. Google Calendar Trigger (New Event Created)\n2. Filter only the \"Demo\" event by name\n3. Format information from the created event\n4. Send a \"Schedule\" conversion event to Meta Conversion API\n\n\n**The following accesses are required for the workflow:**\n- Google Oauth2 (via Google Console API): [Documentation](https://docs.n8n.io/integrations/builtin/credentials/google/oauth-single-service/)\n- Meta Conversion API Parameters (Pixel, Access Token): [Documentation](https://developers.facebook.com/docs/marketing-api/conversions-api/get-started)\n\n\nYou can contact me via LinkedIn, if you have any questions: https://www.linkedin.com/in/marceloamiranda"
},
"typeVersion": 1
},
{
"id": "eb620669-c58d-4896-a6e0-b58685bc52ef",
"name": "Config",
"type": "n8n-nodes-base.set",
"position": [
360,
0
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "c2fc1894-0d50-475d-be54-67d377573090",
"name": "FB_PIXEL_ID",
"type": "string",
"value": "your-pixel-id-here"
},
{
"id": "0cb0174f-e07f-4294-9818-c2e140707b78",
"name": "FB_ACCESS_TOKEN",
"type": "string",
"value": "your-access-token-here"
},
{
"id": "bc87c01e-7f37-4a26-ba95-6bcf16c7d462",
"name": "FB_API_VERSION",
"type": "string",
"value": "v22.0"
},
{
"id": "d9297f81-1577-4bcd-903f-c67d25cc4245",
"name": "source_url",
"type": "string",
"value": "https://your-landing-page-url-here.com"
},
{
"id": "2502bc03-8196-45cd-bd03-7df0d79d658b",
"name": "event_name_filter",
"type": "string",
"value": "your-demo-event-name-here"
}
]
},
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "67a859f7-3b54-479b-95d3-e325cfc8a6ba",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
300,
-220
],
"parameters": {
"color": 4,
"width": 220,
"height": 400,
"content": "**Here you'll configure:**\n- Facebook Pixel ID\n- Facebook Access Token\n- Facebook API Version (default: v22.0)\n- Source URL (your landing page URL)\n- Event Name Filter (Your demo event name)"
},
"typeVersion": 1
},
{
"id": "eebabd9b-151e-490a-a6ad-5a462a6ac0af",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
1080,
-280
],
"parameters": {
"color": 3,
"width": 360,
"height": 140,
"content": "## Sending additional properties\nIf you want to send additional properties to the Meta Conversion API, use this link to help you build your payload: [Meta Payload Helper](https://developers.facebook.com/docs/marketing-api/conversions-api/payload-helper/)\n"
},
"typeVersion": 1
}
],
"connections": {
"If": {
"main": [
[
{
"node": "Crypto",
"type": "main",
"index": 0
}
],
[
{
"node": "No Operation, do nothing",
"type": "main",
"index": 0
}
]
]
},
"Config": {
"main": [
[
{
"node": "If",
"type": "main",
"index": 0
}
]
]
},
"Crypto": {
"main": [
[
{
"node": "Params",
"type": "main",
"index": 0
}
]
]
},
"Params": {
"main": [
[
{
"node": "HTTP Request - Meta Conversion API",
"type": "main",
"index": 0
}
]
]
},
"Google Calendar Trigger": {
"main": [
[
{
"node": "Config",
"type": "main",
"index": 0
}
]
]
}
}
}