-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathemail_click_tracker_workflow.json
More file actions
107 lines (106 loc) · 2.6 KB
/
email_click_tracker_workflow.json
File metadata and controls
107 lines (106 loc) · 2.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
{
"name": "Email Click Tracker – Google Sheets",
"nodes": [
{
"id": "Webhook",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"position": [300, 300],
"parameters": {
"httpMethod": "GET",
"path": "click-track",
"responseMode": "responseNode"
}
},
{
"id": "NormalizeClick",
"name": "Normalize Click Data",
"type": "n8n-nodes-base.set",
"position": [520, 300],
"parameters": {
"keepOnlySet": true,
"values": {
"string": [
{ "name": "event", "value": "click" },
{ "name": "campaign_id", "value": "={{$query.cid}}" },
{ "name": "tracking_id", "value": "={{$query.tid}}" },
{ "name": "email", "value": "={{$query.email}}" },
{ "name": "ip", "value": "={{$headers['x-forwarded-for'] || $json.ip}}" },
{ "name": "user_agent", "value": "={{$headers['user-agent']}}" },
{ "name": "timestamp", "value": "={{$now}}" }
]
}
}
},
{
"id": "AppendSheet",
"name": "Append Click to Google Sheet",
"type": "n8n-nodes-base.googleSheets",
"position": [760, 300],
"parameters": {
"operation": "append",
"sheetId": "PUT_YOUR_GOOGLE_SHEET_ID",
"range": "click_logs",
"options": {}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "YOUR_GOOGLE_CREDENTIAL_ID",
"name": "Google Sheets OAuth2"
}
}
},
{
"id": "Respond",
"name": "Respond to Webhook",
"type": "n8n-nodes-base.respondToWebhook",
"position": [1000, 300],
"parameters": {
"responseCode": 302,
"responseHeaders": {
"entries": [
{
"name": "Location",
"value": ""
}
]
}
}
}
],
"connections": {
"Webhook": {
"main": [
[
{
"node": "Normalize Click Data",
"type": "main",
"index": 0
}
]
]
},
"Normalize Click Data": {
"main": [
[
{
"node": "Append Click to Google Sheet",
"type": "main",
"index": 0
}
]
]
},
"Append Click to Google Sheet": {
"main": [
[
{
"node": "Respond to Webhook",
"type": "main",
"index": 0
}
]
]
}
}
}