-
-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathsendgrid_email_campaign.json
More file actions
58 lines (58 loc) · 1.61 KB
/
sendgrid_email_campaign.json
File metadata and controls
58 lines (58 loc) · 1.61 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
{
"name": "SendGrid Email Campaign",
"description": "Fetches contacts from SendGrid, sends a personalized email to each contact",
"nodes": [
{
"id": "node-1",
"type": "automationStep",
"data": {
"step": {
"id": "step-1",
"type": "sendgridGetContacts",
"description": "Get contact list",
"credentialId": "my-sendgrid-key",
"storeKey": "contacts"
}
},
"position": { "x": 0, "y": 0 }
},
{
"id": "node-2",
"type": "forEach",
"data": {
"step": {
"id": "step-2",
"type": "forEach",
"description": "Loop through contacts",
"array": "{{contacts.result}}",
"itemVariable": "contact",
"indexVariable": "i"
}
},
"position": { "x": 0, "y": 100 }
},
{
"id": "node-3",
"type": "automationStep",
"data": {
"step": {
"id": "step-3",
"type": "sendgridSendEmail",
"description": "Send personalized email",
"credentialId": "my-sendgrid-key",
"to": "{{contact.email}}",
"from": "newsletter@mycompany.com",
"subject": "Hello {{contact.first_name}}!",
"content": "Hi {{contact.first_name}}, check out our latest updates!",
"contentType": "text/plain",
"storeKey": "emailResult"
}
},
"position": { "x": 0, "y": 200 }
}
],
"edges": [
{ "id": "e1-2", "source": "node-1", "target": "node-2" },
{ "id": "e2-3", "source": "node-2", "target": "node-3", "sourceHandle": "loop" }
]
}