Facebook-Meta コンバージョンAPI 電商リード注文
上級
これはAI分野の自動化ワークフローで、17個のノードを含みます。主にSet, Code, Webhook, ManualTrigger, FacebookGraphApiなどのノードを使用、AI技術を活用したスマート自動化を実現。 Facebook/Meta Conversion API 電通エンゲージメントエスクレーション導線/オーダー処理
前提条件
- •HTTP Webhookエンドポイント(n8nが自動生成)
- •Facebook Graph API認証情報
カテゴリー
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
"meta": {
"instanceId": "66ce8bb89c7868f862e0d2e755cd17c6a5aea7904e5504a5b2e292e317980443"
},
"nodes": [
{
"id": "7fd5ddfd-a858-4a0a-84b8-f8f4ec034d63",
"name": "データ正規化",
"type": "n8n-nodes-base.set",
"position": [
-60,
0
],
"parameters": {
"include": "except",
"options": {},
"assignments": {
"assignments": [
{
"id": "65d1994d-f4b8-478a-8cf1-490990e6639d",
"name": "user_data.phone",
"type": "string",
"value": "={{$json.user_data.phone.replace(/\\D/g, '').replace(/^0+/, '')}}"
},
{
"id": "5650546d-f0ad-4c69-829c-3e4283e16ac7",
"name": "event_time",
"type": "number",
"value": "={{Math.floor(new Date($json.event_time).getTime() / 1000)}}"
},
{
"id": "9475d631-348f-4d53-9e75-0d568654aeef",
"name": "user_data.first_name",
"type": "string",
"value": "={{$json.user_data.first_name}}"
},
{
"id": "77a8f321-abf9-4618-8fb2-ef5d567a9cd1",
"name": "user_data.last_name",
"type": "string",
"value": "={{$json.user_data.last_name}}"
}
]
},
"excludeFields": "user_data.name",
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "978d3854-44f6-4773-928e-4536a97a48b1",
"name": "付箋1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-180,
-60
],
"parameters": {
"color": 7,
"width": 343,
"height": 252,
"content": "## Data normalization"
},
"typeVersion": 1
},
{
"id": "feb4a686-278f-41d4-ab13-ba4fbc159ef6",
"name": "データ暗号化",
"type": "n8n-nodes-base.set",
"position": [
300,
0
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "097ed7ff-c076-454e-930c-1f4820ac6e2e",
"name": "user_data.first_name",
"type": "string",
"value": "={{ $json.user_data.first_name.hash(\"sha256\") }}"
},
{
"id": "e285fa12-d272-48a0-a583-5e90b394fd74",
"name": "user_data.last_name",
"type": "string",
"value": "={{ $json.user_data.last_name.hash(\"sha256\") }}"
},
{
"id": "1e87a997-5b78-48d8-9616-edfb1b910743",
"name": "user_data.phone",
"type": "string",
"value": "={{ $json.user_data.phone.hash(\"sha256\") }}"
}
]
},
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "1beb8a7c-0bce-489a-aea4-c2acb937601f",
"name": "付箋2",
"type": "n8n-nodes-base.stickyNote",
"position": [
180,
-60
],
"parameters": {
"color": 7,
"width": 343,
"height": 252,
"content": "## Data encryption\n"
},
"typeVersion": 1
},
{
"id": "9f867c8b-fdc1-4294-b56e-12340c604111",
"name": "付箋3",
"type": "n8n-nodes-base.stickyNote",
"position": [
680,
-220
],
"parameters": {
"color": 7,
"width": 375,
"height": 414,
"content": "## Send event\nYou can use a test code from Facebook Events Manager to verify your integration.\n\nAdd your test code to the test_code parameter inside the JSON payload.\n\nOnce everything is confirmed to be working, remove the test_event_code so that events are officially logged.\n\n[**Read more**](https://business.facebook.com/business/help/2040882565969969)"
},
"typeVersion": 1
},
{
"id": "c00c1fac-7550-4fa9-8fc9-e9f250519e6a",
"name": "Metaへイベント送信",
"type": "n8n-nodes-base.facebookGraphApi",
"position": [
820,
20
],
"parameters": {
"edge": "events",
"node": "={{$('Format data').item.json.pixel_id}}",
"options": {
"queryParametersJson": "={\n \"data\": [\n {\n \"event_name\": \"{{ $('Encrypt data').item.json.event_name }}\",\n \"event_time\": {{ $('Encrypt data').item.json.event_time }},\n \"event_source_url\": \"{{ $('Encrypt data').item.json.event_source_url }}\",\n \"action_source\": \"{{ $('Encrypt data').item.json.action_source }}\",\n \"user_data\": {\n \"em\": \"{{ $('Encrypt data').item.json.user_data.email }}\",\n \"ph\": \"{{ $('Encrypt data').item.json.user_data.phone }}\",\n \"fn\": \"{{ $('Encrypt data').item.json.user_data.first_name }}\",\n \"ln\": \"{{ $('Encrypt data').item.json.user_data.last_name }}\",\n \"fbc\": \"{{ $('Encrypt data').item.json.user_data.fbp }}\",\n \"fbp\": \"{{ $('Encrypt data').item.json.user_data.fbc }}\",\n \"ip\": \"{{ $('Encrypt data').item.json.user_data.ip }}\",\n \"user_agent\": \"{{ $('Encrypt data').item.json.user_data.user_agent }}\"\n },\n \"custom_data\": {\n \"value\": {{ $('Encrypt data').item.json.custom_data.value }},\n \"currency\": \"{{ $('Encrypt data').item.json.custom_data.currency }}\"\n }\n }\n ],\n \"test_event_code\": \"TEST1337\"\n}\n"
},
"graphApiVersion": "=v20.0",
"httpRequestMethod": "POST"
},
"credentials": {
"facebookGraphApi": {
"id": "ThsFZDy4veCJfHRP",
"name": "Meta conversion api (WIJDANPROMO)"
}
},
"typeVersion": 1
},
{
"id": "5b486767-1ec1-4829-a556-ddc4f0c13f95",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"position": [
-1260,
-240
],
"webhookId": "b408defb-315d-4676-b4c4-1dcebe81ffc0",
"parameters": {
"path": "b408defb-315d-4676-b4c4-1dcebe81ffc0",
"options": {},
"httpMethod": [
"POST",
"GET"
],
"multipleMethods": true
},
"typeVersion": 2
},
{
"id": "8a8ee5fb-edf4-410c-b86c-a1b805a66319",
"name": "付箋",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1160,
100
],
"parameters": {
"height": 220,
"content": "## Test data \nYou can chenge test data here"
},
"typeVersion": 1
},
{
"id": "40240bfc-8e7b-4c5b-84e0-b8ccd52b097e",
"name": "データテスト",
"type": "n8n-nodes-base.code",
"position": [
-1100,
180
],
"parameters": {
"jsCode": "return {\n \"body\": {\n 'first_name': \"Alex\",\n 'last_name': \"Forbic\",\n 'phone': \"+116435562\",\n 'ip': \"16.115.243.190\",\n 'user_agent': \"Mozilla/5.0 (Linux; Android 14; SM-A065F Build/UP1A.231005.007; )\",\n 'fbp': \"fb.1.1750638230973.IwZXh0bgNhZW0BMABhZGlkAasgzcY0SboBHlIpXRPFXRua8Udfs9qnBwf4GN3xGWPk9HvipTCJeUYt8jaENcQyAm_TYaYITPrWtzJcJ8e38-CMQ\",\n 'fbc': \"fb.1.1750612363841.918837434857767253\",\n 'created_at': \"2025-06-18T15:24:06.000000Z\",\n 'amount': 120,\n 'currency': \"EUR\"\n }\n};"
},
"notesInFlow": true,
"typeVersion": 2
},
{
"id": "dbb5d646-4500-4ed9-89b6-607ebfc216d9",
"name": "付箋5",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1620,
80
],
"parameters": {
"height": 240,
"content": "## Test Workflow\nClick this button to test the workflow with fake data \n"
},
"typeVersion": 1
},
{
"id": "8473264d-fbad-4213-a0bf-84e7f841053e",
"name": "ワークフロー実行",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-1540,
180
],
"parameters": {},
"typeVersion": 1
},
{
"id": "ad465243-cb30-492d-b77c-1066fec33c1b",
"name": "付箋6",
"type": "n8n-nodes-base.stickyNote",
"position": [
-640,
-220
],
"parameters": {
"color": 7,
"width": 340,
"height": 80,
"content": "## Change here\n"
},
"typeVersion": 1
},
{
"id": "1b1c1cd5-ecfe-40d2-af82-1b0cc2b65e7c",
"name": "付箋4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-640,
-120
],
"parameters": {
"color": 7,
"width": 343,
"height": 312,
"content": "## Collect data\nIn this node you link between your webhook data with this node parameters, also you can add more data."
},
"typeVersion": 1
},
{
"id": "63208dd1-6258-4630-9c3b-c8913cf04085",
"name": "データフォーマット",
"type": "n8n-nodes-base.code",
"position": [
-520,
0
],
"parameters": {
"jsCode": "return [\n {\n json: {\n event_name: \"Purchase\",\n pixel_id:'1714041194725552', // you pixel ID\n user_data: {\n first_name: $input.first().json.body.first_name, // your customer first_name\n last_name: $input.first().json.body.last_name, // your customer last_name\n phone: $input.first().json.body.phone, // your customer phone\n ip: $input.first().json.body.ip, // your customer IP\n user_agent: $input.first().json.body.user_agent, // your customer User agent\n fbp: $input.first().json.body.fbp, // your customer fbp\n fbc: $input.first().json.body.fbc // your customer fbc\n },\n event_time: $input.first().json.body.created_at, // order Date like 2025-06-18T15:24:06.000000Z\n custom_data: {\n value: $input.first().json.body.amount, // pricing\n currency: $input.first().json.body.currency\n },\n action_source: \"website\",\n event_source_url: \"https://example.com/thanks\"\n }\n }\n];"
},
"typeVersion": 2
},
{
"id": "81bb1144-9e20-41d2-a611-c5f2422cba09",
"name": "付箋7",
"type": "n8n-nodes-base.stickyNote",
"position": [
-640,
360
],
"parameters": {
"color": 4,
"width": 1700,
"height": 100,
"content": "## Do you need more help or have any suggestions?\nContact me at mediaplus.ma@gmail.com"
},
"typeVersion": 1
},
{
"id": "a959b199-3d42-4a97-9c59-17cfa0b48124",
"name": "付箋8",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1620,
340
],
"parameters": {
"width": 700,
"height": 80,
"content": "## Just to test"
},
"typeVersion": 1
},
{
"id": "541e0afe-1fd4-4c5e-a8e9-d7aa6f0e5832",
"name": "付箋9",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1300,
-320
],
"parameters": {
"color": 4,
"width": 200,
"height": 240,
"content": "## Production"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"5b486767-1ec1-4829-a556-ddc4f0c13f95": {
"main": [
[
{
"node": "63208dd1-6258-4630-9c3b-c8913cf04085",
"type": "main",
"index": 0
}
]
]
},
"40240bfc-8e7b-4c5b-84e0-b8ccd52b097e": {
"main": [
[
{
"node": "63208dd1-6258-4630-9c3b-c8913cf04085",
"type": "main",
"index": 0
}
]
]
},
"63208dd1-6258-4630-9c3b-c8913cf04085": {
"main": [
[
{
"node": "7fd5ddfd-a858-4a0a-84b8-f8f4ec034d63",
"type": "main",
"index": 0
}
]
]
},
"feb4a686-278f-41d4-ab13-ba4fbc159ef6": {
"main": [
[
{
"node": "c00c1fac-7550-4fa9-8fc9-e9f250519e6a",
"type": "main",
"index": 0
}
]
]
},
"7fd5ddfd-a858-4a0a-84b8-f8f4ec034d63": {
"main": [
[
{
"node": "feb4a686-278f-41d4-ab13-ba4fbc159ef6",
"type": "main",
"index": 0
}
]
]
},
"8473264d-fbad-4213-a0bf-84e7f841053e": {
"main": [
[
{
"node": "40240bfc-8e7b-4c5b-84e0-b8ccd52b097e",
"type": "main",
"index": 0
}
]
]
}
}
}よくある質問
このワークフローの使い方は?
上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。
このワークフローはどんな場面に適していますか?
上級 - 人工知能
有料ですか?
このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。
関連ワークフロー
基于动态提示与AirtableのAIデータ抽出
経由动态提示与Airtable实现AIデータ抽出
Set
Code
Filter
+
Set
Code
Filter
51 ノードJimleuk
人工知能
AI不動産エージェント:エンドツーエンド運用自動化(Web、データ、音声)
AI不動産エージェント:エンドツーエンド運用自動化(Web、データ、音声)
If
Set
Code
+
If
Set
Code
45 ノードSam Yassine
営業
以下は、入力された中国語テキストを日本語に正確に翻訳し、元の専門用語は変更せず、1 行に 1 つの翻訳を加えた結果です。
DeepGramとGPT-4oによる音声対話分析・可視化
Set
Code
Html
+
Set
Code
Html
54 ノードRealSimple Solutions
人工知能
ブログ投稿自動化とSNSプロモーションエージェント
GPT-4、Perplexity、WordPressを使用したSEOブログ作成の自動化+ソーシャルメディア
Set
Code
Gmail
+
Set
Code
Gmail
79 ノードLukaszB
デザイン
Azure検索、Entra ID、Jiraを統合したAI ITサポートアシスタントの構築
Azure Search、Entra ID、Jira を統合した AI IT サポートアシスタントを構築
Set
Code
Webhook
+
Set
Code
Webhook
30 ノードAdam Bertram
サポート
カスタマーセンター分析(DeepSeekモデルでのダブルAI検証)
DeepSeekモデルによる二重回帰検証を備えたカールセンター分析
Code
Webhook
Http Request
+
Code
Webhook
Http Request
15 ノードOmar Akoudad
顧客管理
ワークフロー情報
難易度
上級
ノード数17
カテゴリー1
ノードタイプ6
作成者
Omar Akoudad
@mediaplusmaAutomation, Code, and Analytics for E-commerce businesses, We help businesses streamline operations using n8n, AI agents, and data science to enhance efficiency and scalability.
外部リンク
n8n.ioで表示 →
このワークフローを共有