feat: add folder support for workflows (fixes #70)
This commit is contained in:
557
workflows/Wait/0090_Wait_Lemlist_Create_Scheduled.json
Normal file
557
workflows/Wait/0090_Wait_Lemlist_Create_Scheduled.json
Normal file
@@ -0,0 +1,557 @@
|
||||
{
|
||||
"id": 121,
|
||||
"name": "Create Email Campaign From LinkedIn Post Interactions",
|
||||
"nodes": [
|
||||
{
|
||||
"name": "Cron",
|
||||
"type": "n8n-nodes-base.cron",
|
||||
"position": [
|
||||
280,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"triggerTimes": {
|
||||
"item": [
|
||||
{
|
||||
"mode": "everyHour"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Exists ?",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
1700,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"conditions": {
|
||||
"string": [
|
||||
{
|
||||
"value1": "={{$node[\"Airtable - List\"].json[\"fields\"][\"Email\"]}}",
|
||||
"value2": "={{$node[\"Dropcontact - GET\"].json[\"data\"][0][\"email\"][0][\"email\"]}}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Airtable - List",
|
||||
"type": "n8n-nodes-base.airtable",
|
||||
"position": [
|
||||
1500,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"table": "Contacts",
|
||||
"operation": "list",
|
||||
"additionalOptions": {
|
||||
"fields": []
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"airtableApi": {
|
||||
"id": "",
|
||||
"name": ""
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Airtable - Update",
|
||||
"type": "n8n-nodes-base.airtable",
|
||||
"position": [
|
||||
2100,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"id": "={{$node[\"Airtable - List\"].json[\"id\"]}}",
|
||||
"table": "Contacts",
|
||||
"options": {
|
||||
"typecast": true
|
||||
},
|
||||
"operation": "update",
|
||||
"updateAllFields": false
|
||||
},
|
||||
"credentials": {
|
||||
"airtableApi": {
|
||||
"id": "",
|
||||
"name": ""
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Airtable - Create",
|
||||
"type": "n8n-nodes-base.airtable",
|
||||
"position": [
|
||||
2100,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"table": "Contacts",
|
||||
"options": {
|
||||
"typecast": true
|
||||
},
|
||||
"operation": "append"
|
||||
},
|
||||
"credentials": {
|
||||
"airtableApi": {
|
||||
"id": "",
|
||||
"name": ""
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Set - Update",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
1900,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"values": {
|
||||
"string": [
|
||||
{
|
||||
"name": "=ID",
|
||||
"value": "={{$node[\"Airtable - List\"].json[\"id\"]}}"
|
||||
},
|
||||
{
|
||||
"name": "Email",
|
||||
"value": "={{$node[\"Dropcontact - GET\"].json[\"data\"][0][\"email\"][0][\"email\"]}}"
|
||||
},
|
||||
{
|
||||
"name": "Phone",
|
||||
"value": "={{$node[\"Dropcontact - GET\"].json[\"data\"][0][\"phone\"]}}"
|
||||
},
|
||||
{
|
||||
"name": "LinkedIn",
|
||||
"value": "={{$node[\"Dropcontact - GET\"].json[\"data\"][0][\"linkedin\"]}}"
|
||||
},
|
||||
{
|
||||
"name": "Account",
|
||||
"value": "={{$node[\"Dropcontact - GET\"].json[\"data\"][0][\"company\"]}}"
|
||||
},
|
||||
{
|
||||
"name": "Company website",
|
||||
"value": "={{$node[\"Dropcontact - GET\"].json[\"data\"][0][\"website\"]}}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Set - New",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
1900,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"values": {
|
||||
"string": [
|
||||
{
|
||||
"name": "Name",
|
||||
"value": "={{$node[\"Dropcontact - GET\"].json[\"data\"][0][\"full_name\"]}}"
|
||||
},
|
||||
{
|
||||
"name": "Account",
|
||||
"value": "={{$node[\"Dropcontact - GET\"].json[\"data\"][0][\"company\"]}}"
|
||||
},
|
||||
{
|
||||
"name": "Company website",
|
||||
"value": "={{$node[\"Dropcontact - GET\"].json[\"data\"][0][\"website\"]}}"
|
||||
},
|
||||
{
|
||||
"name": "Email",
|
||||
"value": "={{$node[\"Dropcontact - GET\"].json[\"data\"][0][\"email\"][0][\"email\"]}}"
|
||||
},
|
||||
{
|
||||
"name": "Phone",
|
||||
"value": "={{$node[\"Dropcontact - GET\"].json[\"data\"][0][\"phone\"]}}"
|
||||
},
|
||||
{
|
||||
"name": "LinkedIn",
|
||||
"value": "={{$node[\"Dropcontact - GET\"].json[\"data\"][0][\"linkedin\"]}}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {},
|
||||
"keepOnlySet": true
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Lemlist",
|
||||
"type": "n8n-nodes-base.lemlist",
|
||||
"position": [
|
||||
2300,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"email": "={{$node[\"Dropcontact - GET\"].json[\"data\"][0][\"email\"][0][\"email\"]}}",
|
||||
"resource": "lead",
|
||||
"campaignId": "",
|
||||
"additionalFields": {
|
||||
"lastName": "={{$node[\"Dropcontact - GET\"].json[\"data\"][0][\"last_name\"]}}",
|
||||
"firstName": "={{$node[\"Dropcontact - GET\"].json[\"data\"][0][\"first_name\"]}}",
|
||||
"companyName": "={{$node[\"Dropcontact - GET\"].json[\"data\"][0][\"company\"]}}"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"lemlistApi": {
|
||||
"id": "",
|
||||
"name": ""
|
||||
}
|
||||
},
|
||||
"retryOnFail": false,
|
||||
"typeVersion": 1,
|
||||
"continueOnFail": true
|
||||
},
|
||||
{
|
||||
"name": "Hubspot",
|
||||
"type": "n8n-nodes-base.hubspot",
|
||||
"position": [
|
||||
2700,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"email": "={{$node[\"Dropcontact - GET\"].json[\"data\"][0][\"email\"][0][\"email\"]}}",
|
||||
"resource": "contact",
|
||||
"additionalFields": {
|
||||
"city": "={{$node[\"Dropcontact - GET\"].json[\"data\"][0][\"siret_city\"]}}",
|
||||
"gender": "={{$node[\"Dropcontact - GET\"].json[\"data\"][0][\"civility\"]}}",
|
||||
"lastName": "={{$node[\"Dropcontact - GET\"].json[\"data\"][0][\"last_name\"]}}",
|
||||
"firstName": "={{$node[\"Dropcontact - GET\"].json[\"data\"][0][\"first_name\"]}}",
|
||||
"websiteUrl": "={{$node[\"Dropcontact - GET\"].json[\"data\"][0][\"website\"]}}",
|
||||
"companyName": "={{$node[\"Dropcontact - GET\"].json[\"data\"][0][\"company\"]}}",
|
||||
"phoneNumber": "={{$node[\"Dropcontact - GET\"].json[\"data\"][0][\"phone\"]}}",
|
||||
"originalSource": "SOCIAL_MEDIA"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"hubspotApi": {
|
||||
"id": "",
|
||||
"name": ""
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "LinkedIn Post Commenters",
|
||||
"type": "n8n-nodes-base.phantombuster",
|
||||
"position": [
|
||||
480,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"jsonParameters": true,
|
||||
"additionalFields": {
|
||||
"manualLaunch": true
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"phantombusterApi": {
|
||||
"id": "",
|
||||
"name": ""
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Get Comments",
|
||||
"type": "n8n-nodes-base.phantombuster",
|
||||
"position": [
|
||||
880,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"operation": "getOutput",
|
||||
"additionalFields": {}
|
||||
},
|
||||
"credentials": {
|
||||
"phantombusterApi": {
|
||||
"id": "",
|
||||
"name": ""
|
||||
}
|
||||
},
|
||||
"executeOnce": true,
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Dropcontact",
|
||||
"type": "n8n-nodes-base.dropcontact",
|
||||
"position": [
|
||||
1300,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"additionalFields": {
|
||||
"company": "=",
|
||||
"website": "",
|
||||
"linkedin": "",
|
||||
"last_name": "",
|
||||
"first_name": "="
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"dropcontactApi": {
|
||||
"id": "",
|
||||
"name": ""
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Phantombuster",
|
||||
"type": "n8n-nodes-base.phantombuster",
|
||||
"position": [
|
||||
2500,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"additionalFields": {}
|
||||
},
|
||||
"credentials": {
|
||||
"phantombusterApi": {
|
||||
"id": "",
|
||||
"name": ""
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "LinkedIn Post Liker",
|
||||
"type": "n8n-nodes-base.phantombuster",
|
||||
"position": [
|
||||
480,
|
||||
600
|
||||
],
|
||||
"parameters": {
|
||||
"jsonParameters": true,
|
||||
"additionalFields": {
|
||||
"manualLaunch": true
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"phantombusterApi": {
|
||||
"id": "",
|
||||
"name": ""
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Get Likers",
|
||||
"type": "n8n-nodes-base.phantombuster",
|
||||
"position": [
|
||||
880,
|
||||
600
|
||||
],
|
||||
"parameters": {
|
||||
"operation": "getOutput",
|
||||
"additionalFields": {}
|
||||
},
|
||||
"credentials": {
|
||||
"phantombusterApi": {
|
||||
"id": "",
|
||||
"name": ""
|
||||
}
|
||||
},
|
||||
"executeOnce": true,
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Wait 30s",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
680,
|
||||
560
|
||||
],
|
||||
"webhookId": "de87cd0e-ea00-43d8-896c-836494094779",
|
||||
"parameters": {
|
||||
"unit": "seconds",
|
||||
"amount": 30
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"settings": {},
|
||||
"connections": {
|
||||
"Cron": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "LinkedIn Post Commenters",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "LinkedIn Post Liker",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Lemlist": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Phantombuster",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Exists ?": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Set - Update",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Set - New",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait 30s": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Comments",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Set - New": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Airtable - Create",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Likers": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Dropcontact",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Dropcontact": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Airtable - List",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Comments": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Dropcontact",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Set - Update": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Airtable - Update",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Phantombuster": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Hubspot",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Airtable - List": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Exists ?",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Airtable - Create": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Lemlist",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Airtable - Update": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Lemlist",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"LinkedIn Post Commenters": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait 30s",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
1217
workflows/Wait/0091_Wait_Splitout_Process_Webhook.json
Normal file
1217
workflows/Wait/0091_Wait_Splitout_Process_Webhook.json
Normal file
File diff suppressed because it is too large
Load Diff
132
workflows/Wait/0092_Wait_Datetime_Automate_Triggered.json
Normal file
132
workflows/Wait/0092_Wait_Datetime_Automate_Triggered.json
Normal file
@@ -0,0 +1,132 @@
|
||||
{
|
||||
"nodes": [
|
||||
{
|
||||
"name": "Calendly Trigger",
|
||||
"type": "n8n-nodes-base.calendlyTrigger",
|
||||
"position": [
|
||||
-600,
|
||||
1700
|
||||
],
|
||||
"webhookId": "f3436daa-42cd-4ac9-93ff-750a9cc28165",
|
||||
"parameters": {
|
||||
"events": [
|
||||
"invitee.created"
|
||||
]
|
||||
},
|
||||
"credentials": {
|
||||
"calendlyApi": "calendly_api"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Pipedrive",
|
||||
"type": "n8n-nodes-base.pipedrive",
|
||||
"position": [
|
||||
-400,
|
||||
1600
|
||||
],
|
||||
"parameters": {
|
||||
"type": "call",
|
||||
"subject": "={{$json[\"payload\"][\"event_type\"][\"name\"]}} with {{$json[\"payload\"][\"invitee\"][\"name\"]}} on {{$json[\"payload\"][\"event\"][\"invitee_start_time\"]}}",
|
||||
"resource": "activity",
|
||||
"additionalFields": {}
|
||||
},
|
||||
"credentials": {
|
||||
"pipedriveApi": "pipedriveapi"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Date & Time",
|
||||
"type": "n8n-nodes-base.dateTime",
|
||||
"position": [
|
||||
-400,
|
||||
1800
|
||||
],
|
||||
"parameters": {
|
||||
"value": "={{$json[\"payload\"][\"event\"][\"end_time\"]}}",
|
||||
"action": "calculate",
|
||||
"options": {},
|
||||
"duration": 15,
|
||||
"timeUnit": "minutes",
|
||||
"dataPropertyName": "feedback_time"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Slack",
|
||||
"type": "n8n-nodes-base.slack",
|
||||
"position": [
|
||||
0,
|
||||
1800
|
||||
],
|
||||
"parameters": {
|
||||
"text": "={{$json[\"payload\"][\"event\"][\"assigned_to\"][0]}}, today you had a {{$json[\"payload\"][\"event_type\"][\"name\"]}} {{$json[\"payload\"][\"event_type\"][\"kind\"]}} meeting with {{$json[\"payload\"][\"invitee\"][\"name\"]}}. Please write your notes from the call here [link] and mark this message with ✅ when you're done.",
|
||||
"channel": "salesteam",
|
||||
"blocksUi": {
|
||||
"blocksValues": []
|
||||
},
|
||||
"attachments": [],
|
||||
"otherOptions": {}
|
||||
},
|
||||
"credentials": {
|
||||
"slackApi": "slack_nodeqa"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Wait",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
-200,
|
||||
1800
|
||||
],
|
||||
"webhookId": "05c224b9-6ca7-40e7-97cb-bc1ddc3b55af",
|
||||
"parameters": {
|
||||
"resume": "specificTime",
|
||||
"dateTime": "={{$json[\"feedback_time\"]}}"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"connections": {
|
||||
"Wait": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Slack",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Date & Time": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Calendly Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Date & Time",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Pipedrive",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
152
workflows/Wait/0101_Wait_Manual_Automation_Webhook.json
Normal file
152
workflows/Wait/0101_Wait_Manual_Automation_Webhook.json
Normal file
@@ -0,0 +1,152 @@
|
||||
{
|
||||
"nodes": [
|
||||
{
|
||||
"name": "On clicking 'execute'",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
250,
|
||||
300
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Customer Datastore",
|
||||
"type": "n8n-nodes-base.n8nTrainingCustomerDatastore",
|
||||
"position": [
|
||||
450,
|
||||
300
|
||||
],
|
||||
"parameters": {
|
||||
"operation": "getAllPeople",
|
||||
"returnAll": true
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "SplitInBatches",
|
||||
"type": "n8n-nodes-base.splitInBatches",
|
||||
"position": [
|
||||
650,
|
||||
300
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"batchSize": 1
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "HTTP Request",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
850,
|
||||
300
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://jsonplaceholder.typicode.com/posts",
|
||||
"options": {},
|
||||
"requestMethod": "POST",
|
||||
"bodyParametersUi": {
|
||||
"parameter": [
|
||||
{
|
||||
"name": "id",
|
||||
"value": "={{$json[\"id\"]}}"
|
||||
},
|
||||
{
|
||||
"name": "name",
|
||||
"value": "={{$json[\"name\"]}}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Wait",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
950,
|
||||
100
|
||||
],
|
||||
"webhookId": "b809abfb-8e02-4b31-90b9-0005be656312",
|
||||
"parameters": {
|
||||
"unit": "seconds",
|
||||
"amount": 4
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Replace Me",
|
||||
"type": "n8n-nodes-base.noOp",
|
||||
"position": [
|
||||
1050,
|
||||
300
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"connections": {
|
||||
"Wait": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "SplitInBatches",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"HTTP Request": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Replace Me",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Wait",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"SplitInBatches": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "HTTP Request",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Customer Datastore": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "SplitInBatches",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"On clicking 'execute'": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Customer Datastore",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
376
workflows/Wait/0290_Wait_Code_Update_Webhook.json
Normal file
376
workflows/Wait/0290_Wait_Code_Update_Webhook.json
Normal file
@@ -0,0 +1,376 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "f0a68da631efd4ed052a324b63ff90f7a844426af0398a68338f44245d1dd9e5"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "04750e9b-6ce3-401b-89e7-f1f17f3a4a28",
|
||||
"name": "When clicking \"Execute Workflow\"",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
-180,
|
||||
300
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "7a8bb997-5a2d-4ee0-a1ca-bebe9fe32bc2",
|
||||
"name": "HTTP Request",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
640,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://www.{{ $node[\"Split In Batches\"].json[\"Domain\"] }}",
|
||||
"options": {
|
||||
"redirect": {
|
||||
"redirect": {
|
||||
"followRedirects": true
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"typeVersion": 3,
|
||||
"continueOnFail": true
|
||||
},
|
||||
{
|
||||
"id": "6409f0c4-bf93-4a1d-a74c-e294fb39895f",
|
||||
"name": "HTML Extract",
|
||||
"type": "n8n-nodes-base.htmlExtract",
|
||||
"position": [
|
||||
820,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"trimValues": false
|
||||
},
|
||||
"extractionValues": {
|
||||
"values": [
|
||||
{
|
||||
"key": "body",
|
||||
"cssSelector": "html"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1,
|
||||
"continueOnFail": true
|
||||
},
|
||||
{
|
||||
"id": "f45fcc6a-9ccd-43c9-9eaf-1797768e1e62",
|
||||
"name": "OpenAI",
|
||||
"type": "n8n-nodes-base.openAi",
|
||||
"position": [
|
||||
1140,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"prompt": "=This is the content of the website {{ $node[\"Split In Batches\"].json[\"Domain\"] }}:\"{{ $json[\"contentShort\"] }}\"\n\nIn a JSON format:\n\n- Give me the value proposition of the company. In less than 25 words. In English. Casual Tone. Format is: \"[Company Name] helps [target audience] [achieve desired outcome] and [additional benefit]\"\n\n- Give me the industry of the company. (Classify using this industry list: [Agriculture, Arts, Construction, Consumer Goods, Education, Entertainment, Finance, Other, Health Care, Legal, Manufacturing, Media & Communications, Public Administration, Advertisements, Real Estate, Recreation & Travel, Retail, Software, Transportation & Logistics, Wellness & Fitness] if it's ambiguous between Sofware and Consumer Goods, prefer Consumer Goods)\n\n- Guess the target audience of each company.(Classify and choose 1 from this list: [sales teams, marketing teams, HR teams, customer Service teams, consumers, C-levels] Write it in lowercase)\n\n- Tell me if they are B2B or B2C\n\nformat should be:\n{\"value_proposition\": value_proposition,\n\"industry\": industry,\n\"target_audience\": target_audience, \n\"market\": market }\n\nJSON:",
|
||||
"options": {
|
||||
"topP": 1,
|
||||
"maxTokens": 120,
|
||||
"temperature": 0
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "67",
|
||||
"name": "Lucas Open AI"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1,
|
||||
"continueOnFail": true
|
||||
},
|
||||
{
|
||||
"id": "8de6c3d4-316f-4e00-a9f5-a4deefce90b3",
|
||||
"name": "Merge",
|
||||
"type": "n8n-nodes-base.merge",
|
||||
"position": [
|
||||
1600,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "combine",
|
||||
"options": {},
|
||||
"combinationMode": "mergeByPosition"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "669f888e-1416-4291-a854-07ffbbbfcab1",
|
||||
"name": "Clean Content",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
980,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "runOnceForEachItem",
|
||||
"jsCode": "if ($input.item.json.body){\n\n\n\n$input.item.json.content = $input.item.json.body.replaceAll('/^\\s+|\\s+$/g', '').replace('/(\\r\\n|\\n|\\r)/gm', \"\").replace(/\\s+/g, ' ')\n\n\n $input.item.json.contentShort = $input.item.json.content.slice(0, 10000)\n}\n\n\n\n\nreturn $input.item"
|
||||
},
|
||||
"executeOnce": false,
|
||||
"typeVersion": 1,
|
||||
"continueOnFail": true,
|
||||
"alwaysOutputData": true
|
||||
},
|
||||
{
|
||||
"id": "dbd5f866-2f5e-4adf-b1b5-a27b08c0425a",
|
||||
"name": "Update Google Sheets",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"position": [
|
||||
1840,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldsUi": {
|
||||
"values": [
|
||||
{
|
||||
"column": "Market",
|
||||
"fieldValue": "={{ $json[\"market\"] }}"
|
||||
},
|
||||
{
|
||||
"column": "Industry",
|
||||
"fieldValue": "={{ $json[\"industry\"] }}"
|
||||
},
|
||||
{
|
||||
"column": "Value Proposition",
|
||||
"fieldValue": "={{ $json[\"value_proposition\"] }}"
|
||||
},
|
||||
{
|
||||
"column": "Target Audience",
|
||||
"fieldValue": "={{ $json[\"target_audience\"] }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"operation": "update",
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gid=0",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/13h8HPWKha5kZHDeKxAPQvQqAOonof5cgpxzh79tIQfY/edit#gid=0",
|
||||
"cachedResultName": "Sheet1"
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "url",
|
||||
"value": "https://docs.google.com/spreadsheets/d/18iZ59I0q2AeElqcEpyJECNlSv4M6iJll9PQzXQkqEUk/edit#gid=0",
|
||||
"__regex": "https:\\/\\/(?:drive|docs)\\.google\\.com\\/\\w+\\/d\\/([0-9a-zA-Z\\-_]+)(?:\\/.*|)"
|
||||
},
|
||||
"valueToMatchOn": "={{ $json[\"Domain\"] }}",
|
||||
"columnToMatchOn": "Domain"
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsOAuth2Api": {
|
||||
"id": "2",
|
||||
"name": "Google Sheets account lucas"
|
||||
}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "f8bf8b70-6070-447b-af22-4d4e1ffe3539",
|
||||
"name": "Parse JSON",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
1300,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "runOnceForEachItem",
|
||||
"jsCode": "// Add a new field called 'myNewField' to the\n// JSON of the item\n$input.item.json.value_proposition=JSON.parse($input.item.json.text).value_proposition\n\n$input.item.json.industry=JSON.parse($input.item.json.text).industry\n\n$input.item.json.market=JSON.parse($input.item.json.text).market\n\n$input.item.json.target_audience=JSON.parse($input.item.json.text).target_audience\n\nreturn $input.item;"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "2754c6e1-9cf6-47d4-ad97-0797ec9155df",
|
||||
"name": "Read Google Sheets",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"position": [
|
||||
40,
|
||||
300
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gid=0",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/13h8HPWKha5kZHDeKxAPQvQqAOonof5cgpxzh79tIQfY/edit#gid=0",
|
||||
"cachedResultName": "Sheet1"
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "url",
|
||||
"value": "https://docs.google.com/spreadsheets/d/18iZ59I0q2AeElqcEpyJECNlSv4M6iJll9PQzXQkqEUk/edit#gid=0",
|
||||
"__regex": "https:\\/\\/(?:drive|docs)\\.google\\.com\\/\\w+\\/d\\/([0-9a-zA-Z\\-_]+)(?:\\/.*|)"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsOAuth2Api": {
|
||||
"id": "2",
|
||||
"name": "Google Sheets account lucas"
|
||||
}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "c2b93428-0dcc-4c02-bb81-496c12442284",
|
||||
"name": "Split In Batches",
|
||||
"type": "n8n-nodes-base.splitInBatches",
|
||||
"position": [
|
||||
260,
|
||||
300
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "eccf1dc8-a0bb-40f6-9471-95eac8020b02",
|
||||
"name": "Wait",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
2060,
|
||||
560
|
||||
],
|
||||
"webhookId": "d44bc024-1c21-44e0-b2b4-5cff6fb9f402",
|
||||
"parameters": {
|
||||
"unit": "seconds"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"connections": {
|
||||
"Wait": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Split In Batches",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Merge": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Update Google Sheets",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Parse JSON",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Parse JSON": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge",
|
||||
"type": "main",
|
||||
"index": 1
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"HTML Extract": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Clean Content",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"HTTP Request": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "HTML Extract",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Clean Content": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "OpenAI",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Split In Batches": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "HTTP Request",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Merge",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Read Google Sheets": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Split In Batches",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Update Google Sheets": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When clicking \"Execute Workflow\"": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Read Google Sheets",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
836
workflows/Wait/0330_Wait_Webhook_Send_Webhook.json
Normal file
836
workflows/Wait/0330_Wait_Webhook_Send_Webhook.json
Normal file
@@ -0,0 +1,836 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "8c8c5237b8e37b006a7adce87f4369350c58e41f3ca9de16196d3197f69eabcd",
|
||||
"templateId": "1971"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "dbb98f7d-6737-4eaa-9a66-9779c042c575",
|
||||
"name": "VirusTotal result",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
2430,
|
||||
1648
|
||||
],
|
||||
"parameters": {
|
||||
"url": "={{ $json.data.links.self }}",
|
||||
"options": {},
|
||||
"authentication": "predefinedCredentialType",
|
||||
"nodeCredentialType": "virusTotalApi"
|
||||
},
|
||||
"typeVersion": 4.1
|
||||
},
|
||||
{
|
||||
"id": "fb71337b-ebd3-4331-9f18-ff953c6b068b",
|
||||
"name": "DNS Lookup",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1330,
|
||||
1028
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://dns.google/resolve",
|
||||
"options": {},
|
||||
"sendQuery": true,
|
||||
"queryParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "name",
|
||||
"value": "={{ $json.url.includes('://') ? $json.url.split('://')[1].split('/')[0] : $json.url }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.1
|
||||
},
|
||||
{
|
||||
"id": "290c6e9c-31d1-4476-9beb-b72a795ecfbb",
|
||||
"name": "Set IP From Lookup",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
1530,
|
||||
1028
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "runOnceForEachItem",
|
||||
"jsCode": "// Get the resolved IP address (last item in the Answer array)\nconst ip = $json.Answer.pop().data;\nconst item = {...$('Is IP?').item.json}\nitem.ip = ip\n\nreturn {json: item};"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "2e25aa5e-479c-4e3b-b866-89f2bdbabbba",
|
||||
"name": "Set IP",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
1390,
|
||||
828
|
||||
],
|
||||
"parameters": {
|
||||
"values": {
|
||||
"string": [
|
||||
{
|
||||
"name": "ip",
|
||||
"value": "={{ $json.url }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "69b89cd7-1456-4067-a9da-d81ef3f86097",
|
||||
"name": "Merge VirusTotal & Greynoise results",
|
||||
"type": "n8n-nodes-base.merge",
|
||||
"position": [
|
||||
3610,
|
||||
948
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "combine",
|
||||
"options": {},
|
||||
"mergeByFields": {
|
||||
"values": [
|
||||
{
|
||||
"field1": "ip",
|
||||
"field2": "ip"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "1011bb3b-3f75-40b8-a473-e07b70079b60",
|
||||
"name": "Is IP?",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
1110,
|
||||
848
|
||||
],
|
||||
"parameters": {
|
||||
"conditions": {
|
||||
"string": [
|
||||
{
|
||||
"value1": "={{ $json.url }}",
|
||||
"value2": "/^(?:[0-9]{1,3}\\.){3}[0-9]{1,3}$/",
|
||||
"operation": "regex"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "770b4056-1497-48ed-bcd7-ad6e7106cc7d",
|
||||
"name": "Start VirusTotal Scan",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1990,
|
||||
1648
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://www.virustotal.com/api/v3/urls",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"sendBody": true,
|
||||
"contentType": "multipart-form-data",
|
||||
"authentication": "predefinedCredentialType",
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "url",
|
||||
"value": "={{ $json.url }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"nodeCredentialType": "virusTotalApi"
|
||||
},
|
||||
"typeVersion": 4.1
|
||||
},
|
||||
{
|
||||
"id": "d5d31e4a-2f95-4151-af35-bb8129f2e5a3",
|
||||
"name": "VirusTotal Summary",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
3230,
|
||||
1628
|
||||
],
|
||||
"parameters": {
|
||||
"values": {
|
||||
"string": [
|
||||
{
|
||||
"name": "virusTotalStats",
|
||||
"value": "={{ $json.data.attributes.stats }}"
|
||||
},
|
||||
{
|
||||
"name": "blockList",
|
||||
"value": "={{ $json.data.attributes.results.BlockList.result }}"
|
||||
},
|
||||
{
|
||||
"name": "openPhish",
|
||||
"value": "={{ $json.data.attributes.results.OpenPhish.result }}"
|
||||
},
|
||||
{
|
||||
"name": "url",
|
||||
"value": "={{ $('Merge').all()[$itemIndex].json.url }}"
|
||||
},
|
||||
{
|
||||
"name": "ip",
|
||||
"value": "={{ $('Merge').all()[$itemIndex].json.ip }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {
|
||||
"dotNotation": false
|
||||
},
|
||||
"keepOnlySet": true
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "467c795f-6f13-4d6d-a8cf-5cf9be2e7a77",
|
||||
"name": "VirusTotal ready?",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
2790,
|
||||
1648
|
||||
],
|
||||
"parameters": {
|
||||
"conditions": {
|
||||
"string": [
|
||||
{
|
||||
"value1": "={{ $json.data.attributes.status }}",
|
||||
"value2": "queued",
|
||||
"operation": "notEqual"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "284728e4-dc74-4c37-890b-5305970960c0",
|
||||
"name": "Wait 5s",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
2230,
|
||||
1648
|
||||
],
|
||||
"webhookId": "18348e84-831d-4ea8-bb39-6ec847c72275",
|
||||
"parameters": {
|
||||
"unit": "seconds",
|
||||
"amount": 5
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "76e1414a-d690-44df-a3b8-8dbb4a192720",
|
||||
"name": "Webhook",
|
||||
"type": "n8n-nodes-base.webhook",
|
||||
"notes": "Example:\n\ncurl -X POST \"https://n8n.yourdomain.com/webhook-test/d5124bd8-aada-44da-8050-3070f303ad24\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"data\": [{\"url\": \"1.1.1.1\"}, {\"url\": \"88.204.59.2\"}, {\"url\": \"54.36.148.188\"}, {\"url\": \"facebook.com\"}], \"email\": \"user@domain.com\"}'",
|
||||
"position": [
|
||||
450,
|
||||
1448
|
||||
],
|
||||
"webhookId": "d5124bd8-aada-44da-8050-3070f303ad24",
|
||||
"parameters": {
|
||||
"path": "d5124bd8-aada-44da-8050-3070f303ad24",
|
||||
"options": {},
|
||||
"httpMethod": "POST"
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "b3e188f3-0a39-4451-ab70-632282243f03",
|
||||
"name": "Get List of URLs",
|
||||
"type": "n8n-nodes-base.itemLists",
|
||||
"position": [
|
||||
650,
|
||||
1448
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldToSplitOut": "body.data"
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "360628b7-afc0-4444-a8c0-a85fae54b0e3",
|
||||
"name": "Set Email",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
850,
|
||||
1448
|
||||
],
|
||||
"parameters": {
|
||||
"values": {
|
||||
"string": [
|
||||
{
|
||||
"name": "Email",
|
||||
"value": "={{ $('Webhook').item.json.body.email }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "6df9593b-5f9f-4b50-bddb-97dcb2017d6e",
|
||||
"name": "Merge Greynoise results",
|
||||
"type": "n8n-nodes-base.merge",
|
||||
"position": [
|
||||
2370,
|
||||
728
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "combine",
|
||||
"options": {},
|
||||
"combinationMode": "mergeByPosition"
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "1957a675-7a5a-4ccd-b334-f2c4f9749f58",
|
||||
"name": "Send Report Slack",
|
||||
"type": "n8n-nodes-base.slack",
|
||||
"position": [
|
||||
3850,
|
||||
1168
|
||||
],
|
||||
"parameters": {
|
||||
"text": "=Successfully scanned {{ $json.url }} {{$json.ip !== $json.url ? `(${$json.ip})`: '' }}\n\n\nVirusTotal Report ({{ $json.virusTotalStats.harmless + $json.virusTotalStats.malicious + $json.virusTotalStats.suspicious + $json.virusTotalStats.undetected}} scans)\n\n{{$json.virusTotalStats.harmless}} Harmless\n{{$json.virusTotalStats.malicious}} Malicious\n{{$json.virusTotalStats.suspicious}} Suspicious\n{{$json.virusTotalStats.undetected}} Undetected\n{{$json.virusTotalStats.timeout}} Timed out\n\nBlockList: {{ $json.blockList }}\nOpenPhish: {{ $json.openPhish }}\n\nSummary: {{ $json.virusTotalStats.suspicious + $json.virusTotalStats.malicious === 0 ? \"✅ Harmless\": \"🚨 Malicous\" }}\n\n\n\nGreynoise Report\n\nTrust Level: {{ $json.trust_level ?? \"Not trusted\"}}\nClassification: {{ $json.classification }}\n\nLocation: {{ $json.location || 'n/a' }}\nCategory: {{ $json.category }}\nTags: {{$json.tags.join(', ') || 'None'}}",
|
||||
"select": "channel",
|
||||
"channelId": {
|
||||
"__rl": true,
|
||||
"mode": "name",
|
||||
"value": "#notifications"
|
||||
},
|
||||
"otherOptions": {}
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "4d64351f-0233-4859-afd2-fc31e3fc37cd",
|
||||
"name": "Send Report Email",
|
||||
"type": "n8n-nodes-base.gmail",
|
||||
"position": [
|
||||
3850,
|
||||
948
|
||||
],
|
||||
"parameters": {
|
||||
"sendTo": "={{ $('Merge').first().json.Email }}",
|
||||
"message": "=Successfully scanned {{ $json.url }} {{$json.ip !== $json.url ? `(${$json.ip})`: '' }}<br /><br /><br />\n\n\n<h3>VirusTotal Report ({{ $json.virusTotalStats.harmless + $json.virusTotalStats.malicious + $json.virusTotalStats.suspicious + $json.virusTotalStats.undetected}} scans)</h3><br /><br />\n\n{{$json.virusTotalStats.harmless}} Harmless<br />\n{{$json.virusTotalStats.malicious}} Malicious<br />\n{{$json.virusTotalStats.suspicious}} Suspicious<br />\n{{$json.virusTotalStats.undetected}} Undetected<br />\n{{$json.virusTotalStats.timeout}} Timed out<br /><br />\n\nBlockList: {{ $json.blockList }}<br />\nOpenPhish: {{ $json.openPhish }}<br /><br />\n\n<b>Summary: {{ $json.virusTotalStats.suspicious + $json.virusTotalStats.malicious === 0 ? \"✅ Harmless\": \"🚨 Malicous\" }}</b><br /><br /><br />\n\n\n\n<h3>Greynoise Report</h3><br /><br />\n\nTrust Level: {{ $json.trust_level ?? \"Not trusted\"}}<br />\nClassification: {{ $json.classification }}<br /><br />\n\nLocation: {{ $json.location || 'n/a' }}<br />\nCategory: {{ $json.category }}<br />\nTags: {{$json.tags.join(', ') || 'None'}}<br /><br /><br /><br />",
|
||||
"options": {},
|
||||
"subject": "={{ $json.url }} Scan Report"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "e4305eb1-8e57-49d0-97b7-391200bd0042",
|
||||
"name": "Greynoise Summary",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
2650,
|
||||
728
|
||||
],
|
||||
"parameters": {
|
||||
"values": {
|
||||
"string": [
|
||||
{
|
||||
"name": "ip",
|
||||
"value": "={{ $json.ip }}"
|
||||
},
|
||||
{
|
||||
"name": "classification",
|
||||
"value": "={{ $json.classification || 'safe' }}"
|
||||
},
|
||||
{
|
||||
"name": "location",
|
||||
"value": "={{ $json.metadata?.region ? `${$json.metadata?.region} ${$json.metadata?.country}` : '' }}"
|
||||
},
|
||||
{
|
||||
"name": "tags",
|
||||
"value": "={{ $json.tags ?? [] }}"
|
||||
},
|
||||
{
|
||||
"name": "category",
|
||||
"value": "={{ $json.category || 'n/a' }}"
|
||||
},
|
||||
{
|
||||
"name": "trustLevel",
|
||||
"value": "={{ $json.trust_level }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {
|
||||
"dotNotation": false
|
||||
},
|
||||
"keepOnlySet": true
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "c149b1f3-e447-4194-a94e-7d8e0bf38241",
|
||||
"name": "Merge",
|
||||
"type": "n8n-nodes-base.merge",
|
||||
"position": [
|
||||
1750,
|
||||
848
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "88c30a1d-c232-4da5-87c3-4d67234b6a29",
|
||||
"name": "Combine looped items",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
3010,
|
||||
1628
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "let results = [],\n i = 0;\n\ndo {\n try {\n results = results.concat($(\"VirusTotal result\").all(0, i)\n .filter(node => node.json.data.attributes.status === 'completed')\n );\n } catch (error) {\n return results;\n }\n i++;\n} while (true);"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "839170f5-7c97-40fd-aeaa-ad57262a586e",
|
||||
"name": "Filter",
|
||||
"type": "n8n-nodes-base.filter",
|
||||
"position": [
|
||||
2610,
|
||||
1648
|
||||
],
|
||||
"parameters": {
|
||||
"conditions": {
|
||||
"string": [
|
||||
{
|
||||
"value1": "={{ $json.data.attributes.status }}",
|
||||
"value2": "completed",
|
||||
"operation": "notEqual"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1,
|
||||
"alwaysOutputData": true
|
||||
},
|
||||
{
|
||||
"id": "d68db329-4628-44a8-8f97-b06cbf18e238",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
380,
|
||||
240
|
||||
],
|
||||
"parameters": {
|
||||
"width": 651.1325602067182,
|
||||
"height": 703.911103299255,
|
||||
"content": "## Form Input Overview\n\n- **Purpose**: \n - Instead of forcing other departments to use a full threat platform, simplify the interaction with our Threat Intel workflow which allows other departments to submit items via URL-accessible forms.\n\n- **Form Access URLs**:\n - **Execute Mode**: `https://n8n.domain.com/webhook/test/url-scan-form` - Use this to execute the workflow interactively within the n8n canvas. Hit the 'Execute Workflow' button to see real-time execution results.\n - **Silent Mode**: `https://n8n.domain.com/webhook/url-scan-form` - Use this for background execution without canvas updates. Results will be logged silently and can be reviewed in the 'Executions' tab.\n\n## Details and Best Practices\nWhen using the form, ensure that all inputs match the required format, like valid URLs for scans, to prevent any workflow interruptions. Keep in mind these forms are not performing input sanitation so incorrectly entered values will trigger an error workflow. Should there be any issues upon form submission, such as an absence of a confirmation message, or if the workflow fails, you can find detailed error information in the 'Executions' tab. "
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "f9081f7d-35ab-489c-87bb-c2deba7515f9",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
370,
|
||||
968
|
||||
],
|
||||
"parameters": {
|
||||
"width": 653.8285114211884,
|
||||
"height": 663.9676956356055,
|
||||
"content": "## API Integration\nWant to submit URLs and IPs automatically? Utilize the JSON structure below to upload multiple indicators simultaneously. The workflow leverages 'Item list' to parse the 'data' field, while 'Set Email' node appends the provided email to each URL.\n\n```json\n{\n \"email\": \"johndoe@example.com\",\n \"data\": [\n {\n \"url\": \"aztechsol.com\"\n },\n {\n \"ip\": \"8.8.8.8\"\n }\n ]\n}\n```\n\n## Details and Best Practices\n- Webhook Usage: Send data with a POST request, e.g., using curl.\n- Validation & Errors: Ensure URLs are correctly formatted. Check the 'Executions' tab for any submission errors. Keep in mind that there is only basic error handling in this workflow."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "aaaac5aa-f0a0-4452-99b4-d78d55a80564",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1070,
|
||||
266.9400418986032
|
||||
],
|
||||
"parameters": {
|
||||
"width": 827.7173647545219,
|
||||
"height": 936.2889303743061,
|
||||
"content": "\n## Data Standardization & Google DNS Integration\n- Purpose:\n\n - Standardize the diverse input sources---either from form submissions or API calls---by streamlining the input through a uniform processing pipeline. This ensures that whether the data entered is an IP address or a domain name, it can be consistently managed and transformed for threat intelligence tasks.\n - Extract IP from URL by passing it to Google DNS and attaching it to the URL.\n\n## Details and Best Practices\nTo guarantee the efficacy of the workflow, adhere to the prescribed input formats. For IP addresses, ensure they conform to IPv4 or IPv6 standards; for domains, verify that they are properly structured URLs. The system assumes clean inputs, as there are no built-in sanitation mechanisms---erroneous inputs may result in processing errors.\n\nIn case of an unsuccessful DNS lookup or other discrepancies, consult the 'Executions' tab for comprehensive error logs and apply the necessary corrections. To mitigate workflow disruptions, establish a set of error-handling protocols to manage and rectify such incidents.\n\nBe mindful that while the workflow is designed to automatically discern between IP addresses and domain names, it is imperative that the data entered is accurate to prevent any fallbacks or unnecessary processing overhead."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "32e80421-b608-4d89-b6fe-a95ab5b9e3bd",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1950,
|
||||
68.30371042491026
|
||||
],
|
||||
"parameters": {
|
||||
"width": 1485.5734904392764,
|
||||
"height": 987.7653566551932,
|
||||
"content": "\n## Greynoise Integration\n\n- Purpose:\n - The aim is to tap into Greynoise's robust API to enrich and contextualize IP-related information within the workflow. By querying Greynoise's specialized noise and RIOT databases, the workflow can quickly ascertain the nature of the IP activity and determine its relevance and potential threat level to an organization.\n - Classify and assess IP addresses by consulting with Greynoise databases, providing an additional layer of security intelligence.\n\n## Details and Best Practices\nTo ensure reliable results from the Greynoise integration, it's important to use well-formatted IP addresses. Confirm that IPs meet standard internet protocols for either IPv4 or IPv6. The workflow assumes that inputs are pre-sanitized, so any deviation may lead to errors or inaccurate assessments.\n\nIf the Greynoise lookup does not yield results or encounters errors, investigate the issue using the 'Executions' tab to view detailed error logs. Proactively develop error-handling strategies to effectively manage and recover from these errors.\n\nThe workflow is pre-configured to discern and process IP information accurately; however, it relies heavily on the integrity of the input. Incorrectly entered IPs can cause incorrect lookups and potentially miss significant threat data, thereby undermining the security posture.\n\n**Please note that this workflow segment is designed for the enterprise edition of Greynoise's API. Users must have a valid API key with enterprise access which should be configured in the HTTP request nodes that perform the API calls.**"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "adda919b-f65f-4fe0-9f66-11a5a9b65674",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1952,
|
||||
1088
|
||||
],
|
||||
"parameters": {
|
||||
"width": 1483.145187368557,
|
||||
"height": 774.1502041707245,
|
||||
"content": "\n## VirusTotal Integration\n- Purpose:\n - This workflow component is specifically crafted to harness the VirusTotal API's capabilities, allowing URLs to be submitted for thorough scanning. The goal is to seamlessly integrate the scanning process into the workflow, handling the asynchronous nature of VirusTotal scans by effectively managing state checks and result compilation.\n - Implement URL scanning by submitting requests to the VirusTotal API and accurately aggregating the scan results for analysis.\n\n## Details and Best Practices\nFor successful VirusTotal integration, it's crucial to submit URLs following standard web formats. The workflow is configured to expect correct URL inputs; deviations can disrupt the scanning process.\n\nUpon submission, if the VirusTotal scan results are pending or if errors are encountered, these can be tracked and examined under the 'Executions' tab. Develop a proactive strategy for handling such cases, including error logging, maximum retry limitations, or implementing a timeout mechanism.\n\nThe configuration of the workflow takes into account the need to prevent rapid, repetitive status checks, which can strain the VirusTotal API. As a result, it employs a looping system for status re-evaluation, which should be managed with precision to avoid unnecessary delays or excessive polling.\n\nNote that this integration is tailored for workflows that involve the VirusTotal API. While it works with the free VirusTotal license, too many requests may cause errors due to rate limiting. The Public API is limited to 500 requests per day and a rate of 4 requests per minute. It requires valid credentials set up in the HTTP request nodes to authenticate API calls successfully. Users should configure their API keys for access, and handle any API error responses, like HTTP 4xx or 5xx codes, with a robust error-logging and retry mechanism to ensure reliability and effectiveness of the scan process."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "cdaec18e-e9f1-4567-89e6-f5474bff42c4",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
3470,
|
||||
247
|
||||
],
|
||||
"parameters": {
|
||||
"width": 898.9279259630971,
|
||||
"height": 1146.6423884335761,
|
||||
"content": "\n\n## Reporting Integration\n- Purpose:\n - This component of the workflow is designed to amalgamate and communicate the insights from threat intelligence analysis to the team effectively. By integrating data from VirusTotal and Greynoise, it generates comprehensive reports that are automatically shared via Slack and email, fostering situational awareness and facilitating prompt action.\n - Compile and disseminate threat intelligence reports that highlight the significance and implications of the analyzed IP or domain data, ensuring that the team remains informed and ready to act.\n\n## Details and Best Practices\nThe heart of this workflow lies in the synthesis of threat intelligence gathered from both Greynoise and VirusTotal. By merging these data points, the logic creates a thorough examination of the URLs/IPs under scrutiny.\n\nHere's an expanded view of best practices to adhere to in this critical stage of the workflow:\n\nThe merging process must be precise, using the 'ip' fields as the common key to unify data from the two distinct sources. This unified view is crucial for accurate analysis and reporting.\n\nIt’s advisable to extend the merging capabilities to include additional data fields that may enhance the intelligence report. This could mean incorporating timestamps, geolocation data, or even threat levels.\n\nWhen integrating new messaging or reporting nodes, leverage the provided JSON structure to maintain consistency. To replicate the logic in another node, simply copy the JSON snippet from the expression editor and paste it into the configuration of the new node."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "577d4b74-9155-440f-a752-6654f8e54669",
|
||||
"name": "GreyNoise RIOT lookup",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
2070,
|
||||
708
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://api.greynoise.io/v2/riot/{{ $json.ip }}",
|
||||
"options": {},
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpHeaderAuth"
|
||||
},
|
||||
"typeVersion": 4.1
|
||||
},
|
||||
{
|
||||
"id": "9a41df79-3d81-4b2e-b21c-7f31985d8d1e",
|
||||
"name": "GreyNoise IP Check",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
2070,
|
||||
888
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://api.greynoise.io/v2/noise/context/{{ $json.ip }}",
|
||||
"options": {},
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpHeaderAuth"
|
||||
},
|
||||
"typeVersion": 4.1
|
||||
},
|
||||
{
|
||||
"id": "006eb997-5851-41bd-9d5c-9f44d3b7ec08",
|
||||
"name": "Form Trigger",
|
||||
"type": "n8n-nodes-base.formTrigger",
|
||||
"position": [
|
||||
640,
|
||||
800
|
||||
],
|
||||
"webhookId": "087145f7-3c00-4a1a-8e04-181b536606e7",
|
||||
"parameters": {
|
||||
"path": "url-scan-form",
|
||||
"options": {},
|
||||
"formTitle": "Scan URL or IP and get a report",
|
||||
"formFields": {
|
||||
"values": [
|
||||
{
|
||||
"fieldLabel": "url",
|
||||
"requiredField": true
|
||||
},
|
||||
{
|
||||
"fieldLabel": "Email",
|
||||
"requiredField": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"formDescription": "Get a report from Virus Total and Greynoise on an IP address of URL"
|
||||
},
|
||||
"typeVersion": 2
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Merge": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Start VirusTotal Scan",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "GreyNoise IP Check",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "GreyNoise RIOT lookup",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Filter": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "VirusTotal ready?",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Is IP?": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Set IP",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "DNS Lookup",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Set IP": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait 5s": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "VirusTotal result",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Webhook": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get List of URLs",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Set Email": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Is IP?",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"DNS Lookup": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Set IP From Lookup",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Form Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Is IP?",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get List of URLs": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Set Email",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Greynoise Summary": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge VirusTotal & Greynoise results",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"VirusTotal ready?": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Combine looped items",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Wait 5s",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"VirusTotal result": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Filter",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"GreyNoise IP Check": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge Greynoise results",
|
||||
"type": "main",
|
||||
"index": 1
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Set IP From Lookup": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge",
|
||||
"type": "main",
|
||||
"index": 1
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"VirusTotal Summary": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge VirusTotal & Greynoise results",
|
||||
"type": "main",
|
||||
"index": 1
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Combine looped items": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "VirusTotal Summary",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"GreyNoise RIOT lookup": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge Greynoise results",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Start VirusTotal Scan": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait 5s",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Merge Greynoise results": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Greynoise Summary",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Merge VirusTotal & Greynoise results": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Send Report Slack",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Send Report Email",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
414
workflows/Wait/0385_Wait_Code_Send_Scheduled.json
Normal file
414
workflows/Wait/0385_Wait_Code_Send_Scheduled.json
Normal file
@@ -0,0 +1,414 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "cb484ba7b742928a2048bf8829668bed5b5ad9787579adea888f05980292a4a7"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "fe775b06-0264-49ea-af29-16289fee1100",
|
||||
"name": "Get events page",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
-660,
|
||||
1160
|
||||
],
|
||||
"parameters": {
|
||||
"url": "={{ $json.location }}/this-month?page={{ $runIndex+1}}",
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "c55554f4-f06c-4084-b9c2-454cf290682b",
|
||||
"name": "Last page?",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
0,
|
||||
1160
|
||||
],
|
||||
"parameters": {
|
||||
"conditions": {
|
||||
"number": [
|
||||
{
|
||||
"value1": "={{ $items().length }}",
|
||||
"value2": "=50"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "3d750b8a-4288-45ac-af2d-24fc6b7126ec",
|
||||
"name": "Get all events from the page",
|
||||
"type": "n8n-nodes-base.htmlExtract",
|
||||
"position": [
|
||||
-440,
|
||||
1160
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"trimValues": true
|
||||
},
|
||||
"extractionValues": {
|
||||
"values": [
|
||||
{
|
||||
"key": "events",
|
||||
"cssSelector": "li.event-listings-element",
|
||||
"returnArray": true,
|
||||
"returnValue": "html"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "84b570d5-60ad-4cb1-9428-1cc3372954cb",
|
||||
"name": "Get each event data",
|
||||
"type": "n8n-nodes-base.htmlExtract",
|
||||
"position": [
|
||||
420,
|
||||
1140
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"dataPropertyName": "events",
|
||||
"extractionValues": {
|
||||
"values": [
|
||||
{
|
||||
"key": "date",
|
||||
"attribute": "datetime",
|
||||
"cssSelector": "time",
|
||||
"returnArray": true,
|
||||
"returnValue": "attribute"
|
||||
},
|
||||
{
|
||||
"key": "artist",
|
||||
"cssSelector": "p.artists strong"
|
||||
},
|
||||
{
|
||||
"key": "support",
|
||||
"cssSelector": "p.artists span.support"
|
||||
},
|
||||
{
|
||||
"key": "location",
|
||||
"cssSelector": "p.location"
|
||||
},
|
||||
{
|
||||
"key": "eventLink",
|
||||
"attribute": "href",
|
||||
"cssSelector": "a.event-link",
|
||||
"returnValue": "attribute"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "783555d1-1c9c-4bda-8969-0ac46dced10e",
|
||||
"name": "Limit to one",
|
||||
"type": "n8n-nodes-base.itemLists",
|
||||
"position": [
|
||||
420,
|
||||
1300
|
||||
],
|
||||
"parameters": {
|
||||
"operation": "limit"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "fdd1c66b-5e20-4c2d-8c01-38555621ec84",
|
||||
"name": "Wait 3s",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
220,
|
||||
1300
|
||||
],
|
||||
"webhookId": "617f8c35-66e5-4fca-b974-cf9fc4130d68",
|
||||
"parameters": {
|
||||
"unit": "seconds",
|
||||
"amount": 3
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "49b5b5c7-9645-42cb-89ec-bb9972c8b379",
|
||||
"name": "Split events",
|
||||
"type": "n8n-nodes-base.itemLists",
|
||||
"position": [
|
||||
-220,
|
||||
1160
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldToSplitOut": "events"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "30b06dc8-d896-4684-9c79-3d845f1041ac",
|
||||
"name": "Collect all results",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
220,
|
||||
1140
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "let results = [],\n i = 0;\n\ndo {\n try {\n results = results.concat($items('Split events', 0, i));\n } catch (error) {\n return results;\n }\n i++;\n} while(true);"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "ea9444ad-06a3-4567-9638-ce8ef8bfff23",
|
||||
"name": "🤖 Each month",
|
||||
"type": "n8n-nodes-base.scheduleTrigger",
|
||||
"position": [
|
||||
-1220,
|
||||
1160
|
||||
],
|
||||
"parameters": {
|
||||
"rule": {
|
||||
"interval": [
|
||||
{
|
||||
"field": "months",
|
||||
"triggerAtHour": 20
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "73f7295d-c0f7-42b6-8784-3198538e6e48",
|
||||
"name": "Setup location and email",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
-880,
|
||||
1160
|
||||
],
|
||||
"parameters": {
|
||||
"values": {
|
||||
"string": [
|
||||
{
|
||||
"name": "location"
|
||||
},
|
||||
{
|
||||
"name": "email"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {},
|
||||
"keepOnlySet": true
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "a3529743-a7fd-4056-80a9-63b0dac259d6",
|
||||
"name": "💄 Lick the stamp",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
620,
|
||||
1140
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "const monthNames = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ];\n\nlet html = `<table style=\"width: 100%\">`;\nfor (const item of $input.all()) {\n const eventDate = new Date(item.json.date[0]);\n \n html += `\n <tr>\n <td style=\"width: 60px; background-color: #2e2e32; font-family: sans-serif\">\n <a href=\"https://www.songkick.com${item.json.eventLink}\" style=\"color: #dcdfe6; text-decoration: none\">\n <p style=\"font-weight: bold; text-align: center; margin: 5px 0 0; padding: 0 0.5em\">${monthNames[eventDate.getMonth()]}</p>\n <p style=\"font-weight: bold; font-size: 1.5em; text-align: center; margin: 0 0 2px\">${eventDate.getDate()}</p>\n </a>\n </td>\n <td style=\"background-color: #f2f4f8; font-family: sans-serif; padding: 0.3em 0.5em\">\n <a href=\"https://www.songkick.com${item.json.eventLink}\" style=\"color: #555555; text-decoration: none\">\n <div>\n <p style=\"font-size: 1.2em; margin: 0\"><b>${item.json.artist}</b>`\n\n if (item.json.support) {\n html = html + `<span style=\"color: #7d7d87; margin:0\"> + ${item.json.support}</span>`;\n }\n \n html += `\n </p><p style=\"color: #7d7d87; margin: 0\">${item.json.location.split(',')[0].replace(/(\\r\\n|\\n|\\r)/gm, \"\")}</p>\n </div>\n </a>\n </td>\n </tr>\n `\n}\nhtml += '</table>';\n\nreturn { \n \"html\": html,\n \"total\": $input.all().length \n};\n//$input.all();"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "a8f0e1cf-e8b5-402f-9336-4c623980a315",
|
||||
"name": "✉️ Send it",
|
||||
"type": "n8n-nodes-base.gmail",
|
||||
"position": [
|
||||
820,
|
||||
1140
|
||||
],
|
||||
"parameters": {
|
||||
"sendTo": "={{ $('Setup location and email').params[\"values\"][\"string\"][1][\"value\"] }}",
|
||||
"message": "={{ $json[\"html\"] }}",
|
||||
"options": {
|
||||
"senderName": "=Monthly event newsletter"
|
||||
},
|
||||
"subject": "=📫 This month: {{$json[\"total\"]}} events!"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "e23fd2fc-baf3-4494-ae4a-ddb51f45ff3c",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-940,
|
||||
1080
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"height": 230.21423635107112,
|
||||
"content": "### Setup your location link and receiver email(s) here"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "58300fe9-e3b3-452f-b13b-a9296cf05a71",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
800,
|
||||
1060
|
||||
],
|
||||
"parameters": {
|
||||
"color": 3,
|
||||
"height": 230.21423635107112,
|
||||
"content": "### Don't forget to connect a GMail account to this node!"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "663147c1-1af0-49f3-9671-3d1d66e7a6f0",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
460,
|
||||
720
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"content": "## Don't forget to activate the workflow here ☝️"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Wait 3s": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Limit to one",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Last page?": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Collect all results",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Wait 3s",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Limit to one": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Setup location and email",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Split events": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Last page?",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get events page": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get all events from the page",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"🤖 Each month": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Setup location and email",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Collect all results": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get each event data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get each event data": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "💄 Lick the stamp",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"💄 Lick the stamp": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "✉️ Send it",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Setup location and email": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get events page",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get all events from the page": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Split events",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
508
workflows/Wait/0466_Wait_Filter_Send_Webhook.json
Normal file
508
workflows/Wait/0466_Wait_Filter_Send_Webhook.json
Normal file
@@ -0,0 +1,508 @@
|
||||
{
|
||||
"nodes": [
|
||||
{
|
||||
"id": "fdb7302d-9319-4861-abab-557a3c1f1493",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2660,
|
||||
340
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 288.76295784381495,
|
||||
"height": 795.272978576365,
|
||||
"content": "### Available source and target languages`*`:\n\n`BG` - 🇧🇬 Bulgarian\n`CS` - 🇨🇿 Czech\n`DA` - 🇩🇰 Danish\n`DE` - 🇩🇪 German\n`EL` - 🇬🇷 Greek\n`EN-GB` - 🇬🇧 English (British)\n`EN-US` - 🇺🇸 English (American)\n`ES` - 🇪🇸 Spanish\n`ET` - 🇪🇪 Estonian\n`FI` - 🇫🇮 Finnish\n`FR` - 🇫🇷 French\n`HU` - 🇭🇺 Hungarian\n`ID` - 🇮🇩 Indonesian\n`IT` - 🇮🇹 Italian\n`JA` - 🇯🇵 Japanese\n`KO` - 🇰🇷 Korean\n`LT` - 🇱🇹 Lithuanian\n`LV` - 🇱🇻 Latvian\n`NB` - 🇳🇴 Norwegian (Bokmål)\n`NL` - 🇳🇱 Dutch\n`PL` - 🇵🇱 Polish\n`PT-BR` - 🇧🇷 Portuguese (Brazilian)\n`PT-PT` - 🇵🇹 Portuguese\n`RO` - 🇷🇴 Romanian\n`RU` - 🇷🇺 Russian\n`SK` - 🇸🇰 Slovak\n`SL` - 🇸🇮 Slovenian\n`SV` - 🇸🇪 Swedish\n`TR` - 🇹🇷 Turkish\n`UK` - 🇺🇦 Ukrainian\n`ZH` - 🇨🇳 Chinese (simplified)\n\n`*` For more up-to-date list, please consult the official DeepL [API documentation](https://www.deepl.com/docs-api/documents/translate-document)"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "9cad538a-0efb-4186-b588-ef4d764fdf4e",
|
||||
"name": "Run manually",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
1100,
|
||||
560
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "242d4895-5b02-46b8-9c87-07fd2e11c9ba",
|
||||
"name": "Get files from specified folder",
|
||||
"type": "n8n-nodes-base.googleDrive",
|
||||
"position": [
|
||||
1780,
|
||||
560
|
||||
],
|
||||
"parameters": {
|
||||
"filter": {
|
||||
"folderId": {
|
||||
"__rl": true,
|
||||
"mode": "url",
|
||||
"value": "={{ $json.folder_url }}"
|
||||
},
|
||||
"whatToSearch": "files"
|
||||
},
|
||||
"options": {
|
||||
"fields": [
|
||||
"kind",
|
||||
"id",
|
||||
"name",
|
||||
"mimeType"
|
||||
]
|
||||
},
|
||||
"resource": "fileFolder"
|
||||
},
|
||||
"credentials": {
|
||||
"googleDriveOAuth2Api": {
|
||||
"id": "6q7v3i91ZDHQOKx3",
|
||||
"name": "Google Drive account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "1660cf85-af39-4d70-a997-5f4ef2252370",
|
||||
"name": "Use only PDF documents",
|
||||
"type": "n8n-nodes-base.filter",
|
||||
"position": [
|
||||
2000,
|
||||
560
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "098535fe-164e-4f58-9b35-0628b51ac5d0",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "endsWith"
|
||||
},
|
||||
"leftValue": "={{ $json.name }}",
|
||||
"rightValue": ".pdf"
|
||||
},
|
||||
{
|
||||
"id": "a0bb0e8c-25e9-4ee0-a1fd-2d98a7328111",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "notContains"
|
||||
},
|
||||
"leftValue": "={{ $json.name }}",
|
||||
"rightValue": "=-{{ $('⚙️ config').first().json.target_lang }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "b7cc611e-81a3-4468-bcab-ca6de564fbeb",
|
||||
"name": "Download files",
|
||||
"type": "n8n-nodes-base.googleDrive",
|
||||
"position": [
|
||||
2220,
|
||||
560
|
||||
],
|
||||
"parameters": {
|
||||
"fileId": {
|
||||
"__rl": true,
|
||||
"mode": "id",
|
||||
"value": "={{ $json.id }}"
|
||||
},
|
||||
"options": {},
|
||||
"operation": "download"
|
||||
},
|
||||
"credentials": {
|
||||
"googleDriveOAuth2Api": {
|
||||
"id": "6q7v3i91ZDHQOKx3",
|
||||
"name": "Google Drive account"
|
||||
}
|
||||
},
|
||||
"executeOnce": false,
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "f6e2c1e6-b68d-47b3-8582-7772f8b1ee95",
|
||||
"name": "Send translate request",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
2440,
|
||||
560
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://api.deepl.com/v2/document",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"sendBody": true,
|
||||
"contentType": "multipart-form-data",
|
||||
"authentication": "genericCredentialType",
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "target_lang",
|
||||
"value": "={{ $('⚙️ config').first().json.target_lang }}"
|
||||
},
|
||||
{
|
||||
"name": "file",
|
||||
"parameterType": "formBinaryData",
|
||||
"inputDataFieldName": "data"
|
||||
},
|
||||
{
|
||||
"name": "source_lang",
|
||||
"value": "={{ $('⚙️ config').first().json.source_lang }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"genericAuthType": "httpHeaderAuth"
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "NcB0kuT7IJgHvWlC",
|
||||
"name": "Deepl API Header auth"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.1
|
||||
},
|
||||
{
|
||||
"id": "9fab53d1-dfa8-4b27-892f-884853df1e50",
|
||||
"name": "Check translation status",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1320,
|
||||
820
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://api.deepl.com/v2/document/{{ $json.document_id }}",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"sendBody": true,
|
||||
"authentication": "genericCredentialType",
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "document_key",
|
||||
"value": "={{ $('Send translate request').item.json.document_key }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"genericAuthType": "httpHeaderAuth"
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "NcB0kuT7IJgHvWlC",
|
||||
"name": "Deepl API Header auth"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.1
|
||||
},
|
||||
{
|
||||
"id": "9d320d4c-8398-4af4-8582-bc60ca52b986",
|
||||
"name": "Wait a bit",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
1540,
|
||||
820
|
||||
],
|
||||
"webhookId": "9fd126e3-203c-4f11-ad50-d00ff55301a2",
|
||||
"parameters": {
|
||||
"unit": "seconds",
|
||||
"amount": 5
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "657758b1-a5f5-4b0b-bdd0-ef0cdb518863",
|
||||
"name": "file translated?",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
1760,
|
||||
820
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "1a7ad415-3d30-4d51-b31e-7a0911391d21",
|
||||
"operator": {
|
||||
"name": "filter.operator.equals",
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json.status }}",
|
||||
"rightValue": "done"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "2018d45b-8922-4a9c-884b-27cc6903d464",
|
||||
"name": "Wait between documents",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
2000,
|
||||
800
|
||||
],
|
||||
"webhookId": "877870bc-5b29-4ce0-82d6-3202d43e89fd",
|
||||
"parameters": {
|
||||
"unit": "seconds",
|
||||
"amount": 2
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "717972fe-45fa-4bd4-acf9-9db2efb45c12",
|
||||
"name": "Get translated document from deepL",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
2240,
|
||||
800
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://api.deepl.com/v2/document/{{ $json.document_id }}/result",
|
||||
"method": "POST",
|
||||
"options": {
|
||||
"timeout": 30000
|
||||
},
|
||||
"sendBody": true,
|
||||
"authentication": "genericCredentialType",
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "document_key",
|
||||
"value": "={{ $('Send translate request').item.json.document_key }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"genericAuthType": "httpHeaderAuth"
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "NcB0kuT7IJgHvWlC",
|
||||
"name": "Deepl API Header auth"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.1
|
||||
},
|
||||
{
|
||||
"id": "c9e9b000-8202-410d-9630-b08481ba4e39",
|
||||
"name": "Uplad to original folder",
|
||||
"type": "n8n-nodes-base.googleDrive",
|
||||
"position": [
|
||||
2460,
|
||||
800
|
||||
],
|
||||
"parameters": {
|
||||
"name": "={{ $('Download files').item.json.name.replace('.pdf', '--' + $('⚙️ config').first().json.target_lang) + '.pdf' }}",
|
||||
"driveId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "My Drive"
|
||||
},
|
||||
"options": {},
|
||||
"folderId": {
|
||||
"__rl": true,
|
||||
"mode": "url",
|
||||
"value": "={{ $('⚙️ config').first().json.folder_url }}"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleDriveOAuth2Api": {
|
||||
"id": "6q7v3i91ZDHQOKx3",
|
||||
"name": "Google Drive account"
|
||||
}
|
||||
},
|
||||
"executeOnce": false,
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "698a33ce-8b33-4b33-8236-190b1013cb0d",
|
||||
"name": "⚙️ config",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
1440,
|
||||
560
|
||||
],
|
||||
"parameters": {
|
||||
"fields": {
|
||||
"values": [
|
||||
{
|
||||
"name": "target_lang"
|
||||
},
|
||||
{
|
||||
"name": "source_lang"
|
||||
},
|
||||
{
|
||||
"name": "folder_url"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 3.2
|
||||
},
|
||||
{
|
||||
"id": "aeee03fa-f4a6-48fd-b3ca-ff6a6dc20fb4",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1280,
|
||||
367.395398150649
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 444.71526152412946,
|
||||
"height": 343.02803459456237,
|
||||
"content": "### Configure your workflow here by setting these parameters:\n- `folder_url`: URL of your google drive folder\n- `target_lang`: The language into which the text should be translated\n- `source_lang`: Language of the text to be translated (optional, if not specified DeepL will try to auto-detect the source language)"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Wait a bit": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "file translated?",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Run manually": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "⚙️ config",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"⚙️ config": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get files from specified folder",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Download files": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Send translate request",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"file translated?": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait between documents",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Check translation status",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Send translate request": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Check translation status",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Use only PDF documents": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Download files",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait between documents": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get translated document from deepL",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Check translation status": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait a bit",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get files from specified folder": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Use only PDF documents",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get translated document from deepL": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Uplad to original folder",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
522
workflows/Wait/0498_Wait_Splitout_Process_Scheduled.json
Normal file
522
workflows/Wait/0498_Wait_Splitout_Process_Scheduled.json
Normal file
@@ -0,0 +1,522 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "a2435d996b378e3a6fdef0468d70285e3aa0fbd0004de817bfc80e80afee4e7b"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "5fa5ccd8-81be-45a2-ac00-7ef28148c0c7",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
700,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"width": 1767.817629414989,
|
||||
"height": 470.03830555074103,
|
||||
"content": "## DROPCONTACT 250 BATCH ASYNCHRONOUSLY \n## 1500/HOUR REQUESTS\n**Double click** to edit me. [Guide](https://docs.n8n.io/workflows/sticky-notes/)"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "9c6826a3-ec94-4ff4-92a6-0ff7fa22349e",
|
||||
"name": "Aggregate",
|
||||
"type": "n8n-nodes-base.aggregate",
|
||||
"position": [
|
||||
1000,
|
||||
620
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldsToAggregate": {
|
||||
"fieldToAggregate": [
|
||||
{
|
||||
"fieldToAggregate": "first_name"
|
||||
},
|
||||
{
|
||||
"fieldToAggregate": "last_name"
|
||||
},
|
||||
{
|
||||
"fieldToAggregate": "domain"
|
||||
},
|
||||
{
|
||||
"fieldToAggregate": "phantom_linkedin"
|
||||
},
|
||||
{
|
||||
"fieldToAggregate": "full_name"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "c0d5b884-de58-42f3-bc50-0c7e6ca5e576",
|
||||
"name": "PROFILES QUERY",
|
||||
"type": "n8n-nodes-base.postgres",
|
||||
"position": [
|
||||
560,
|
||||
600
|
||||
],
|
||||
"parameters": {
|
||||
"query": "select first_name, last_name, domain, full_name\nfrom accounts a \nleft join profiles p on a.company_id = p.company_id \nwhere title = 'Bestuurder' and p.email is null and a.domain != ''\nand domain NOT IN ('gmail.com', 'hotmail.com', 'hotmail.be', 'hotmail%','outlook.com','telenet.be', 'live.be', 'skynet.be','SKYNET%', 'yahoo.com' , 'yahoo%', 'msn%', 'hotmail', 'belgacom%') and dropcontact_found is null \nlimit 1000\n",
|
||||
"options": {},
|
||||
"operation": "executeQuery"
|
||||
},
|
||||
"credentials": {
|
||||
"postgres": {
|
||||
"id": "pYryZTyzA44MBOiN",
|
||||
"name": "Postgres account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.3
|
||||
},
|
||||
{
|
||||
"id": "ddf11e8d-f1db-406c-9c2a-ab5a510fee47",
|
||||
"name": "BULK DROPCONTACT REQUESTS",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"onError": "continueRegularOutput",
|
||||
"maxTries": 3,
|
||||
"position": [
|
||||
1360,
|
||||
620
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://api.dropcontact.io/batch",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"jsonBody": "={{ $json.toJsonString()}}\n",
|
||||
"sendBody": true,
|
||||
"sendHeaders": true,
|
||||
"specifyBody": "json",
|
||||
"authentication": "predefinedCredentialType",
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "X-Access-Token",
|
||||
"value": "apiKey"
|
||||
}
|
||||
]
|
||||
},
|
||||
"nodeCredentialType": "dropcontactApi"
|
||||
},
|
||||
"credentials": {
|
||||
"dropcontactApi": {
|
||||
"id": "kUzEc345AiEZDjK7",
|
||||
"name": "Dropcontact Willow account"
|
||||
}
|
||||
},
|
||||
"retryOnFail": true,
|
||||
"typeVersion": 4.2,
|
||||
"waitBetweenTries": 600
|
||||
},
|
||||
{
|
||||
"id": "606e2898-eb44-46c2-9576-8e3cc1bd2578",
|
||||
"name": "Loop Over Items2",
|
||||
"type": "n8n-nodes-base.splitInBatches",
|
||||
"position": [
|
||||
780,
|
||||
600
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"batchSize": 250
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "ace20caa-3c9b-432a-a572-6bad48181347",
|
||||
"name": "Split Out",
|
||||
"type": "n8n-nodes-base.splitOut",
|
||||
"onError": "continueRegularOutput",
|
||||
"position": [
|
||||
1940,
|
||||
600
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldToSplitOut": "data"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "2c581721-a399-4d48-98a1-cee82246c4f4",
|
||||
"name": "Postgres",
|
||||
"type": "n8n-nodes-base.postgres",
|
||||
"onError": "continueErrorOutput",
|
||||
"maxTries": 2,
|
||||
"position": [
|
||||
2100,
|
||||
600
|
||||
],
|
||||
"parameters": {
|
||||
"table": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "profiles",
|
||||
"cachedResultName": "profiles"
|
||||
},
|
||||
"schema": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "public"
|
||||
},
|
||||
"columns": {
|
||||
"value": {
|
||||
"email": "={{ $json.email[0].email }}",
|
||||
"phone": "={{ $json.phone }}",
|
||||
"full_name": "={{ $json.custom_fields.full_name }}",
|
||||
"dropcontact_found": "={{ true }}",
|
||||
"email_qualification": "={{ $json.email[0].qualification }}"
|
||||
},
|
||||
"schema": [
|
||||
{
|
||||
"id": "company_id",
|
||||
"type": "number",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "company_id",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "create_date",
|
||||
"type": "dateTime",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "create_date",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "phone",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "phone",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "first_name",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "first_name",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "last_name",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "last_name",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "title",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "title",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "start_date_raw",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "start_date_raw",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "full_name",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "full_name",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "seniority",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "seniority",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "email",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "email",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "email_qualification",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "email_qualification",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "dropcontact_found",
|
||||
"type": "boolean",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "dropcontact_found",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
}
|
||||
],
|
||||
"mappingMode": "defineBelow",
|
||||
"matchingColumns": [
|
||||
"full_name"
|
||||
]
|
||||
},
|
||||
"options": {
|
||||
"replaceEmptyStrings": true
|
||||
},
|
||||
"operation": "update"
|
||||
},
|
||||
"credentials": {
|
||||
"postgres": {
|
||||
"id": "pYryZTyzA44MBOiN",
|
||||
"name": "Postgres account"
|
||||
}
|
||||
},
|
||||
"retryOnFail": true,
|
||||
"typeVersion": 2.3,
|
||||
"alwaysOutputData": true
|
||||
},
|
||||
{
|
||||
"id": "7e94c87d-3f83-4fd1-877d-3463dce3cdd1",
|
||||
"name": "BULK DROPCONTACT DOWNLOAD",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"onError": "continueErrorOutput",
|
||||
"position": [
|
||||
1740,
|
||||
620
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://api.dropcontact.io/batch/{{ $json.request_id }}",
|
||||
"options": {},
|
||||
"authentication": "predefinedCredentialType",
|
||||
"nodeCredentialType": "dropcontactApi"
|
||||
},
|
||||
"credentials": {
|
||||
"dropcontactApi": {
|
||||
"id": "kUzEc345AiEZDjK7",
|
||||
"name": "Dropcontact Willow account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "17aab456-72dc-482d-b5e3-b3dfb3a3b3f7",
|
||||
"name": "Wait2",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
1540,
|
||||
620
|
||||
],
|
||||
"webhookId": "de669d58-95c5-480e-9acc-17c396859fcf",
|
||||
"parameters": {
|
||||
"amount": 600
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "148cec0c-985b-4c82-8835-fff8eacf6e38",
|
||||
"name": "DATA TRANSFORMATION",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
1180,
|
||||
620
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "runOnceForEachItem",
|
||||
"language": "python",
|
||||
"pythonCode": "import json\n\n## Load & access the existing JSON data\nfor item in _input.all():\n data = item.json \n\n # Define the output data structure\n output_data = {\"data\": [], \"siren\": True}\n\n # Unpack data from the single element list\n first_names = data[\"first_name\"]\n last_names = data[\"last_name\"]\n domain = data[\"domain\"]\n full_name = data[\"full_name\"]\n\n # Combine data into a list of dictionaries\n transformed_data = []\n for i, (first_name, last_name, domain_name, full_name_value) in enumerate(zip(first_names, last_names, domain, full_name)):\n transformed_data.append({\n \"first_name\": first_name,\n \"last_name\": last_name,\n \"website\": domain_name,\n \"custom_fields\": {\n \"full_name\": full_name_value}\n })\n\n output_data[\"data\"] = transformed_data\n\n return output_data \n\n"
|
||||
},
|
||||
"typeVersion": 2,
|
||||
"alwaysOutputData": true
|
||||
},
|
||||
{
|
||||
"id": "b233abfe-cfae-474a-b86d-29e56e1f3ac7",
|
||||
"name": "Slack",
|
||||
"type": "n8n-nodes-base.slack",
|
||||
"position": [
|
||||
1740,
|
||||
820
|
||||
],
|
||||
"parameters": {
|
||||
"text": "Dropcontact Credits issue: url ",
|
||||
"user": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": ""
|
||||
},
|
||||
"select": "user",
|
||||
"otherOptions": {}
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "d4e90677-89c9-418b-b618-f751b797d395",
|
||||
"name": "Schedule Trigger",
|
||||
"type": "n8n-nodes-base.scheduleTrigger",
|
||||
"position": [
|
||||
380,
|
||||
600
|
||||
],
|
||||
"parameters": {
|
||||
"rule": {
|
||||
"interval": [
|
||||
{}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Wait2": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "BULK DROPCONTACT DOWNLOAD",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Postgres": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop Over Items2",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Aggregate": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "DATA TRANSFORMATION",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Split Out": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Postgres",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"PROFILES QUERY": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop Over Items2",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Loop Over Items2": {
|
||||
"main": [
|
||||
null,
|
||||
[
|
||||
{
|
||||
"node": "Aggregate",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Schedule Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "PROFILES QUERY",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"DATA TRANSFORMATION": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "BULK DROPCONTACT REQUESTS",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"BULK DROPCONTACT DOWNLOAD": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Split Out",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Slack",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"BULK DROPCONTACT REQUESTS": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait2",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
991
workflows/Wait/0523_Wait_Splitout_Create_Webhook.json
Normal file
991
workflows/Wait/0523_Wait_Splitout_Create_Webhook.json
Normal file
@@ -0,0 +1,991 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "26ba763460b97c249b82942b23b6384876dfeb9327513332e743c5f6219c2b8e"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "7076854e-c7e8-45b5-9e5e-16678bffa254",
|
||||
"name": "OpenAI Model",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmOpenAi",
|
||||
"position": [
|
||||
2420,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"model": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gpt-3.5-turbo-1106",
|
||||
"cachedResultName": "gpt-3.5-turbo-1106"
|
||||
},
|
||||
"options": {
|
||||
"temperature": 0
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "8gccIjcuf3gvaoEr",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "00819f1c-2c60-4b7c-b395-445ec05fd898",
|
||||
"name": "Structured Output Parser",
|
||||
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
|
||||
"position": [
|
||||
2600,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"jsonSchema": "{\n \"Invoice date\": { \"type\": \"date\" },\n \"invoice number\": { \"type\": \"string\" },\n \"Purchase order number\": { \"type\": \"string\" },\n \"Supplier name\": { \"type\": \"string\" },\n \"Supplier address\": {\n \"type\": \"object\",\n \"properties\": {\n \"address 1\": { \"type\": \"string\" },\n \"address 2\": { \"type\": \"string\" },\n \"city\": { \"type\": \"string\" },\n \"postcode\": { \"type\": \"string\" }\n }\n },\n \"Supplier VAT identification number\": { \"type\": \"string\" },\n \"Customer name\": { \"type\": \"string\" },\n \"Customer address\": {\n \"type\": \"object\",\n \"properties\": {\n \"address 1\": { \"type\": \"string\" },\n \"address 2\": { \"type\": \"string\" },\n \"city\": { \"type\": \"string\" },\n \"postcode\": { \"type\": \"string\" }\n }\n },\n \"Customer VAT identification number\": { \"type\": \"string\" }, \n \"Shipping addresses\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"address 1\": { \"type\": \"string\" },\n \"address 2\": { \"type\": \"string\" },\n \"city\": { \"type\": \"string\" },\n \"postcode\": { \"type\": \"string\" }\n }\n }\n },\n \"Line items\": {\n \"type\": \"array\",\n \"items\": {\n \"name\": \"string\",\n \"description\": \"string\",\n \"price\": \"number\",\n \"discount\": \"number\"\n }\n },\n \"Subtotal without VAT\": { \"type\": \"number\" },\n \"Subtotal with VAT\": { \"type\": \"number\" },\n \"Total price\": { \"type\": \"number\" }\n}"
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "3b40d506-aabc-4105-853a-a318375cea73",
|
||||
"name": "Upload to LlamaParse",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1620,
|
||||
420
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://api.cloud.llamaindex.ai/api/parsing/upload",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"sendBody": true,
|
||||
"contentType": "multipart-form-data",
|
||||
"sendHeaders": true,
|
||||
"authentication": "genericCredentialType",
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "file",
|
||||
"parameterType": "formBinaryData",
|
||||
"inputDataFieldName": "=attachment_0"
|
||||
}
|
||||
]
|
||||
},
|
||||
"genericAuthType": "httpHeaderAuth",
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "accept",
|
||||
"value": "application/json"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "pZ4YmwFIkyGnbUC7",
|
||||
"name": "LlamaIndex API"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "57a5d331-8838-4d44-8fac-a44dba35fcc4",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1540,
|
||||
140
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 785.9525375246163,
|
||||
"height": 623.4951418211454,
|
||||
"content": "## 2. Advanced PDF Processing with LlamaParse\n[Read more about using HTTP Requests](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.httprequest/)\n\nLlamaIndex's LlamaCloud is a cloud-based service that allows you to upload,\nparse, and index document. LlamaParse is a tool offered by LlamaCloud\nto parse for complex PDFs with embedded objects ie PDF Tables and figures.\n\nAt time of writing, you can parse 1000 pdfs/day with LlamaCloud's free plan\nby signing up at [https://cloud.llamaindex.ai/](https://cloud.llamaindex.ai/?ref=n8n.io)."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "a4504d83-da3b-41bc-891f-f8f9314a6af5",
|
||||
"name": "Receiving Invoices",
|
||||
"type": "n8n-nodes-base.gmailTrigger",
|
||||
"position": [
|
||||
780,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"simple": false,
|
||||
"filters": {
|
||||
"q": "has:attachment",
|
||||
"sender": "invoices@paypal.com"
|
||||
},
|
||||
"options": {
|
||||
"downloadAttachments": true
|
||||
},
|
||||
"pollTimes": {
|
||||
"item": [
|
||||
{
|
||||
"mode": "everyMinute"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"gmailOAuth2": {
|
||||
"id": "Sf5Gfl9NiFTNXFWb",
|
||||
"name": "Gmail account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "02bd4636-f35b-4a3a-8a5f-9ae7aeed2bf4",
|
||||
"name": "Append to Reconciliation Sheet",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"position": [
|
||||
2960,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"columns": {
|
||||
"value": {},
|
||||
"schema": [
|
||||
{
|
||||
"id": "Invoice date",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Invoice date",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "invoice number",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "invoice number",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Purchase order number",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Purchase order number",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Supplier name",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Supplier name",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Supplier address",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Supplier address",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Supplier VAT identification number",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Supplier VAT identification number",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Customer name",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Customer name",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Customer address",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Customer address",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Customer VAT identification number",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Customer VAT identification number",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Shipping addresses",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Shipping addresses",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Line items",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Line items",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Subtotal without VAT",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Subtotal without VAT",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Subtotal with VAT",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Subtotal with VAT",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Total price",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Total price",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
}
|
||||
],
|
||||
"mappingMode": "autoMapInputData",
|
||||
"matchingColumns": [
|
||||
"output"
|
||||
]
|
||||
},
|
||||
"options": {},
|
||||
"operation": "append",
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "id",
|
||||
"value": "gid=0"
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "1omHDl1jpjHyrtga2ZHBddUkbkdatEr1ga9vHc4fQ1pI",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1omHDl1jpjHyrtga2ZHBddUkbkdatEr1ga9vHc4fQ1pI/edit?usp=drivesdk",
|
||||
"cachedResultName": "Invoice Reconciliation"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsOAuth2Api": {
|
||||
"id": "XHvC7jIRR8A2TlUl",
|
||||
"name": "Google Sheets account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.3
|
||||
},
|
||||
{
|
||||
"id": "cdb0a7ee-068d-465a-b4ae-d5221d5e7400",
|
||||
"name": "Get Processing Status",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1800,
|
||||
420
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://api.cloud.llamaindex.ai/api/parsing/job/{{ $json.id }}",
|
||||
"options": {},
|
||||
"sendHeaders": true,
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpHeaderAuth",
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "accept",
|
||||
"value": "application/json"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "pZ4YmwFIkyGnbUC7",
|
||||
"name": "LlamaIndex API"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "b68a01ab-d8e6-42f4-ab1d-81e746695eef",
|
||||
"name": "Wait to stay within service limits",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
2120,
|
||||
560
|
||||
],
|
||||
"webhookId": "17a96ed6-b5ff-47bb-a8a2-39c1eb40185a",
|
||||
"parameters": {
|
||||
"amount": 1
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "41bd28d2-665a-4f71-a456-98eeb26b6655",
|
||||
"name": "Is Job Ready?",
|
||||
"type": "n8n-nodes-base.switch",
|
||||
"position": [
|
||||
1960,
|
||||
420
|
||||
],
|
||||
"parameters": {
|
||||
"rules": {
|
||||
"values": [
|
||||
{
|
||||
"outputKey": "SUCCESS",
|
||||
"conditions": {
|
||||
"options": {
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "300fce8c-b19a-4d0c-86e8-f62853c70ce2",
|
||||
"operator": {
|
||||
"name": "filter.operator.equals",
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json.status }}",
|
||||
"rightValue": "SUCCESS"
|
||||
}
|
||||
]
|
||||
},
|
||||
"renameOutput": true
|
||||
},
|
||||
{
|
||||
"outputKey": "ERROR",
|
||||
"conditions": {
|
||||
"options": {
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "e6058aa0-a3e2-4ce3-9bed-6ff41a5be052",
|
||||
"operator": {
|
||||
"name": "filter.operator.equals",
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json.status }}",
|
||||
"rightValue": "ERROR"
|
||||
}
|
||||
]
|
||||
},
|
||||
"renameOutput": true
|
||||
},
|
||||
{
|
||||
"outputKey": "CANCELED",
|
||||
"conditions": {
|
||||
"options": {
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "ceb6338f-4261-40ac-be11-91f61c7302ba",
|
||||
"operator": {
|
||||
"name": "filter.operator.equals",
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json.status }}",
|
||||
"rightValue": "CANCELED"
|
||||
}
|
||||
]
|
||||
},
|
||||
"renameOutput": true
|
||||
},
|
||||
{
|
||||
"outputKey": "PENDING",
|
||||
"conditions": {
|
||||
"options": {
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "0fa97d86-432a-409a-917e-5f1a002b1ab9",
|
||||
"operator": {
|
||||
"name": "filter.operator.equals",
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json.status }}",
|
||||
"rightValue": "PENDING"
|
||||
}
|
||||
]
|
||||
},
|
||||
"renameOutput": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {
|
||||
"allMatchingOutputs": true
|
||||
}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "f7157abe-b1ee-46b3-adb2-1be056d9d75d",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
694.0259411218055,
|
||||
139.97202236910687
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 808.8727491350096,
|
||||
"height": 709.5781339256318,
|
||||
"content": "## 1. Watch for Invoice Emails\n[Read more about Gmail Triggers](https://docs.n8n.io/integrations/builtin/trigger-nodes/n8n-nodes-base.gmailtrigger)\n\nThe Gmail node can watch for all incoming messages and filter based on a condition. We'll set our Gmail node to wait for:\n* a message from particular email address.\n* having an attachment which should be the invoice PDF\n* not having a label \"invoice synced\", which is what we use to avoid duplicate processing."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "ff7cb6e4-5a60-4f12-b15e-74e7a4a302ce",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2360,
|
||||
70.48792658995046
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 805.0578351924228,
|
||||
"height": 656.5014186128178,
|
||||
"content": "## 3. Use LLMs to Extract Values from Data\n[Read more about Basic LLM Chain](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.chainllm/)\n\nLarge language models are perfect for data extraction tasks as they can work across a range of document layouts without human intervention. The extracted data can then be sent to a variety of datastores such as spreadsheets, accounting systems and/or CRMs.\n\n**Tip:** The \"Structured Output Parser\" ensures the AI output can be\ninserted to our spreadsheet without additional clean up and/or formatting. "
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "0d510631-440b-41f5-b1aa-9b7279e9c8e3",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1934,
|
||||
774
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 394.15089838126653,
|
||||
"height": 154.49585536070904,
|
||||
"content": "### 🙋♂️ Why not just use the built-in PDF convertor?\nA common issue with PDF-to-text convertors are that they ignore important data structures like tables. These structures can be important for data extraction. For example, being able to distinguish between seperate line items in an invoice."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "fe7fdb90-3c85-4f29-a7d3-16f927f48682",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
3200,
|
||||
157.65172434465347
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 362.3535748101346,
|
||||
"height": 440.3435768155051,
|
||||
"content": "## 4. Add Label to Avoid Duplication\n[Read more about working with Gmail](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.gmail/)\n\nTo finish off the workflow, we'll add the \"invoice synced\" label to the original invoice email to flag that the extraction was successful. This can be useful if working with a shared inbox and for quality control purposes later."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "1acf2c60-c2b9-4f78-94a4-0711c8bd71ab",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
300,
|
||||
140
|
||||
],
|
||||
"parameters": {
|
||||
"width": 360.0244620907562,
|
||||
"height": 573.2443601155958,
|
||||
"content": "## Try Me Out!\n\n**This workflow does the following:**\n* Waits for email invoices with PDF attachments.\n* Uses the LlamaParse service to convert the invoice PDF into a markdown file.\n* Uses a LLM to extract invoice data from the Markdown file.\n* Exports the extracted data to a Google Sheet.\n\n### Follow along with the blog here\nhttps://blog.n8n.io/how-to-extract-data-from-pdf-to-excel-spreadsheet-advance-parsing-with-n8n-io-and-llamaparse/\n\n### Good to know\n* You'll need to create the label \"invoice synced\" in gmail before using this workflow.\n\n### Need Help?\nJoin the [Discord](https://discord.com/invite/XPKeKXeB7d) or ask in the [Forum](https://community.n8n.io/)!\n\nHappy Hacking!"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "3802c538-acf9-48d8-b011-bfe2fb817350",
|
||||
"name": "Add \"invoice synced\" Label",
|
||||
"type": "n8n-nodes-base.gmail",
|
||||
"position": [
|
||||
3320,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"labelIds": [
|
||||
"Label_5511644430826409825"
|
||||
],
|
||||
"messageId": "={{ $('Receiving Invoices').item.json.id }}",
|
||||
"operation": "addLabels"
|
||||
},
|
||||
"credentials": {
|
||||
"gmailOAuth2": {
|
||||
"id": "Sf5Gfl9NiFTNXFWb",
|
||||
"name": "Gmail account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "ffabd8c5-c440-4473-8e44-b849426c70cf",
|
||||
"name": "Get Parsed Invoice Data",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
2160,
|
||||
280
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://api.cloud.llamaindex.ai/api/parsing/job/{{ $json.id }}/result/markdown",
|
||||
"options": {
|
||||
"redirect": {
|
||||
"redirect": {}
|
||||
}
|
||||
},
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpHeaderAuth"
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "pZ4YmwFIkyGnbUC7",
|
||||
"name": "LlamaIndex API"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "5f9b507f-4dc1-4853-bf71-a64f2f4b55c1",
|
||||
"name": "Map Output",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
2760,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "raw",
|
||||
"options": {},
|
||||
"jsonOutput": "={{ $json.output }}"
|
||||
},
|
||||
"typeVersion": 3.3
|
||||
},
|
||||
{
|
||||
"id": "d22744cd-151d-4b92-b4f2-4a5b9ceb4ee7",
|
||||
"name": "Apply Data Extraction Rules",
|
||||
"type": "@n8n/n8n-nodes-langchain.chainLlm",
|
||||
"position": [
|
||||
2420,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"text": "=Given the following invoice in the <invoice> xml tags, extract the following information as listed below.\nIf you cannot the information for a specific item, then leave blank and skip to the next. \n\n* Invoice date\n* invoice number\n* Purchase order number\n* Supplier name\n* Supplier address\n* Supplier VAT identification number\n* Customer name\n* Customer address\n* Customer VAT identification number\n* Shipping addresses\n* Line items, including a description of the goods or services rendered\n* Price with and without VAT\n* Total price\n\n<invoice>{{ $json.markdown }}</invoice>",
|
||||
"promptType": "define",
|
||||
"hasOutputParser": true
|
||||
},
|
||||
"typeVersion": 1.4
|
||||
},
|
||||
{
|
||||
"id": "3735a124-9fab-4400-8b94-8b5aa9f951fe",
|
||||
"name": "Should Process Email?",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
1340,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "e5649a2b-6e12-4cc4-8001-4639cc9cc2c2",
|
||||
"operator": {
|
||||
"name": "filter.operator.equals",
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $input.item.binary.attachment_0.mimeType }}",
|
||||
"rightValue": "application/pdf"
|
||||
},
|
||||
{
|
||||
"id": "4c57ab9b-b11c-455a-a63d-daf48418b06e",
|
||||
"operator": {
|
||||
"type": "array",
|
||||
"operation": "notContains",
|
||||
"rightType": "any"
|
||||
},
|
||||
"leftValue": "={{ $json.labels }}",
|
||||
"rightValue": "invoice synced"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "12a23527-39f3-4f72-8691-3d5cf59f9909",
|
||||
"name": "Split Out Labels",
|
||||
"type": "n8n-nodes-base.splitOut",
|
||||
"position": [
|
||||
980,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldToSplitOut": "labelIds"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "88ff6e22-d3d3-403d-b0b2-2674487140a7",
|
||||
"name": "Get Labels Names",
|
||||
"type": "n8n-nodes-base.gmail",
|
||||
"position": [
|
||||
980,
|
||||
540
|
||||
],
|
||||
"parameters": {
|
||||
"labelId": "={{ $json.labelIds }}",
|
||||
"resource": "label",
|
||||
"operation": "get"
|
||||
},
|
||||
"credentials": {
|
||||
"gmailOAuth2": {
|
||||
"id": "Sf5Gfl9NiFTNXFWb",
|
||||
"name": "Gmail account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "88accb8e-6531-40be-8d35-1bba594149af",
|
||||
"name": "Combine Label Names",
|
||||
"type": "n8n-nodes-base.aggregate",
|
||||
"position": [
|
||||
980,
|
||||
680
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldsToAggregate": {
|
||||
"fieldToAggregate": [
|
||||
{
|
||||
"renameField": true,
|
||||
"outputFieldName": "labels",
|
||||
"fieldToAggregate": "name"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "d233ff33-cabf-434e-876d-879693ecaf58",
|
||||
"name": "Email with Label Names",
|
||||
"type": "n8n-nodes-base.merge",
|
||||
"position": [
|
||||
1160,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "combine",
|
||||
"options": {},
|
||||
"combinationMode": "multiplex"
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "733fc285-e069-4e4e-b13e-dfc1c259ac12",
|
||||
"name": "Sticky Note6",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2540,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"width": 192.26896179623753,
|
||||
"height": 213.73043662572252,
|
||||
"content": "\n\n\n\n\n\n\n\n\n\n\n\n**Need more attributes?**\nChange it here!"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "83aa6ed0-ce3b-48d7-aded-475c337ae86e",
|
||||
"name": "Sticky Note7",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2880,
|
||||
300
|
||||
],
|
||||
"parameters": {
|
||||
"width": 258.29345180972877,
|
||||
"height": 397.0641952938746,
|
||||
"content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n🚨**Required**\n* Set Your Google Sheet URL here\n* Set the Name of your Sheet\n\n\n**Don't use GSheets?**\nSwap this for Excel, Airtable or a Database!"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "720070f6-2d6c-45ef-80c2-e950862a002b",
|
||||
"name": "Sticky Note8",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
740,
|
||||
380
|
||||
],
|
||||
"parameters": {
|
||||
"width": 174.50671517518518,
|
||||
"height": 274.6295678979021,
|
||||
"content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n🚨**Required**\n* Change the email filters here!"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Map Output": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Append to Reconciliation Sheet",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Apply Data Extraction Rules",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Is Job Ready?": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Parsed Invoice Data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
null,
|
||||
null,
|
||||
[
|
||||
{
|
||||
"node": "Wait to stay within service limits",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Labels Names": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Combine Label Names",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Split Out Labels": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Labels Names",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Receiving Invoices": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Split Out Labels",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Email with Label Names",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Combine Label Names": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Email with Label Names",
|
||||
"type": "main",
|
||||
"index": 1
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Upload to LlamaParse": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Processing Status",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Processing Status": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Is Job Ready?",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Should Process Email?": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Upload to LlamaParse",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Email with Label Names": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Should Process Email?",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Parsed Invoice Data": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Apply Data Extraction Rules",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Structured Output Parser": {
|
||||
"ai_outputParser": [
|
||||
[
|
||||
{
|
||||
"node": "Apply Data Extraction Rules",
|
||||
"type": "ai_outputParser",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Apply Data Extraction Rules": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Map Output",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Append to Reconciliation Sheet": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Add \"invoice synced\" Label",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait to stay within service limits": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Processing Status",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
973
workflows/Wait/0533_Wait_Code_Export_Webhook.json
Normal file
973
workflows/Wait/0533_Wait_Code_Export_Webhook.json
Normal file
@@ -0,0 +1,973 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "26ba763460b97c249b82942b23b6384876dfeb9327513332e743c5f6219c2b8e"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "1eb82902-a1d6-4eff-82a2-26908a82cea2",
|
||||
"name": "When clicking \"Test workflow\"",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
720,
|
||||
320
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "e0031fc3-27f1-45d9-910b-4c07dd322115",
|
||||
"name": "Get This Week's Menu",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
992,
|
||||
370
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://www.hellofresh.co.uk/menus/{{ $now.year }}-W{{ $now.weekNumber }}",
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "2c556cc7-7d4e-4d80-902f-9686e756ed8c",
|
||||
"name": "Extract Available Courses",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
992,
|
||||
650
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "const pageData = JSON.parse($input.first().json.data)\nreturn pageData.props.pageProps.ssrPayload.courses.slice(0, 10);"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "90c39db6-6116-4c37-8d48-a6d5e8f8c777",
|
||||
"name": "Extract Server Data",
|
||||
"type": "n8n-nodes-base.html",
|
||||
"position": [
|
||||
992,
|
||||
510
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"trimValues": false,
|
||||
"cleanUpText": true
|
||||
},
|
||||
"operation": "extractHtmlContent",
|
||||
"extractionValues": {
|
||||
"values": [
|
||||
{
|
||||
"key": "data",
|
||||
"cssSelector": "script#__NEXT_DATA__"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "fbd4ed97-0154-4991-bf16-d9c4cb3f4776",
|
||||
"name": "Get Course Metadata",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
1172,
|
||||
370
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "3c90fd1e-e9ac-49c1-a459-7cff8c87fe8d",
|
||||
"name": "name",
|
||||
"type": "string",
|
||||
"value": "={{ $json.recipe.name }}"
|
||||
},
|
||||
{
|
||||
"id": "c4f3a5df-346c-4e8d-90ba-a49ed6afdedf",
|
||||
"name": "cuisines",
|
||||
"type": "array",
|
||||
"value": "={{ $json.recipe.cuisines.map(item => item.name) }}"
|
||||
},
|
||||
{
|
||||
"id": "97917928-0956-497b-bb68-507df1783240",
|
||||
"name": "category",
|
||||
"type": "string",
|
||||
"value": "={{ $json.recipe.category.name }}"
|
||||
},
|
||||
{
|
||||
"id": "1e84cf1e-7ad7-4888-9606-d3f7a310ce5f",
|
||||
"name": "tags",
|
||||
"type": "array",
|
||||
"value": "={{ $json.recipe.tags.flatMap(tag => tag.preferences) }}"
|
||||
},
|
||||
{
|
||||
"id": "cf6e2174-e8cb-4935-8303-2f8ed067f510",
|
||||
"name": "nutrition",
|
||||
"type": "object",
|
||||
"value": "={{ $json.recipe.nutrition.reduce((acc,item) => ({ ...acc, [item.name]: item.amount + item.unit }), {}) }}"
|
||||
},
|
||||
{
|
||||
"id": "25ba3fe6-c2fa-4315-a2cb-112ec7e3620f",
|
||||
"name": "url",
|
||||
"type": "string",
|
||||
"value": "={{ $json.recipe.websiteUrl }}"
|
||||
},
|
||||
{
|
||||
"id": "8f444fb3-c2ee-4254-b505-440cca3c7b8b",
|
||||
"name": "id",
|
||||
"type": "string",
|
||||
"value": "={{ $json.recipe.id }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.3
|
||||
},
|
||||
{
|
||||
"id": "5ab1a5fa-adc3-41e0-be6d-f680af301aca",
|
||||
"name": "Get Recipe",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1172,
|
||||
510
|
||||
],
|
||||
"parameters": {
|
||||
"url": "={{ $json.recipe.websiteUrl }}",
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "5014dc62-8320-4968-b9bd-396a517a2b5c",
|
||||
"name": "Embeddings Mistral Cloud",
|
||||
"type": "@n8n/n8n-nodes-langchain.embeddingsMistralCloud",
|
||||
"position": [
|
||||
1960,
|
||||
420
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"mistralCloudApi": {
|
||||
"id": "EIl2QxhXAS9Hkg37",
|
||||
"name": "Mistral Cloud account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "2a8fad89-f74b-4808-8cb6-97c6b46a53ee",
|
||||
"name": "Default Data Loader",
|
||||
"type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
|
||||
"position": [
|
||||
2080,
|
||||
420
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"metadata": {
|
||||
"metadataValues": [
|
||||
{
|
||||
"name": "week",
|
||||
"value": "={{ $json.week }}"
|
||||
},
|
||||
{
|
||||
"name": "cuisine",
|
||||
"value": "={{ $json.cuisines }}"
|
||||
},
|
||||
{
|
||||
"name": "category",
|
||||
"value": "={{ $json.category }}"
|
||||
},
|
||||
{
|
||||
"name": "tag",
|
||||
"value": "={{ $json.tags }}"
|
||||
},
|
||||
{
|
||||
"name": "recipe_id",
|
||||
"value": "={{ $json.id }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"jsonData": "={{ $json.data }}",
|
||||
"jsonMode": "expressionData"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "44ceef5c-1d08-40d2-8ab4-227b551f72f5",
|
||||
"name": "Merge Course & Recipe",
|
||||
"type": "n8n-nodes-base.merge",
|
||||
"position": [
|
||||
1480,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "combine",
|
||||
"options": {},
|
||||
"combinationMode": "mergeByPosition"
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "b56bd85e-f182-49d1-aeb1-062e905c316a",
|
||||
"name": "Prepare Documents",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
1660,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "462567fe-02ec-4747-ae33-407d2bc6d776",
|
||||
"name": "data",
|
||||
"type": "string",
|
||||
"value": "=# {{ $json.name }}\n{{ $json.description.replaceAll('\\n\\n','\\n') }}\n\n# Website\n{{ $json.url }}\n\n## Ingredients\n{{ $json.ingredients.replaceAll('\\n\\n','\\n') }}\n\n## Utensils\n{{ $json.utensils }}\n\n## Nutrition\n{{ Object.keys($json.nutrition).map(key => `* ${key}: ${$json.nutrition[key]}`).join('\\n') }}\n\n## Instructions\n{{ $json.instructions.replaceAll('\\n\\n','\\n') }}"
|
||||
},
|
||||
{
|
||||
"id": "5738e420-abfe-4a85-b7ad-541cfc181563",
|
||||
"name": "cuisine",
|
||||
"type": "array",
|
||||
"value": "={{ $json.cuisines }}"
|
||||
},
|
||||
{
|
||||
"id": "349f46d4-e230-4da8-a118-50227ceb7233",
|
||||
"name": "category",
|
||||
"type": "string",
|
||||
"value": "={{ $json.category }}"
|
||||
},
|
||||
{
|
||||
"id": "9588b347-4469-4aa5-93a2-e7bf41b4c468",
|
||||
"name": "tag",
|
||||
"type": "array",
|
||||
"value": "={{ $json.tags }}"
|
||||
},
|
||||
{
|
||||
"id": "7ddab229-fa52-4d27-84e1-83ed47280d29",
|
||||
"name": "week",
|
||||
"type": "string",
|
||||
"value": "={{ $now.year }}-W{{ $now.weekNumber }}"
|
||||
},
|
||||
{
|
||||
"id": "13163e45-5699-4d25-af3d-4c7910dd2926",
|
||||
"name": "id",
|
||||
"type": "string",
|
||||
"value": "={{ $json.id }}"
|
||||
},
|
||||
{
|
||||
"id": "a0c5d599-ff2b-420d-9173-2baf9218abc5",
|
||||
"name": "name",
|
||||
"type": "string",
|
||||
"value": "={{ $json.name }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.3
|
||||
},
|
||||
{
|
||||
"id": "6b800632-f320-4fc3-bd2a-6a062834343d",
|
||||
"name": "Recursive Character Text Splitter",
|
||||
"type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
|
||||
"position": [
|
||||
2080,
|
||||
560
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "df7f17a2-8b27-4203-a2ff-091aaf6609b8",
|
||||
"name": "Chat Trigger",
|
||||
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
|
||||
"position": [
|
||||
2440,
|
||||
360
|
||||
],
|
||||
"webhookId": "745056ec-2d36-4ac3-9c70-6ff0b1055d0a",
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "ee38effe-5929-421e-a3c5-b1055a755242",
|
||||
"name": "Extract Recipe Details",
|
||||
"type": "n8n-nodes-base.html",
|
||||
"position": [
|
||||
1172,
|
||||
650
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"operation": "extractHtmlContent",
|
||||
"extractionValues": {
|
||||
"values": [
|
||||
{
|
||||
"key": "description",
|
||||
"cssSelector": "[data-test-id=\"recipe-description\"]"
|
||||
},
|
||||
{
|
||||
"key": "ingredients",
|
||||
"cssSelector": "[data-test-id=\"ingredients-list\"]"
|
||||
},
|
||||
{
|
||||
"key": "utensils",
|
||||
"cssSelector": "[data-test-id=\"utensils\"]"
|
||||
},
|
||||
{
|
||||
"key": "instructions",
|
||||
"cssSelector": "[data-test-id=\"instructions\"]",
|
||||
"skipSelectors": "img,a"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "dede108f-2fde-49cb-8a0e-fa5786c59d4b",
|
||||
"name": "Qdrant Recommend API",
|
||||
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
|
||||
"position": [
|
||||
2840,
|
||||
540
|
||||
],
|
||||
"parameters": {
|
||||
"name": "get_recipe_recommendation",
|
||||
"fields": {
|
||||
"values": [
|
||||
{
|
||||
"name": "week",
|
||||
"stringValue": "={{ $now.year }}-W{{ $now.weekNumber }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"schemaType": "manual",
|
||||
"workflowId": "={{ $workflow.id }}",
|
||||
"description": "Call this tool to get a recipe recommendation. Pass in the following params as a json object:\n* positives - a description of what the user wants to cook. This could be ingredients, flavours, utensils available, number of diners, type of meal etc.\n* negatives - a description of what the user wants to avoid in the recipe. This could be flavours to avoid, allergen considerations, conflicts with theme of meal etc.",
|
||||
"inputSchema": "{\n\"type\": \"object\",\n\"properties\": {\n\t\"positive\": {\n\t\t\"type\": \"string\",\n\t\t\"description\": \"a description of what the user wants to cook. This could be ingredients, flavours, utensils available, number of diners, type of meal etc.\"\n\t},\n \"negative\": {\n \"type\": \"string\",\n \"description\": \"a description of what the user wants to avoid in the recipe. This could be flavours to avoid, allergen considerations, conflicts with theme of meal etc.\"\n }\n}\n}",
|
||||
"specifyInputSchema": true
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "5e703134-4dd9-464b-9ec9-dc6103907a1e",
|
||||
"name": "Execute Workflow Trigger",
|
||||
"type": "n8n-nodes-base.executeWorkflowTrigger",
|
||||
"position": [
|
||||
2420,
|
||||
940
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "9fb5f4fd-3b38-4a35-8986-d3955754c8d1",
|
||||
"name": "Mistral Cloud Chat Model",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatMistralCloud",
|
||||
"position": [
|
||||
2660,
|
||||
540
|
||||
],
|
||||
"parameters": {
|
||||
"model": "mistral-large-2402",
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"mistralCloudApi": {
|
||||
"id": "EIl2QxhXAS9Hkg37",
|
||||
"name": "Mistral Cloud account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "d38275e6-aede-4f1c-9b05-018f3cf4faab",
|
||||
"name": "Get Tool Response",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
3160,
|
||||
940
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "10b55200-4610-4e9b-8be7-d487c6b56a78",
|
||||
"name": "response",
|
||||
"type": "string",
|
||||
"value": "={{ JSON.stringify($json.result) }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.3
|
||||
},
|
||||
{
|
||||
"id": "dc3ceb2f-3c64-4b42-aeca-ddcdb84abf12",
|
||||
"name": "Wait for Rate Limits",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
2420,
|
||||
1080
|
||||
],
|
||||
"webhookId": "e86d8ae4-3b0d-4c40-9d12-a11d6501a043",
|
||||
"parameters": {
|
||||
"amount": 1.1
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "ec36d6f8-c3da-4732-8d56-a092a3358864",
|
||||
"name": "Get Mistral Embeddings",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
2620,
|
||||
940
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://api.mistral.ai/v1/embeddings",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"sendBody": true,
|
||||
"authentication": "predefinedCredentialType",
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "model",
|
||||
"value": "mistral-embed"
|
||||
},
|
||||
{
|
||||
"name": "encoding_format",
|
||||
"value": "float"
|
||||
},
|
||||
{
|
||||
"name": "input",
|
||||
"value": "={{ [$json.query.positive, $json.query.negative].compact() }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"nodeCredentialType": "mistralCloudApi"
|
||||
},
|
||||
"credentials": {
|
||||
"mistralCloudApi": {
|
||||
"id": "EIl2QxhXAS9Hkg37",
|
||||
"name": "Mistral Cloud account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "aebcb860-d25c-4833-9e9d-0297101259c7",
|
||||
"name": "Use Qdrant Recommend API",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
2800,
|
||||
940
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=http://qdrant:6333/collections/hello_fresh/points/recommend/groups",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"sendBody": true,
|
||||
"authentication": "predefinedCredentialType",
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "strategy",
|
||||
"value": "average_vector"
|
||||
},
|
||||
{
|
||||
"name": "limit",
|
||||
"value": "={{ 3 }}"
|
||||
},
|
||||
{
|
||||
"name": "positive",
|
||||
"value": "={{ [$json.data[0].embedding] }}"
|
||||
},
|
||||
{
|
||||
"name": "negative",
|
||||
"value": "={{ [$json.data[1].embedding] }}"
|
||||
},
|
||||
{
|
||||
"name": "filter",
|
||||
"value": "={{ { \"must\": {\"key\": \"metadata.week\", \"match\": { \"value\": $('Execute Workflow Trigger').item.json.week } } } }}"
|
||||
},
|
||||
{
|
||||
"name": "with_payload",
|
||||
"value": "={{ true }}"
|
||||
},
|
||||
{
|
||||
"name": "group_by",
|
||||
"value": "metadata.recipe_id"
|
||||
},
|
||||
{
|
||||
"name": "group_size",
|
||||
"value": "={{ 3 }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"nodeCredentialType": "qdrantApi"
|
||||
},
|
||||
"credentials": {
|
||||
"qdrantApi": {
|
||||
"id": "NyinAS3Pgfik66w5",
|
||||
"name": "QdrantApi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "2474c97d-0d85-4acc-a95e-2eb6494786dc",
|
||||
"name": "Get Recipes From DB",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
2980,
|
||||
940
|
||||
],
|
||||
"parameters": {
|
||||
"language": "python",
|
||||
"pythonCode": "import sqlite3\ncon = sqlite3.connect(\"hello_fresh_1.db\")\n\nrecipe_ids = list(set([group.id for group in _input.all()[0].json.result.groups if group.hits[0].score > 0.5]))\nplaceholders = ','.join(['?' for i in range(0,len(recipe_ids))])\n\ncur = con.cursor()\nres = cur.execute(f'SELECT * FROM recipes WHERE id IN ({placeholders})', recipe_ids)\nrows = res.fetchall()\n\ncon.close()\n\nreturn [{ \"result\": [row[2] for row in rows] }]"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "54229c2a-6e26-4350-8a94-57f415ef2340",
|
||||
"name": "Save Recipes to DB",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
1960,
|
||||
940
|
||||
],
|
||||
"parameters": {
|
||||
"language": "python",
|
||||
"pythonCode": "import sqlite3\ncon = sqlite3.connect(\"hello_fresh_1.db\")\n\ncur = con.cursor()\ncur.execute(\"CREATE TABLE IF NOT EXISTS recipes (id TEXT PRIMARY KEY, name TEXT, data TEXT, cuisine TEXT, category TEXT, tag TEXT, week TEXT);\")\n\nfor item in _input.all():\n cur.execute('INSERT OR REPLACE INTO recipes VALUES(?,?,?,?,?,?,?)', (\n item.json.id,\n item.json.name,\n item.json.data,\n ','.join(item.json.cuisine),\n item.json.category,\n ','.join(item.json.tag),\n item.json.week\n ))\n\ncon.commit()\ncon.close()\n\nreturn [{ \"affected_rows\": len(_input.all()) }]"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "725c1f56-5373-4891-92b9-3f32dd28892b",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
901.1666225087287,
|
||||
180.99920515712074
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 484.12381677448207,
|
||||
"height": 674.1153489831718,
|
||||
"content": "## Step 1. Fetch Available Courses For the Current Week\n\nTo populate our vectorstore, we'll scrape the weekly menu off the HelloFresh Website. The pages are quite large so may take a while so please be patient."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "f4e882b8-3762-4e6b-9e95-b0d708d0c284",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1420,
|
||||
300
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 409.1756468632768,
|
||||
"height": 398.81415970574335,
|
||||
"content": "## Step 2. Create Recipe Documents For VectorStore\n\nTo populate our vectorstore, we'll scrape the weekly menu off the HelloFresh Website. The pages are quite large so may take a while so please be patient."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "fc3c2221-b67c-451c-9096-d6acd2a297fa",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1860,
|
||||
19.326425127730317
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 486.02284096214964,
|
||||
"height": 690.7816167755491,
|
||||
"content": "## Step 3. Vectorise Recipes For Recommendation Engine\n[Read more about Qdrant node](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoreqdrant)\n\nWe'll store our documents in our Qdrant vectorstore by converting to vectors using Mistral Embed. Our goal is to a build a recommendation engine for meals of the week which Qdrant is a perfect solution."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "43296173-b929-46cc-b6ea-58007837b8df",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1740,
|
||||
740
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 547.0098868353456,
|
||||
"height": 347.6002738958705,
|
||||
"content": "## Step 4. Save Original Document to Database\n[Read more about Code Node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.code)\n\nFinally, let's have the original document stored in a more traditional datastore. USually our vectorsearch will return partial docs and those are enough for many use-cases, however in this instance we'll pull the full docs for the Agent get the info required to make the recommendation. "
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "6e2e58d2-e0ad-4503-8ed6-891124c8035b",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2380,
|
||||
160
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 673.6008766895472,
|
||||
"height": 552.9202706743265,
|
||||
"content": "## 5. Chat with Our HelloFresh Recommendation AI Agent\n[Read more about AI Agents](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent)\n\nThis agent is designed to recommend HelloFresh recipes based on your current taste preferences. Need something hot and spicy, warm and comforting or fast and chilled? This agent will capture what you would like and not like and queries our Recipe Recommendation engine powered by Qdrant Vectorstore."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "ba692c21-38bc-48a1-8b40-bad298be8b9e",
|
||||
"name": "AI Agent",
|
||||
"type": "@n8n/n8n-nodes-langchain.agent",
|
||||
"position": [
|
||||
2660,
|
||||
360
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"systemMessage": "=You are a recipe bot for the company, \"Hello fresh\". You will help the user choose which Hello Fresh recipe to choose from this week's menu. The current week is {{ $now.year }}-W{{ $now.weekNumber }}.\nDo not recommend any recipes other from the current week's menu. If there are no recipes to recommend, please ask the user to visit the website instead https://hellofresh.com."
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.6
|
||||
},
|
||||
{
|
||||
"id": "d7ca0f97-72dc-4f4c-8b46-3ff57b9068a4",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2320,
|
||||
740
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 987.4785537889618,
|
||||
"height": 531.9173034334732,
|
||||
"content": "## 5. Using Qdrant's Recommend API & Grouping Functionality\n[Read more about Qdrant's Recommend API](https://qdrant.tech/documentation/concepts/explore/?q=recommend)\n\nUnlike basic similarity search, Qdrant's Recommend API takes a positive query to match against (eg. Roast Dinner) and a negative query to avoid (eg. Roast Chicken). This feature significantly improves results for a recommendation engine. Additionally, by utilising Qdrant's Grouping feature, we're able to group similar matches from the same recipe - meaning we can ensure unique recipes everytime."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "96a294e2-1437-4ded-9973-0999b444c999",
|
||||
"name": "Sticky Note6",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
440,
|
||||
-40
|
||||
],
|
||||
"parameters": {
|
||||
"width": 432.916474478624,
|
||||
"height": 542.9295980774649,
|
||||
"content": "## Try it out!\n### This workflow does the following:\n* Fetches and stores this week's HelloFresh's menu\n* Builds the foundation of a recommendation engine by storing the recipes in a Qdrant Vectorstore and SQLite database.\n* Builds an AI Agent that allows for a chat interface to query for a the week's recipe recommendations.\n* AI agent uses the Qdrant Recommend API, providing what the user likes/dislikes as the query.\n* Qdrant returns the results which enable the AI Agent to make the recommendation to the user.\n\n### Need Help?\nJoin the [Discord](https://discord.com/invite/XPKeKXeB7d) or ask in the [Forum](https://community.n8n.io/)!\n\nHappy Hacking!"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "72c98600-f21a-42d4-97be-836b8ef6dc77",
|
||||
"name": "Qdrant Vector Store",
|
||||
"type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
|
||||
"position": [
|
||||
1960,
|
||||
240
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "insert",
|
||||
"options": {},
|
||||
"qdrantCollection": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "hello_fresh",
|
||||
"cachedResultName": "hello_fresh"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"qdrantApi": {
|
||||
"id": "NyinAS3Pgfik66w5",
|
||||
"name": "QdrantApi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "b7c4b597-ac2b-41d7-8f0f-1cbba25085de",
|
||||
"name": "Sticky Note7",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1860,
|
||||
-195.8987124522777
|
||||
],
|
||||
"parameters": {
|
||||
"width": 382.47301504497716,
|
||||
"height": 195.8987124522777,
|
||||
"content": "### 🚨Ensure Qdrant collection exists!\nYou'll need to run the following command in Qdrant:\n```\nPUT collections/hello_fresh\n{\n \"vectors\": {\n \"distance\": \"Cosine\",\n \"size\": 1024\n }\n}\n```"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "39191834-ecc2-46f0-a31a-0a7e9c47ac5d",
|
||||
"name": "Sticky Note8",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2740,
|
||||
920
|
||||
],
|
||||
"parameters": {
|
||||
"width": 213.30551928619226,
|
||||
"height": 332.38559808882246,
|
||||
"content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n### 🚨Configure Your Qdrant Connection\n* Be sure to enter your endpoint address"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Get Recipe": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Extract Recipe Details",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Chat Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Prepare Documents": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Qdrant Vector Store",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Save Recipes to DB",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Default Data Loader": {
|
||||
"ai_document": [
|
||||
[
|
||||
{
|
||||
"node": "Qdrant Vector Store",
|
||||
"type": "ai_document",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Extract Server Data": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Extract Available Courses",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Course Metadata": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge Course & Recipe",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Recipes From DB": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Tool Response",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get This Week's Menu": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Extract Server Data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Qdrant Recommend API": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait for Rate Limits": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Mistral Embeddings",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Merge Course & Recipe": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Prepare Documents",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Extract Recipe Details": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge Course & Recipe",
|
||||
"type": "main",
|
||||
"index": 1
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Mistral Embeddings": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Use Qdrant Recommend API",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Embeddings Mistral Cloud": {
|
||||
"ai_embedding": [
|
||||
[
|
||||
{
|
||||
"node": "Qdrant Vector Store",
|
||||
"type": "ai_embedding",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Execute Workflow Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait for Rate Limits",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Mistral Cloud Chat Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Use Qdrant Recommend API": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Recipes From DB",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Extract Available Courses": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Course Metadata",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Get Recipe",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When clicking \"Test workflow\"": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get This Week's Menu",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Recursive Character Text Splitter": {
|
||||
"ai_textSplitter": [
|
||||
[
|
||||
{
|
||||
"node": "Default Data Loader",
|
||||
"type": "ai_textSplitter",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
1147
workflows/Wait/0538_Wait_Splitout_Send_Webhook.json
Normal file
1147
workflows/Wait/0538_Wait_Splitout_Send_Webhook.json
Normal file
File diff suppressed because it is too large
Load Diff
457
workflows/Wait/0542_Wait_Redis_Create_Triggered.json
Normal file
457
workflows/Wait/0542_Wait_Redis_Create_Triggered.json
Normal file
@@ -0,0 +1,457 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "26ba763460b97c249b82942b23b6384876dfeb9327513332e743c5f6219c2b8e"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "d61d8ff3-532a-4b0d-a5a7-e02d2e79ddce",
|
||||
"name": "OpenAI Chat Model",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
2660,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "8gccIjcuf3gvaoEr",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "b6d5c1cf-b4a1-4901-b001-0c375747ee63",
|
||||
"name": "No Operation, do nothing",
|
||||
"type": "n8n-nodes-base.noOp",
|
||||
"position": [
|
||||
1660,
|
||||
520
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "f4e08e32-bb96-4b5d-852e-26ad6fec3c8c",
|
||||
"name": "Add to Messages Stack",
|
||||
"type": "n8n-nodes-base.redis",
|
||||
"position": [
|
||||
1340,
|
||||
200
|
||||
],
|
||||
"parameters": {
|
||||
"list": "=chat-buffer:{{ $json.From }}",
|
||||
"tail": true,
|
||||
"operation": "push",
|
||||
"messageData": "={{ $json.Body }}"
|
||||
},
|
||||
"credentials": {
|
||||
"redis": {
|
||||
"id": "zU4DA70qSDrZM1El",
|
||||
"name": "Redis account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "181ae99e-ebe7-4e99-b5a5-999acc249621",
|
||||
"name": "Should Continue?",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
1660,
|
||||
360
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "ec39573f-f92a-4fe4-a832-0a137de8e7d0",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $('Get Latest Message Stack').item.json.messages.last() }}",
|
||||
"rightValue": "={{ $('Twilio Trigger').item.json.Body }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "640c63ca-2798-48a9-8484-b834c1a36301",
|
||||
"name": "Window Buffer Memory",
|
||||
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
|
||||
"position": [
|
||||
2780,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"sessionKey": "=chat-debouncer:{{ $('Twilio Trigger').item.json.From }}",
|
||||
"sessionIdType": "customKey"
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "123c35c5-f7b2-4b4d-b220-0e5273e25115",
|
||||
"name": "Twilio Trigger",
|
||||
"type": "n8n-nodes-base.twilioTrigger",
|
||||
"position": [
|
||||
940,
|
||||
360
|
||||
],
|
||||
"webhookId": "0ca3da0e-e4e1-4e94-8380-06207bf9b429",
|
||||
"parameters": {
|
||||
"updates": [
|
||||
"com.twilio.messaging.inbound-message.received"
|
||||
]
|
||||
},
|
||||
"credentials": {
|
||||
"twilioApi": {
|
||||
"id": "TJv4H4lXxPCLZT50",
|
||||
"name": "Twilio account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "f4e86455-7f4d-4401-8f61-a859be1433a9",
|
||||
"name": "Get Latest Message Stack",
|
||||
"type": "n8n-nodes-base.redis",
|
||||
"position": [
|
||||
1500,
|
||||
360
|
||||
],
|
||||
"parameters": {
|
||||
"key": "=chat-buffer:{{ $json.From }}",
|
||||
"keyType": "list",
|
||||
"options": {},
|
||||
"operation": "get",
|
||||
"propertyName": "messages"
|
||||
},
|
||||
"credentials": {
|
||||
"redis": {
|
||||
"id": "zU4DA70qSDrZM1El",
|
||||
"name": "Redis account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1,
|
||||
"alwaysOutputData": false
|
||||
},
|
||||
{
|
||||
"id": "02f8e7f5-12b4-4a5a-9ce9-5f0558e447aa",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1232.162872321277,
|
||||
-50.203627749982275
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 632.8309394802918,
|
||||
"height": 766.7069233634998,
|
||||
"content": "## Step 2. Buffer Incoming Messages\n[Learn more about using Redis](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.redis)\n\n* New messages are captured into a list.\n* After X seconds, we get a fresh copy of this list\n* If the last message on the list is the same as the incoming message, then we know no new follow-on messages were sent within the last 5 seconds. Hence the user should be waiting and it is safe to reply.\n* But if the reverse is true, then we will abort the execution here."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "311c0d69-a735-4435-91b6-e80bf7d4c012",
|
||||
"name": "Send Reply",
|
||||
"type": "n8n-nodes-base.twilio",
|
||||
"position": [
|
||||
3000,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"to": "={{ $('Twilio Trigger').item.json.From }}",
|
||||
"from": "={{ $('Twilio Trigger').item.json.To }}",
|
||||
"message": "={{ $json.output }}",
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"twilioApi": {
|
||||
"id": "TJv4H4lXxPCLZT50",
|
||||
"name": "Twilio account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "c0e0cd08-66e3-4ca3-9441-8436c0d9e664",
|
||||
"name": "Wait 5 seconds",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
1340,
|
||||
360
|
||||
],
|
||||
"webhookId": "d486979c-8074-4ecb-958e-fcb24455086b",
|
||||
"parameters": {},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "c7959fa2-69a5-46b4-8e67-1ef824860f4e",
|
||||
"name": "Get Chat History",
|
||||
"type": "@n8n/n8n-nodes-langchain.memoryManager",
|
||||
"position": [
|
||||
2000,
|
||||
280
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"groupMessages": true
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "55933c54-5546-4770-8b36-a31496163528",
|
||||
"name": "Window Buffer Memory1",
|
||||
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
|
||||
"position": [
|
||||
2000,
|
||||
420
|
||||
],
|
||||
"parameters": {
|
||||
"sessionKey": "=chat-debouncer:{{ $('Twilio Trigger').item.json.From }}",
|
||||
"sessionIdType": "customKey"
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "459c0181-d239-4eec-88b6-c9603868d518",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
774.3250485705519,
|
||||
198.07493876489747
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 431.1629802181097,
|
||||
"height": 357.49804533541777,
|
||||
"content": "## Step 1. Listen for Twilio Messages\n[Read more about Twilio Trigger](https://docs.n8n.io/integrations/builtin/trigger-nodes/n8n-nodes-base.twiliotrigger)\n\nIn this example, we'll use the sender's phone number as the session ID. This will be important in retrieving chat history."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "e06313a9-066a-4387-a36c-a6c6ff57d6f9",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1900,
|
||||
80
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 618.970917763344,
|
||||
"height": 501.77420646931444,
|
||||
"content": "## Step 3. Get Messages Since Last Reply\n[Read more about using Chat Memory](https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.memorymanager)\n\nOnce conditions are met and we allow the agent to reply, we'll need to find the bot's last reply and work out the buffer of user messages since then. We can do this by looking using chat memory and comparing this to the latest message in our redis messages stack."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "601a71f6-c6f8-4b73-98c7-cfa11b1facaa",
|
||||
"name": "Get Messages Buffer",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
2320,
|
||||
280
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "01434acb-c224-46d2-99b0-7a81a2bb50c5",
|
||||
"name": "messages",
|
||||
"type": "string",
|
||||
"value": "={{\n$('Get Latest Message Stack').item.json.messages\n .slice(\n $('Get Latest Message Stack').item.json.messages.lastIndexOf(\n $('Get Chat History').item.json.messages.last().human\n || $('Twilio Trigger').item.json.chatInput\n ),\n $('Get Latest Message Stack').item.json.messages.length\n )\n .join('\\n')\n}}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "9e49f2de-89e6-4152-8e9c-ed47c5fc4654",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2549,
|
||||
120
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 670.2274698011594,
|
||||
"height": 522.5993538768389,
|
||||
"content": "## Step 4. Send Single Agent Reply For Many Messages\n[Learn more about using AI Agents](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent)\n\nFinally, our buffered messages are sent to the AI Agent that can formulate a single response for all. This could potentially improve the conversation experience if the chat interaction is naturally more rapid and spontaneous. A drawback however is that responses could be feel much slower - tweak the wait threshold to suit your needs!"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "be13c74a-467c-4ab1-acca-44878c68dba4",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
380,
|
||||
80
|
||||
],
|
||||
"parameters": {
|
||||
"width": 375.55385425077225,
|
||||
"height": 486.69228315530853,
|
||||
"content": "## Try It Out!\n### This workflow demonstrates a simple approach to stagger an AI Agent's reply if users often send in a sequence of partial messages and in short bursts.\n\n* Twilio webhook receives user's messages which are recorded in a message stack powered by Redis.\n* The execution is immediately paused for 5 seconds and then another check is done against the message stack for the latest message.\n* The purpose of this check lets use know if the user is sending more messages or if they are waiting for a reply.\n* The execution is aborted if the latest message on the stack differs from the incoming message and continues if they are the same.\n* For the latter, the agent receives buffered messages and is able to respond to all in a single reply."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "334d38e1-ec16-46f2-a57d-bf531adb8d3d",
|
||||
"name": "AI Agent",
|
||||
"type": "@n8n/n8n-nodes-langchain.agent",
|
||||
"position": [
|
||||
2660,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"text": "={{ $json.messages }}",
|
||||
"agent": "conversationalAgent",
|
||||
"options": {},
|
||||
"promptType": "define"
|
||||
},
|
||||
"typeVersion": 1.6
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"AI Agent": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Send Reply",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Twilio Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Add to Messages Stack",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Wait 5 seconds",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait 5 seconds": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Latest Message Stack",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Chat History": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Messages Buffer",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Should Continue?": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Chat History",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "No Operation, do nothing",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Messages Buffer": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Window Buffer Memory": {
|
||||
"ai_memory": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_memory",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Window Buffer Memory1": {
|
||||
"ai_memory": [
|
||||
[
|
||||
{
|
||||
"node": "Get Chat History",
|
||||
"type": "ai_memory",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Latest Message Stack": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Should Continue?",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
1359
workflows/Wait/0547_Wait_Splitout_Create_Webhook.json
Normal file
1359
workflows/Wait/0547_Wait_Splitout_Create_Webhook.json
Normal file
File diff suppressed because it is too large
Load Diff
366
workflows/Wait/0567_Wait_Code_Export_Webhook.json
Normal file
366
workflows/Wait/0567_Wait_Code_Export_Webhook.json
Normal file
@@ -0,0 +1,366 @@
|
||||
{
|
||||
"id": "23GPrqZjHnIVvTEa",
|
||||
"meta": {
|
||||
"instanceId": "[instance id auto generated]",
|
||||
"templateCredsSetupCompleted": true
|
||||
},
|
||||
"name": "Backup n8n Workflows to Bitbucket",
|
||||
"tags": [],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "b3363b9d-ea6e-47b7-99f9-f48a21805886",
|
||||
"name": "Calculate Wait Time",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
1400,
|
||||
-260
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "// Get all input items and ensure we have data\nif ($input.all().length === 0 || !$input.all()[0].headers) {\n // If no headers available, return default wait time\n return { waitTime: 1 };\n}\n\n// Check rate limit headers from previous request\nconst headers = $input.all()[0].headers;\nlet waitTime = 1; // Default 1 second\n\n// Check if we have rate limit information (safely)\nconst remaining = parseInt(headers['x-ratelimit-remaining']) || null;\nconst reset = parseInt(headers['x-ratelimit-reset']) || null;\n\n// Only adjust wait time if we have valid rate limit info\nif (remaining !== null && reset !== null) {\n // If we're running low on requests, calculate a longer wait time\n if (remaining < 100) {\n // Calculate seconds until reset\n const now = Math.floor(Date.now() / 1000);\n const timeUntilReset = reset - now;\n \n // Spread remaining requests over time until reset\n // Add 10% buffer to be safe\n waitTime = Math.ceil((timeUntilReset / remaining) * 1.1);\n } else if (remaining < 500) {\n // Start slowing down earlier\n waitTime = 2;\n }\n}\n\n// Cap maximum wait time at 30 seconds\nwaitTime = Math.min(waitTime, 30);\n\nreturn { waitTime };"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "3cbc2287-b36f-4839-87b7-be4a7eadcf79",
|
||||
"name": "Run Daily at 2 AM",
|
||||
"type": "n8n-nodes-base.scheduleTrigger",
|
||||
"position": [
|
||||
-120,
|
||||
-20
|
||||
],
|
||||
"parameters": {
|
||||
"rule": {
|
||||
"interval": [
|
||||
{
|
||||
"triggerAtHour": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "09b396aa-61e8-4631-8aae-7126fbd609e6",
|
||||
"name": "Get All Workflows",
|
||||
"type": "n8n-nodes-base.n8n",
|
||||
"position": [
|
||||
320,
|
||||
-20
|
||||
],
|
||||
"parameters": {
|
||||
"filters": {},
|
||||
"requestOptions": {}
|
||||
},
|
||||
"credentials": {
|
||||
"n8nApi": {
|
||||
"id": "[n8n-api-credential-id]",
|
||||
"name": "n8n Development Environment"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "c46b50cd-432f-4714-ac68-b6f92663b592",
|
||||
"name": "Loop Workflows",
|
||||
"type": "n8n-nodes-base.splitInBatches",
|
||||
"position": [
|
||||
540,
|
||||
-20
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "2a27e85d-51c0-4f45-a7d6-6422fc8a439b",
|
||||
"name": "Get Existing Worfklow from Bitbucket",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"onError": "continueRegularOutput",
|
||||
"position": [
|
||||
780,
|
||||
-20
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://api.bitbucket.org/2.0/repositories/{{ $('Set Bitbucket Workspace & Repository').item.json.WorkspaceSlug }}/{{ $('Set Bitbucket Workspace & Repository').item.json.RepositorySlug }}/src/main/{{ $json.name.replace(/[^a-zA-Z0-9]/g, '-').toLowerCase() }}",
|
||||
"options": {
|
||||
"response": {
|
||||
"response": {
|
||||
"fullResponse": true
|
||||
}
|
||||
},
|
||||
"allowUnauthorizedCerts": true
|
||||
},
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpBasicAuth"
|
||||
},
|
||||
"credentials": {
|
||||
"httpBasicAuth": {
|
||||
"id": "[bitbucket-credential-id]",
|
||||
"name": "Bitbucket"
|
||||
}
|
||||
},
|
||||
"retryOnFail": false,
|
||||
"typeVersion": 4.2,
|
||||
"alwaysOutputData": false
|
||||
},
|
||||
{
|
||||
"id": "eeb52f03-dd60-46ae-ad86-1cabf7f6c20f",
|
||||
"name": "New or Changed?",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
980,
|
||||
-20
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"ignoreCase": true
|
||||
},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": false,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "or",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "2d5da90e-0f1d-436b-84d4-d82deaaa4b58",
|
||||
"operator": {
|
||||
"type": "number",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json.error.status }}",
|
||||
"rightValue": 404
|
||||
},
|
||||
{
|
||||
"id": "b7b9a48d-8954-4cc4-bf7a-ab30439ad930",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "notEquals"
|
||||
},
|
||||
"leftValue": "={{ $('Get Existing Worfklow from Bitbucket').item.json.data }}",
|
||||
"rightValue": "={{ JSON.stringify($('Loop Workflows').item.json, null, 2) }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "04400827-d331-4ee2-8a67-1238ea2dc969",
|
||||
"name": "Upload Workflow to Bitbucket",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1200,
|
||||
-260
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://api.bitbucket.org/2.0/repositories/{{ $('Set Bitbucket Workspace & Repository').item.json.WorkspaceSlug }}/{{ $('Set Bitbucket Workspace & Repository').item.json.RepositorySlug }}/src",
|
||||
"method": "POST",
|
||||
"options": {
|
||||
"redirect": {
|
||||
"redirect": {
|
||||
"maxRedirects": 5
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"response": {
|
||||
"fullResponse": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"sendBody": true,
|
||||
"sendHeaders": true,
|
||||
"authentication": "genericCredentialType",
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "message",
|
||||
"value": "={{ $('Loop Workflows').item.json.name + ' [' + $now.format('yyyy-MM-dd HH:mm:ss') +']' }}"
|
||||
},
|
||||
{
|
||||
"name": "={{ $('Loop Workflows').item.json.name.replace(/[^a-zA-Z0-9]/g, '-').toLowerCase() }}",
|
||||
"value": "={{ JSON.stringify($('Loop Workflows').item.json, null, 2) }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"genericAuthType": "httpBasicAuth",
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Content-Type",
|
||||
"value": "application/x-www-form-urlencoded"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"httpBasicAuth": {
|
||||
"id": "[bitbucket-credential-id]",
|
||||
"name": "Bitbucket"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "5f198366-3bcf-4a96-ae60-da7cc9403a6f",
|
||||
"name": "Wait to Avoid Rate Limiting",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
1620,
|
||||
-20
|
||||
],
|
||||
"webhookId": "793d7525-d166-4487-a71f-d48da7c66662",
|
||||
"parameters": {
|
||||
"amount": "={{ $json.waitTime || 1 }}"
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "adc37b33-c5af-4a44-ba87-9806efe25603",
|
||||
"name": "Set Bitbucket Workspace & Repository",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
100,
|
||||
-20
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "37f2ddba-188d-4bc1-98b3-5c5fa31d2d62",
|
||||
"name": "WorkspaceSlug",
|
||||
"type": "string",
|
||||
"value": "[workspace-slug]"
|
||||
},
|
||||
{
|
||||
"id": "303f25f0-bba8-4977-8f4f-33961e2e7e8c",
|
||||
"name": "RepositorySlug",
|
||||
"type": "string",
|
||||
"value": "[repository-slug]"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
}
|
||||
],
|
||||
"active": true,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "f21887f2-e885-42c6-a934-4f7617e267dd",
|
||||
"connections": {
|
||||
"Loop Workflows": {
|
||||
"main": [
|
||||
[],
|
||||
[
|
||||
{
|
||||
"node": "Get Existing Worfklow from Bitbucket",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"New or Changed?": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Upload Workflow to Bitbucket",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Wait to Avoid Rate Limiting",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get All Workflows": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop Workflows",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Run Daily at 2 AM": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Set Bitbucket Workspace & Repository",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Calculate Wait Time": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait to Avoid Rate Limiting",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait to Avoid Rate Limiting": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop Workflows",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Upload Workflow to Bitbucket": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Calculate Wait Time",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Existing Worfklow from Bitbucket": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "New or Changed?",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Set Bitbucket Workspace & Repository": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get All Workflows",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
1001
workflows/Wait/0578_Wait_Schedule_Create_Webhook.json
Normal file
1001
workflows/Wait/0578_Wait_Schedule_Create_Webhook.json
Normal file
File diff suppressed because it is too large
Load Diff
653
workflows/Wait/0582_Wait_Dropbox_Create_Webhook.json
Normal file
653
workflows/Wait/0582_Wait_Dropbox_Create_Webhook.json
Normal file
@@ -0,0 +1,653 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "cd478e616d2616186f4f92b70cfe0c2ed95b5b209f749f2b873b38bdc56c47c9"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "f4b1bdd8-654d-4643-a004-ff1b2f32b5ae",
|
||||
"name": "When clicking ‘Test workflow’",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
580,
|
||||
1100
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "d6b1c410-81c3-486d-bdcb-86a4c6f7bf9e",
|
||||
"name": "Create Asset",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1940,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://pdf-services.adobe.io/assets",
|
||||
"method": "POST",
|
||||
"options": {
|
||||
"redirect": {
|
||||
"redirect": {}
|
||||
}
|
||||
},
|
||||
"sendBody": true,
|
||||
"sendHeaders": true,
|
||||
"authentication": "genericCredentialType",
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "mediaType",
|
||||
"value": "application/pdf"
|
||||
}
|
||||
]
|
||||
},
|
||||
"genericAuthType": "httpHeaderAuth",
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"value": "=Bearer {{ $json.access_token }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "PU8GmSwXswwM1Fzq",
|
||||
"name": "Adobe API calls"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.1
|
||||
},
|
||||
{
|
||||
"id": "9e900a45-d792-4dc5-938c-0d5cdfd2e647",
|
||||
"name": "Execute Workflow Trigger",
|
||||
"type": "n8n-nodes-base.executeWorkflowTrigger",
|
||||
"position": [
|
||||
1140,
|
||||
440
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "859f369d-f36f-4c3f-a50d-a17214fef2a3",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
20,
|
||||
140
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 667.6107231291055,
|
||||
"height": 715.2927406867177,
|
||||
"content": "# Adobe API Wrapper\n\nSee Adobe documentation:\n- https://developer.adobe.com/document-services/docs/overview/pdf-services-api/howtos/\n- https://developer.adobe.com/document-services/docs/overview/pdf-extract-api/gettingstarted/\n\nIn short, this workflow does the following steps :\n\n- Authentication\n- Upload an asset (pdf) to adobe\n- Wait for the asset to be processed by Adobe\n- Download the result\n\n## Credential\n\nCredentials are not \"predefined\" and you'll have to create 2 custom credentials, detailed in the workflow.\n\n## Result\n\nThe result will depend on the transformation requested. It could be 1 of various files (json, zip...) accessible via download URL returned by the workflow.\n\nWorkflow can be tested with a PDF filed fetched with Dorpbox for example or any storage provider. "
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "450199c5-e588-486d-81cf-eb69cf729ab1",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
560,
|
||||
900
|
||||
],
|
||||
"parameters": {
|
||||
"width": 857.2064431277577,
|
||||
"height": 463.937514110429,
|
||||
"content": "## Testing for development"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "311a75d6-4fbe-4d8f-89b3-d4b0ee21f7ae",
|
||||
"name": "Adobe API Query",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
900,
|
||||
1000
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "62bb6466-acf4-41e5-9444-c9ef608a6822",
|
||||
"name": "endpoint",
|
||||
"type": "string",
|
||||
"value": "extractpdf"
|
||||
},
|
||||
{
|
||||
"id": "0352f585-1434-4ab7-a704-a1e187fffa96",
|
||||
"name": "json_payload",
|
||||
"type": "object",
|
||||
"value": "={{ \n{\n \"renditionsToExtract\": [\n \"tables\"\n ],\n \"elementsToExtract\": [\n \"text\",\n \"tables\"\n ]\n }\n}}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "abf20778-db50-4787-a5f4-7af5d5c76efe",
|
||||
"name": "Load a test pdf file",
|
||||
"type": "n8n-nodes-base.dropbox",
|
||||
"position": [
|
||||
900,
|
||||
1180
|
||||
],
|
||||
"parameters": {
|
||||
"path": "/valerian/w/prod/_freelance/ADEZIF/AI/Source data/Brochures pour GPT/Brochure 3M/3M_doc_emballage VERSION FINALE.pdf",
|
||||
"operation": "download",
|
||||
"authentication": "oAuth2"
|
||||
},
|
||||
"credentials": {
|
||||
"dropboxOAuth2Api": {
|
||||
"id": "9",
|
||||
"name": "Dropbox account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "8bb2ae0c-df61-4110-af44-b1040b4340a2",
|
||||
"name": "Query + File",
|
||||
"type": "n8n-nodes-base.merge",
|
||||
"position": [
|
||||
1180,
|
||||
1080
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "combine",
|
||||
"options": {},
|
||||
"combinationMode": "mergeByPosition"
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "92afa6d6-daf8-4358-8c95-36473b810dc2",
|
||||
"name": "Query + File + Asset information",
|
||||
"type": "n8n-nodes-base.merge",
|
||||
"position": [
|
||||
2180,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "combine",
|
||||
"options": {},
|
||||
"combinationMode": "mergeByPosition"
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "5d88b8e4-0b0a-463a-88db-c45d5e87e823",
|
||||
"name": "Process Query",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
2640,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://pdf-services.adobe.io/operation/{{ $('Query + File + Asset information').item.json.endpoint }}",
|
||||
"method": "POST",
|
||||
"options": {
|
||||
"redirect": {
|
||||
"redirect": {}
|
||||
},
|
||||
"response": {
|
||||
"response": {
|
||||
"fullResponse": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"jsonBody": "={{ \n{\n...{ \"assetID\":$('Query + File + Asset information').first().json.assetID },\n...$('Query + File + Asset information').first().json.json_payload\n}\n}}",
|
||||
"sendBody": true,
|
||||
"sendHeaders": true,
|
||||
"specifyBody": "json",
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpHeaderAuth",
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"value": "=Bearer {{ $('Authenticartion (get token)').first().json[\"access_token\"] }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "PU8GmSwXswwM1Fzq",
|
||||
"name": "Adobe API calls"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.1
|
||||
},
|
||||
{
|
||||
"id": "47278b2f-dd04-4609-90ab-52f34b9a0e72",
|
||||
"name": "Wait 5 second",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
2860,
|
||||
580
|
||||
],
|
||||
"webhookId": "ed00a9a8-d599-4a98-86f8-a15176352c0a",
|
||||
"parameters": {
|
||||
"unit": "seconds",
|
||||
"amount": 5
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "691b52ae-132a-4105-b1e4-bb7d55d0e347",
|
||||
"name": "Try to download the result",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
3080,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"url": "={{ $('Process Query').item.json[\"headers\"][\"location\"] }}",
|
||||
"options": {},
|
||||
"sendHeaders": true,
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpHeaderAuth",
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"value": "=Bearer {{ $('Authenticartion (get token)').first().json[\"access_token\"] }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "PU8GmSwXswwM1Fzq",
|
||||
"name": "Adobe API calls"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.1
|
||||
},
|
||||
{
|
||||
"id": "277dea14-de8d-4719-aff1-f4008d6d5c67",
|
||||
"name": "Switch",
|
||||
"type": "n8n-nodes-base.switch",
|
||||
"position": [
|
||||
3260,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"rules": {
|
||||
"values": [
|
||||
{
|
||||
"outputKey": "in progress",
|
||||
"conditions": {
|
||||
"options": {
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json.status }}",
|
||||
"rightValue": "in progress"
|
||||
}
|
||||
]
|
||||
},
|
||||
"renameOutput": true
|
||||
},
|
||||
{
|
||||
"outputKey": "failed",
|
||||
"conditions": {
|
||||
"options": {
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "6d6917f6-abb9-4175-a070-a2f500d9f34f",
|
||||
"operator": {
|
||||
"name": "filter.operator.equals",
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json.status }}",
|
||||
"rightValue": "failed"
|
||||
}
|
||||
]
|
||||
},
|
||||
"renameOutput": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {
|
||||
"fallbackOutput": "extra"
|
||||
}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "8f6f8273-43ed-4a44-bb27-6ce137000472",
|
||||
"name": "Forward response to origin workflow",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
3820,
|
||||
600
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": []
|
||||
},
|
||||
"includeOtherFields": true
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "00e2d7e3-94cd-49e5-a975-2fdc1a7a95fd",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2780,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"width": 741.3069226712129,
|
||||
"height": 336.57433650102917,
|
||||
"content": "## Wait for file do be processed"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "3667b1ba-b9a6-4e1a-94b1-61b37f1e7adc",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1324.6733934850213,
|
||||
147.59707015795897
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 402.63171535688423,
|
||||
"height": 700.9473619571734,
|
||||
"content": "### 1- Credential for token request\n\nCreate a \"Custom Auth\" credential like this :\n\n```\n{\n \"headers\": {\n \"Content-Type\":\"application/x-www-form-urlencoded\"\n }, \n \"body\" : {\n \"client_id\": \"****\", \n \"client_secret\":\"****\"\n }\n}\n```"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "718bb738-8ce4-4b38-94e4-6ccac1adf9ec",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1800,
|
||||
152.6219700851708
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 1752.5923360342827,
|
||||
"height": 692.0175575715904,
|
||||
"content": "### 2- Credential for all other Queries\n\nCreate a \"Header Auth\" credential like this : \n\n```\nX-API-Key: **** (same value as client_id)\n```"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "d6bc8011-699d-4388-82f5-e5f90ba8672a",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
740,
|
||||
140
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 529.7500231395039,
|
||||
"height": 718.8735380890446,
|
||||
"content": "## Workflow Input\n\n- endpoint: splitpdf, extractpdf, ...\n- json_payload : all endpoint payload except assetID which is handled in current workflow\n- **PDF Data as n8n Binary**\n\n\n### Example for **split** : \n\n```\n{\n \"endpoint\": \"splitpdf\",\n \"json_payload\": {\n \"splitoption\": \n { \"pageRanges\": [{\"start\": 1,\"end\": 2}]}\n }\n }\n}\n```\n\n### Example for **extractpdf**\n\n```\n{\n \"endpoint\": \"splitpdf\",\n \"json_payload\": {\n \"renditionsToExtract\": [\n \"tables\"\n ],\n \"elementsToExtract\": [\n \"text\",\n \"tables\"\n ]\n }\n}\n```"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "2bbf6d9d-8399-49ba-94ea-b90795ef44ba",
|
||||
"name": "Authenticartion (get token)",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1500,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://pdf-services.adobe.io/token",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"sendBody": true,
|
||||
"contentType": "form-urlencoded",
|
||||
"authentication": "genericCredentialType",
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{}
|
||||
]
|
||||
},
|
||||
"genericAuthType": "httpCustomAuth"
|
||||
},
|
||||
"credentials": {
|
||||
"httpCustomAuth": {
|
||||
"id": "djeOoXpBafK4aiGX",
|
||||
"name": "Adobe API"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.1
|
||||
},
|
||||
{
|
||||
"id": "be4e87e8-6e56-408f-b932-320023382f98",
|
||||
"name": "Upload PDF File (asset)",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
2440,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"url": "={{ $json.uploadUri }}",
|
||||
"method": "PUT",
|
||||
"options": {
|
||||
"redirect": {
|
||||
"redirect": {}
|
||||
}
|
||||
},
|
||||
"sendBody": true,
|
||||
"sendQuery": true,
|
||||
"contentType": "binaryData",
|
||||
"queryParameters": {
|
||||
"parameters": [
|
||||
{}
|
||||
]
|
||||
},
|
||||
"inputDataFieldName": "data"
|
||||
},
|
||||
"typeVersion": 4.1
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Switch": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait 5 second",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Forward response to origin workflow",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Forward response to origin workflow",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Create Asset": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Query + File + Asset information",
|
||||
"type": "main",
|
||||
"index": 1
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Query + File": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Authenticartion (get token)",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Query + File + Asset information",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Process Query": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait 5 second",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait 5 second": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Try to download the result",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Adobe API Query": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Query + File",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Load a test pdf file": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Query + File",
|
||||
"type": "main",
|
||||
"index": 1
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Upload PDF File (asset)": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Process Query",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Execute Workflow Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Authenticartion (get token)",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Query + File + Asset information",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Try to download the result": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Switch",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Authenticartion (get token)": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Create Asset",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Query + File + Asset information": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Upload PDF File (asset)",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When clicking ‘Test workflow’": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Load a test pdf file",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Adobe API Query",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
665
workflows/Wait/0583_Wait_Splitout_Create_Webhook.json
Normal file
665
workflows/Wait/0583_Wait_Splitout_Create_Webhook.json
Normal file
@@ -0,0 +1,665 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "7858a8e25b8fc4dae485c1ef345e6fe74effb1f5060433ef500b4c186c965c18"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "49ab7596-665e-4a0f-bb8b-9dc04525ce88",
|
||||
"name": "Gmail",
|
||||
"type": "n8n-nodes-base.gmail",
|
||||
"position": [
|
||||
2340,
|
||||
1440
|
||||
],
|
||||
"parameters": {
|
||||
"message": "={{ $json.html }}",
|
||||
"options": {},
|
||||
"subject": "Podcast Review"
|
||||
},
|
||||
"credentials": {
|
||||
"gmailOAuth2": {
|
||||
"id": "1MUdv1HbrQUFABiZ",
|
||||
"name": "Gmail account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "40aa23f4-69d6-46e5-84a2-b46a64a3f0af",
|
||||
"name": "TaddyTopDaily",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1620,
|
||||
820
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://api.taddy.org/",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"sendBody": true,
|
||||
"sendHeaders": true,
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "query",
|
||||
"value": "=query { getTopChartsByGenres( limitPerPage:10, filterByCountry:UNITED_STATES_OF_AMERICA, taddyType:PODCASTEPISODE, genres:PODCASTSERIES_{{ $json.genre }}){ topChartsId podcastEpisodes{ uuid name audioUrl podcastSeries{ uuid name } } } }"
|
||||
}
|
||||
]
|
||||
},
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "X-USER-ID"
|
||||
},
|
||||
{
|
||||
"name": "X-API-KEY"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "42eea23b-b09c-49ee-af5b-12abb3960390",
|
||||
"name": "Genre",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
1420,
|
||||
820
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "e995cd5b-b91c-4a9d-8215-44d7dfe3f52f",
|
||||
"name": "genre",
|
||||
"type": "string",
|
||||
"value": "TECHNOLOGY"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "da256fbf-ed7b-4a26-9fa8-33d1c2b717a5",
|
||||
"name": "Split Out",
|
||||
"type": "n8n-nodes-base.splitOut",
|
||||
"position": [
|
||||
1840,
|
||||
820
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldToSplitOut": "data.getTopChartsByGenres.podcastEpisodes"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "069ab68c-dcd6-406f-8e7f-2597f62a04f5",
|
||||
"name": "Whisper Transcribe Audio",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1880,
|
||||
1120
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://api.openai.com/v1/audio/transcriptions",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"sendBody": true,
|
||||
"contentType": "multipart-form-data",
|
||||
"authentication": "predefinedCredentialType",
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "model",
|
||||
"value": "whisper-1"
|
||||
},
|
||||
{
|
||||
"name": "file",
|
||||
"parameterType": "formBinaryData",
|
||||
"inputDataFieldName": "data"
|
||||
}
|
||||
]
|
||||
},
|
||||
"nodeCredentialType": "openAiApi"
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "tTOOlpAaNT3QoKbQ",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "ffa67b8d-8601-4e1d-8f72-b6266e6b3327",
|
||||
"name": "Final Data",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
2320,
|
||||
1120
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "raw",
|
||||
"options": {},
|
||||
"jsonOutput": "={\n\"podcast\": \"{{ $('TaddyTopDaily').item.json.data.getTopChartsByGenres.podcastEpisodes[$itemIndex].podcastSeries.name }}\",\n\"name\": \"{{ $('TaddyTopDaily').item.json.data.getTopChartsByGenres.podcastEpisodes[$itemIndex].name.replace(/\\\"/g,'\\\"') }}\",\n \"url\":\"{{ $('TaddyTopDaily').item.json.data.getTopChartsByGenres.podcastEpisodes[$itemIndex].audioUrl.replace(/\"/g,'') }}\",\n\"summary\":\"{{ $json.message.content.replace(/\\\\/g, '\\\\\\\\').replace(/\"/g, '\\\\\"').replace(/\\n/g, '<br/>').replace(/\\r/g, '\\\\r').replace(/\\t/g, '\\\\t') }}\"\n \n}\n"
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "88cd1fa5-07ae-4dcd-b4f8-85cbf7c98d73",
|
||||
"name": "Merge Results",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
1900,
|
||||
1440
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "return [{fields:$input.all().map(x=>x.json)}]"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "4c2c80d1-750f-42f1-a0f1-343dec325b0f",
|
||||
"name": "HTML",
|
||||
"type": "n8n-nodes-base.html",
|
||||
"position": [
|
||||
2120,
|
||||
1440
|
||||
],
|
||||
"parameters": {
|
||||
"html": "<!DOCTYPE html>\n<html>\n<head>\n <meta charset=\"UTF-8\" />\n</head>\n<body>\n <table>\n <tr> \n {{ ['Podcast', 'Episode', 'Summary'].map(propname=>'<td><h4>'+propname+'</h4></td>').join('') }}\n </tr>\n {{ $json.fields.map(ep=>{ return `<tr><td>${ep.podcast}</td><td><a href=\"${ep.url}\">${ep.name}</a></td><td>${ep.summary}</td><td></td></tr>`} ) }}\n </table>\n</body>\n</html>\n\n<style>\ntr { \n border: 1px solid #000; \n padding: 8px; \n }\n.container {\n background-color: #ffffff;\n text-align: center;\n padding: 16px;\n border-radius: 8px;\n}\n\nh1 {\n color: #ff6d5a;\n font-size: 24px;\n font-weight: bold;\n padding: 8px;\n}\n\nh2 {\n color: #909399;\n font-size: 18px;\n font-weight: bold;\n padding: 8px;\n}\n</style>\n"
|
||||
},
|
||||
"executeOnce": true,
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "f1d13556-2c3a-48e5-84a1-5b82f338c6ba",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
340,
|
||||
760
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 547.952991050529,
|
||||
"height": 683.5200847858991,
|
||||
"content": "## Daily Podcast Summary\n### This workflow will summarize the content in the day's top podcasts for a certain genre, then send you the podcasts with summaries by email\n\n## Setup:\n 1. Create a free API key on Taddy here: https://taddy.org/signup/developers\n 2. Input your user number and API key into the `TaddyTopDaily` node in the header parameters X-USER-ID and X-API-KEY respectively.\n 3. Create access credentials for your Gmail as described here: https://developers.google.com/workspace/guides/create-credentials. Use the credentials from your *client_secret.json* in the `Gmail` node.\n 4. In the `Genre` node, set the genre of podcasts you want a summary for. Valid values are: TECHNOLOGY, NEWS, ARTS, COMEDY, SPORTS, FICTION, etc. Look at api.taddy.org for the full list (they will be displayed in the help docs as PODCASTSERIES_TECHNOLOGY, PODCASTSERIES_NEWS, etc.)\n 5. Enter your email address in the `Gmail` node.\n 6. Change the schedule time for sending email from `Schedule` to whichever time you want to receive the email.\n \n\n## Test:\n- Link a `Test Workflow` node in place of the `Schedule` node.\n- Hit Test Workflow.\n- Check your email for the results."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "5aee7279-349e-47cd-99dc-7a32677b5a20",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1820,
|
||||
1060
|
||||
],
|
||||
"parameters": {
|
||||
"width": 651.4454343326669,
|
||||
"height": 252.64899257060446,
|
||||
"content": "### Whisper transcribes and Open AI summarizes the podcast"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "f8b4a203-b27f-4a11-90ef-a7e1561219f5",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1100,
|
||||
760
|
||||
],
|
||||
"parameters": {
|
||||
"width": 1189.7320416038633,
|
||||
"height": 249.2202456997519,
|
||||
"content": "### Get daily list of top podcasts (according to Apple charts) and download audio, then crop for OpenAI"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "7045c9c8-5509-4dc0-b167-ddd4d6c90c22",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1825,
|
||||
1384
|
||||
],
|
||||
"parameters": {
|
||||
"width": 645.0210885124873,
|
||||
"height": 227.94126205257731,
|
||||
"content": "### Finally, send the email!"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "8dc9583b-cec3-4ac0-a74a-329f6c3b4801",
|
||||
"name": "Summarize Podcast",
|
||||
"type": "n8n-nodes-base.openAi",
|
||||
"position": [
|
||||
2140,
|
||||
1120
|
||||
],
|
||||
"parameters": {
|
||||
"model": "gpt-4o-mini",
|
||||
"prompt": {
|
||||
"messages": [
|
||||
{
|
||||
"content": "=Summarize the major points of the following podcast: {{ $json.text }}. Start your answer by saying 'This episode focuses on', 'This episode is about', etc. Contain your answer to 3-4 paragraphs max, and focus on only key information. "
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {
|
||||
"maxTokens": 500
|
||||
},
|
||||
"resource": "chat",
|
||||
"requestOptions": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "tTOOlpAaNT3QoKbQ",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "e8d122f1-29f9-41ca-9c6b-b72269686fd6",
|
||||
"name": "Schedule",
|
||||
"type": "n8n-nodes-base.scheduleTrigger",
|
||||
"position": [
|
||||
1220,
|
||||
820
|
||||
],
|
||||
"parameters": {
|
||||
"rule": {
|
||||
"interval": [
|
||||
{
|
||||
"triggerAtHour": 8
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "67bc7a5b-8d0a-4de4-918d-410551dad4d7",
|
||||
"name": "Request Audio Crop",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1000,
|
||||
1220
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://api.products.aspose.app/audio/cutter/api/cutter",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"sendBody": true,
|
||||
"contentType": "multipart-form-data",
|
||||
"sendHeaders": true,
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "1",
|
||||
"parameterType": "formBinaryData",
|
||||
"inputDataFieldName": "data"
|
||||
},
|
||||
{
|
||||
"name": "convertOption",
|
||||
"value": "{\"startTime\":\"00:08:00\",\"endTime\":\"00:24:00\",\"audioFormat\":\"mp3\"}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Accept",
|
||||
"value": "*/*("
|
||||
},
|
||||
{
|
||||
"name": "Connection",
|
||||
"value": "keep-alive"
|
||||
},
|
||||
{
|
||||
"name": "Origin",
|
||||
"value": "https://products.aspose.app"
|
||||
},
|
||||
{
|
||||
"name": "Referer",
|
||||
"value": "https://products.aspose.app"
|
||||
},
|
||||
{
|
||||
"name": "Sec-Fetch-Dest",
|
||||
"value": "empty"
|
||||
},
|
||||
{
|
||||
"name": "Sec-Fetch-Mode",
|
||||
"value": "cors"
|
||||
},
|
||||
{
|
||||
"name": "Sec-Fetch-Site",
|
||||
"value": "same-site"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "0dc62507-3fea-45d7-a0dc-e92fb8e2600f",
|
||||
"name": "Get Download Link",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1200,
|
||||
1220
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://api.products.aspose.app/audio/cutter/api/cutter/HandleStatus?fileRequestId={{ $('Request Audio Crop').item.json.Data.FileRequestId }}",
|
||||
"options": {},
|
||||
"sendHeaders": true,
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Accept",
|
||||
"value": "application/json, text/javascript, */*; q=0.01"
|
||||
},
|
||||
{
|
||||
"name": "Connection",
|
||||
"value": "keep-alive"
|
||||
},
|
||||
{
|
||||
"name": "Origin",
|
||||
"value": "https://products.aspose.app"
|
||||
},
|
||||
{
|
||||
"name": "Referer",
|
||||
"value": "https://products.aspose.app"
|
||||
},
|
||||
{
|
||||
"name": "Sec-Fetch-Dest",
|
||||
"value": "empty"
|
||||
},
|
||||
{
|
||||
"name": "Sec-Fetch-Dest",
|
||||
"value": "cors"
|
||||
},
|
||||
{
|
||||
"name": "Sec-Fetch-Dest",
|
||||
"value": "same-site"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "8aa65189-2a4b-4ac4-9915-45ccd679a5da",
|
||||
"name": "Download Cut MP3",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1660,
|
||||
1140
|
||||
],
|
||||
"parameters": {
|
||||
"url": "={{ $json.Data.DownloadLink }}",
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "4e7318df-dbaa-4d9f-858d-4455ead763c1",
|
||||
"name": "Download Podcast",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
2060,
|
||||
820
|
||||
],
|
||||
"parameters": {
|
||||
"url": "={{ $json.audioUrl }}",
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "ab4601c6-7387-4f2f-a2f3-4256f88c0b3e",
|
||||
"name": "Wait",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
1600,
|
||||
1360
|
||||
],
|
||||
"webhookId": "bc28bc57-d9ea-430e-88db-78d088a058cb",
|
||||
"parameters": {},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "a0b300b9-aaad-48f1-8319-a03700e0d298",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
920,
|
||||
1100
|
||||
],
|
||||
"parameters": {
|
||||
"width": 898.7483569555845,
|
||||
"height": 387.3779915472271,
|
||||
"content": "### Crop the podcast down before analysis"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "34ca89fe-4ed1-491f-b3b9-32e97040959b",
|
||||
"name": "If Downloads Ready",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
1380,
|
||||
1180
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "loose"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "49440938-0cb3-41c8-bcab-b7ad96973f77",
|
||||
"operator": {
|
||||
"type": "boolean",
|
||||
"operation": "true",
|
||||
"singleValue": true
|
||||
},
|
||||
"leftValue": "={{ $input.all().map(x=>x.json.Data.DownloadLink).reduce((accumulator, currentValue) => accumulator && currentValue, true)\n}}",
|
||||
"rightValue": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
"looseTypeValidation": true
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"HTML": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Gmail",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Download Link",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Genre": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "TaddyTopDaily",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Schedule": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Genre",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Split Out": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Download Podcast",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Final Data": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge Results",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Merge Results": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "HTML",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"TaddyTopDaily": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Split Out",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Download Cut MP3": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Whisper Transcribe Audio",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Download Podcast": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Request Audio Crop",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Download Link": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "If Downloads Ready",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Summarize Podcast": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Final Data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"If Downloads Ready": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Download Cut MP3",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Wait",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Request Audio Crop": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Download Link",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Whisper Transcribe Audio": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Summarize Podcast",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
4125
workflows/Wait/0596_Wait_Code_Import_Webhook.json
Normal file
4125
workflows/Wait/0596_Wait_Code_Import_Webhook.json
Normal file
File diff suppressed because one or more lines are too long
1059
workflows/Wait/0602_Wait_Splitout_Send_Webhook.json
Normal file
1059
workflows/Wait/0602_Wait_Splitout_Send_Webhook.json
Normal file
File diff suppressed because it is too large
Load Diff
581
workflows/Wait/0603_Wait_Splitout_Create_Webhook.json
Normal file
581
workflows/Wait/0603_Wait_Splitout_Create_Webhook.json
Normal file
@@ -0,0 +1,581 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "408f9fb9940c3cb18ffdef0e0150fe342d6e655c3a9fac21f0f644e8bedabcd9"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "6d16b5be-8f7b-49f2-8523-9b84c62f2759",
|
||||
"name": "OpenAI Chat Model",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
1960,
|
||||
660
|
||||
],
|
||||
"parameters": {
|
||||
"model": "gpt-4o-2024-08-06",
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "8gccIjcuf3gvaoEr",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "a6084f09-9a4f-478a-ac1a-ab1413628c1f",
|
||||
"name": "Capture Frames",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
720,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "runOnceForEachItem",
|
||||
"language": "python",
|
||||
"pythonCode": "import cv2\nimport numpy as np\nimport base64\n\ndef extract_evenly_distributed_frames_from_base64(base64_string, max_frames=90):\n # Decode the Base64 string into bytes\n video_bytes = base64.b64decode(base64_string)\n \n # Write the bytes to a temporary file\n video_path = '/tmp/temp_video.mp4'\n with open(video_path, 'wb') as video_file:\n video_file.write(video_bytes)\n \n # Open the video file using OpenCV\n video_capture = cv2.VideoCapture(video_path)\n \n # Get the total number of frames in the video\n total_frames = int(video_capture.get(cv2.CAP_PROP_FRAME_COUNT))\n \n # Calculate the step size to take 'max_frames' evenly distributed frames\n step_size = max(1, total_frames // (max_frames - 1))\n \n # List to store selected frames as base64\n selected_frames_base64 = []\n \n for i in range(0, total_frames, step_size):\n # Set the current frame position\n video_capture.set(cv2.CAP_PROP_POS_FRAMES, i)\n \n # Read the frame\n ret, frame = video_capture.read()\n if ret:\n # Convert frame (NumPy array) to a Base64 string\n frame_base64 = convert_frame_to_base64(frame)\n selected_frames_base64.append(frame_base64)\n if len(selected_frames_base64) >= max_frames:\n break\n \n # Release the video capture object\n video_capture.release()\n\n return selected_frames_base64\n\ndef convert_frame_to_base64(frame):\n # Convert the frame (NumPy array) to JPEG format\n ret, buffer = cv2.imencode('.jpg', frame)\n if not ret:\n return None\n\n # Encode JPEG image to Base64\n frame_base64 = base64.b64encode(buffer).decode('utf-8')\n return frame_base64\n\nbase64_video = _input.item.binary.data.data\nframes_base64 = extract_evenly_distributed_frames_from_base64(base64_video, max_frames=90)\n\nreturn { \"output\": frames_base64 }"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "b45e82a4-f304-4733-a9cf-07cae6df13ea",
|
||||
"name": "Split Out Frames",
|
||||
"type": "n8n-nodes-base.splitOut",
|
||||
"position": [
|
||||
920,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldToSplitOut": "output"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "83d29c51-a415-476d-b380-1ca5f0d4f521",
|
||||
"name": "Download Video",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
329,
|
||||
346
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://cdn.pixabay.com/video/2016/05/12/3175-166339863_small.mp4",
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "0304ebb5-945d-4b0b-9597-f83ae8c1fe31",
|
||||
"name": "Convert to Binary",
|
||||
"type": "n8n-nodes-base.convertToFile",
|
||||
"position": [
|
||||
1480,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"operation": "toBinary",
|
||||
"sourceProperty": "output"
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "32a21e1d-1d8b-411e-8281-8d0e68a06889",
|
||||
"name": "When clicking ‘Test workflow’",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
149,
|
||||
346
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "0ad2ea6a-e1f4-4b26-a4de-9103ecbb3831",
|
||||
"name": "Combine Script",
|
||||
"type": "n8n-nodes-base.aggregate",
|
||||
"position": [
|
||||
2640,
|
||||
360
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"aggregate": "aggregateAllItemData"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "2d9bb91a-3369-4268-882f-f97e73897bb8",
|
||||
"name": "Upload to GDrive",
|
||||
"type": "n8n-nodes-base.googleDrive",
|
||||
"position": [
|
||||
3040,
|
||||
360
|
||||
],
|
||||
"parameters": {
|
||||
"name": "=narrating-video-using-vision-ai-{{ $now.format('yyyyMMddHHmmss') }}.mp3",
|
||||
"driveId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "My Drive",
|
||||
"cachedResultUrl": "https://drive.google.com/drive/my-drive",
|
||||
"cachedResultName": "My Drive"
|
||||
},
|
||||
"options": {},
|
||||
"folderId": {
|
||||
"__rl": true,
|
||||
"mode": "id",
|
||||
"value": "1dBJZL_SCh6F2U7N7kIMsnSiI4QFxn2xD"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleDriveOAuth2Api": {
|
||||
"id": "yOwz41gMQclOadgu",
|
||||
"name": "Google Drive account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "137185f6-ba32-4c68-844f-f50c7a5a261d",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-440,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"width": 476.34074202271484,
|
||||
"height": 586.0597334122469,
|
||||
"content": "## Try It Out!\n\n### This n8n template takes a video and extracts frames from it which are used with a multimodal LLM to generate a script. The script is then passed to the same multimodal LLM to generate a voiceover clip.\n\nThis template was inspired by [Processing and narrating a video with GPT's visual capabilities and the TTS API](https://cookbook.openai.com/examples/gpt_with_vision_for_video_understanding)\n\n* Video is downloaded using the HTTP node.\n* Python code node is used to extract the frames using OpenCV.\n* Loop node is used o batch the frames for the LLM to generate partial scripts.\n* All partial scripts are combined to form the full script which is then sent to OpenAI to generate audio from it.\n* The finished voiceover clip is uploaded to Google Drive.\n\nSample the finished product here: https://drive.google.com/file/d/1-XCoii0leGB2MffBMPpCZoxboVyeyeIX/view?usp=sharing\n\n\n### Need Help?\nJoin the [Discord](https://discord.com/invite/XPKeKXeB7d) or ask in the [Forum](https://community.n8n.io/)!"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "23700b04-2549-4121-b442-4b92adf7f6d6",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
60,
|
||||
120
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 459.41860465116287,
|
||||
"height": 463.313953488372,
|
||||
"content": "## 1. Download Video\n[Learn more about the HTTP Request node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.httprequest/)\n\nIn this demonstration, we'll download a stock video from pixabay using the HTTP Request node. Feel free to use other sources but ensure they are in a format support by OpenCV ([See docs](https://docs.opencv.org/3.4/dd/d43/tutorial_py_video_display.html))"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "0a42aeb0-96cd-401c-abeb-c50e0f04f7ad",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
560,
|
||||
120
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 605.2674418604653,
|
||||
"height": 522.6860465116279,
|
||||
"content": "## 2. Split Video into Frames\n[Learn more about the Code node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.code/)\n\nWe need to think of videos are a sum of 2 parts; a visual track and an audio track. The visual track is technically just a collection of images displayed one after the other and are typically referred to as frames. When we want LLM to understand videos, most of the time we can do so by giving it a series of frames as images to process.\n\nHere, we use the Python Code node to extract the frames from the video using OpenCV, a computer vision library. For performance reasons, we'll also capture only a max of 90 frames from the video but ensure they are evenly distributed across the video. This step takes about 1-2 mins to complete on a 3mb video."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "b518461c-13f1-45ae-a156-20ae6051fc19",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
560,
|
||||
660
|
||||
],
|
||||
"parameters": {
|
||||
"color": 3,
|
||||
"width": 418.11627906976724,
|
||||
"height": 132.89534883720933,
|
||||
"content": "### 🚨 PERFORMANCE WARNING!\nUsing large videos or capturing a large number of frames is really memory intensive and could crash your n8n instance. Be sure you have sufficient memory and to optimise the video beforehand! "
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "585f7a7f-1676-4bc3-a6fb-eace443aa5da",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1200,
|
||||
118.69767441860472
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 1264.8139534883715,
|
||||
"height": 774.3720930232558,
|
||||
"content": "## 3. Use Vision AI to Narrate on Batches of Frames\n[Read more about the Basic LLM node](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.chainllm/)\n\nTo keep within token limits of our LLM, we'll need to send our frames in sequential batches to represent chunks of our original video. We'll use the loop node to create batches of 15 frames - this is because of our max of 90 frames, this fits perfectly for a total of 6 loops. Next, we'll convert each frame to a binary image so we can resize for and attach to the Basic LLM node. One trick to point out is that within the Basic LLM node, previous iterations of the generation are prepended to form a cohesive script. Without, the LLM will assume it needs to start fresh for each batch of frames.\n\nA wait node is used to stay within service rate limits. This is useful for new users who are still on lower tiers. If you do not have such restrictions, feel free to remove this wait node!"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "42c002a3-37f6-4dd7-af14-20391b19cb5a",
|
||||
"name": "Stay Within Service Limits",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
2280,
|
||||
640
|
||||
],
|
||||
"webhookId": "677fa706-b4dd-4fe3-ba17-feea944c3193",
|
||||
"parameters": {},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "5beb17fa-8a57-4c72-9c3b-b7fdf41b545a",
|
||||
"name": "For Every 15 Frames",
|
||||
"type": "n8n-nodes-base.splitInBatches",
|
||||
"position": [
|
||||
1320,
|
||||
380
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"batchSize": 15
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "9a57256a-076a-4823-8cad-3b64a17ff705",
|
||||
"name": "Resize Frame",
|
||||
"type": "n8n-nodes-base.editImage",
|
||||
"position": [
|
||||
1640,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"width": 768,
|
||||
"height": 768,
|
||||
"options": {
|
||||
"format": "jpeg"
|
||||
},
|
||||
"operation": "resize"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "3e776939-1a25-4ea0-8106-c3072d108106",
|
||||
"name": "Aggregate Frames",
|
||||
"type": "n8n-nodes-base.aggregate",
|
||||
"position": [
|
||||
1800,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"includeBinaries": true
|
||||
},
|
||||
"aggregate": "aggregateAllItemData"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "3a973a9c-2c7a-43c5-9c45-a14d49b56622",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2500,
|
||||
120.6860465116277
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 769.1860465116274,
|
||||
"height": 487.83720930232533,
|
||||
"content": "## 4. Generate Voice Over Clip Using TTS\n[Read more about the OpenAI node](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-langchain.openai)\n\nFinally with our generated script parts, we can combine them into one and use OpenAI's Audio generation capabilities to generate a voice over from the full script. Once we have the output mp3, we can upload it to somewhere like Google Drive for later use.\n\nHave a listen to the finished product here: https://drive.google.com/file/d/1-XCoii0leGB2MffBMPpCZoxboVyeyeIX/view?usp=sharing"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "92e07c18-4058-4098-a448-13451bd8a17a",
|
||||
"name": "Use Text-to-Speech",
|
||||
"type": "@n8n/n8n-nodes-langchain.openAi",
|
||||
"position": [
|
||||
2840,
|
||||
360
|
||||
],
|
||||
"parameters": {
|
||||
"input": "={{ $json.data.map(item => item.text).join('\\n') }}",
|
||||
"options": {
|
||||
"response_format": "mp3"
|
||||
},
|
||||
"resource": "audio"
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "8gccIjcuf3gvaoEr",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.5
|
||||
},
|
||||
{
|
||||
"id": "0696c336-1814-4ad4-aa5e-b86489a4231e",
|
||||
"name": "Sticky Note6",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
61,
|
||||
598
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 458.1279069767452,
|
||||
"height": 296.8139534883723,
|
||||
"content": "**The video used in this demonstration is**\n© [Coverr-Free-Footage](https://pixabay.com/users/coverr-free-footage-1281706/) via [Pixabay](https://pixabay.com/videos/india-street-busy-rickshaw-people-3175/)\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "81185ac4-c7fd-4921-937f-109662d5dfa5",
|
||||
"name": "Generate Narration Script",
|
||||
"type": "@n8n/n8n-nodes-langchain.chainLlm",
|
||||
"position": [
|
||||
1960,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"text": "=These are frames of a video. Create a short voiceover script in the style of David Attenborough. Only include the narration.\n{{\n$('Generate Narration Script').isExecuted\n ? `Continue from this script:\\n${$('Generate Narration Script').all().map(item => item.json.text.replace(/\\n/g,'')).join('\\n')}`\n : ''\n}}",
|
||||
"messages": {
|
||||
"messageValues": [
|
||||
{
|
||||
"type": "HumanMessagePromptTemplate",
|
||||
"messageType": "imageBinary"
|
||||
},
|
||||
{
|
||||
"type": "HumanMessagePromptTemplate",
|
||||
"messageType": "imageBinary",
|
||||
"binaryImageDataKey": "data_1"
|
||||
},
|
||||
{
|
||||
"type": "HumanMessagePromptTemplate",
|
||||
"messageType": "imageBinary",
|
||||
"binaryImageDataKey": "data_2"
|
||||
},
|
||||
{
|
||||
"type": "HumanMessagePromptTemplate",
|
||||
"messageType": "imageBinary",
|
||||
"binaryImageDataKey": "data_3"
|
||||
},
|
||||
{
|
||||
"type": "HumanMessagePromptTemplate",
|
||||
"messageType": "imageBinary",
|
||||
"binaryImageDataKey": "data_4"
|
||||
},
|
||||
{
|
||||
"type": "HumanMessagePromptTemplate",
|
||||
"messageType": "imageBinary",
|
||||
"binaryImageDataKey": "data_5"
|
||||
},
|
||||
{
|
||||
"type": "HumanMessagePromptTemplate",
|
||||
"messageType": "imageBinary",
|
||||
"binaryImageDataKey": "data_6"
|
||||
},
|
||||
{
|
||||
"type": "HumanMessagePromptTemplate",
|
||||
"messageType": "imageBinary",
|
||||
"binaryImageDataKey": "data_7"
|
||||
},
|
||||
{
|
||||
"type": "HumanMessagePromptTemplate",
|
||||
"messageType": "imageBinary",
|
||||
"binaryImageDataKey": "data_8"
|
||||
},
|
||||
{
|
||||
"type": "HumanMessagePromptTemplate",
|
||||
"messageType": "imageBinary",
|
||||
"binaryImageDataKey": "data_9"
|
||||
},
|
||||
{
|
||||
"type": "HumanMessagePromptTemplate",
|
||||
"messageType": "imageBinary",
|
||||
"binaryImageDataKey": "data_10"
|
||||
},
|
||||
{
|
||||
"type": "HumanMessagePromptTemplate",
|
||||
"messageType": "imageBinary",
|
||||
"binaryImageDataKey": "data_11"
|
||||
},
|
||||
{
|
||||
"type": "HumanMessagePromptTemplate",
|
||||
"messageType": "imageBinary",
|
||||
"binaryImageDataKey": "data_12"
|
||||
},
|
||||
{
|
||||
"type": "HumanMessagePromptTemplate",
|
||||
"messageType": "imageBinary",
|
||||
"binaryImageDataKey": "data_13"
|
||||
},
|
||||
{
|
||||
"type": "HumanMessagePromptTemplate",
|
||||
"messageType": "imageBinary",
|
||||
"binaryImageDataKey": "data_14"
|
||||
}
|
||||
]
|
||||
},
|
||||
"promptType": "define"
|
||||
},
|
||||
"typeVersion": 1.4
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Resize Frame": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Aggregate Frames",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Capture Frames": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Split Out Frames",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Combine Script": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Use Text-to-Speech",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Download Video": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Capture Frames",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Aggregate Frames": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Generate Narration Script",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Split Out Frames": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "For Every 15 Frames",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Convert to Binary": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Resize Frame",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Generate Narration Script",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Use Text-to-Speech": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Upload to GDrive",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"For Every 15 Frames": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Combine Script",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Convert to Binary",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Generate Narration Script": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Stay Within Service Limits",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Stay Within Service Limits": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "For Every 15 Frames",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When clicking ‘Test workflow’": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Download Video",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
427
workflows/Wait/0609_Wait_Limit_Import_Webhook.json
Normal file
427
workflows/Wait/0609_Wait_Limit_Import_Webhook.json
Normal file
@@ -0,0 +1,427 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "6b6a2db47bdf8371d21090c511052883cc9a3f6af5d0d9d567c702d74a18820e"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "f4570aad-db25-4dcd-8589-b1c8335935de",
|
||||
"name": "When clicking ‘Test workflow’",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
-180,
|
||||
3800
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "bd481559-85f2-4865-8d85-e50e72369f26",
|
||||
"name": "Wait",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
940,
|
||||
3620
|
||||
],
|
||||
"webhookId": "f10708f0-38c6-4c75-b635-37222d5b183a",
|
||||
"parameters": {
|
||||
"amount": 45
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "cc9e9947-19e4-47c5-95b0-a631d688a8b6",
|
||||
"name": "Sticky Note36",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
549.7858793743054,
|
||||
3709.534654112671
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 327.8244990224782,
|
||||
"height": 268.48353140372035,
|
||||
"content": "**40 at a time seems to be the memory limit on my server - run until complete with batches of 40 or increase based on your server memory**\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "9ebbd993-9194-40b1-a98e-352eb3a3f9eb",
|
||||
"name": "Sticky Note28",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-50.797941767307435,
|
||||
3729.028866440868
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 574.7594700148138,
|
||||
"height": 248.90718753310907,
|
||||
"content": "**Firecrawl.dev retrieves markdown inc. title, description, links & content. First define the URLs you'd like to scrape**\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "71c0f975-c0f9-47ae-a245-f852387ad461",
|
||||
"name": "Connect to your own data source",
|
||||
"type": "n8n-nodes-base.noOp",
|
||||
"position": [
|
||||
1380,
|
||||
3820
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "fba918e7-2c88-4de3-a789-cadbf4f2584e",
|
||||
"name": "Get urls from own data source",
|
||||
"type": "n8n-nodes-base.noOp",
|
||||
"position": [
|
||||
0,
|
||||
3800
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "221a75eb-0bc8-4747-9ec1-1879c46d9163",
|
||||
"name": "Example fields from data source",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"notes": "Define URLs in array",
|
||||
"position": [
|
||||
200,
|
||||
3800
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "cc2c6af0-68d3-49eb-85fe-3288d2ed0f6b",
|
||||
"name": "Page",
|
||||
"type": "array",
|
||||
"value": "[\"https://www.automake.io/\", \"https://www.n8n.io/\"]"
|
||||
}
|
||||
]
|
||||
},
|
||||
"includeOtherFields": true
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "5a914964-e8ef-4064-8ecb-f1866de0d8c6",
|
||||
"name": "Sticky Note33",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-40,
|
||||
4000
|
||||
],
|
||||
"parameters": {
|
||||
"color": 3,
|
||||
"width": 510.3561134140244,
|
||||
"height": 94.13486342358942,
|
||||
"content": "**REQUIRED**\nConnect to your database of urls to input. Name the column `Page` like in the `Example fields from data source` node and make sure it has one link per row like `split out page urls`"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "5c004d5c-afeb-47c9-b30b-eb88880f87b9",
|
||||
"name": "Sticky Note34",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
900,
|
||||
4000
|
||||
],
|
||||
"parameters": {
|
||||
"color": 3,
|
||||
"width": 284.87764467541297,
|
||||
"height": 168.68864948728321,
|
||||
"content": "**REQUIRED**\nUpdate the Auth parameter to your own [Firecrawl](https://firecrawl.dev) dev token\n\n**Header Auth parameter**\nname - Authorization\nvalue - your-own-api-key"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "53d97054-a5e4-4819-bdd9-f8632c33eba2",
|
||||
"name": "Sticky Note35",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1360,
|
||||
4000
|
||||
],
|
||||
"parameters": {
|
||||
"color": 3,
|
||||
"width": 284.87764467541297,
|
||||
"height": 91.91340067739628,
|
||||
"content": "**REQUIRED** \nOutput the data to your own data source e.g. Airtable"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "357a463f-7581-43ba-8930-af27e4762905",
|
||||
"name": "Sticky Note37",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
900,
|
||||
3570.2075673933587
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 181.96744211154697,
|
||||
"height": 189.23753199986137,
|
||||
"content": "**Respect API limits (10 requests per min)**\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "77311c67-f50f-427a-87fd-b29b1f542bbc",
|
||||
"name": "40 items at a time",
|
||||
"type": "n8n-nodes-base.limit",
|
||||
"position": [
|
||||
580,
|
||||
3800
|
||||
],
|
||||
"parameters": {
|
||||
"maxItems": 40
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "43557ab1-4e52-4598-83a9-e39d5afc6de7",
|
||||
"name": "10 at a time",
|
||||
"type": "n8n-nodes-base.splitInBatches",
|
||||
"position": [
|
||||
740,
|
||||
3800
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"batchSize": 10
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "555d52e7-010b-462b-9382-26804493de1c",
|
||||
"name": "Markdown data and Links",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
1160,
|
||||
3820
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "3a959c64-4c3c-4072-8427-67f6f6ecba1b",
|
||||
"name": "title",
|
||||
"type": "string",
|
||||
"value": "={{ $json.data.metadata.title }}"
|
||||
},
|
||||
{
|
||||
"id": "d2da0859-a7a0-4c39-913a-150ecb95d075",
|
||||
"name": "description",
|
||||
"type": "string",
|
||||
"value": "={{ $json.data.metadata.description }}"
|
||||
},
|
||||
{
|
||||
"id": "62bd2d76-b78d-4501-a59b-a25ed7b345b0",
|
||||
"name": "content",
|
||||
"type": "string",
|
||||
"value": "={{ $json.data.markdown }}"
|
||||
},
|
||||
{
|
||||
"id": "d4c712fa-b52a-498f-8abc-26dc72be61f7",
|
||||
"name": "links",
|
||||
"type": "string",
|
||||
"value": "={{ $json.data.links }} "
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "aac948e6-ac86-4cea-be84-f27919d6d936",
|
||||
"name": "Split out page URLs",
|
||||
"type": "n8n-nodes-base.splitOut",
|
||||
"position": [
|
||||
380,
|
||||
3800
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldToSplitOut": "Page"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "71c5a0d4-540e-4766-ae99-bdc427019dac",
|
||||
"name": "Retrieve Page Markdown and Links",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"notes": "curl -X POST https://api.firecrawl.dev/v1/scrape \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer YOUR_API_KEY' \\\n -d '{\n \"url\": \"https://docs.firecrawl.dev\",\n \"formats\" : [\"markdown\", \"html\"]\n }'\n",
|
||||
"position": [
|
||||
960,
|
||||
3820
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://api.firecrawl.dev/v1/scrape",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"jsonBody": "={\n \"url\": \"{{ $json.Page }}\",\n \"formats\" : [\"markdown\", \"links\"]\n} ",
|
||||
"sendBody": true,
|
||||
"sendHeaders": true,
|
||||
"specifyBody": "json",
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpHeaderAuth",
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Content-Type",
|
||||
"value": "application/json"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "nbamiF1MDku2NNz7",
|
||||
"name": "Firecrawl Bearer"
|
||||
}
|
||||
},
|
||||
"retryOnFail": true,
|
||||
"typeVersion": 4.2,
|
||||
"waitBetweenTries": 5000
|
||||
},
|
||||
{
|
||||
"id": "a2f12929-262e-4354-baa3-f9e3c05ec2eb",
|
||||
"name": "Sticky Note38",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-840,
|
||||
3340
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 581.9949654101088,
|
||||
"height": 818.5240734585421,
|
||||
"content": "## Convert URL HTML to Markdown and Get Page Links\n\n## Use Case\nTransform web pages into AI-friendly markdown format:\n- You need to process webpage content for LLM analysis\n- You want to extract both content and links from web pages\n- You need clean, formatted text without HTML markup\n- You want to respect API rate limits while crawling pages\n\n## What this Workflow Does\nThe workflow uses Firecrawl.dev API to process webpages:\n- Converts HTML content to markdown format\n- Extracts all links from each webpage\n- Handles API rate limiting automatically\n- Processes URLs in batches from your database\n\n## Setup\n1. Create a [Firecrawl.dev](https://www.firecrawl.dev/) account and get your API key\n2. Add your Firecrawl API key to the HTTP Request node's Authorization header\n3. Connect your URL database to the input node (column name must be \"Page\") or edit the array in `Example fields from data source`\n4. Configure your preferred output database connection\n\n## How to Adjust it to Your Needs\n- Modify input source to pull URLs from different databases\n- Adjust rate limiting parameters if needed\n- Customize output format for your specific use case\n\n\nMade by Simon @ [automake.io](https://automake.io)\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Wait": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "10 at a time",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"10 at a time": {
|
||||
"main": [
|
||||
null,
|
||||
[
|
||||
{
|
||||
"node": "Retrieve Page Markdown and Links",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"40 items at a time": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "10 at a time",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Split out page URLs": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "40 items at a time",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Markdown data and Links": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Connect to your own data source",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get urls from own data source": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Example fields from data source",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Connect to your own data source": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Example fields from data source": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Split out page URLs",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Retrieve Page Markdown and Links": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Markdown data and Links",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When clicking ‘Test workflow’": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get urls from own data source",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
842
workflows/Wait/0620_Wait_Slack_Automate_Webhook.json
Normal file
842
workflows/Wait/0620_Wait_Slack_Automate_Webhook.json
Normal file
File diff suppressed because one or more lines are too long
675
workflows/Wait/0621_Wait_Slack_Monitor_Webhook.json
Normal file
675
workflows/Wait/0621_Wait_Slack_Monitor_Webhook.json
Normal file
@@ -0,0 +1,675 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "03e9d14e9196363fe7191ce21dc0bb17387a6e755dcc9acc4f5904752919dca8"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "1de0b08b-585a-43a9-bf32-34cdd763fbb0",
|
||||
"name": "Global Variables",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
1180,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "6a8a0cbf-bf3e-4702-956e-a35966d8b9c5",
|
||||
"name": "base_url",
|
||||
"type": "string",
|
||||
"value": "https://qualysapi.qg3.apps.qualys.com"
|
||||
}
|
||||
]
|
||||
},
|
||||
"includeOtherFields": true
|
||||
},
|
||||
"typeVersion": 3.3
|
||||
},
|
||||
{
|
||||
"id": "cc10e116-1a16-4bd9-bdbb-27baa680dc91",
|
||||
"name": "Fetch Report IDs",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1400,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"": "",
|
||||
"url": "={{ $json.base_url }}/msp/report_template_list.php",
|
||||
"method": "GET",
|
||||
"options": {},
|
||||
"sendBody": false,
|
||||
"sendQuery": false,
|
||||
"curlImport": "",
|
||||
"infoMessage": "",
|
||||
"sendHeaders": false,
|
||||
"authentication": "predefinedCredentialType",
|
||||
"httpVariantWarning": "",
|
||||
"nodeCredentialType": "qualysApi",
|
||||
"provideSslCertificates": false
|
||||
},
|
||||
"credentials": {
|
||||
"qualysApi": {
|
||||
"id": "KdkmNjVYkDUzHAvw",
|
||||
"name": "Qualys account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2,
|
||||
"extendsCredential": "qualysApi"
|
||||
},
|
||||
{
|
||||
"id": "69e097c2-ba05-4964-af82-ce07fb2a6535",
|
||||
"name": "Convert XML To JSON",
|
||||
"type": "n8n-nodes-base.xml",
|
||||
"position": [
|
||||
1580,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "d2a2001a-4df8-4482-9ecf-62a7aed90a9c",
|
||||
"name": "Launch Report",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1760,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"": "",
|
||||
"url": "={{ $('Global Variables').item.json[\"base_url\"] }}/api/2.0/fo/report/",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"sendBody": true,
|
||||
"sendQuery": true,
|
||||
"curlImport": "",
|
||||
"contentType": "multipart-form-data",
|
||||
"infoMessage": "",
|
||||
"sendHeaders": true,
|
||||
"specifyQuery": "keypair",
|
||||
"authentication": "predefinedCredentialType",
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "template_id",
|
||||
"value": "={{ $jmespath($json[\"REPORT_TEMPLATE_LIST\"][\"REPORT_TEMPLATE\"], \"[?TITLE == '\"+$('Global Variables').item.json.template_name+\"'].ID\") | [0] }}",
|
||||
"parameterType": "formData"
|
||||
},
|
||||
{
|
||||
"name": "=output_format",
|
||||
"value": "={{ $('Global Variables').item.json.output_format }}",
|
||||
"parameterType": "formData"
|
||||
},
|
||||
{
|
||||
"name": "report_title",
|
||||
"value": "={{ $('Global Variables').item.json.report_title }}",
|
||||
"parameterType": "formData"
|
||||
}
|
||||
]
|
||||
},
|
||||
"specifyHeaders": "keypair",
|
||||
"queryParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "action",
|
||||
"value": "launch"
|
||||
}
|
||||
]
|
||||
},
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "X-Requested-With",
|
||||
"value": "n8n"
|
||||
}
|
||||
]
|
||||
},
|
||||
"httpVariantWarning": "",
|
||||
"nodeCredentialType": "qualysApi",
|
||||
"provideSslCertificates": false
|
||||
},
|
||||
"credentials": {
|
||||
"qualysApi": {
|
||||
"id": "KdkmNjVYkDUzHAvw",
|
||||
"name": "Qualys account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2,
|
||||
"extendsCredential": "qualysApi"
|
||||
},
|
||||
{
|
||||
"id": "3f525e48-2866-42ba-a09d-05b8f5aa092d",
|
||||
"name": "Loop Over Items",
|
||||
"type": "n8n-nodes-base.splitInBatches",
|
||||
"position": [
|
||||
2200,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"reset": true
|
||||
}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "e202aab9-f9fe-4f6e-ac50-4d4b3b30c1f4",
|
||||
"name": "Wait 1 Minute",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
2400,
|
||||
500
|
||||
],
|
||||
"webhookId": "b99241f2-8b9b-4699-a006-9a3e8457c42c",
|
||||
"parameters": {
|
||||
"unit": "minutes",
|
||||
"amount": 1
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "eb8db4f0-eacb-4d3d-ae8c-77c096bbb289",
|
||||
"name": "Check Status of Report",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
2560,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"": "",
|
||||
"url": "={{ $('Global Variables').item.json.base_url }}/api/2.0/fo/report",
|
||||
"method": "GET",
|
||||
"options": {},
|
||||
"sendBody": false,
|
||||
"sendQuery": true,
|
||||
"curlImport": "",
|
||||
"infoMessage": "",
|
||||
"sendHeaders": false,
|
||||
"specifyQuery": "keypair",
|
||||
"authentication": "predefinedCredentialType",
|
||||
"queryParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "action",
|
||||
"value": "list"
|
||||
},
|
||||
{
|
||||
"name": "id",
|
||||
"value": "={{ $('Convert Report Launch XML to JSON').item.json[\"SIMPLE_RETURN\"][\"RESPONSE\"][\"ITEM_LIST\"][\"ITEM\"][\"VALUE\"] }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"httpVariantWarning": "",
|
||||
"nodeCredentialType": "qualysApi",
|
||||
"provideSslCertificates": false
|
||||
},
|
||||
"credentials": {
|
||||
"qualysApi": {
|
||||
"id": "KdkmNjVYkDUzHAvw",
|
||||
"name": "Qualys account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2,
|
||||
"extendsCredential": "qualysApi"
|
||||
},
|
||||
{
|
||||
"id": "7cfcaa0c-7b0e-4704-8268-d5869677a58e",
|
||||
"name": "Is Report Finished?",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
2900,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "97935da6-84fa-4756-83e1-4fbf5861baec",
|
||||
"operator": {
|
||||
"name": "filter.operator.equals",
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json.REPORT_LIST_OUTPUT.RESPONSE.REPORT_LIST.REPORT.STATUS.STATE }}",
|
||||
"rightValue": "Finished"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "b1a1f2bf-ddb1-4343-be2e-929128ed502c",
|
||||
"name": "Download Report",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
3080,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"": "",
|
||||
"url": "={{ $('Global Variables').item.json.base_url }}/api/2.0/fo/report/",
|
||||
"method": "GET",
|
||||
"options": {},
|
||||
"sendBody": false,
|
||||
"sendQuery": true,
|
||||
"curlImport": "",
|
||||
"infoMessage": "",
|
||||
"sendHeaders": false,
|
||||
"specifyQuery": "keypair",
|
||||
"authentication": "predefinedCredentialType",
|
||||
"queryParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "action",
|
||||
"value": "fetch"
|
||||
},
|
||||
{
|
||||
"name": "id",
|
||||
"value": "={{ $('Convert Report Launch XML to JSON').item.json.SIMPLE_RETURN.RESPONSE.ITEM_LIST.ITEM.VALUE }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"httpVariantWarning": "",
|
||||
"nodeCredentialType": "qualysApi",
|
||||
"provideSslCertificates": false
|
||||
},
|
||||
"credentials": {
|
||||
"qualysApi": {
|
||||
"id": "KdkmNjVYkDUzHAvw",
|
||||
"name": "Qualys account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2,
|
||||
"extendsCredential": "qualysApi"
|
||||
},
|
||||
{
|
||||
"id": "aa1bb6b0-12db-4624-a682-d719e7463bdb",
|
||||
"name": "Slack",
|
||||
"type": "n8n-nodes-base.slack",
|
||||
"position": [
|
||||
3400,
|
||||
540
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"channelId": "=C05LAN72WJK",
|
||||
"initialComment": "=📊 *Test Report* (Scan) by `aztec3am1` is ready!\n\n- *ID:* {{ $('Download Report').item.json[\"REPORT_LIST_OUTPUT\"][\"RESPONSE\"][\"REPORT_LIST\"][\"REPORT\"][\"ID\"] }}\n- *Launch Time:* {{ $('Download Report').item.json[\"REPORT_LIST_OUTPUT\"][\"RESPONSE\"][\"REPORT_LIST\"][\"REPORT\"][\"LAUNCH_DATETIME\"] }}\n- *Output Format:* {{ $('Download Report').item.json[\"REPORT_LIST_OUTPUT\"][\"RESPONSE\"][\"REPORT_LIST\"][\"REPORT\"][\"OUTPUT_FORMAT\"] }}\n- *Size:* {{ $('Download Report').item.binary.data.fileSize }}\n- *Status:* ✅ Finished\n- *Expiration Time:* {{ $('Download Report').item.json[\"REPORT_LIST_OUTPUT\"][\"RESPONSE\"][\"REPORT_LIST\"][\"REPORT\"][\"EXPIRATION_DATETIME\"] }}\n"
|
||||
},
|
||||
"resource": "file"
|
||||
},
|
||||
"credentials": {
|
||||
"slackApi": {
|
||||
"id": "hOkN2lZmH8XimxKh",
|
||||
"name": "TheHive Slack App"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "3ab2cc79-9634-4a8a-ac72-c8e32370572a",
|
||||
"name": "Convert Report Launch XML to JSON",
|
||||
"type": "n8n-nodes-base.xml",
|
||||
"position": [
|
||||
1980,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "c24e8997-8594-4abc-8313-0198abfc7f5d",
|
||||
"name": "Convert Report List to JSON",
|
||||
"type": "n8n-nodes-base.xml",
|
||||
"position": [
|
||||
2740,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "33fa7420-b65f-4af1-8dad-19840b43e8cc",
|
||||
"name": "Execute Workflow Trigger",
|
||||
"type": "n8n-nodes-base.executeWorkflowTrigger",
|
||||
"position": [
|
||||
860,
|
||||
500
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "2c8b286a-0e00-49e1-81c2-e94ef5b7725e",
|
||||
"name": "Sticky Note11",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
820.9673276258711,
|
||||
38.56257011400896
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 489.3146851921929,
|
||||
"height": 655.6477214487218,
|
||||
"content": "\n## Triggered from Slack Parent Workflow\n\nThis section is triggered by the parent n8n workflow, `Qualys Slack Shortcut Bot`. It is triggered when a user fills out the slack modal popup with data and hits the submit button. \n\nThese modals can be customized to perform various actions and are designed to be mobile-friendly, ensuring flexibility and ease of use. "
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "96cd5a16-f12d-4373-be7b-9ebe1549ccb8",
|
||||
"name": "Sticky Note12",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1320,
|
||||
40
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 816.4288734746297,
|
||||
"height": 662.0100319801938,
|
||||
"content": "\n## Report ID are retrieved and the Scan report is requested from Qualys\nIn this section, the process begins with the \"Fetch Report IDs\" node, which performs an HTTP GET request to retrieve a list of available report templates. \n\nThis request utilizes predefined API credentials and the output, in XML format, is then converted to JSON by the \"Convert XML to JSON\" node for easier manipulation. Following this, the \"Launch Report\" node sends an HTTP POST request to Qualys to initiate the generation of a report based on parameters like the template ID, output format, and report title, which are dynamically sourced from global variables. \n\nThis node also includes additional configurations such as query parameters and headers to tailor the request. Finally, the \"Convert Report Launch XML to JSON\" node processes the XML response from the report launch, converting it into JSON format. This sequence ensures a streamlined and automated handling of report generation tasks within Qualys, facilitating efficient data processing and integration within the workflow."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "ec51d524-4cef-4d78-a5d0-38dbe6c53825",
|
||||
"name": "Sticky Note15",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2140,
|
||||
33.01345938069812
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 391.7799748314626,
|
||||
"height": 664.948136798539,
|
||||
"content": "\n\n## n8n Loop Node\n\nThis node queries the report status at regular intervals (every minute) until the report is marked as finished. Once the report is complete, the loop ends, and the results are posted to Slack as a PDF attachment, ensuring the team is promptly informed. \n\nFor a SOC, continuous monitoring ensures timely updates, while automation of the waiting period frees up analysts' time for other tasks. Prompt notifications to Slack enable quick action on the completed reports, enhancing overall efficiency."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "894b9ea3-ab3b-4459-8576-49fd107d4c7f",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2540,
|
||||
36.092592419318635
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 670.8185951020379,
|
||||
"height": 655.5577875573053,
|
||||
"content": "\n## Check Status of Report in Qualys API\n\nThis node checks the status of the report in the Qualys API. After parsing the XML response to ensure the report is complete, it submits the report details to Slack. \n\nThis step is crucial for maintaining an automated and efficient workflow. For SOCs, automated monitoring reduces the need for manual checking, ensuring that only completed reports are processed further, which maintains data integrity. \n\nAdditionally, integrating with Slack streamlines operations by seamlessly communicating report statuses."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "24a96b8a-1ed9-42ee-802b-952000f3cfab",
|
||||
"name": "Sticky Note13",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
3220,
|
||||
40
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 473.6487484083029,
|
||||
"height": 650.1491670103001,
|
||||
"content": "\n## Upload Report to Slack\n\nThis node automates the process of uploading the generated report to a designated Slack channel. \n\nBy ensuring that the report, whether in PDF or HTML format, is easily accessible to the team, it streamlines communication and enhances collaboration. \n\nFor a Security Operations Center (SOC), this feature significantly improves accessibility, as team members can quickly access the latest reports directly from Slack. \n\nIt also enhances collaboration by sharing reports in a common communication platform and provides real-time updates, allowing for timely review and action."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "c179e45b-37a8-423f-a542-74e6166b09f0",
|
||||
"name": "Sticky Note8",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
160,
|
||||
80
|
||||
],
|
||||
"parameters": {
|
||||
"width": 646.7396383244529,
|
||||
"height": 1327.6335333503064,
|
||||
"content": "\n# Create Qualys Scan Slack Report Subworkflow\n\n## Introducing the Qualys Create Report Workflow—a robust solution designed to automate the generation and retrieval of security reports from the Qualys API.\n\nThis workflow is a sub workflow of the `Qualys Slack Shortcut Bot` workflow. It is triggered when someone fills out the modal popup in slack generated by the `Qualys Slack Shortcut Bot`.\n\nWhen deploying this workflow, use the Demo Data node to simulate the data that is input via the Execute Workflow Trigger. That data flows into the Global Variables Node which is then referenced by the rest of the workflow. \n\nIt includes nodes to Fetch the Report IDs and then Launch a report, and then check the report status periodically and download the completed report, which is then posted to Slack for easy access. \n\nFor Security Operations Centers (SOCs), this workflow provides significant benefits by automating tedious tasks, ensuring timely updates, and facilitating efficient data handling.\n\n**How It Works:**\n\n- **Fetch Report Templates:** The \"Fetch Report IDs\" node retrieves a list of available report templates from Qualys. This automated retrieval saves time and ensures that the latest templates are used, enhancing the accuracy and relevance of reports.\n \n- **Convert XML to JSON:** The response is converted to JSON format for easier manipulation. This step simplifies data handling, making it easier for SOC analysts to work with the data and integrate it into other tools or processes.\n \n- **Launch Report:** A POST request is sent to Qualys to initiate report generation using specified parameters like template ID and report title. Automating this step ensures consistency and reduces the chance of human error, improving the reliability of the reports generated.\n \n- **Loop and Check Status:** The workflow loops every minute to check if the report generation is complete. Continuous monitoring automates the waiting process, freeing up SOC analysts to focus on higher-priority tasks while ensuring they are promptly notified when reports are ready.\n \n- **Download Report:** Once the report is ready, it is downloaded from Qualys. Automated downloading ensures that the latest data is always available without manual intervention, improving efficiency.\n \n- **Post to Slack:** The final report is posted to a designated Slack channel for quick access. This integration with Slack ensures that the team can promptly access and review the reports, facilitating swift action and decision-making.\n\n\n**Get Started:**\n\n- Ensure your [Slack](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.slack/?utm_source=n8n_app&utm_medium=node_settings_modal-credential_link&utm_campaign=n8n-nodes-base.slack) and [Qualys](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.httprequest/?utm_source=n8n_app&utm_medium=node_settings_modal-credential_link&utm_campaign=n8n-creds-base.qualysApi) integrations are properly set up.\n- Customize the workflow to fit your specific reporting needs.\n\n\n**Need Help?**\n\n- Join the discussion on our Forum or check out resources on Discord!\n\n\nDeploy this workflow to streamline your security report generation process, improve response times, and enhance the efficiency of your security operations."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "32479679-791d-4c1d-b0c8-9102c3b879a5",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1420,
|
||||
700
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 532.5097590794944,
|
||||
"height": 726.1144174692245,
|
||||
"content": "\n### 🔄This workflow is triggered by this slack modal. The Report Template Dropdown is powered by another Sub Workflow"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "0340d311-8b41-4c3e-a023-9ea50301247c",
|
||||
"name": "Demo Data",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
1020,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "47cd1502-3039-4661-a6b1-e20a74056550",
|
||||
"name": "report_title",
|
||||
"type": "string",
|
||||
"value": "Test Report"
|
||||
},
|
||||
{
|
||||
"id": "9a15f4db-f006-4ad8-a2c0-4002dd3e2655",
|
||||
"name": "output_format",
|
||||
"type": "string",
|
||||
"value": "pdf"
|
||||
},
|
||||
{
|
||||
"id": "13978e05-7e7f-42e9-8645-d28803db8cc9",
|
||||
"name": "template_name",
|
||||
"type": "string",
|
||||
"value": "Technical Report"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.3
|
||||
},
|
||||
{
|
||||
"id": "f007312a-ea15-4188-8461-2f69550d9214",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
820,
|
||||
700
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 596.6847639718076,
|
||||
"height": 438.8903816479826,
|
||||
"content": "\n### 🤖 Triggering this workflow is as easy as typing a backslash in Slack and filling out the modal on the right"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Demo Data": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Global Variables",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Launch Report": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Convert Report Launch XML to JSON",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait 1 Minute": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Check Status of Report",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Download Report": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Slack",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Loop Over Items": {
|
||||
"main": [
|
||||
null,
|
||||
[
|
||||
{
|
||||
"node": "Wait 1 Minute",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Fetch Report IDs": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Convert XML To JSON",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Global Variables": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Fetch Report IDs",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Convert XML To JSON": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Launch Report",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Is Report Finished?": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Download Report",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Loop Over Items",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Check Status of Report": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Convert Report List to JSON",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Execute Workflow Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Demo Data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Convert Report List to JSON": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Is Report Finished?",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Convert Report Launch XML to JSON": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop Over Items",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
922
workflows/Wait/0627_Wait_Splitout_Create_Scheduled.json
Normal file
922
workflows/Wait/0627_Wait_Splitout_Create_Scheduled.json
Normal file
@@ -0,0 +1,922 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "03e9d14e9196363fe7191ce21dc0bb17387a6e755dcc9acc4f5904752919dca8"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "f97d8638-b081-4b09-9a83-265f8f99d2dc",
|
||||
"name": "When clicking \"Test workflow\"",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
460,
|
||||
400
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "2df27d6b-b89b-4af0-bdbf-4bc1e0dfc95a",
|
||||
"name": "Global Variables",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
780,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "6a8a0cbf-bf3e-4702-956e-a35966d8b9c5",
|
||||
"name": "base_url",
|
||||
"type": "string",
|
||||
"value": "https://qualysapi.qg3.apps.qualys.com"
|
||||
},
|
||||
{
|
||||
"id": "fa441581-e50e-4766-adb1-e791b3031aac",
|
||||
"name": "newtimestamp",
|
||||
"type": "string",
|
||||
"value": "={{ $now.toUTC().toString() }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.3
|
||||
},
|
||||
{
|
||||
"id": "f280aaec-10e1-4d4f-9233-75130f7e2601",
|
||||
"name": "Fetch Reports from Qualys",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1180,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"": "",
|
||||
"url": "={{ $json.base_url }}/api/2.0/fo/report",
|
||||
"method": "GET",
|
||||
"options": {},
|
||||
"sendBody": false,
|
||||
"sendQuery": true,
|
||||
"curlImport": "",
|
||||
"infoMessage": "",
|
||||
"sendHeaders": false,
|
||||
"specifyQuery": "keypair",
|
||||
"authentication": "predefinedCredentialType",
|
||||
"queryParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "action",
|
||||
"value": "list"
|
||||
},
|
||||
{
|
||||
"name": "state",
|
||||
"value": "Finished"
|
||||
}
|
||||
]
|
||||
},
|
||||
"httpVariantWarning": "",
|
||||
"nodeCredentialType": "qualysApi",
|
||||
"provideSslCertificates": false
|
||||
},
|
||||
"credentials": {
|
||||
"qualysApi": {
|
||||
"id": "KdkmNjVYkDUzHAvw",
|
||||
"name": "Qualys account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2,
|
||||
"extendsCredential": "qualysApi"
|
||||
},
|
||||
{
|
||||
"id": "481066cc-8ac2-4382-9203-33b78f76af77",
|
||||
"name": "Remove Already Processed Reports",
|
||||
"type": "n8n-nodes-base.filter",
|
||||
"position": [
|
||||
1700,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "10408e4e-fa76-4e35-bb23-5c34f698f4b4",
|
||||
"operator": {
|
||||
"type": "dateTime",
|
||||
"operation": "after"
|
||||
},
|
||||
"leftValue": "={{ $json.LAUNCH_DATETIME }}",
|
||||
"rightValue": "={{ $('Get Last Timestamp').item.json[\"timestamp\"] || $today.minus({year: 50}).toUTC() }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2,
|
||||
"alwaysOutputData": true
|
||||
},
|
||||
{
|
||||
"id": "4dfdb8c9-ab22-48a4-ada0-d1edd30b9460",
|
||||
"name": "Any Reports to Process?",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
1880,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "0d2bcbb2-e2b8-476e-8090-2ad350dd58d2",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "exists",
|
||||
"singleValue": true
|
||||
},
|
||||
"leftValue": "={{ $json.ID }}",
|
||||
"rightValue": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "94e678e8-669f-47ee-9530-4652ff11b99f",
|
||||
"name": "Loop Over Items",
|
||||
"type": "n8n-nodes-base.splitInBatches",
|
||||
"position": [
|
||||
2120,
|
||||
520
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "28dc3495-5af2-4b31-ac20-a3c7ee11f19f",
|
||||
"name": "Wait",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
2380,
|
||||
540
|
||||
],
|
||||
"webhookId": "9b6f1b01-42f9-4f51-b0f5-47262da9c9ca",
|
||||
"parameters": {},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "06e5daf2-334a-430e-8dbf-c8feeb20d015",
|
||||
"name": "Update Timestamp",
|
||||
"type": "n8n-nodes-base.n8n",
|
||||
"position": [
|
||||
2380,
|
||||
380
|
||||
],
|
||||
"parameters": {
|
||||
"operation": "update",
|
||||
"workflowId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "n9Vh6tvRs0Y2y7V9",
|
||||
"cachedResultName": "Timestamp Storage Qualys (#n9Vh6tvRs0Y2y7V9)"
|
||||
},
|
||||
"requestOptions": {},
|
||||
"workflowObject": "={\n \"name\": \"Timestamp Storage\",\n \"nodes\": [\n {\n \"parameters\": {\n \"assignments\": {\n \"assignments\": [\n {\n \"id\": \"9ff52fe4-011e-4460-a8c5-a38bff47966a\",\n \"name\": \"timestamp\",\n \"value\": \"{{ $('Global Variables').item.json[\"newtimestamp\"] }}\",\n \"type\": \"string\"\n }\n ]\n },\n \"includeOtherFields\": true,\n \"options\": {}\n },\n \"id\": \"8903e1d5-e9cd-4694-94d8-502ecbe58ebe\",\n \"name\": \"Set Timestamp\",\n \"type\": \"n8n-nodes-base.set\",\n \"typeVersion\": 3.3,\n \"position\": [\n 1020,\n 220\n ]\n },\n {\n \"parameters\": {},\n \"id\": \"ca615aab-24e4-4f25-81ad-3e697426c236\",\n \"name\": \"Execute Workflow Trigger\",\n \"type\": \"n8n-nodes-base.executeWorkflowTrigger\",\n \"typeVersion\": 1,\n \"position\": [\n 800,\n 220\n ]\n }\n ],\n \"connections\": {\n \"Execute Workflow Trigger\": {\n \"main\": [\n [\n {\n \"node\": \"Set Timestamp\",\n \"type\": \"main\",\n \"index\": 0\n }\n ]\n ]\n }\n },\n \"settings\": {\n \n },\n \"staticData\": null\n}\n"
|
||||
},
|
||||
"credentials": {
|
||||
"n8nApi": {
|
||||
"id": "61",
|
||||
"name": "n8n account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "387c0d2a-09e0-4227-8910-f0a30106787a",
|
||||
"name": "Get Last Timestamp",
|
||||
"type": "n8n-nodes-base.executeWorkflow",
|
||||
"position": [
|
||||
980,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"workflowId": "n9Vh6tvRs0Y2y7V9"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "6c0d8608-da13-4fa1-a612-aa43ac607af6",
|
||||
"name": "XML",
|
||||
"type": "n8n-nodes-base.xml",
|
||||
"position": [
|
||||
1340,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "511d290e-5cad-4d34-b54c-de45b11dab45",
|
||||
"name": "Split Out",
|
||||
"type": "n8n-nodes-base.splitOut",
|
||||
"position": [
|
||||
1520,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldToSplitOut": "REPORT_LIST_OUTPUT.RESPONSE.REPORT_LIST.REPORT"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "45f7c06b-63c0-4bae-b301-33633e751a61",
|
||||
"name": "Create Case",
|
||||
"type": "n8n-nodes-base.theHiveProject",
|
||||
"position": [
|
||||
2640,
|
||||
540
|
||||
],
|
||||
"parameters": {
|
||||
"resource": "case",
|
||||
"caseFields": {
|
||||
"value": {
|
||||
"tlp": 2,
|
||||
"flag": false,
|
||||
"tags": "Qualys Scan",
|
||||
"title": "={{ $json.TITLE }}",
|
||||
"description": "=- **ID:** {{ $json[\"ID\"] }}\n- **Type:** {{ $json[\"TYPE\"] }}\n- **User Login:** {{ $json[\"USER_LOGIN\"] }}\n- **Launch Datetime:** {{ $json[\"LAUNCH_DATETIME\"] }}\n- **Output Format:** {{ $json[\"OUTPUT_FORMAT\"] }}\n- **Size:** {{ $json[\"OUTPUT_FORMAT\"] }}\n- **Status:** {{ $json[\"STATUS\"][\"STATE\"] }}\n- **Expiration Datetime:** {{ $json[\"EXPIRATION_DATETIME\"] }}\n"
|
||||
},
|
||||
"schema": [
|
||||
{
|
||||
"id": "title",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": true,
|
||||
"displayName": "Title",
|
||||
"defaultMatch": false
|
||||
},
|
||||
{
|
||||
"id": "description",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": true,
|
||||
"displayName": "Description",
|
||||
"defaultMatch": false
|
||||
},
|
||||
{
|
||||
"id": "severity",
|
||||
"type": "options",
|
||||
"display": true,
|
||||
"options": [
|
||||
{
|
||||
"name": "Low",
|
||||
"value": 1
|
||||
},
|
||||
{
|
||||
"name": "Medium",
|
||||
"value": 2
|
||||
},
|
||||
{
|
||||
"name": "High",
|
||||
"value": 3
|
||||
},
|
||||
{
|
||||
"name": "Critical",
|
||||
"value": 4
|
||||
}
|
||||
],
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "Severity (Severity of information)",
|
||||
"defaultMatch": false
|
||||
},
|
||||
{
|
||||
"id": "startDate",
|
||||
"type": "dateTime",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "Start Date",
|
||||
"defaultMatch": false
|
||||
},
|
||||
{
|
||||
"id": "endDate",
|
||||
"type": "dateTime",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "End Date",
|
||||
"defaultMatch": false
|
||||
},
|
||||
{
|
||||
"id": "tags",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Tags",
|
||||
"defaultMatch": false
|
||||
},
|
||||
{
|
||||
"id": "flag",
|
||||
"type": "boolean",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "Flag",
|
||||
"defaultMatch": false
|
||||
},
|
||||
{
|
||||
"id": "tlp",
|
||||
"type": "options",
|
||||
"display": true,
|
||||
"options": [
|
||||
{
|
||||
"name": "White",
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"name": "Green",
|
||||
"value": 1
|
||||
},
|
||||
{
|
||||
"name": "Amber",
|
||||
"value": 2
|
||||
},
|
||||
{
|
||||
"name": "Red",
|
||||
"value": 3
|
||||
}
|
||||
],
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "TLP (Confidentiality of information)",
|
||||
"defaultMatch": false
|
||||
},
|
||||
{
|
||||
"id": "pap",
|
||||
"type": "options",
|
||||
"display": true,
|
||||
"options": [
|
||||
{
|
||||
"name": "White",
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"name": "Green",
|
||||
"value": 1
|
||||
},
|
||||
{
|
||||
"name": "Amber",
|
||||
"value": 2
|
||||
},
|
||||
{
|
||||
"name": "Red",
|
||||
"value": 3
|
||||
}
|
||||
],
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "PAP (Level of exposure of information)",
|
||||
"defaultMatch": false
|
||||
},
|
||||
{
|
||||
"id": "summary",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "Summary",
|
||||
"defaultMatch": false
|
||||
},
|
||||
{
|
||||
"id": "status",
|
||||
"type": "options",
|
||||
"display": true,
|
||||
"options": [
|
||||
{
|
||||
"name": "Duplicated",
|
||||
"value": "Duplicated",
|
||||
"description": "Stage: Closed"
|
||||
},
|
||||
{
|
||||
"name": "FalsePositive",
|
||||
"value": "FalsePositive",
|
||||
"description": "Stage: Closed"
|
||||
},
|
||||
{
|
||||
"name": "Indeterminate",
|
||||
"value": "Indeterminate",
|
||||
"description": "Stage: Closed"
|
||||
},
|
||||
{
|
||||
"name": "InProgress",
|
||||
"value": "InProgress",
|
||||
"description": "Stage: InProgress"
|
||||
},
|
||||
{
|
||||
"name": "New",
|
||||
"value": "New",
|
||||
"description": "Stage: New"
|
||||
},
|
||||
{
|
||||
"name": "Other",
|
||||
"value": "Other",
|
||||
"description": "Stage: Closed"
|
||||
},
|
||||
{
|
||||
"name": "TruePositive",
|
||||
"value": "TruePositive",
|
||||
"description": "Stage: Closed"
|
||||
}
|
||||
],
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "Status",
|
||||
"defaultMatch": false
|
||||
},
|
||||
{
|
||||
"id": "assignee",
|
||||
"type": "options",
|
||||
"display": true,
|
||||
"options": [
|
||||
{
|
||||
"name": "Angel",
|
||||
"value": "angel@n8n.io"
|
||||
},
|
||||
{
|
||||
"name": "John Smith",
|
||||
"value": "john@n8n.io"
|
||||
}
|
||||
],
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "Assignee",
|
||||
"defaultMatch": false
|
||||
},
|
||||
{
|
||||
"id": "caseTemplate",
|
||||
"type": "options",
|
||||
"display": true,
|
||||
"options": [],
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "Case Template",
|
||||
"defaultMatch": false
|
||||
},
|
||||
{
|
||||
"id": "tasks",
|
||||
"type": "array",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "Tasks",
|
||||
"defaultMatch": false
|
||||
},
|
||||
{
|
||||
"id": "sharingParameters",
|
||||
"type": "array",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "Sharing Parameters",
|
||||
"defaultMatch": false
|
||||
},
|
||||
{
|
||||
"id": "observableRule",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "Observable Rule",
|
||||
"defaultMatch": false
|
||||
}
|
||||
],
|
||||
"mappingMode": "defineBelow",
|
||||
"matchingColumns": []
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"theHiveProjectApi": {
|
||||
"id": "6O5aPdkMaQmc8I9B",
|
||||
"name": "The Hive 5 account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "b38d3176-2c87-4460-b22c-e08ccae93e44",
|
||||
"name": "Download Report",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
3060,
|
||||
540
|
||||
],
|
||||
"parameters": {
|
||||
"": "",
|
||||
"url": "={{ $('Global Variables').item.json.base_url }}/api/2.0/fo/report/",
|
||||
"method": "GET",
|
||||
"options": {},
|
||||
"sendBody": false,
|
||||
"sendQuery": true,
|
||||
"curlImport": "",
|
||||
"infoMessage": "",
|
||||
"sendHeaders": false,
|
||||
"specifyQuery": "keypair",
|
||||
"authentication": "predefinedCredentialType",
|
||||
"queryParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "action",
|
||||
"value": "fetch"
|
||||
},
|
||||
{
|
||||
"name": "id",
|
||||
"value": "={{ $('Loop Over Items').item.json.ID }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"httpVariantWarning": "",
|
||||
"nodeCredentialType": "qualysApi",
|
||||
"provideSslCertificates": false
|
||||
},
|
||||
"credentials": {
|
||||
"qualysApi": {
|
||||
"id": "KdkmNjVYkDUzHAvw",
|
||||
"name": "Qualys account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2,
|
||||
"extendsCredential": "qualysApi"
|
||||
},
|
||||
{
|
||||
"id": "9b005b38-be40-4f36-954e-ef829b894436",
|
||||
"name": "Add Report As Attachment",
|
||||
"type": "n8n-nodes-base.theHiveProject",
|
||||
"position": [
|
||||
3420,
|
||||
540
|
||||
],
|
||||
"parameters": {
|
||||
"caseId": {
|
||||
"__rl": true,
|
||||
"mode": "id",
|
||||
"value": "={{ $('Create Case').item.json._id }}"
|
||||
},
|
||||
"options": {},
|
||||
"resource": "case",
|
||||
"operation": "addAttachment",
|
||||
"attachmentsUi": {
|
||||
"values": [
|
||||
{}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"theHiveProjectApi": {
|
||||
"id": "6O5aPdkMaQmc8I9B",
|
||||
"name": "The Hive 5 account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "8a1fda04-2028-41a0-95db-3aa958fc7446",
|
||||
"name": "Schedule Trigger",
|
||||
"type": "n8n-nodes-base.scheduleTrigger",
|
||||
"position": [
|
||||
460,
|
||||
560
|
||||
],
|
||||
"parameters": {
|
||||
"rule": {
|
||||
"interval": [
|
||||
{
|
||||
"field": "hours"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "25f91441-f95a-4da8-9d62-acecc22b6789",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2920,
|
||||
164.82441481723265
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 361.5043838490178,
|
||||
"height": 550.0452010151306,
|
||||
"content": "\nCreate a new case in TheHive\nIn this section, we create a new case in TheHive as a container for our PDF report. The case must be created first to have a case ID to use to upload the file as an attachment. \n\nEach new report generates a case in TheHive, ensuring that the report is properly attached to the created case for better tracking and organization.\n\nFor more information about this endpoint, visit the [API quick reference](https://cdn2.qualys.com/docs/qualys-api-quick-reference.pdf)"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "3f84b5c8-4f1c-4dc9-a9ce-8f8936bfbf98",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1140,
|
||||
20
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 318.2931356227883,
|
||||
"height": 698.5851033452675,
|
||||
"content": "\n## Fetch reports from Qualys\nFor more information about this endpoint, visit the [API quick reference](https://cdn2.qualys.com/docs/qualys-api-quick-reference.pdf). The results of the api call are converted from XML to JSON."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "a3843690-484f-4ff4-b47b-1b8fc76e93de",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
320,
|
||||
20
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 400.5192406950739,
|
||||
"height": 694.6109995985548,
|
||||
"content": "\n## Run every hour\nThe first time the workflow runs, no timestamp will exist in the subworkflow, so it will query all the Qualys scans to generate reports for all of them. Otherwise it will check only for newer scans. \n\nThis schedule allows for an organization to create a running export of their reports and store them somewhere operational both for historical purposes and for tracking and accountability purposes. "
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "21c4c9ae-203d-480e-8459-c36726d57d92",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
720,
|
||||
20
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 400.5192406950739,
|
||||
"height": 696.1026552732698,
|
||||
"content": "\n## Set time Stamp\nTo ensure we do not duplicate data in TheHive, we set a timestamp like a bookmark for every time we run this workflow. We then use the previous timestamp if available to only get the newest scan results from Qualys. "
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "ef250f59-304d-4710-80e8-e8e81e4a4f68",
|
||||
"name": "Sticky Note6",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1460,
|
||||
20
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 1067.9843739266996,
|
||||
"height": 696.1026552732698,
|
||||
"content": "\n## Split out all reports to ensure they are all processed. \nWhen we get the response from Qualys, multiple reports are embedded in the JSON, so we use the split out node to process all the reports at once. Before the reports can be saved however, they must go through a filter, checking the time of creation against the time stamp at the beginning. Any that are newer than the timestamp are copied to TheHive.\nA wait node is added for a second to ensure that there are no rate request issues when querying TheHive.\nThe timestamp node updates the value in the subworkflow that stores the timestamp value. "
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "3dff5dc9-95a6-48f5-aee7-d839a385578f",
|
||||
"name": "Sticky Note7",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2540,
|
||||
160.4112877153152
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 361.5043838490178,
|
||||
"height": 554.458328117048,
|
||||
"content": "\n## Create a new case in TheHive\nIn this section, we create a new case in TheHive as a container for our PDF report. The case must be created first to have a case ID to use to upload the file as an attachment. Each new report generates a case in TheHive, ensuring that the report is properly attached to the created case for better tracking and organization."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "5509f907-e2bb-4045-864e-283d3da5d5ce",
|
||||
"name": "Sticky Note8",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
3300,
|
||||
200
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 361.5043838490178,
|
||||
"height": 514.8696158323633,
|
||||
"content": "\nHere we attach the PDF file as an attachment to the Case in TheHive. \n\nThis step automates the attachment of the downloaded report to the created case, ensuring all relevant information is consolidated in one place.\n\n "
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "d0a7d953-91de-448b-adfb-72d8c52b9efe",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-340,
|
||||
20
|
||||
],
|
||||
"parameters": {
|
||||
"width": 646.7396383244529,
|
||||
"height": 1327.6335333503064,
|
||||
"content": "\n\n# Automate Report Generation with n8n & Qualys\n\n## Introducing the Save Qualys Reports to TheHive Workflow—a robust solution designed to automate the retrieval and storage of Qualys reports in TheHive.\n\nThis workflow fetches reports from Qualys, filters out already processed reports, and creates cases in TheHive for the new reports. It runs every hour to ensure continuous monitoring and up-to-date vulnerability management, making it ideal for Security Operations Centers (SOCs).\n\n**How It Works:**\n\n- **Set Global Variables:** Initializes necessary global variables like `base_url` and `newtimestamp`. This step ensures that the workflow operates with the correct configuration and up-to-date timestamps. Ensure to change the `Global Variables` to match your environment. \n \n- **Fetch Reports from Qualys:** Sends a GET request to the Qualys API to retrieve finished reports. Automating this step ensures timely updates and consistent data retrieval.\n \n- **Convert XML to JSON:** Converts the XML response to JSON format for easier data manipulation. This transformation simplifies further processing and integration into TheHive.\n \n- **Filter Reports:** Checks if the reports have already been processed using their creation timestamps. This filtering ensures that only new reports are handled, avoiding duplicates.\n \n- **Process Each Report:** Loops through the list of new reports, ensuring each is processed individually. This step-by-step handling prevents issues related to bulk processing and improves reliability.\n \n- **Create Case in TheHive:** Generates a new case in TheHive for each report, serving as a container for the report data. Automating case creation improves efficiency and ensures that all relevant data is captured.\n \n- **Download and Attach Report:** Downloads the report from Qualys and attaches it to the respective case in TheHive. This automation ensures that all data is properly archived and easily accessible for review.\n\n\n**Get Started:**\n\n- Ensure your [Qualys](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.httprequest/?utm_source=n8n_app&utm_medium=node_settings_modal-credential_link&utm_campaign=n8n-creds-base.qualysApi) and [TheHive](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.thehiveproject/?utm_source=n8n_app&utm_medium=node_settings_modal-credential_link&utm_campaign=n8n-nodes-base.theHiveProject) integrations are properly set up.\n- Customize the workflow to fit your specific vulnerability management needs.\n\n\n**Need Help?**\n\n- Join the discussion on our Forum or check out resources on Discord!\n\n\nDeploy this workflow to streamline your vulnerability management process, improve response times, and enhance the efficiency of your security operations."
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"XML": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Split Out",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Create Case",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Split Out": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Remove Already Processed Reports",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Create Case": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Download Report",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Download Report": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Add Report As Attachment",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Loop Over Items": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Update Timestamp",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Wait",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Global Variables": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Last Timestamp",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Schedule Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Global Variables",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Last Timestamp": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Fetch Reports from Qualys",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Any Reports to Process?": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop Over Items",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Update Timestamp",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Add Report As Attachment": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop Over Items",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Fetch Reports from Qualys": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "XML",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When clicking \"Test workflow\"": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Global Variables",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Remove Already Processed Reports": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Any Reports to Process?",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
467
workflows/Wait/0629_Wait_Code_Update_Webhook.json
Normal file
467
workflows/Wait/0629_Wait_Code_Update_Webhook.json
Normal file
@@ -0,0 +1,467 @@
|
||||
{
|
||||
"nodes": [
|
||||
{
|
||||
"id": "0d911b91-bb9a-4177-8cd5-12ddddf1bc61",
|
||||
"name": "When clicking ‘Test workflow’",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
580,
|
||||
405
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "d13f78f7-4093-435f-8b38-722f4a5c7a1f",
|
||||
"name": "Loop Over Items",
|
||||
"type": "n8n-nodes-base.splitInBatches",
|
||||
"position": [
|
||||
1020,
|
||||
405
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "97d26220-a85f-4c40-b97c-b36f2d235776",
|
||||
"name": "Webhook Callback Wait",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
1720,
|
||||
445
|
||||
],
|
||||
"webhookId": "5cd058b4-48c8-449a-9c09-959a5b8a2b48",
|
||||
"parameters": {
|
||||
"resume": "webhook",
|
||||
"options": {},
|
||||
"httpMethod": "POST",
|
||||
"responseMode": "responseNode"
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "ee02d5cb-8151-4b24-a630-77a677b1434a",
|
||||
"name": "Update finishedSet",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
1940,
|
||||
445
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "let json = $('If All Finished').first().json;\nif (!json.finishedSet) json.finishedSet = [];\nlet finishedItemId = $('Webhook Callback Wait').item.json.body.finishedItemId;\nif (!json.finishedSet[finishedItemId]) json.finishedSet.push(finishedItemId);\nreturn [json];"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "09f1cf3f-9e32-43f2-9e57-d7a33970dac4",
|
||||
"name": "Initialize finishedSet",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
1240,
|
||||
285
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "193ab8f1-0e23-491c-914e-b8b26b0160f7",
|
||||
"name": "finishedSet",
|
||||
"type": "array",
|
||||
"value": "[]"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"executeOnce": true,
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "105d8f64-8ade-4e02-8722-587a35f2b046",
|
||||
"name": "Simulate Multi-Item for Parallel Processing",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
780,
|
||||
405
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "return [\n {requestId: 'req4567'},\n {requestId: 'req8765'},\n {requestId: 'req1234'}\n];"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "c5f72fa0-693e-4134-910f-8fd0767861d1",
|
||||
"name": "If All Finished",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
1460,
|
||||
285
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 1,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "385c3149-3623-4dd2-9022-770c32f82421",
|
||||
"operator": {
|
||||
"type": "number",
|
||||
"operation": "gte"
|
||||
},
|
||||
"leftValue": "={{ $json.finishedSet.length }}",
|
||||
"rightValue": "={{ $('Simulate Multi-Item for Parallel Processing').all().length }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "20d16393-8573-4cc1-adc0-034f0f1def70",
|
||||
"name": "Start Sub-Workflow via Webhook",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1180,
|
||||
645
|
||||
],
|
||||
"parameters": {
|
||||
"url": "={{ $env.WEBHOOK_URL }}/webhook/parallel-subworkflow-target",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"sendBody": true,
|
||||
"sendHeaders": true,
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "requestItemId",
|
||||
"value": "={{ $json.requestId }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "callbackurl",
|
||||
"value": "={{ $execution.resumeUrl }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "4ad48520-39b3-4016-a6a9-dd789c079e08",
|
||||
"name": "Acknowledge Finished",
|
||||
"type": "n8n-nodes-base.respondToWebhook",
|
||||
"position": [
|
||||
1780,
|
||||
665
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "ad1018a1-3b9d-4613-b23f-136763a514ba",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
720,
|
||||
605
|
||||
],
|
||||
"parameters": {
|
||||
"color": 3,
|
||||
"width": 390,
|
||||
"height": 109,
|
||||
"content": "### Start Multiple Sub-Workflows Asynchronously\n* Note: Callback/Webhook \"internal\" Base-URL should be configured in the n8n instance to reference the k8s service name and internal port."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "f4171d39-8bfe-4e3a-9b94-87d969abda2d",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1740,
|
||||
365
|
||||
],
|
||||
"parameters": {
|
||||
"color": 3,
|
||||
"width": 283,
|
||||
"height": 80,
|
||||
"content": "### Pseudo-Synchronously Wait for All Sub-Workflows to finish"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "98657cd3-968c-4d66-aea0-4e3180f8508f",
|
||||
"name": "Continue Workflow (noop)",
|
||||
"type": "n8n-nodes-base.noOp",
|
||||
"position": [
|
||||
1780,
|
||||
205
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "5a9518ea-456e-4975-bf6f-71bf9ed0a6e1",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
540,
|
||||
180
|
||||
],
|
||||
"parameters": {
|
||||
"width": 1577.931818181817,
|
||||
"height": 684.1818181818179,
|
||||
"content": "## Main/Parent Workflow\n* This starts multiple executions of the sub-workflow in parallel and then loops until they all report back."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "13ad3423-c3bf-4144-b76d-03daa8877bed",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
560,
|
||||
900
|
||||
],
|
||||
"parameters": {
|
||||
"width": 1477.331211260329,
|
||||
"height": 189.2194473140495,
|
||||
"content": "### Sub-Workflow\n**Cut/Paste this into a separate workflow, and activate it!!!**"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "e92865b0-b3e9-4195-ae16-5c199875a04b",
|
||||
"name": "Wait",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
1440,
|
||||
940
|
||||
],
|
||||
"webhookId": "2d62e5c2-ad4a-4e90-a075-7ca5212e015a",
|
||||
"parameters": {},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "710456c8-394d-4c45-8d8e-16e0a4095dc3",
|
||||
"name": "Call Resume on Parent Workflow",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"notes": "The callback resumes the parent workflow and reports which item finished. There could be a race condition if the parent workflow was just resumed by a different sub-workflow but hasn't entered a webhook-wait again yet. The delay and retry mitigates for the possibility that multiple subtasks complete and call back at once.",
|
||||
"position": [
|
||||
1660,
|
||||
940
|
||||
],
|
||||
"parameters": {
|
||||
"url": "={{ $('Webhook').item.json.headers.callbackurl }}",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"sendBody": true,
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "finishedItemId",
|
||||
"value": "={{ $('Webhook').item.json.body.requestItemId }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"retryOnFail": true,
|
||||
"typeVersion": 4.2,
|
||||
"waitBetweenTries": 3000
|
||||
},
|
||||
{
|
||||
"id": "2ee41b1a-89f0-4d2f-b2ff-74aef5baaa70",
|
||||
"name": "Respond to Webhook",
|
||||
"type": "n8n-nodes-base.respondToWebhook",
|
||||
"position": [
|
||||
1220,
|
||||
940
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"respondWith": "json",
|
||||
"responseBody": "={{ \n{\n \"finishedItemId\": $json.body.requestItemId\n}\n}}"
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "04445a9a-61f9-468e-8589-3eeb403f2553",
|
||||
"name": "Webhook",
|
||||
"type": "n8n-nodes-base.webhook",
|
||||
"position": [
|
||||
1000,
|
||||
940
|
||||
],
|
||||
"webhookId": "14776b45-77d7-4220-808f-2d0a38bec4de",
|
||||
"parameters": {
|
||||
"path": "parallel-subworkflow-target",
|
||||
"options": {},
|
||||
"httpMethod": "POST",
|
||||
"responseMode": "responseNode"
|
||||
},
|
||||
"typeVersion": 2
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Wait": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Call Resume on Parent Workflow",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Webhook": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Respond to Webhook",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"If All Finished": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Continue Workflow (noop)",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Webhook Callback Wait",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Loop Over Items": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Initialize finishedSet",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Start Sub-Workflow via Webhook",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Respond to Webhook": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Update finishedSet": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Acknowledge Finished",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Acknowledge Finished": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "If All Finished",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Webhook Callback Wait": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Update finishedSet",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Initialize finishedSet": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "If All Finished",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Start Sub-Workflow via Webhook": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop Over Items",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When clicking ‘Test workflow’": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Simulate Multi-Item for Parallel Processing",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Simulate Multi-Item for Parallel Processing": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop Over Items",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
747
workflows/Wait/0639_Wait_Splitout_Send_Webhook.json
Normal file
747
workflows/Wait/0639_Wait_Splitout_Send_Webhook.json
Normal file
@@ -0,0 +1,747 @@
|
||||
{
|
||||
"name": "Google Maps Email Scraper Template",
|
||||
"tags": [],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "79df5316-c210-478d-a4de-35b5d31924ee",
|
||||
"name": "Remove Duplicate URLs",
|
||||
"type": "n8n-nodes-base.removeDuplicates",
|
||||
"position": [
|
||||
-780,
|
||||
380
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "985ac7e3-b501-4079-a043-780677c94b52",
|
||||
"name": "Loop over queries",
|
||||
"type": "n8n-nodes-base.splitInBatches",
|
||||
"position": [
|
||||
-1080,
|
||||
-100
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "3a478935-781b-4fb1-bdc7-fcf8be1334bc",
|
||||
"name": "Search Google Maps with query",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
-1380,
|
||||
380
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://www.google.com/maps/search/{{ $json.query }}",
|
||||
"options": {
|
||||
"allowUnauthorizedCerts": false
|
||||
}
|
||||
},
|
||||
"executeOnce": false,
|
||||
"typeVersion": 4.2,
|
||||
"alwaysOutputData": false
|
||||
},
|
||||
{
|
||||
"id": "477e7d55-b7d6-4b20-ac44-dd1f443e270a",
|
||||
"name": "Scrape URLs from results",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
-1180,
|
||||
380
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "const data = $input.first().json.data\n\nconst regex = /https?:\\/\\/[^\\/]+/g\n\nconst urls = data.match(regex)\n\nreturn urls.map(url => ({json: {url: url}}))"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "a5b67e45-a3f6-41d2-aa58-c26a441c41b2",
|
||||
"name": "Filter irrelevant URLs",
|
||||
"type": "n8n-nodes-base.filter",
|
||||
"position": [
|
||||
-980,
|
||||
380
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "041797f2-2fe2-41dc-902a-d34050b9b304",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "notRegex"
|
||||
},
|
||||
"leftValue": "={{ $json.url }}",
|
||||
"rightValue": "=(google|gstatic|ggpht|schema\\.org|example\\.com|sentry-next\\.wixpress\\.com|imli\\.com|sentry\\.wixpress\\.com|ingest\\.sentry\\.io)"
|
||||
},
|
||||
{
|
||||
"id": "eb499a7e-17bc-453c-be08-a47286f726dd",
|
||||
"operator": {
|
||||
"name": "filter.operator.equals",
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "",
|
||||
"rightValue": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "40ec6d1f-1c98-4c9f-8499-c5893c3df7b9",
|
||||
"name": "Request web page for URL",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"onError": "continueRegularOutput",
|
||||
"position": [
|
||||
-380,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"url": "={{ $json.url }}",
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 4.2,
|
||||
"alwaysOutputData": false
|
||||
},
|
||||
{
|
||||
"id": "12f662a8-c55f-409a-b381-f37ab6dd3794",
|
||||
"name": "Loop over URLs",
|
||||
"type": "n8n-nodes-base.splitInBatches",
|
||||
"onError": "continueErrorOutput",
|
||||
"position": [
|
||||
-580,
|
||||
380
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"reset": false
|
||||
}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "e6957d05-3533-48ae-9cc1-ee4ac026a2a6",
|
||||
"name": "Loop over pages",
|
||||
"type": "n8n-nodes-base.splitInBatches",
|
||||
"onError": "continueErrorOutput",
|
||||
"position": [
|
||||
-360,
|
||||
120
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 3,
|
||||
"alwaysOutputData": false
|
||||
},
|
||||
{
|
||||
"id": "018621c0-0ea9-4865-b110-b6d0727f0588",
|
||||
"name": "Scrape emails from page",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"onError": "continueRegularOutput",
|
||||
"position": [
|
||||
-200,
|
||||
220
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "runOnceForEachItem",
|
||||
"jsCode": "const data = $json.data\n\nconst emailRegex = /[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.(?!png|jpg|gif|jpeg)[a-zA-Z]{2,}/g\n\nconst emails = data.match(emailRegex)\n\nreturn {json: {emails: emails}}"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "5509b8e2-a6fc-4fbe-bbc5-1bc1d5de1c98",
|
||||
"name": "Aggregate arrays of emails",
|
||||
"type": "n8n-nodes-base.aggregate",
|
||||
"position": [
|
||||
-40,
|
||||
100
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"mergeLists": true
|
||||
},
|
||||
"fieldsToAggregate": {
|
||||
"fieldToAggregate": [
|
||||
{
|
||||
"fieldToAggregate": "emails"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "f1f01f03-b62e-453f-b938-ffe4f9b3f4de",
|
||||
"name": "Split out into default data structure",
|
||||
"type": "n8n-nodes-base.splitOut",
|
||||
"position": [
|
||||
180,
|
||||
100
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldToSplitOut": "emails"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "ec27d665-d9c1-4f10-9c52-0d5ea89cbf77",
|
||||
"name": "Remove duplicate emails",
|
||||
"type": "n8n-nodes-base.removeDuplicates",
|
||||
"position": [
|
||||
400,
|
||||
100
|
||||
],
|
||||
"parameters": {
|
||||
"compare": "selectedFields",
|
||||
"options": {},
|
||||
"fieldsToCompare": "emails"
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "4a071bf0-23ad-455b-b231-bafd3b32e4f8",
|
||||
"name": "Filter irrelevant emails",
|
||||
"type": "n8n-nodes-base.filter",
|
||||
"position": [
|
||||
600,
|
||||
100
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "041797f2-2fe2-41dc-902a-d34050b9b304",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "notRegex"
|
||||
},
|
||||
"leftValue": "={{ $json.emails }}",
|
||||
"rightValue": "=(google|gstatic|ggpht|schema\\.org|example\\.com|sentry\\.wixpress\\.com|sentry-next\\.wixpress\\.com|ingest\\.sentry\\.io|sentry\\.io|imli\\.com)"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "59675faa-2b0d-4ba5-82c7-dc5dedcad31e",
|
||||
"name": "Save emails to Google Sheet",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"position": [
|
||||
800,
|
||||
100
|
||||
],
|
||||
"parameters": {
|
||||
"columns": {
|
||||
"value": {
|
||||
"Emails": "={{ $json.emails }}"
|
||||
},
|
||||
"schema": [
|
||||
{
|
||||
"id": "Emails",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Emails",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
}
|
||||
],
|
||||
"mappingMode": "defineBelow",
|
||||
"matchingColumns": [
|
||||
"Emails"
|
||||
]
|
||||
},
|
||||
"options": {},
|
||||
"operation": "append"
|
||||
},
|
||||
"typeVersion": 4.5
|
||||
},
|
||||
{
|
||||
"id": "93437e8b-4f8d-40a1-9585-cab1b556164a",
|
||||
"name": "Starts scraper workflow",
|
||||
"type": "n8n-nodes-base.executeWorkflowTrigger",
|
||||
"position": [
|
||||
-1600,
|
||||
380
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "eed77477-777d-450d-a975-4d2848b1cf55",
|
||||
"name": "Run workflow",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
-1320,
|
||||
-100
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "dffaf04e-d1d2-4002-9a69-f0904b61fc2d",
|
||||
"name": "Wait between executions",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
-700,
|
||||
0
|
||||
],
|
||||
"webhookId": "40eb11a9-0f7d-4932-993e-0052b69dbf9b",
|
||||
"parameters": {
|
||||
"amount": 2
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "18787007-1d11-41b9-89c3-d5f69756eda7",
|
||||
"name": "Execute scraper for query",
|
||||
"type": "n8n-nodes-base.executeWorkflow",
|
||||
"position": [
|
||||
-880,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "each",
|
||||
"options": {
|
||||
"waitForSubWorkflow": false
|
||||
},
|
||||
"workflowId": {
|
||||
"__rl": true,
|
||||
"mode": "id",
|
||||
"value": "={{ $workflow.id }}"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "67fcde25-05e4-437c-b799-4448baea7891",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-2280,
|
||||
-140
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 740,
|
||||
"height": 180,
|
||||
"content": "## 🛠 Setup\n1. Setup your list of queries in the \"Run workflow\" manual trigger node. Watch this [video](https://youtu.be/HaiO-UeiKBA) on how to generate the queries with ChatGPT.\n3. Choose a sheet to populate with data in the **Google Sheets node**\n4. Run the workflow and start getting leads into your Google Sheets document"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "ac880457-44b4-4ff7-8440-b4107f8468bb",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-700,
|
||||
-120
|
||||
],
|
||||
"parameters": {
|
||||
"color": 6,
|
||||
"height": 100,
|
||||
"content": "**Optional** 👇\nSet wait time between each query workflow execution. Default is 2 seconds."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "d83afb3d-7b71-4b47-9b50-28837aac408c",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-1600,
|
||||
260
|
||||
],
|
||||
"parameters": {
|
||||
"width": 480,
|
||||
"height": 100,
|
||||
"content": "### Scraper 👇\nThis workflow will be executed in the background for each query. Click the **All executions** tab in the left sidebar to see the executions running."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "007b621a-3d41-4358-aa45-560a3c8e3414",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
820,
|
||||
300
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"height": 180,
|
||||
"content": "👆 \n1. Setup your **credentials**. Here's a [video tutorial](https://youtu.be/O5RnWDM27M8) on how to do that.\n\n2. Choose which document and sheet to save the scraped emails to. "
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "fc0b837f-624c-4d25-8ed7-f787f76c785b",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-1760,
|
||||
-360
|
||||
],
|
||||
"parameters": {
|
||||
"color": 3,
|
||||
"content": " ## ⚠️ Note\n\nA [video tutorial](https://youtu.be/HaiO-UeiKBA) for this workflow guide is available on my [Youtube channel](https://www.youtube.com/channel/UCn8xmUBunez1SsDVRfZDUGA)"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "2f8665d5-2890-4f7d-908b-9c09a66b6c93",
|
||||
"name": "Sticky Note6",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-2280,
|
||||
-360
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 480,
|
||||
"height": 140,
|
||||
"content": "## Google Maps Automatic Email Scraper\n\nThis workflow automatically scrapes emails from businesses on Google Maps based on a list of queries that you provide."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "7414b2ed-259d-47da-bbd1-d9ce0d64d43c",
|
||||
"name": "Sticky Note7",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-1000,
|
||||
540
|
||||
],
|
||||
"parameters": {
|
||||
"color": 6,
|
||||
"width": 160,
|
||||
"height": 100,
|
||||
"content": "**Optional** 👆\nAdd or change the regex for filtering irrelevant URLs."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "789c9a02-e6e7-4ea6-a7a2-acc7715b377a",
|
||||
"name": "Sticky Note8",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
580,
|
||||
260
|
||||
],
|
||||
"parameters": {
|
||||
"color": 6,
|
||||
"width": 200,
|
||||
"height": 100,
|
||||
"content": "**Optional** 👆\nAdd or change the regex for filtering irrelevant/incorrect email addresses."
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"pinData": {
|
||||
"Run workflow": [
|
||||
{
|
||||
"json": {
|
||||
"query": "hollywood+dentist"
|
||||
}
|
||||
},
|
||||
{
|
||||
"json": {
|
||||
"query": "downtown+los+angeles+dentist"
|
||||
}
|
||||
},
|
||||
{
|
||||
"json": {
|
||||
"query": "santa+monica+dentist"
|
||||
}
|
||||
},
|
||||
{
|
||||
"json": {
|
||||
"query": "westwood+dentist"
|
||||
}
|
||||
},
|
||||
{
|
||||
"json": {
|
||||
"query": "west+l.a.+dentist"
|
||||
}
|
||||
},
|
||||
{
|
||||
"json": {
|
||||
"query": "the+valley+dentist"
|
||||
}
|
||||
},
|
||||
{
|
||||
"json": {
|
||||
"query": "echo+park+dentist"
|
||||
}
|
||||
},
|
||||
{
|
||||
"json": {
|
||||
"query": "culver+city+dentist"
|
||||
}
|
||||
},
|
||||
{
|
||||
"json": {
|
||||
"query": "pasadena+dentist"
|
||||
}
|
||||
},
|
||||
{
|
||||
"json": {
|
||||
"query": "silver+lake+dentist"
|
||||
}
|
||||
},
|
||||
{
|
||||
"json": {
|
||||
"query": "mid-wilshire+dentist"
|
||||
}
|
||||
},
|
||||
{
|
||||
"json": {
|
||||
"query": "beverly+hills+dentist"
|
||||
}
|
||||
},
|
||||
{
|
||||
"json": {
|
||||
"query": "north+hills+dentist"
|
||||
}
|
||||
},
|
||||
{
|
||||
"json": {
|
||||
"query": "south+los+angeles+dentist"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"connections": {
|
||||
"Run workflow": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop over queries",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Loop over URLs": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop over pages",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Request web page for URL",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Loop over pages": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Aggregate arrays of emails",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Scrape emails from page",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Loop over queries": {
|
||||
"main": [
|
||||
[],
|
||||
[
|
||||
{
|
||||
"node": "Execute scraper for query",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Remove Duplicate URLs": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop over URLs",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Filter irrelevant URLs": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Remove Duplicate URLs",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Remove duplicate emails": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Filter irrelevant emails",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Scrape emails from page": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop over pages",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Starts scraper workflow": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Search Google Maps with query",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait between executions": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop over queries",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Filter irrelevant emails": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Save emails to Google Sheet",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Request web page for URL": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop over URLs",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Scrape URLs from results": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Filter irrelevant URLs",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Execute scraper for query": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait between executions",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Aggregate arrays of emails": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Split out into default data structure",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Search Google Maps with query": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Scrape URLs from results",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Split out into default data structure": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Remove duplicate emails",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
557
workflows/Wait/0640_Wait_Splitout_Create_Scheduled.json
Normal file
557
workflows/Wait/0640_Wait_Splitout_Create_Scheduled.json
Normal file
@@ -0,0 +1,557 @@
|
||||
{
|
||||
"nodes": [
|
||||
{
|
||||
"id": "6aa059e4-e78f-4bbd-a707-994a39840f97",
|
||||
"name": "Create Session",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
-520,
|
||||
240
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://bsky.social/xrpc/com.atproto.server.createSession",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"sendBody": true,
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "identifier",
|
||||
"value": "youruser.bsky.social"
|
||||
},
|
||||
{
|
||||
"name": "password",
|
||||
"value": "your-app-passord-here"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 4.1
|
||||
},
|
||||
{
|
||||
"id": "143e37b0-de79-4329-99a2-51484c9609a8",
|
||||
"name": "List followers",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
-280,
|
||||
240
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://bsky.social/xrpc/app.bsky.graph.getFollowers",
|
||||
"options": {
|
||||
"response": {
|
||||
"response": {
|
||||
"responseFormat": "json"
|
||||
}
|
||||
},
|
||||
"pagination": {
|
||||
"pagination": {
|
||||
"parameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "cursor",
|
||||
"value": "={{ $response.body.cursor }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"maxRequests": 2,
|
||||
"requestInterval": 250,
|
||||
"limitPagesFetched": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"sendQuery": true,
|
||||
"sendHeaders": true,
|
||||
"queryParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "actor",
|
||||
"value": "={{ $json.did }}"
|
||||
},
|
||||
{
|
||||
"name": "limit",
|
||||
"value": "100"
|
||||
}
|
||||
]
|
||||
},
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"value": "=Bearer {{ $item(\"0\").$node[\"Create Session\"].json[\"accessJwt\"] }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "f1436a63-a23f-4082-9209-12c21a26ad91",
|
||||
"name": "Convert to File",
|
||||
"type": "n8n-nodes-base.convertToFile",
|
||||
"position": [
|
||||
100,
|
||||
620
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"fileName": "followers-basuracero.json"
|
||||
},
|
||||
"operation": "toJson"
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "f8beea47-6f36-4dfb-b2e7-bf94adb63e66",
|
||||
"name": "Extract from File",
|
||||
"type": "n8n-nodes-base.extractFromFile",
|
||||
"position": [
|
||||
100,
|
||||
240
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"operation": "fromJson"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "41658372-3054-4909-850b-3bffd1b1b79c",
|
||||
"name": "Split Out",
|
||||
"type": "n8n-nodes-base.splitOut",
|
||||
"position": [
|
||||
520,
|
||||
240
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"destinationFieldName": "did"
|
||||
},
|
||||
"fieldToSplitOut": "newDids"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "c94aa8e9-06db-4b24-a20a-5615b7129023",
|
||||
"name": "Loop Over Items",
|
||||
"type": "n8n-nodes-base.splitInBatches",
|
||||
"position": [
|
||||
740,
|
||||
240
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "4d1c6a2f-3acd-4783-96d4-693ced06fd97",
|
||||
"name": "Wait",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
-100,
|
||||
620
|
||||
],
|
||||
"webhookId": "b1608475-db84-4f23-acd6-d003f5094afd",
|
||||
"parameters": {},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "e4125cb8-8eb5-4cf0-b00d-e7ce4ec8236e",
|
||||
"name": "Find new followers",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
280,
|
||||
240
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "// Datos de entrada\nconst listFollowers = $('List followers').all()[0].json.followers;\nconst extractFromFile = $('Extract from File').all()[0].json.data[0].followers;\n\n// Verificar que tenemos acceso a los datos\nconsole.log('listFollowers length:', Array.isArray(listFollowers) ? listFollowers.length : 'no es array');\nconsole.log('extractFromFile length:', Array.isArray(extractFromFile) ? extractFromFile.length : 'no es array');\n\n// Mostrar algunos ejemplos de cada lista\nconsole.log('Ejemplo de listFollowers:', listFollowers?.slice(0, 2));\nconsole.log('Ejemplo de extractFromFile:', extractFromFile?.slice(0, 2));\n\n// Crear conjunto de DIDs del archivo extraído\nconst existingDids = new Set(extractFromFile?.map(item => item.did) || []);\nconsole.log('DIDs existentes:', Array.from(existingDids).slice(0, 5));\n\n// Filtrar listFollowers\nconst newFollowers = listFollowers?.filter(follower => !existingDids.has(follower.did)) || [];\n\nreturn {\n json: {\n debug: {\n listFollowersCount: listFollowers?.length || 0,\n extractFromFileCount: extractFromFile?.length || 0,\n existingDidsCount: existingDids.size,\n newFollowersCount: newFollowers.length\n },\n newFollowers,\n newDids: newFollowers.map(follower => follower.did),\n count: newFollowers.length\n }\n}"
|
||||
},
|
||||
"typeVersion": 2,
|
||||
"alwaysOutputData": true
|
||||
},
|
||||
{
|
||||
"id": "a28accb5-ee47-431f-83e4-376425e9899e",
|
||||
"name": "Read followers from file",
|
||||
"type": "n8n-nodes-base.readWriteFile",
|
||||
"position": [
|
||||
-80,
|
||||
240
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fileSelector": "=followers-{{ $('Create Session').item.json.handle }}.json"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "aa2ab5e1-eb6f-4657-9a9a-66417ffa421e",
|
||||
"name": "Save followers to file",
|
||||
"type": "n8n-nodes-base.readWriteFile",
|
||||
"position": [
|
||||
280,
|
||||
620
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"append": false
|
||||
},
|
||||
"fileName": "=followers-{{ $('Create Session').item.json.handle }}.json",
|
||||
"operation": "write"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "9a4fb5e5-f2f6-4aa1-846e-8d6460ad7765",
|
||||
"name": "Define welcome message",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
980,
|
||||
260
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "afe7fe9b-3bd4-4429-afe9-81e5fe934e07",
|
||||
"name": "text",
|
||||
"type": "string",
|
||||
"value": "Hello, thanks for your follow. You can read more about my over my site:"
|
||||
},
|
||||
{
|
||||
"id": "97590cd1-9d85-442b-baa3-bad849ff9be0",
|
||||
"name": "link",
|
||||
"type": "string",
|
||||
"value": "https://yoursite.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "594ce66f-acbd-4c31-806c-382aa9a98ed0",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
920,
|
||||
160
|
||||
],
|
||||
"parameters": {
|
||||
"width": 230,
|
||||
"height": 266,
|
||||
"content": "### 2. Define your welcome message and link here"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "c24a7971-11a7-4164-9f2d-78335264f250",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
220,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"width": 231,
|
||||
"height": 338,
|
||||
"content": "### 3. **Important** \n\nYou need to manually run \"Save followers to file\" once before the first time so you populate your list of existing followers"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "c6e766cf-a118-4db0-8e3c-32662c40737b",
|
||||
"name": "Send message",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1360,
|
||||
260
|
||||
],
|
||||
"parameters": {
|
||||
"url": "={{ $item(\"0\").$node[\"Create Session\"].json.didDoc.service[0].serviceEndpoint }}/xrpc/chat.bsky.convo.sendMessage",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"jsonBody": "={\n \"convoId\" : \"{{ $json.convo.id }}\",\n \"message\" : {\n \"text\" : \"{{ $('Define welcome message').item.json.text }}\\n\\n{{ $('Define welcome message').item.json.link }}\",\n \"facets\" : [\n {\n \"index\" : {\n \"byteStart\": {{ $('Define welcome message').item.json.text.length }},\n \"byteEnd\": {{ $('Define welcome message').item.json.text.length + 3 + $('Define welcome message').item.json.link.length}}\n },\n \"features\": [\n {\n \"$type\": \"app.bsky.richtext.facet#link\",\n \"uri\": \"{{ $('Define welcome message').item.json.link }}\"\n }\n ]\n }\n ]\n }\n}",
|
||||
"sendBody": true,
|
||||
"sendHeaders": true,
|
||||
"specifyBody": "json",
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"value": "=Bearer {{ $item(\"0\").$node[\"Create Session\"].json[\"accessJwt\"] }}"
|
||||
},
|
||||
{
|
||||
"name": "Atproto-Proxy",
|
||||
"value": "did:web:api.bsky.chat#bsky_chat"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "33aa7e0c-58fe-4527-a94e-49bec0e06325",
|
||||
"name": "Get conversation ID",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1200,
|
||||
260
|
||||
],
|
||||
"parameters": {
|
||||
"url": "={{ $item(\"0\").$node[\"Create Session\"].json.didDoc.service[0].serviceEndpoint }}/xrpc/chat.bsky.convo.getConvoForMembers",
|
||||
"options": {},
|
||||
"sendQuery": true,
|
||||
"sendHeaders": true,
|
||||
"queryParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "members",
|
||||
"value": "={{ $('Split Out').item.json.did }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"value": "=Bearer {{ $item(\"0\").$node[\"Create Session\"].json[\"accessJwt\"] }}"
|
||||
},
|
||||
{
|
||||
"name": "Atproto-Proxy",
|
||||
"value": "did:web:api.bsky.chat#bsky_chat"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "066f1d0d-319a-4676-9c0a-5b00d206ffd2",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-40,
|
||||
-100
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 479,
|
||||
"height": 307,
|
||||
"content": "## Send a welcome private message to your new BlueSky followers\n\nThis flow will save your current followers in a file and check for new ones on the next execution, sending them the Defined message an link as a private message.\n\nOnce messages are sent, the new list of followers will be saved into the file.\n\n**Important: Follow the yellow notes in order before enabling the full flow for the first time**"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "a61e301e-a0ca-48e9-9a46-05975662aa90",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-560,
|
||||
40
|
||||
],
|
||||
"parameters": {
|
||||
"width": 181,
|
||||
"height": 364,
|
||||
"content": "### 1. Define your Bluesky user and app password first\n\nThe App password should have access to private messages"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "1b1dcd74-7a71-49e4-99e8-c079b692aca5",
|
||||
"name": "Each 60 minutes",
|
||||
"type": "n8n-nodes-base.scheduleTrigger",
|
||||
"position": [
|
||||
-720,
|
||||
240
|
||||
],
|
||||
"parameters": {
|
||||
"rule": {
|
||||
"interval": [
|
||||
{
|
||||
"field": "minutes",
|
||||
"minutesInterval": 60
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "6acf153c-cdc6-42c1-85f9-2692c8777eef",
|
||||
"name": "No Operation, do nothing",
|
||||
"type": "n8n-nodes-base.noOp",
|
||||
"position": [
|
||||
520,
|
||||
620
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Wait": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Convert to File",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Split Out": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop Over Items",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Send message": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop Over Items",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Create Session": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "List followers",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"List followers": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Read followers from file",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Wait",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Convert to File": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Save followers to file",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Each 60 minutes": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Create Session",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Loop Over Items": {
|
||||
"main": [
|
||||
[],
|
||||
[
|
||||
{
|
||||
"node": "Define welcome message",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Extract from File": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Find new followers",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Find new followers": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Split Out",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get conversation ID": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Send message",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Define welcome message": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get conversation ID",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Save followers to file": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "No Operation, do nothing",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Read followers from file": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Extract from File",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
3777
workflows/Wait/0668_Wait_Splitout_Create_Webhook.json
Normal file
3777
workflows/Wait/0668_Wait_Splitout_Create_Webhook.json
Normal file
File diff suppressed because it is too large
Load Diff
1775
workflows/Wait/0715_Wait_Schedule_Create_Scheduled.json
Normal file
1775
workflows/Wait/0715_Wait_Schedule_Create_Scheduled.json
Normal file
File diff suppressed because it is too large
Load Diff
555
workflows/Wait/0716_Wait_Webhook_Process_Webhook.json
Normal file
555
workflows/Wait/0716_Wait_Webhook_Process_Webhook.json
Normal file
@@ -0,0 +1,555 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "37c9b6d3ee04c3e15f526d799209783b3fa8da2950c0e8241dc8ad516d7eb4df"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "ba9d786a-0698-4306-adba-40c928c1a340",
|
||||
"name": "Sticky Note8",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
840,
|
||||
1100
|
||||
],
|
||||
"parameters": {
|
||||
"width": 718.7339166606896,
|
||||
"height": 141.09832891056485,
|
||||
"content": "## Independent \"Async\" Process\nThis could be anything that eventually triggers another workflow and passes through something (e.g. resumeUrl) that identifies the original workflow execution that needs to be joined.\nFor instance, this could be a Telegram conversation where the trigger is watching for a message containing a \"reply\" to something that was originally sent out via Telegram."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "d90e6fa4-2f88-4446-8522-e3ae7b1334d2",
|
||||
"name": "When clicking ‘Test workflow’",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
400,
|
||||
400
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "a76364e9-ef28-4ad8-88a3-68ac23fed0c1",
|
||||
"name": "Wait",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
1100,
|
||||
400
|
||||
],
|
||||
"webhookId": "253803de-f2d4-4519-8014-62d0ef80b988",
|
||||
"parameters": {
|
||||
"resume": "webhook",
|
||||
"options": {},
|
||||
"httpMethod": "POST"
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "fa83bc05-ee83-4150-ac5e-68e6b14e37d2",
|
||||
"name": "HTTP Request - Initiate Independent Process",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
860,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=http://127.0.0.1:5678/webhook/{{ $('Set Primary Execution Context').first().json.simulatedExternalProcessWorkflowId }}",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"sendBody": true,
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "resumeUrlForWaitingExecution",
|
||||
"value": "={{ $execution.resumeUrl }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "a2aad4e1-e305-43cb-9e59-21c92ae351b1",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
780,
|
||||
280
|
||||
],
|
||||
"parameters": {
|
||||
"width": 593,
|
||||
"height": 107,
|
||||
"content": "## Only One Item Will Work\nIf the previous steps could result in multiple initiations via the `Secondary Trigger` below, **only the first one** will resume the workflow. Others will be rejected."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "4065389a-8af6-440d-94d6-1a2261e75818",
|
||||
"name": "HTTP Request - Resume Other Workflow Execution",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1100,
|
||||
780
|
||||
],
|
||||
"parameters": {
|
||||
"url": "={{ $json.body.resumeUrlForWaitingExecution.replace($env.WEBHOOK_URL, 'http://127.0.0.1:5678') }}",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"sendBody": true,
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "jokeFromIndependentProcess",
|
||||
"value": "={{ $('Receive Input from External, Independent Process').first().json.body.joke }}"
|
||||
},
|
||||
{
|
||||
"name": "setupFromIndependentProcess",
|
||||
"value": "={{ $('Receive Input from External, Independent Process').first().json.body.setup }}"
|
||||
},
|
||||
{
|
||||
"name": "deliveryFromIndependentProcess",
|
||||
"value": "={{ $('Receive Input from External, Independent Process').first().json.body.delivery }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "d0ef28a5-7a4f-4c60-8070-1da0016f9bb6",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
380,
|
||||
600
|
||||
],
|
||||
"parameters": {
|
||||
"width": 590,
|
||||
"height": 179,
|
||||
"content": "## Secondary Trigger From Independent Process\nWhen something runs the workflow through this trigger, it is a completely separate execution. By passing through the resumeUrl from the **Primary Execution**, it is possible to join back into it via the \"webhook callback\" to the `Wait` node.\n* Note: This trigger could be anything that would support input including the `resumeUrl`, not just a webhook. The `Webhook` node is just used to demonstrate a separate trigger."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "f0c82308-166f-44e4-84c0-65c2f5d65bf5",
|
||||
"name": "This Node Can Access Primary and Secondary",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
1340,
|
||||
520
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "91dfddea-5498-41dc-a423-830bb67638cc",
|
||||
"name": "somethingFromPrimaryExecution",
|
||||
"type": "string",
|
||||
"value": "={{ $('Set Primary Execution Context').first().json.someContextItem }}"
|
||||
},
|
||||
{
|
||||
"id": "beb6454f-3148-44a1-a681-4691f5fc6c06",
|
||||
"name": "somethingFromSecondaryExecution",
|
||||
"type": "string",
|
||||
"value": "={{ $('Wait').item.json.body.jokeFromIndependentProcess }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "a0b6fd7d-fc69-47c9-bc17-14a57c4eb628",
|
||||
"name": "Set Primary Execution Context",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
620,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "4e85d854-9326-4045-9636-facd38d681f1",
|
||||
"name": "someContextItem",
|
||||
"type": "string",
|
||||
"value": "this value is only available / in-scope from the primary execution's previous-nodes"
|
||||
},
|
||||
{
|
||||
"id": "0c1f5a1b-b087-4414-b558-3e4ff809e9ab",
|
||||
"name": "simulatedExternalProcessWorkflowId",
|
||||
"type": "string",
|
||||
"value": "21cea9f6-d55f-4c47-b6a2-158cce1811cd"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "e4d59b9a-536b-42c6-901e-afb4e4897efd",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
300,
|
||||
280
|
||||
],
|
||||
"parameters": {
|
||||
"width": 357.8809516773294,
|
||||
"height": 80,
|
||||
"content": "## Primary Trigger/Execution\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "a7370b71-3c0e-4bff-b786-0b353938bcfe",
|
||||
"name": "Receive Input from External, Independent Process",
|
||||
"type": "n8n-nodes-base.webhook",
|
||||
"position": [
|
||||
420,
|
||||
780
|
||||
],
|
||||
"webhookId": "3064395b-378c-4755-9634-ce40cc4733a6",
|
||||
"parameters": {
|
||||
"path": "3064395b-378c-4755-9634-ce40cc4733a6",
|
||||
"options": {},
|
||||
"httpMethod": "POST"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "8f1ef649-f5df-498c-9aa4-a1dc00613cef",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1040,
|
||||
391
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 218,
|
||||
"height": 557,
|
||||
"content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nThese are the nodes that combine the `Secondary` execution back to the `Primary` execution via the `resumeUrl`."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "dacae6ab-9039-4b80-af59-21ca9c958bc0",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
180,
|
||||
211.1677791891891
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 1415.7138930630392,
|
||||
"height": 792.7070677927813,
|
||||
"content": "# Main Workflow - Keep these together in the same workflow instance"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "442f3d39-5a1b-4534-95a2-7c47ce150bb1",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
180,
|
||||
1040
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 1410.9085229279067,
|
||||
"height": 411.48103707206576,
|
||||
"content": "# Simulated External Independent Process\nCut/Paste these nodes into a separate workflow instance\nThen activate the trigger\nThen activate the workflow"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "d9b3d85f-b2f6-48f4-9bfc-3e134e2d4f20",
|
||||
"name": "Sticky Note6",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
580,
|
||||
360
|
||||
],
|
||||
"parameters": {
|
||||
"color": 3,
|
||||
"width": 180.88095167732934,
|
||||
"height": 217,
|
||||
"content": "## Update Me"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "38738f2c-d478-4cba-95be-a52536843bcd",
|
||||
"name": "Sticky Note7",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1280,
|
||||
420
|
||||
],
|
||||
"parameters": {
|
||||
"color": 3,
|
||||
"height": 306.5674498803857,
|
||||
"content": "## Execute This Node to Test"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "de9913e4-ea3f-4378-a851-7d7925679bd6",
|
||||
"name": "Respond to Webhook",
|
||||
"type": "n8n-nodes-base.respondToWebhook",
|
||||
"position": [
|
||||
480,
|
||||
1260
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "e84ad080-9239-44ee-bc73-d16496813241",
|
||||
"name": "Simulate Event that Hits the 2nd Trigger/Flow",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1360,
|
||||
1260
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=http://127.0.0.1:5678/webhook/{{ $('Demo \"Trigger\" Callback Setup').first().json.triggerTargetWorkflowId }}",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"sendBody": true,
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "resumeUrlForWaitingExecution",
|
||||
"value": "={{ $('Webhook').item.json.body.resumeUrlForWaitingExecution }}"
|
||||
},
|
||||
{
|
||||
"name": "joke",
|
||||
"value": "={{ $('HTTP Request - Get A Random Joke').item.json.joke }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "4fb07c03-1df0-4703-9d26-22cff17137bf",
|
||||
"name": "Simulate some Consumed Service Time",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
1140,
|
||||
1260
|
||||
],
|
||||
"webhookId": "d055185f-2515-4f30-824d-5d0fa346c3bc",
|
||||
"parameters": {
|
||||
"amount": 2
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "66f3cf0a-62dc-4c85-a832-143f45280dd5",
|
||||
"name": "HTTP Request - Get A Random Joke",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
920,
|
||||
1260
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://v2.jokeapi.dev/joke/Programming",
|
||||
"options": {},
|
||||
"sendQuery": true,
|
||||
"queryParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "blacklistFlags",
|
||||
"value": "nsfw,religious,political,racist,sexist,explicit"
|
||||
},
|
||||
{
|
||||
"name": "type",
|
||||
"value": "single"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "873a6d02-6393-4354-b7fe-c9c1f2e84339",
|
||||
"name": "Demo \"Trigger\" Callback Setup",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
700,
|
||||
1260
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "c6cfe1c1-257b-4785-8ae9-8945e3c7bcd9",
|
||||
"name": "triggerTargetWorkflowId",
|
||||
"type": "string",
|
||||
"value": "3064395b-378c-4755-9634-ce40cc4733a6"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "a8eafdc2-e4b0-42b1-b0aa-7e3cb3972b4b",
|
||||
"name": "Webhook",
|
||||
"type": "n8n-nodes-base.webhook",
|
||||
"disabled": true,
|
||||
"position": [
|
||||
280,
|
||||
1260
|
||||
],
|
||||
"webhookId": "21cea9f6-d55f-4c47-b6a2-158cce1811cd",
|
||||
"parameters": {
|
||||
"path": "21cea9f6-d55f-4c47-b6a2-158cce1811cd",
|
||||
"options": {},
|
||||
"httpMethod": "POST",
|
||||
"responseMode": "responseNode"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "77282136-69ec-4f23-b222-30817498b47d",
|
||||
"name": "Sticky Note9",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
662,
|
||||
1220
|
||||
],
|
||||
"parameters": {
|
||||
"color": 3,
|
||||
"width": 171,
|
||||
"height": 217,
|
||||
"content": "## Update Me"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Wait": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "This Node Can Access Primary and Secondary",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Webhook": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Respond to Webhook",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Respond to Webhook": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Demo \"Trigger\" Callback Setup",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Demo \"Trigger\" Callback Setup": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "HTTP Request - Get A Random Joke",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Set Primary Execution Context": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "HTTP Request - Initiate Independent Process",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"HTTP Request - Get A Random Joke": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Simulate some Consumed Service Time",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When clicking ‘Test workflow’": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Set Primary Execution Context",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Simulate some Consumed Service Time": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Simulate Event that Hits the 2nd Trigger/Flow",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"HTTP Request - Initiate Independent Process": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Receive Input from External, Independent Process": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "HTTP Request - Resume Other Workflow Execution",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
1252
workflows/Wait/0763_Wait_Splitout_Create_Webhook.json
Normal file
1252
workflows/Wait/0763_Wait_Splitout_Create_Webhook.json
Normal file
File diff suppressed because it is too large
Load Diff
774
workflows/Wait/0764_Wait_Splitout_Create_Triggered.json
Normal file
774
workflows/Wait/0764_Wait_Splitout_Create_Triggered.json
Normal file
@@ -0,0 +1,774 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "cb484ba7b742928a2048bf8829668bed5b5ad9787579adea888f05980292a4a7",
|
||||
"templateCredsSetupCompleted": true
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "a810abc1-4cbf-49a8-8c4e-227ad572d137",
|
||||
"name": "Execute Workflow Trigger",
|
||||
"type": "n8n-nodes-base.executeWorkflowTrigger",
|
||||
"position": [
|
||||
2280,
|
||||
-400
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "02f98d43-05d9-4d70-a94a-1af7e2ad10cf",
|
||||
"name": "Create Marketing Insight Data",
|
||||
"type": "n8n-nodes-base.notion",
|
||||
"position": [
|
||||
3500,
|
||||
-480
|
||||
],
|
||||
"parameters": {
|
||||
"title": "={{ $('Execute Workflow Trigger').item.json.metaData.title }}",
|
||||
"options": {
|
||||
"icon": "🎯"
|
||||
},
|
||||
"resource": "databasePage",
|
||||
"databaseId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "1395b6e0-c94f-802d-9a63-c524a1769699",
|
||||
"cachedResultUrl": "https://www.notion.so/1395b6e0c94f802d9a63c524a1769699",
|
||||
"cachedResultName": "Marketing Insights"
|
||||
},
|
||||
"propertiesUi": {
|
||||
"propertyValues": [
|
||||
{
|
||||
"key": "Name|title",
|
||||
"title": "={{ $json.Summary }}"
|
||||
},
|
||||
{
|
||||
"key": "Marketing Tags|multi_select",
|
||||
"multiSelectValue": "={{ $json.Tag }}"
|
||||
},
|
||||
{
|
||||
"key": "Sales Call Summaries|relation",
|
||||
"relationValue": [
|
||||
"={{ $('Execute Workflow Trigger').item.json.notionData[0].id }}"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "Date Mentioned|date",
|
||||
"date": "={{ $('Execute Workflow Trigger').item.json.metaData.started }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"notionApi": {
|
||||
"id": "80",
|
||||
"name": "Notion david-internal"
|
||||
}
|
||||
},
|
||||
"retryOnFail": true,
|
||||
"typeVersion": 2.2,
|
||||
"waitBetweenTries": 3000
|
||||
},
|
||||
{
|
||||
"id": "426e8b9d-7542-473e-8124-45cf70adf035",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2720,
|
||||
-600
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 1480,
|
||||
"height": 480,
|
||||
"content": "## Marketing Insights Processing"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "2946cd22-e7e6-40eb-a375-0f5233d66260",
|
||||
"name": "Sticky Note6",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2140,
|
||||
-760
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 560,
|
||||
"height": 620,
|
||||
"content": "## Receives AI Data from other workflow\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "3a0be813-8556-44cc-bd1a-9cdcf9b7aa55",
|
||||
"name": "Sticky Note7",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1780,
|
||||
-960
|
||||
],
|
||||
"parameters": {
|
||||
"width": 340,
|
||||
"height": 820,
|
||||
"content": "\n## CallForge - The AI Gong Sales Call Processor\nCallForge allows you to extract important information for different departments from your Sales Gong Calls. \n\n### AI Output Processor\nOnce the AI data is generated, it is then added (or not!) to the Notion Database here. This is also where the Pipedrive or Salesforce integration will be added once that portion is complete. "
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "35aa0491-8135-4f69-a213-8a578bf0c405",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2720,
|
||||
-100
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 1480,
|
||||
"height": 440,
|
||||
"content": "## Actionable Insights"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "8035c35e-0073-4d66-8630-8f3f2d6fea72",
|
||||
"name": "Sticky Note8",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2720,
|
||||
-1060
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 1480,
|
||||
"height": 440,
|
||||
"content": "## Recurring Topics"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "c18b2e0d-3c7f-4caa-bf12-5d5058d6d6e2",
|
||||
"name": "Check if Recurring Topics Found",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
2820,
|
||||
-820
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "7f182ff7-b5cf-44d0-9645-9200bb7afa24",
|
||||
"operator": {
|
||||
"type": "array",
|
||||
"operation": "lengthGte",
|
||||
"rightType": "number"
|
||||
},
|
||||
"leftValue": "={{ $json.AIoutput.MarketingInsights }}",
|
||||
"rightValue": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "8130e673-247c-4e99-89aa-59c1e76e8cc4",
|
||||
"name": "Wait for rate limiting - Recurring",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
3060,
|
||||
-980
|
||||
],
|
||||
"webhookId": "9aa5f1eb-1ca7-4d69-9783-8d4a21b32db3",
|
||||
"parameters": {
|
||||
"amount": 3
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "25838252-28ad-4f9a-b360-7a0e8e2e39bf",
|
||||
"name": "Split Out Recurring Topics",
|
||||
"type": "n8n-nodes-base.splitOut",
|
||||
"position": [
|
||||
3280,
|
||||
-980
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldToSplitOut": "AIoutput.RecurringTopics"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "f48e333b-9dd3-47a5-a874-a14ab6710c59",
|
||||
"name": "Create Recurring Topics Data",
|
||||
"type": "n8n-nodes-base.notion",
|
||||
"position": [
|
||||
3500,
|
||||
-980
|
||||
],
|
||||
"parameters": {
|
||||
"title": "={{ $('Execute Workflow Trigger').item.json.metaData.title }}",
|
||||
"options": {
|
||||
"icon": "🔁"
|
||||
},
|
||||
"resource": "databasePage",
|
||||
"databaseId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "17c5b6e0-c94f-80f4-9bf0-e52c7b0ef947",
|
||||
"cachedResultUrl": "https://www.notion.so/17c5b6e0c94f80f49bf0e52c7b0ef947",
|
||||
"cachedResultName": "Recurring Topics"
|
||||
},
|
||||
"propertiesUi": {
|
||||
"propertyValues": [
|
||||
{
|
||||
"key": "Context|rich_text",
|
||||
"textContent": "={{ $json.Context }}"
|
||||
},
|
||||
{
|
||||
"key": "Mentions|number",
|
||||
"numberValue": "={{ $json.Mentions }}"
|
||||
},
|
||||
{
|
||||
"key": "Topic|title",
|
||||
"title": "={{ $json.Topic }}"
|
||||
},
|
||||
{
|
||||
"key": "Sales Call Summaries|relation",
|
||||
"relationValue": [
|
||||
"={{ $('Execute Workflow Trigger').item.json.notionData[0].id }}"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"notionApi": {
|
||||
"id": "2B3YIiD4FMsF9Rjn",
|
||||
"name": "Angelbot Notion"
|
||||
}
|
||||
},
|
||||
"retryOnFail": true,
|
||||
"typeVersion": 2.2,
|
||||
"waitBetweenTries": 3000
|
||||
},
|
||||
{
|
||||
"id": "f0f39472-35e7-42a0-a0c6-c4414deacfb9",
|
||||
"name": "Bundle Recurring Topics Data to 1 object",
|
||||
"type": "n8n-nodes-base.aggregate",
|
||||
"position": [
|
||||
3700,
|
||||
-980
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"aggregate": "aggregateAllItemData",
|
||||
"destinationFieldName": "tagdata"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "290d14a5-f255-4a15-bcce-b879f6c45300",
|
||||
"name": "Merge Recurring Topics Thread",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
4000,
|
||||
-800
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "d8fc65ad-2b05-40c1-84c7-7bda819f0f1f",
|
||||
"name": "aiResponse",
|
||||
"type": "object",
|
||||
"value": "={{ $('Execute Workflow Trigger').item.json.aiResponse }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "784209f5-d9cf-47b6-b222-e90eab0e9c42",
|
||||
"name": "Check if Marketing Insight Data Found",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
2820,
|
||||
-320
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "7f182ff7-b5cf-44d0-9645-9200bb7afa24",
|
||||
"operator": {
|
||||
"type": "array",
|
||||
"operation": "lengthGte",
|
||||
"rightType": "number"
|
||||
},
|
||||
"leftValue": "={{ $json.AIoutput.MarketingInsights }}",
|
||||
"rightValue": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "f9c10abd-cab4-4cfa-909c-b7a4b9d132ec",
|
||||
"name": "Wait for rate limiting - Marketing Insights",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
3060,
|
||||
-480
|
||||
],
|
||||
"webhookId": "264a15ce-478f-4b69-b46c-21bf8ec4bcd2",
|
||||
"parameters": {
|
||||
"amount": 3
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "805c464a-38d1-4bee-a65a-a7dca32fc7f5",
|
||||
"name": "Split out Insights",
|
||||
"type": "n8n-nodes-base.splitOut",
|
||||
"position": [
|
||||
3280,
|
||||
-480
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldToSplitOut": "AIoutput.MarketingInsights"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "424eb472-9280-4fc8-b7e2-ba55e0b5d9b9",
|
||||
"name": "Bundle Marketing Insights Data to 1 object",
|
||||
"type": "n8n-nodes-base.aggregate",
|
||||
"position": [
|
||||
3700,
|
||||
-480
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"aggregate": "aggregateAllItemData",
|
||||
"destinationFieldName": "tagdata"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "a7942700-6feb-494e-b013-ecaafa03bc9c",
|
||||
"name": "Merge Marketing Insights Thread",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
4000,
|
||||
-300
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "d8fc65ad-2b05-40c1-84c7-7bda819f0f1f",
|
||||
"name": "aiResponse",
|
||||
"type": "object",
|
||||
"value": "={{ $('Execute Workflow Trigger').item.json.aiResponse }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "355724f6-bd52-470d-8346-a7482bbd4a86",
|
||||
"name": "Check if Actionable Insights Data Found",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
2820,
|
||||
140
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "7f182ff7-b5cf-44d0-9645-9200bb7afa24",
|
||||
"operator": {
|
||||
"type": "array",
|
||||
"operation": "lengthGte",
|
||||
"rightType": "number"
|
||||
},
|
||||
"leftValue": "={{ $json.AIoutput.ActionableInsights }}",
|
||||
"rightValue": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "4ffd7478-3f04-49bb-9773-8c870007b64b",
|
||||
"name": "Wait for rate limiting - Actionable Insights",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
3060,
|
||||
-20
|
||||
],
|
||||
"webhookId": "8156cdcc-e8d6-4fdb-92f9-6b70d9c671fd",
|
||||
"parameters": {
|
||||
"amount": 3
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "31305dc7-4362-4039-a43e-c38bdd9ad1ce",
|
||||
"name": "Split Out Actionable Insights",
|
||||
"type": "n8n-nodes-base.splitOut",
|
||||
"position": [
|
||||
3280,
|
||||
-20
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldToSplitOut": "AIoutput.ActionableInsights"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "733cd058-bb92-41f4-88e7-9970f71b3ad0",
|
||||
"name": "Create Actionable Insights Data",
|
||||
"type": "n8n-nodes-base.notion",
|
||||
"position": [
|
||||
3500,
|
||||
-20
|
||||
],
|
||||
"parameters": {
|
||||
"title": "={{ $('Execute Workflow Trigger').item.json.metaData.title }}",
|
||||
"options": {
|
||||
"icon": "🎬"
|
||||
},
|
||||
"resource": "databasePage",
|
||||
"databaseId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "17c5b6e0-c94f-809f-b5ee-e890f3ab3be9",
|
||||
"cachedResultUrl": "https://www.notion.so/17c5b6e0c94f809fb5eee890f3ab3be9",
|
||||
"cachedResultName": "Actionable Insights"
|
||||
},
|
||||
"propertiesUi": {
|
||||
"propertyValues": [
|
||||
{
|
||||
"key": "Rationale|rich_text",
|
||||
"textContent": "={{ $json.Rationale }}"
|
||||
},
|
||||
{
|
||||
"key": "Recommendation Type|rich_text",
|
||||
"textContent": "={{ $json.RecommendationType }}"
|
||||
},
|
||||
{
|
||||
"key": "Title|rich_text",
|
||||
"textContent": "={{ $json.Title }}"
|
||||
},
|
||||
{
|
||||
"key": "Topic|title",
|
||||
"title": "={{ $json.Topic }}"
|
||||
},
|
||||
{
|
||||
"key": "Sales Call Summaries|relation",
|
||||
"relationValue": [
|
||||
"={{ $('Execute Workflow Trigger').item.json.notionData[0].id }}"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"notionApi": {
|
||||
"id": "2B3YIiD4FMsF9Rjn",
|
||||
"name": "Angelbot Notion"
|
||||
}
|
||||
},
|
||||
"retryOnFail": true,
|
||||
"typeVersion": 2.2,
|
||||
"waitBetweenTries": 3000
|
||||
},
|
||||
{
|
||||
"id": "ae519285-cf01-4f4b-9574-131ec2487ce7",
|
||||
"name": "Bundle Actionable Insights Data to 1 object",
|
||||
"type": "n8n-nodes-base.aggregate",
|
||||
"position": [
|
||||
3700,
|
||||
-20
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"aggregate": "aggregateAllItemData",
|
||||
"destinationFieldName": "tagdata"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "45812c79-be23-4139-987b-14bc674fbfc1",
|
||||
"name": "Merge Actionable Insights Thread",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
4000,
|
||||
160
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "d8fc65ad-2b05-40c1-84c7-7bda819f0f1f",
|
||||
"name": "aiResponse",
|
||||
"type": "object",
|
||||
"value": "={{ $('Execute Workflow Trigger').item.json.aiResponse }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Split out Insights": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Create Marketing Insight Data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Execute Workflow Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Check if Marketing Insight Data Found",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Check if Recurring Topics Found",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Check if Actionable Insights Data Found",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Split Out Recurring Topics": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Create Recurring Topics Data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Create Recurring Topics Data": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Bundle Recurring Topics Data to 1 object",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Create Marketing Insight Data": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Bundle Marketing Insights Data to 1 object",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Split Out Actionable Insights": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Create Actionable Insights Data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Check if Recurring Topics Found": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait for rate limiting - Recurring",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Merge Recurring Topics Thread",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Create Actionable Insights Data": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Bundle Actionable Insights Data to 1 object",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait for rate limiting - Recurring": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Split Out Recurring Topics",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Check if Marketing Insight Data Found": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait for rate limiting - Marketing Insights",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Merge Marketing Insights Thread",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Check if Actionable Insights Data Found": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait for rate limiting - Actionable Insights",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Merge Actionable Insights Thread",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Bundle Recurring Topics Data to 1 object": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge Recurring Topics Thread",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Bundle Marketing Insights Data to 1 object": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge Marketing Insights Thread",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Bundle Actionable Insights Data to 1 object": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge Actionable Insights Thread",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait for rate limiting - Marketing Insights": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Split out Insights",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait for rate limiting - Actionable Insights": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Split Out Actionable Insights",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
641
workflows/Wait/0765_Wait_Splitout_Create_Triggered.json
Normal file
641
workflows/Wait/0765_Wait_Splitout_Create_Triggered.json
Normal file
@@ -0,0 +1,641 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "cb484ba7b742928a2048bf8829668bed5b5ad9787579adea888f05980292a4a7",
|
||||
"templateCredsSetupCompleted": true
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "a2061232-329f-4288-9b01-ba832463c31e",
|
||||
"name": "Execute Workflow Trigger",
|
||||
"type": "n8n-nodes-base.executeWorkflowTrigger",
|
||||
"position": [
|
||||
2280,
|
||||
-400
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "42df9296-82ac-44cd-8370-50e4507fb91d",
|
||||
"name": "Check if Product Data Found",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
2800,
|
||||
-340
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "1a67895e-3ab7-4c93-8e16-202b3882ded5",
|
||||
"operator": {
|
||||
"type": "array",
|
||||
"operation": "lengthGte",
|
||||
"rightType": "number"
|
||||
},
|
||||
"leftValue": "={{ $json.AIoutput.ProductFeedback }}",
|
||||
"rightValue": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "84e93120-92d8-45fd-bb63-8626743e7fe0",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2720,
|
||||
-580
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 1340,
|
||||
"height": 440,
|
||||
"content": "## Product Data Processing"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "5cb1df66-abba-4d82-8fe5-c2313c8f7b44",
|
||||
"name": "Sticky Note6",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2140,
|
||||
-760
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 560,
|
||||
"height": 620,
|
||||
"content": "## Receives AI Data from other workflow\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "7c046627-f418-4b7e-aa5b-7cff69f98f59",
|
||||
"name": "Sticky Note7",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1780,
|
||||
-960
|
||||
],
|
||||
"parameters": {
|
||||
"width": 340,
|
||||
"height": 820,
|
||||
"content": "\n## CallForge - The AI Gong Sales Call Processor\nCallForge allows you to extract important information for different departments from your Sales Gong Calls. \n\n### AI Output Processor\nOnce the AI data is generated, it is then added (or not!) to the Notion Database here. This is also where the Pipedrive or Salesforce integration will be added once that portion is complete. "
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "a04dac9d-5477-41a3-8696-1871c1cccf53",
|
||||
"name": "Create Product Data Object1",
|
||||
"type": "n8n-nodes-base.notion",
|
||||
"position": [
|
||||
3280,
|
||||
-940
|
||||
],
|
||||
"parameters": {
|
||||
"title": "={{ $('Execute Workflow Trigger').item.json.metaData.title }}",
|
||||
"options": {
|
||||
"icon": "💬"
|
||||
},
|
||||
"resource": "databasePage",
|
||||
"databaseId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "1775b6e0-c94f-80ac-9885-d9695af5bc89",
|
||||
"cachedResultUrl": "https://www.notion.so/1775b6e0c94f80ac9885d9695af5bc89",
|
||||
"cachedResultName": "AI use-case database"
|
||||
},
|
||||
"propertiesUi": {
|
||||
"propertyValues": [
|
||||
{
|
||||
"key": "Company|title",
|
||||
"title": "={{ $json.metaData.CompanyName }}"
|
||||
},
|
||||
{
|
||||
"key": "Department|multi_select",
|
||||
"multiSelectValue": "={{ $json.AIoutput.AI_ML_References.Details.Department }}"
|
||||
},
|
||||
{
|
||||
"key": "Dev status|select",
|
||||
"selectValue": "={{ $json.AIoutput.AI_ML_References.Details.DevelopmentStatus }}"
|
||||
},
|
||||
{
|
||||
"key": "Employees|select",
|
||||
"selectValue": "={{ $json.sfOpp[0].Employees }}"
|
||||
},
|
||||
{
|
||||
"key": "Engagement with n8n|select",
|
||||
"selectValue": "Prospect"
|
||||
},
|
||||
{
|
||||
"key": "Requires agents|checkbox",
|
||||
"checkboxValue": "={{ $json.AIoutput.AI_ML_References.Details.RequiresAgents }}"
|
||||
},
|
||||
{
|
||||
"key": "More info|url",
|
||||
"urlValue": "={{ $json.metaData.url }}"
|
||||
},
|
||||
{
|
||||
"key": "Requires RAG|checkbox",
|
||||
"checkboxValue": "={{ $json.AIoutput.AI_ML_References.Details.RequiresRAG }}"
|
||||
},
|
||||
{
|
||||
"key": "Requires chat|select",
|
||||
"selectValue": "={{ $json.AIoutput.AI_ML_References.Details.RequiresChat }}"
|
||||
},
|
||||
{
|
||||
"key": "Use case|rich_text",
|
||||
"textContent": "={{ $json.AIoutput.AI_ML_References.Context }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"notionApi": {
|
||||
"id": "2B3YIiD4FMsF9Rjn",
|
||||
"name": "Angelbot Notion"
|
||||
}
|
||||
},
|
||||
"retryOnFail": true,
|
||||
"typeVersion": 2.2,
|
||||
"waitBetweenTries": 3000
|
||||
},
|
||||
{
|
||||
"id": "66c252a9-e330-4742-84d1-d17042585f79",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2720,
|
||||
-1040
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 1340,
|
||||
"height": 440,
|
||||
"content": "## AI use Case "
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "caded10f-8662-4a2b-ab47-b1a825c39c4b",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2720,
|
||||
-120
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 1340,
|
||||
"height": 360,
|
||||
"content": "## AI Mentioned on call"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "750c2853-3653-4557-b636-354fd91f846b",
|
||||
"name": "Create Product Feedback Data Object",
|
||||
"type": "n8n-nodes-base.notion",
|
||||
"position": [
|
||||
3440,
|
||||
-480
|
||||
],
|
||||
"parameters": {
|
||||
"title": "={{ $('Execute Workflow Trigger').item.json.metaData.title }}",
|
||||
"options": {
|
||||
"icon": "💬"
|
||||
},
|
||||
"resource": "databasePage",
|
||||
"databaseId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "1375b6e0-c94f-80a8-93c9-c623b76dd14a",
|
||||
"cachedResultUrl": "https://www.notion.so/1375b6e0c94f80a893c9c623b76dd14a",
|
||||
"cachedResultName": "Product Feedback"
|
||||
},
|
||||
"propertiesUi": {
|
||||
"propertyValues": [
|
||||
{
|
||||
"key": "Sentiment|multi_select",
|
||||
"multiSelectValue": "={{ $json.Sentiment }}"
|
||||
},
|
||||
{
|
||||
"key": "Feedback|title",
|
||||
"title": "={{ $json.Feedback }}"
|
||||
},
|
||||
{
|
||||
"key": "Feedback Date|date",
|
||||
"date": "={{ $('Execute Workflow Trigger').item.json.metaData.started }}"
|
||||
},
|
||||
{
|
||||
"key": "Sales Call Summaries|relation",
|
||||
"relationValue": [
|
||||
"={{ $('Execute Workflow Trigger').item.json.notionData[0].id }}"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"notionApi": {
|
||||
"id": "80",
|
||||
"name": "Notion david-internal"
|
||||
}
|
||||
},
|
||||
"retryOnFail": true,
|
||||
"typeVersion": 2.2,
|
||||
"waitBetweenTries": 3000
|
||||
},
|
||||
{
|
||||
"id": "343f536f-2aa3-4fc9-9c75-e288a5019b84",
|
||||
"name": "Check if AI Use Case Data Found",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
2800,
|
||||
-800
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "1a67895e-3ab7-4c93-8e16-202b3882ded5",
|
||||
"operator": {
|
||||
"type": "boolean",
|
||||
"operation": "true",
|
||||
"singleValue": true
|
||||
},
|
||||
"leftValue": "={{ $json.AIoutput.AI_ML_References.Exist }}",
|
||||
"rightValue": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "3d261de2-61fe-40e8-806b-f311b72081f0",
|
||||
"name": "Check if AI Mentioned On Call",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
2860,
|
||||
40
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "1a67895e-3ab7-4c93-8e16-202b3882ded5",
|
||||
"operator": {
|
||||
"type": "boolean",
|
||||
"operation": "true",
|
||||
"singleValue": true
|
||||
},
|
||||
"leftValue": "={{ $json.AIoutput.AI_ML_References.Exist }}",
|
||||
"rightValue": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "e422c25b-05c0-4549-a12b-50b727cbcb83",
|
||||
"name": "Wait for rate limiting - AI Use Case",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
3020,
|
||||
-940
|
||||
],
|
||||
"webhookId": "a26d4c04-4092-45fb-9ba3-d6c70ac0934c",
|
||||
"parameters": {
|
||||
"amount": 3
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "9ceb4ac2-6539-4c19-b207-883d61670c07",
|
||||
"name": "Wait for rate limiting - Product Data",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
3020,
|
||||
-480
|
||||
],
|
||||
"webhookId": "04bed240-5bae-4524-bb6f-011d8a6e1431",
|
||||
"parameters": {
|
||||
"amount": 3
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "61d6864c-a7fa-488e-a252-f60b497de675",
|
||||
"name": "Split Out Product Data",
|
||||
"type": "n8n-nodes-base.splitOut",
|
||||
"position": [
|
||||
3220,
|
||||
-480
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldToSplitOut": "AIoutput.ProductFeedback"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "49bd2056-4eeb-43d7-a210-e4b777fd8535",
|
||||
"name": "Bundle AI Use Case Data to 1 object",
|
||||
"type": "n8n-nodes-base.aggregate",
|
||||
"position": [
|
||||
3540,
|
||||
-940
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"aggregate": "aggregateAllItemData",
|
||||
"destinationFieldName": "tagdata"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "ce6e127d-9ff0-493c-bb47-02c30594f0e2",
|
||||
"name": "Bundle Product Feedback Data to 1 object",
|
||||
"type": "n8n-nodes-base.aggregate",
|
||||
"position": [
|
||||
3660,
|
||||
-480
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"aggregate": "aggregateAllItemData",
|
||||
"destinationFieldName": "tagdata"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "ce06a39c-8066-4a3a-9ef4-b8bf6d14273a",
|
||||
"name": "Merge AI Use Case Thread",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
3860,
|
||||
-780
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "d8fc65ad-2b05-40c1-84c7-7bda819f0f1f",
|
||||
"name": "aiResponse",
|
||||
"type": "object",
|
||||
"value": "={{ $('Execute Workflow Trigger').item.json.aiResponse }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "1d64eff6-442a-4f71-a497-d6261bf4753f",
|
||||
"name": "Merge Product Feedback Thread",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
3880,
|
||||
-320
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "d8fc65ad-2b05-40c1-84c7-7bda819f0f1f",
|
||||
"name": "aiResponse",
|
||||
"type": "object",
|
||||
"value": "={{ $('Execute Workflow Trigger').item.json.aiResponse }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "50116044-d468-4f07-a711-8373c1b26e94",
|
||||
"name": "Update Call with AI Data Summary",
|
||||
"type": "n8n-nodes-base.notion",
|
||||
"position": [
|
||||
3180,
|
||||
-40
|
||||
],
|
||||
"parameters": {
|
||||
"pageId": {
|
||||
"__rl": true,
|
||||
"mode": "id",
|
||||
"value": "={{ $('Execute Workflow Trigger').item.json.notionData[0].id }}"
|
||||
},
|
||||
"options": {},
|
||||
"resource": "databasePage",
|
||||
"operation": "update",
|
||||
"propertiesUi": {
|
||||
"propertyValues": [
|
||||
{
|
||||
"key": "AI Related|checkbox",
|
||||
"checkboxValue": "={{ $json.AIoutput.AI_ML_References.Exist }}"
|
||||
},
|
||||
{
|
||||
"key": "AI Summary|rich_text",
|
||||
"textContent": "={{ $json.AIoutput.AI_ML_References.Context }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"notionApi": {
|
||||
"id": "80",
|
||||
"name": "Notion david-internal"
|
||||
}
|
||||
},
|
||||
"retryOnFail": true,
|
||||
"typeVersion": 2.2,
|
||||
"waitBetweenTries": 3000
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Split Out Product Data": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Create Product Feedback Data Object",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Execute Workflow Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Check if Product Data Found",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Check if AI Use Case Data Found",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Check if AI Mentioned On Call",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Check if Product Data Found": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait for rate limiting - Product Data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Merge Product Feedback Thread",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Create Product Data Object1": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Bundle AI Use Case Data to 1 object",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Check if AI Mentioned On Call": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Update Call with AI Data Summary",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Merge Product Feedback Thread": {
|
||||
"main": [
|
||||
[]
|
||||
]
|
||||
},
|
||||
"Check if AI Use Case Data Found": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait for rate limiting - AI Use Case",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Merge AI Use Case Thread",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Bundle AI Use Case Data to 1 object": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge AI Use Case Thread",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Create Product Feedback Data Object": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Bundle Product Feedback Data to 1 object",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait for rate limiting - AI Use Case": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Create Product Data Object1",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait for rate limiting - Product Data": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Split Out Product Data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Bundle Product Feedback Data to 1 object": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge Product Feedback Thread",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
756
workflows/Wait/0766_Wait_Limit_Update_Webhook.json
Normal file
756
workflows/Wait/0766_Wait_Limit_Update_Webhook.json
Normal file
@@ -0,0 +1,756 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "fddb3e91967f1012c95dd02bf5ad21f279fc44715f47a7a96a33433621caa253",
|
||||
"templateCredsSetupCompleted": true
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "b717d887-4d4b-4f21-97a3-978fcde2c9f6",
|
||||
"name": "slack_action_payload",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
-1020,
|
||||
100
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "raw",
|
||||
"options": {},
|
||||
"jsonOutput": "= {{ $json.body.payload }}"
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "046950ad-a40c-47d9-8dab-406bc6bf6e12",
|
||||
"name": "slack_action_drink_data",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
-800,
|
||||
100
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "3d208143-1b80-4701-bff7-fc1dfbf9b89c",
|
||||
"name": "value",
|
||||
"type": "string",
|
||||
"value": "={{ $json.actions[0].value }}"
|
||||
},
|
||||
{
|
||||
"id": "1600b553-8ef1-44ac-9ae7-d33be8e539e5",
|
||||
"name": "message_text",
|
||||
"type": "string",
|
||||
"value": "={{ $json.message.text }}"
|
||||
},
|
||||
{
|
||||
"id": "5ea5f093-7e36-4de0-aa14-fb2bc0788e84",
|
||||
"name": "shortcut_url",
|
||||
"type": "string",
|
||||
"value": "=shortcuts://run-shortcut?name=darrell_water&input="
|
||||
},
|
||||
{
|
||||
"id": "5d9e4946-10eb-48ed-87d8-978235d44ec1",
|
||||
"name": "shortcut_url_data",
|
||||
"type": "string",
|
||||
"value": "={\"value\":{{ $json.actions[0].value }},\"time\":\"{{ $now.format(\"yyyy-MM-dd\") }}T{{ $now.format(\"HH:mm:ss\") }}\"}"
|
||||
},
|
||||
{
|
||||
"id": "625258d8-55eb-4252-b313-b4954da57de1",
|
||||
"name": "message_ts",
|
||||
"type": "string",
|
||||
"value": "={{ $json.container.message_ts }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "f90ec31c-b63e-470c-84ba-9429539d6bf4",
|
||||
"name": "OpenAI",
|
||||
"type": "@n8n/n8n-nodes-langchain.openAi",
|
||||
"position": [
|
||||
140,
|
||||
-800
|
||||
],
|
||||
"parameters": {
|
||||
"modelId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gpt-4o-mini",
|
||||
"cachedResultName": "GPT-4O-MINI"
|
||||
},
|
||||
"options": {
|
||||
"temperature": 1
|
||||
},
|
||||
"messages": {
|
||||
"values": [
|
||||
{
|
||||
"content": "=Remind to drink water, the last time you drank water was {{ DateTime.fromISO($('combine data').item.json.date +\"T\"+$('combine data').item.json.time).format('yyyy-MM-dd HH:mm:ss') }}\nThe current time is {{ $now.format('yyyy-MM-dd HH:mm:ss') }}\nThe user has drunk water {{ $('combine data').item.json.count_date }} times today"
|
||||
},
|
||||
{
|
||||
"role": "assistant",
|
||||
"content": "You are a gentle and professional Chinese medicine practitioner who provides health advice in a friendly, encouraging tone. Please generate a response in JSON format with the structure {\"message\": \"...\"}, keeping the message brief (<100-200 words), persuasive, reminding me to drink water, clearly specifying intervals (such as 2 hours), and mentioning at least one benefit of drinking water (such as replenishing qi) and one negative effect of dehydration (such as blood stasis), encouraging me to take action to drink water, ending with an action prompt. Start directly without using any form of address. "
|
||||
},
|
||||
{
|
||||
"role": "system",
|
||||
"content": "must return {\\\"message\\\": \\\"...\\\"} and **responding in English**"
|
||||
}
|
||||
]
|
||||
},
|
||||
"jsonOutput": true
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "AE7fbXM0LWEUpaUf",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.8
|
||||
},
|
||||
{
|
||||
"id": "28fe1f82-a8d6-4a9a-9061-ec94a7344fa3",
|
||||
"name": "Schedule Trigger",
|
||||
"type": "n8n-nodes-base.scheduleTrigger",
|
||||
"position": [
|
||||
-1260,
|
||||
-800
|
||||
],
|
||||
"parameters": {
|
||||
"rule": {
|
||||
"interval": [
|
||||
{
|
||||
"field": "cronExpression",
|
||||
"expression": "=0 {{ Math.floor(Math.random() * 11) }} 8-23 * * *"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "ef12fb27-4377-42be-b9bc-bdbaaaa4c754",
|
||||
"name": "Limit",
|
||||
"type": "n8n-nodes-base.limit",
|
||||
"position": [
|
||||
-840,
|
||||
-640
|
||||
],
|
||||
"parameters": {
|
||||
"keep": "lastItems"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "e36862e2-912f-4e41-80b0-6f66cc8ba0ba",
|
||||
"name": "Google Sheets - Get Target",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"position": [
|
||||
-1040,
|
||||
-820
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"returnFirstMatch": false
|
||||
},
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": 2141999480,
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1NRPq87zvNiBGKzVJaT0YYc55qp-6-9kGA4VpqkylpbI/edit#gid=2141999480",
|
||||
"cachedResultName": "setting"
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "1NRPq87zvNiBGKzVJaT0YYc55qp-6-9kGA4VpqkylpbI",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1NRPq87zvNiBGKzVJaT0YYc55qp-6-9kGA4VpqkylpbI/edit?usp=drivesdk",
|
||||
"cachedResultName": "n8n-drink-water"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsOAuth2Api": {
|
||||
"id": "atsKA0m2aQXeL6i6",
|
||||
"name": "Google Sheets account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.5
|
||||
},
|
||||
{
|
||||
"id": "9809c9bd-51ff-4277-9f0f-5e1438c25fe8",
|
||||
"name": "Summarize",
|
||||
"type": "n8n-nodes-base.summarize",
|
||||
"position": [
|
||||
-840,
|
||||
-500
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldsToSummarize": {
|
||||
"values": [
|
||||
{
|
||||
"field": "value",
|
||||
"aggregation": "sum"
|
||||
},
|
||||
{
|
||||
"field": "date"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "ca995a95-9c35-43e4-ab68-0f7aa44f99d1",
|
||||
"name": "combine data",
|
||||
"type": "n8n-nodes-base.merge",
|
||||
"position": [
|
||||
-620,
|
||||
-800
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "combine",
|
||||
"options": {},
|
||||
"combineBy": "combineByPosition",
|
||||
"numberInputs": 3
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "44da169c-a2da-427c-aa46-54082b27e94b",
|
||||
"name": "If",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
-200,
|
||||
-800
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "350fc192-3049-407a-b468-bfdcfbdde966",
|
||||
"operator": {
|
||||
"type": "dateTime",
|
||||
"operation": "after"
|
||||
},
|
||||
"leftValue": "={{ DateTime.fromISO($('combine data').item.json.date +\"T\"+$('combine data').item.json.time).format('yyyy-MM-dd HH:mm:ss') }}",
|
||||
"rightValue": "={{ $now.minus(30, \"minutes\") }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "bc85d85a-cee2-43ab-a434-b26c5cd69122",
|
||||
"name": "Wait",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"notes": "If the user log water recently. \nWait for another 3x minutes",
|
||||
"position": [
|
||||
-20,
|
||||
-640
|
||||
],
|
||||
"webhookId": "fb26360f-6364-4069-a3f1-ed5c37ecccc0",
|
||||
"parameters": {
|
||||
"unit": "minutes",
|
||||
"amount": "={{ Math.floor(Math.random() * 11) + 21 }}"
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "551c217e-9192-486e-ae9f-068bebd0792a",
|
||||
"name": "slack drink webhook",
|
||||
"type": "n8n-nodes-base.webhook",
|
||||
"position": [
|
||||
-1200,
|
||||
100
|
||||
],
|
||||
"webhookId": "f992f346-0076-4a79-a046-5b5c295bf6c2",
|
||||
"parameters": {
|
||||
"path": "f992f346-0076-4a79-a046-5b5c295bf6c2",
|
||||
"options": {},
|
||||
"httpMethod": "POST"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "c000d036-7246-47a5-9001-ffc482c74371",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-1340,
|
||||
-960
|
||||
],
|
||||
"parameters": {
|
||||
"width": 1060,
|
||||
"height": 620,
|
||||
"content": "## Grab recent drink data\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "fd4bdbf4-c2d0-497c-891e-2667a85fa2ad",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-260,
|
||||
-960
|
||||
],
|
||||
"parameters": {
|
||||
"color": 2,
|
||||
"width": 360,
|
||||
"height": 500,
|
||||
"content": "If already drink recently. Delay the notification in 3x minutes randomly\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "cd4b4928-a858-4f12-b294-51ba8a4484da",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
120,
|
||||
-960
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 580,
|
||||
"height": 360,
|
||||
"content": "## Send the slack notification with AI wording. Also have the drink water action buttons"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "cc7c8459-a97d-4ee9-b97c-b4a95afecf5a",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-1340,
|
||||
-320
|
||||
],
|
||||
"parameters": {
|
||||
"color": 3,
|
||||
"width": 1300,
|
||||
"height": 660,
|
||||
"content": "## When User interact the drink button. Record the drink value to sheet and send back the iOS health log water url to start the shortcut\n\n**Note for Shortcut:**\n\nThe shortcul url will be like `shortcuts://run-shortcut?name=darrell_water&input=%7B%22value%22%3A100%2C%22time%22%3A%222025-03-04T16%3A10%3A15%22%7D`\n\nIt's url encoded. The decoded version will be:\n`shortcuts://run-shortcut?name=darrell_water&input={\"value\":100,\"time\":\"2025-03-04T16:10:15\"}`\n\nWe can see it pass the shortcut name and input with json string value. This will be used in iOS shortcut"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "e8e388e0-dddc-4db2-b5fa-acb76d025580",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-1700,
|
||||
-960
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 340,
|
||||
"height": 240,
|
||||
"content": "## Created by darrell_tw_ \n\nAn engineer now focus on AI and Automation\n\n### contact me with following:\n[X](https://x.com/darrell_tw_)\n[Threads](https://www.threads.net/@darrell_tw_)\n[Instagram](https://www.instagram.com/darrell_tw_/)\n[Website](https://www.darrelltw.com/)"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "32b098ea-a72f-4906-9a39-916afcf47dc8",
|
||||
"name": "Slack send drink notification",
|
||||
"type": "n8n-nodes-base.slack",
|
||||
"position": [
|
||||
480,
|
||||
-800
|
||||
],
|
||||
"webhookId": "1ffefb29-4176-4a9c-a8e2-cfc3caf05910",
|
||||
"parameters": {
|
||||
"text": "喝水提醒",
|
||||
"select": "channel",
|
||||
"blocksUi": "={\n\t\"blocks\": [\n\t\t{\n\t\t\t\"type\": \"section\",\n\t\t\t\"text\": {\n\t\t\t\t\"type\": \"mrkdwn\",\n\t\t\t\t\"text\": \"{{ $json.message.content.message ? $json.message.content.message : 'Time to drink!' }}\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"type\": \"section\",\n\t\t\t\"text\": {\n\t\t\t\t\"type\": \"mrkdwn\",\n\t\t\t\t\"text\": \"{{ $('Edit Fields-Set progress').item.json.progress_image }}\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"type\": \"actions\",\n\t\t\t\"elements\": [\n\t\t\t\t{\n\t\t\t\t\t\"type\": \"button\",\n\t\t\t\t\t\"text\": {\n\t\t\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\t\t\"emoji\": true,\n\t\t\t\t\t\t\"text\": \"100\"\n\t\t\t\t\t},\n\t\t\t\t\t\"style\": \"primary\",\n\t\t\t\t\t\"value\": \"100\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"type\": \"button\",\n\t\t\t\t\t\"text\": {\n\t\t\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\t\t\"emoji\": true,\n\t\t\t\t\t\t\"text\": \"150\"\n\t\t\t\t\t},\n\t\t\t\t\t\"style\": \"primary\",\n\t\t\t\t\t\"value\": \"150\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"type\": \"button\",\n\t\t\t\t\t\"text\": {\n\t\t\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\t\t\"emoji\": true,\n\t\t\t\t\t\t\"text\": \"200\"\n\t\t\t\t\t},\n\t\t\t\t\t\"style\": \"primary\",\n\t\t\t\t\t\"value\": \"200\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"type\": \"button\",\n\t\t\t\t\t\"text\": {\n\t\t\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\t\t\"emoji\": true,\n\t\t\t\t\t\t\"text\": \"250\"\n\t\t\t\t\t},\n\t\t\t\t\t\"style\": \"primary\",\n\t\t\t\t\t\"value\": \"250\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"type\": \"button\",\n\t\t\t\t\t\"text\": {\n\t\t\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\t\t\"emoji\": true,\n\t\t\t\t\t\t\"text\": \"300\"\n\t\t\t\t\t},\n\t\t\t\t\t\"style\": \"primary\",\n\t\t\t\t\t\"value\": \"300\"\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t]\n}",
|
||||
"channelId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "C08FW6YKVC1",
|
||||
"cachedResultName": "n8n-drink-water-nofity-demo"
|
||||
},
|
||||
"messageType": "block",
|
||||
"otherOptions": {},
|
||||
"authentication": "oAuth2"
|
||||
},
|
||||
"credentials": {
|
||||
"slackOAuth2Api": {
|
||||
"id": "sD1J9ZLyEhcglrRa",
|
||||
"name": "Slack account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.3
|
||||
},
|
||||
{
|
||||
"id": "8f550d8f-b960-41df-8a3b-2443327d5892",
|
||||
"name": "Send to Slack with confirm",
|
||||
"type": "n8n-nodes-base.slack",
|
||||
"position": [
|
||||
-560,
|
||||
0
|
||||
],
|
||||
"webhookId": "fc8af764-ed01-4ca1-acef-80b8076bb9db",
|
||||
"parameters": {
|
||||
"text": "=Log Successfully",
|
||||
"select": "channel",
|
||||
"blocksUi": "={\n\t\"blocks\": [\n {\n\t\t\t\"type\": \"divider\"\n\t\t},\n\t\t{\n\t\t\t\"type\": \"section\",\n\t\t\t\"text\": {\n\t\t\t\t\"type\": \"mrkdwn\",\n\t\t\t\t\"text\": \"Already log the water\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"type\": \"section\",\n\t\t\t\"text\": {\n\t\t\t\t\"type\": \"mrkdwn\",\n\t\t\t\t\"text\": \"Click me to Shortcut\"\n\t\t\t},\n\t\t\t\"accessory\": {\n\t\t\t\t\"type\": \"button\",\n\t\t\t\t\"text\": {\n\t\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\t\"text\": \"iOS Health\",\n\t\t\t\t\t\"emoji\": true\n\t\t\t\t},\n\t\t\t\t\"value\": \"click\",\n\t\t\t\t\"url\": \"{{ $('slack_action_drink_data').item.json.shortcut_url}}{{ $('slack_action_drink_data').item.json.shortcut_url_data.urlEncode() }}\",\n\t\t\t\t\"action_id\": \"button-action\"\n\t\t\t}\n\t\t}\n\t]\n}",
|
||||
"channelId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "C08FW6YKVC1",
|
||||
"cachedResultName": "n8n-drink-water-nofity-demo"
|
||||
},
|
||||
"messageType": "block",
|
||||
"otherOptions": {
|
||||
"thread_ts": {
|
||||
"replyValues": {
|
||||
"thread_ts": "={{ $('slack_action_drink_data').item.json.message_ts }}"
|
||||
}
|
||||
}
|
||||
},
|
||||
"authentication": "oAuth2"
|
||||
},
|
||||
"credentials": {
|
||||
"slackOAuth2Api": {
|
||||
"id": "sD1J9ZLyEhcglrRa",
|
||||
"name": "Slack account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.3
|
||||
},
|
||||
{
|
||||
"id": "3383574c-7c96-4332-9876-2e47ad21f3de",
|
||||
"name": "Edit Fields-Set progress",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
-420,
|
||||
-800
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "427f1878-99a0-446a-b4a2-2c49c919c809",
|
||||
"name": "progress_percent",
|
||||
"type": "number",
|
||||
"value": "={{ ($json.sum_value/$json.target) }}"
|
||||
},
|
||||
{
|
||||
"id": "3fd85387-6ad3-4f4a-92ee-1db7e84f065b",
|
||||
"name": "progress_image",
|
||||
"type": "string",
|
||||
"value": "={{ (function() { let p = $json.sum_value / $json.target; let n = Math.round(p * 10); n = Math.max(0, Math.min(10, n)); return '💧'.repeat(n) + '⬜'.repeat(10 - n); })() }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "67fa160d-0ea2-48c2-83b5-2f5f1b6a01b5",
|
||||
"name": "Google Sheets - log water value to sheet",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"position": [
|
||||
-560,
|
||||
180
|
||||
],
|
||||
"parameters": {
|
||||
"columns": {
|
||||
"value": {
|
||||
"date": "={{ $now.format('yyyy-MM-dd') }}",
|
||||
"time": "={{ $now.format('HH:mm:ss') }}",
|
||||
"value": "={{ $json.value }}"
|
||||
},
|
||||
"schema": [
|
||||
{
|
||||
"id": "date",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "date",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "time",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "time",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "value",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "value",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
}
|
||||
],
|
||||
"mappingMode": "defineBelow",
|
||||
"matchingColumns": [],
|
||||
"attemptToConvertTypes": false,
|
||||
"convertFieldsToString": false
|
||||
},
|
||||
"options": {},
|
||||
"operation": "append",
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gid=0",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1NRPq87zvNiBGKzVJaT0YYc55qp-6-9kGA4VpqkylpbI/edit#gid=0",
|
||||
"cachedResultName": "Sheet1"
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "1NRPq87zvNiBGKzVJaT0YYc55qp-6-9kGA4VpqkylpbI",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1NRPq87zvNiBGKzVJaT0YYc55qp-6-9kGA4VpqkylpbI/edit?usp=drivesdk",
|
||||
"cachedResultName": "n8n-drink-water"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsOAuth2Api": {
|
||||
"id": "atsKA0m2aQXeL6i6",
|
||||
"name": "Google Sheets account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.5
|
||||
},
|
||||
{
|
||||
"id": "6d336f63-0016-46ae-b71f-2e1dfac06826",
|
||||
"name": "Google Sheets - Get Today Water Log",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"position": [
|
||||
-1040,
|
||||
-640
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"returnFirstMatch": false
|
||||
},
|
||||
"filtersUI": {
|
||||
"values": [
|
||||
{
|
||||
"lookupValue": "={{ $now.format('yyyy-MM-dd') }}",
|
||||
"lookupColumn": "date"
|
||||
}
|
||||
]
|
||||
},
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gid=0",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1NRPq87zvNiBGKzVJaT0YYc55qp-6-9kGA4VpqkylpbI/edit#gid=0",
|
||||
"cachedResultName": "log"
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "1NRPq87zvNiBGKzVJaT0YYc55qp-6-9kGA4VpqkylpbI",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1NRPq87zvNiBGKzVJaT0YYc55qp-6-9kGA4VpqkylpbI/edit?usp=drivesdk",
|
||||
"cachedResultName": "n8n-drink-water"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsOAuth2Api": {
|
||||
"id": "atsKA0m2aQXeL6i6",
|
||||
"name": "Google Sheets account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.5
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"If": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "OpenAI",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "OpenAI",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Limit": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "combine data",
|
||||
"type": "main",
|
||||
"index": 1
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Slack send drink notification",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Summarize": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "combine data",
|
||||
"type": "main",
|
||||
"index": 2
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"combine data": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Edit Fields-Set progress",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Schedule Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Google Sheets - Get Target",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Google Sheets - Get Today Water Log",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"slack drink webhook": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "slack_action_payload",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"slack_action_payload": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "slack_action_drink_data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"slack_action_drink_data": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Google Sheets - log water value to sheet",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Send to Slack with confirm",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Edit Fields-Set progress": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "If",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Google Sheets - Get Target": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "combine data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Send to Slack with confirm": {
|
||||
"main": [
|
||||
[]
|
||||
]
|
||||
},
|
||||
"Google Sheets - Get Today Water Log": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Limit",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Summarize",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
726
workflows/Wait/0820_Wait_Code_Send_Webhook.json
Normal file
726
workflows/Wait/0820_Wait_Code_Send_Webhook.json
Normal file
@@ -0,0 +1,726 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "408f9fb9940c3cb18ffdef0e0150fe342d6e655c3a9fac21f0f644e8bedabcd9",
|
||||
"templateCredsSetupCompleted": true
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "78bb4afe-ccc6-4b5e-90ba-50253f761f14",
|
||||
"name": "Split Attachments",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
-80,
|
||||
140
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "let results = [];\n\nfor (const item of $input.all()) {\n for (key of Object.keys(item.binary)) {\n results.push({\n json: {\n fileName: item.binary[key].fileName\n },\n binary: {\n data: item.binary[key],\n }\n });\n }\n}\n\nreturn results;"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "48a79e8c-27c2-4cdb-a6f7-241158c10962",
|
||||
"name": "Download Attachments",
|
||||
"type": "n8n-nodes-base.microsoftOutlook",
|
||||
"position": [
|
||||
-260,
|
||||
140
|
||||
],
|
||||
"webhookId": "2eb57df9-1579-4af2-a30e-f412b268aba2",
|
||||
"parameters": {
|
||||
"options": {
|
||||
"downloadAttachments": true
|
||||
},
|
||||
"messageId": {
|
||||
"__rl": true,
|
||||
"mode": "id",
|
||||
"value": "={{ $json.id }}"
|
||||
},
|
||||
"operation": "get"
|
||||
},
|
||||
"credentials": {
|
||||
"microsoftOutlookOAuth2Api": {
|
||||
"id": "EWg6sbhPKcM5y3Mr",
|
||||
"name": "Microsoft Outlook account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "7dda1618-dfa7-4325-b5ff-7935602a3043",
|
||||
"name": "Parse Output",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
680,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "raw",
|
||||
"options": {},
|
||||
"jsonOutput": "={{\n{\n invoice: $json.candidates[0].content.parts[0].text.parseJson(),\n email: {\n ...$('Message Ref').first().json,\n body: null\n }\n}\n}}"
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "4d45cf33-5a14-4fe4-9485-38de901113aa",
|
||||
"name": "For Each Message",
|
||||
"type": "n8n-nodes-base.splitInBatches",
|
||||
"position": [
|
||||
-640,
|
||||
140
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "b5c70065-3ed8-4024-9a10-247810c062a4",
|
||||
"name": "Message Ref",
|
||||
"type": "n8n-nodes-base.noOp",
|
||||
"position": [
|
||||
-440,
|
||||
140
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "cafcf919-25c3-46bd-8dd3-8cc0201c93cb",
|
||||
"name": "Message Classifier",
|
||||
"type": "@n8n/n8n-nodes-langchain.textClassifier",
|
||||
"position": [
|
||||
-1160,
|
||||
140
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"fallback": "other"
|
||||
},
|
||||
"inputText": "=from: {{ $json.from.emailAddress.address }} <{{ $json.from.emailAddress.address }}>\nsubject: {{ $json.subject }}\n<message>\n{{ $json.markdown.split('\\n**From**')[0].trim() }}\n</message>",
|
||||
"categories": {
|
||||
"categories": [
|
||||
{
|
||||
"category": "invoice",
|
||||
"description": "Message is an invoice is being issued"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "f97f9b24-828b-4dd8-a0e8-b7ab670403a8",
|
||||
"name": "Extract from File",
|
||||
"type": "n8n-nodes-base.extractFromFile",
|
||||
"position": [
|
||||
-440,
|
||||
340
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"operation": "binaryToPropery"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "99d49549-af7c-46aa-b321-2b9955333812",
|
||||
"name": "Markdown",
|
||||
"type": "n8n-nodes-base.markdown",
|
||||
"position": [
|
||||
-1340,
|
||||
140
|
||||
],
|
||||
"parameters": {
|
||||
"html": "={{ $json.body.content }}",
|
||||
"options": {},
|
||||
"destinationKey": "markdown"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "18455ee7-e87b-433c-baef-28444358e486",
|
||||
"name": "Empty Response",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
680,
|
||||
600
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "raw",
|
||||
"options": {},
|
||||
"jsonOutput": "={{\n{\n invoice: null,\n email: {\n ...$('Message Ref').first().json,\n body: null\n }\n}\n}}"
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "d0b4bab2-5955-4d05-8e4f-4a23fac98c45",
|
||||
"name": "Wait",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
880,
|
||||
600
|
||||
],
|
||||
"webhookId": "6dae0a77-74f4-4d85-a58b-e55c44fbea58",
|
||||
"parameters": {
|
||||
"amount": 1
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "2600020d-9751-44df-abcd-48026c21f592",
|
||||
"name": "Filter Invoices",
|
||||
"type": "n8n-nodes-base.filter",
|
||||
"position": [
|
||||
-80,
|
||||
340
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "5240de52-3b02-4151-8c2b-b0522582700e",
|
||||
"operator": {
|
||||
"type": "boolean",
|
||||
"operation": "true",
|
||||
"singleValue": true
|
||||
},
|
||||
"leftValue": "={{\n(function(output) {\n return output.is_invoice && output.is_issued_to_company;\n})(\n $json.candidates[0].content.parts[0].text.parseJson()\n)\n}}",
|
||||
"rightValue": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2,
|
||||
"alwaysOutputData": true
|
||||
},
|
||||
{
|
||||
"id": "b31d359e-d949-4d56-b32e-c49b35124ff7",
|
||||
"name": "Has Invoice?",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
280,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "57f433cd-5861-434f-80f2-ce28d7c22c26",
|
||||
"operator": {
|
||||
"type": "object",
|
||||
"operation": "notEmpty",
|
||||
"singleValue": true
|
||||
},
|
||||
"leftValue": "={{ $input.first().json }}",
|
||||
"rightValue": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "857e2282-d7f7-438b-be87-a1c36986cfc0",
|
||||
"name": "Schedule Trigger",
|
||||
"type": "n8n-nodes-base.scheduleTrigger",
|
||||
"position": [
|
||||
-1820,
|
||||
120
|
||||
],
|
||||
"parameters": {
|
||||
"rule": {
|
||||
"interval": [
|
||||
{
|
||||
"field": "hours"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "7292a6cc-3b59-4d9b-b87d-3ba55bbc0c67",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-780,
|
||||
-120
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 950,
|
||||
"height": 680,
|
||||
"content": "## 2. Classify If Attachment is Invoice\n[Learn more about the Outlook node](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.microsoftoutlook)\n\nFor each qualifying message, we will need to know which of the attachments contained are actual invoice documents. To do this, we can use Google Gemini's docuemnt understanding capabilities to validate this test. We're using Gemini specifically in this case because at time of writing, Gemini is the only one of the few LLM providers that are currently accepting PDF documents. If you're not using Gemini, you may need to convert the PDF document to an image first - [check out an example of this here](https://n8n.io/workflows/2421-transcribing-bank-statements-to-markdown-using-gemini-vision-ai/)."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "ed35c1dc-625d-4ffb-b186-fad514f6df81",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
200,
|
||||
180
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 850,
|
||||
"height": 580,
|
||||
"content": "## 3. Extract Invoice Details\n[Learn more about the HTTP Request node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.httprequest/)\n\nWith our invoice PDFs ready to go, we'll again use the Gemini API to extract the required details from them. I'm using the HTTP request node because unfortunately, Gemini works best for data extraction when using the API's \"generationConfig\" parameter which isn't supported in n8n's native AI nodes. The output is then merged with the original email to keep the reference between them."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "42a9036c-8040-41a7-9366-658ba3e31c70",
|
||||
"name": "Get Recent Messages",
|
||||
"type": "n8n-nodes-base.microsoftOutlook",
|
||||
"position": [
|
||||
-1540,
|
||||
140
|
||||
],
|
||||
"webhookId": "e3957f65-145c-4c0d-ac66-31342a1bc888",
|
||||
"parameters": {
|
||||
"fields": [
|
||||
"body",
|
||||
"categories",
|
||||
"conversationId",
|
||||
"from",
|
||||
"hasAttachments",
|
||||
"internetMessageId",
|
||||
"sender",
|
||||
"subject",
|
||||
"toRecipients",
|
||||
"receivedDateTime",
|
||||
"webLink"
|
||||
],
|
||||
"output": "fields",
|
||||
"options": {},
|
||||
"filtersUI": {
|
||||
"values": {
|
||||
"filters": {
|
||||
"receivedAfter": "={{ $now.minus({ \"hour\": 1 }).toISO() }}",
|
||||
"hasAttachments": true,
|
||||
"foldersToInclude": [
|
||||
"AAMkAGZkNmEzOTVhLTk3NDQtNGQzNi1hNDY2LTE2MWFlMzUyNTczMgAuAAAAAAA27qsaXv92QoGqcRnqoMpSAQDhSgSaDoa3Sp4gzAabpsdOAAAAAAEMAAA="
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"operation": "getAll",
|
||||
"returnAll": true
|
||||
},
|
||||
"credentials": {
|
||||
"microsoftOutlookOAuth2Api": {
|
||||
"id": "EWg6sbhPKcM5y3Mr",
|
||||
"name": "Microsoft Outlook account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "86838ba4-0d57-4571-983f-c17005f39333",
|
||||
"name": "Model",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
|
||||
"position": [
|
||||
-1080,
|
||||
280
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"modelName": "models/gemini-2.0-flash"
|
||||
},
|
||||
"credentials": {
|
||||
"googlePalmApi": {
|
||||
"id": "dSxo6ns5wn658r8N",
|
||||
"name": "Google Gemini(PaLM) Api account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "8ecb7298-3512-40fe-b2bc-70fb4ed5965d",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-1620,
|
||||
-120
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 810,
|
||||
"height": 560,
|
||||
"content": "## 1. Check for Invoice Emails\n[Learn more about the text classifier node](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.text-classifier/)\n\nThe Outlook node fetches all inbox messages within the last hour and classifies each message prior to downloading the attachments. This is a really good early check to reduce the comsumption of resources. In this use-case, using AI for contextual reasoning regarding the intent of the email can be much more powerful than simple keyword matching. The latter is more prone to matching false positives.\n*Note: we're not using the Outlook Trigger node because it doesn't allow setting for dateTime filters.*"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "a3c28ab3-ecab-46fd-86bb-62bf8a222f37",
|
||||
"name": "Microsoft Excel 365",
|
||||
"type": "n8n-nodes-base.microsoftExcel",
|
||||
"position": [
|
||||
420,
|
||||
-40
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldsUi": {
|
||||
"values": [
|
||||
{}
|
||||
]
|
||||
},
|
||||
"resource": "worksheet",
|
||||
"workbook": {
|
||||
"__rl": true,
|
||||
"mode": "id",
|
||||
"value": "ABCDEFGHIJ"
|
||||
},
|
||||
"operation": "append",
|
||||
"worksheet": {
|
||||
"__rl": true,
|
||||
"mode": "id",
|
||||
"value": "{00000000-0001-0000-0000-000000000000}"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"microsoftExcelOAuth2Api": {
|
||||
"id": "56tIUYYVARBe9gfX",
|
||||
"name": "Microsoft Excel account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "69f2a975-ab91-4cbc-be72-633c4601bf6f",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
200,
|
||||
-220
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 530,
|
||||
"height": 380,
|
||||
"content": "## 4. Upload to Excel Workbook\n[Read more about the Excel node](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.microsoftexcel/)\n\nFinally to capture the data, we can map these to an Excel workflow which can be reviewed by a human before it enters the accounting system."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "68f7c7f3-5ddd-4291-adb3-78f3a297fd8e",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-2120,
|
||||
-660
|
||||
],
|
||||
"parameters": {
|
||||
"width": 480,
|
||||
"height": 960,
|
||||
"content": "## Try it out\n### This n8n template monitors an Outlook mailbox for invoices, automatically parses/extracts data from them and then uploads the output to an Excel Workbook.\n\nOne of my top workflow requests, this template can save in order of 100s of hours of manual labour for you or your finance team.\n\n### How it works\n* A scheduled trigger is set to fetch recent Outlook messages to the Accounts receivable mailbox.\n* Each message is analysed to determine whether or not it from a supplier and is issuing/contains an invoice.\n* For each valid message, the attachments are downloaded and non-invoice documents are filtered out via AI Vision classification.\n* Invoices are then processed through a AI vision model again to extract the details.\n* The extracted data can then be used for reconciliation or otherwise. For this demonstration, we'll just append the row to an Excel sheet for now.\n\n### How to use\n* Ensure your Microsoft365 credential points to the correct mailbox. If a shared folder is used, toggle \"shared folder\" option to \"on\" and for the principal ID, use the email address.\n* If you receive lots of other types of messages such as replies and forwards, you may want to implement additional checks to prevent processing invoices twice. The \"remove duplicates\" node can help with this.\n\n### Need Help?\nJoin the [Discord](https://discord.com/invite/XPKeKXeB7d) or ask in the [Forum](https://community.n8n.io/)!\n\nHappy Hacking!"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "a55323b4-2079-4a7c-8ba2-f20ef0930b55",
|
||||
"name": "Invoice Classifier With Gemini 2.0",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
-260,
|
||||
340
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"jsonBody": "={{\n{\n \"contents\": [\n {\n \"parts\": [\n {\n \"inline_data\": {\n \"mime_type\": $('Split Attachments').item.binary.data.mimeType,\n \"data\": $json.data\n }\n },\n {\n \"text\": `You are an accounts receivable agent who is helping to identify if the document is an invoice, the invoice's supplier is not our company and the invoice is issued to our company.`\n }\n ]\n }\n ],\n \"generationConfig\": {\n \"response_mime_type\": \"application/json\",\n \"response_schema\": {\n \"type\": \"OBJECT\",\n \"required\": [\n \"is_invoice\",\n \"is_issued_to_company\"\n ],\n \"properties\": {\n \"is_invoice\": { \"type\": \"boolean\" },\n \"is_issued_to_company\": { \"type\": \"boolean\" }\n }\n }\n }\n}\n}}",
|
||||
"sendBody": true,
|
||||
"specifyBody": "json",
|
||||
"authentication": "predefinedCredentialType",
|
||||
"nodeCredentialType": "googlePalmApi"
|
||||
},
|
||||
"credentials": {
|
||||
"googlePalmApi": {
|
||||
"id": "dSxo6ns5wn658r8N",
|
||||
"name": "Google Gemini(PaLM) Api account"
|
||||
}
|
||||
},
|
||||
"executeOnce": false,
|
||||
"retryOnFail": false,
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "f696737d-cddf-411b-a427-cc72bd68d248",
|
||||
"name": "File-Based OCR with Gemini 2.0",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"onError": "continueErrorOutput",
|
||||
"position": [
|
||||
480,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"jsonBody": "={{\n{\n \"contents\": [\n {\n \"parts\": [\n {\n \"inline_data\": {\n \"mime_type\": $('Split Attachments').item.binary.data.mimeType,\n \"data\": $('Extract from File').item.json.data\n }\n },\n {\n \"text\": `You are an accounts receivable agent who is helping to extract information from a supplier's invoice issued to our company.`\n }\n ]\n }\n ],\n \"generationConfig\": {\n \"response_mime_type\": \"application/json\",\n \"response_schema\": {\n \"type\": \"OBJECT\",\n \"required\": [\n \"invoice_number\",\n \"invoice_date\",\n \"invoice_amount\",\n \"invoice_due_date\",\n \"supplier_name\",\n \"supplier_address\",\n \"supplier_telephone\",\n \"supplier_email\",\n \"booking_number\",\n \"booking_date\",\n \"booking_name\",\n \"guest_name\",\n \"guest_quantity\",\n \"services\"\n ],\n \"properties\": {\n \"invoice_number\": { \"type\": \"string\" },\n \"invoice_date\": { \"type\": \"string\", \"nullable\": true },\n \"invoice_amount\": { \"type\": \"number\", \"nullable\": true },\n \"invoice_due_date\": { \"type\": \"string\", \"nullable\": true },\n \"recipient_name\": { \"type\": \"string\", \"nullable\": true },\n \"recipient_address\": { \"type\": \"string\", \"nullable\": true },\n \"recipient_company_number\": { \"type\": \"string\", \"nullable\": true },\n \"supplier_name\": { \"type\": \"string\", \"nullable\": true },\n \"supplier_address\": { \"type\": \"string\", \"nullable\": true },\n \"supplier_telephone\": { \"type\": \"string\", \"nullable\": true },\n \"supplier_email\": { \"type\": \"string\", \"nullable\": true },\n \"supplier_company_number\": { \"type\": \"string\", \"nullable\": true },\n \"booking_number\": { \"type\": \"string\", \"nullable\": true },\n \"booking_date\": { \"type\": \"string\", \"nullable\": true },\n \"booking_name\": { \"type\": \"string\", \"nullable\": true },\n \"guest_name\": { \"type\": \"string\", \"nullable\": true },\n \"guest_quantity\": { \"type\": \"number\", \"nullable\": true },\n \"services\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"required\": [],\n \"properties\": {\n \"name\": { \"type\": \"string\" },\n \"date\": { \"type\": \"string\", \"nullable\": true },\n \"description\": { \"type\": \"string\", \"nullable\": true },\n \"quantity\": { \"type\": \"number\", \"nullable\": true },\n \"total\": { \"type\": \"number\" }\n }\n }\n }\n }\n }\n }\n}\n}}",
|
||||
"sendBody": true,
|
||||
"specifyBody": "json",
|
||||
"authentication": "predefinedCredentialType",
|
||||
"nodeCredentialType": "googlePalmApi"
|
||||
},
|
||||
"credentials": {
|
||||
"googlePalmApi": {
|
||||
"id": "dSxo6ns5wn658r8N",
|
||||
"name": "Google Gemini(PaLM) Api account"
|
||||
}
|
||||
},
|
||||
"executeOnce": false,
|
||||
"retryOnFail": false,
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "1d76c0c8-a03b-4f0c-b76d-53369ab5d6e8",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
760,
|
||||
-220
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 400,
|
||||
"height": 140,
|
||||
"content": "### Where Next? It's Up to You!\nThis template is deliberately cut short to demonstrate the build but should be easily modified to upload directly to an accounting system or even extended for other tasks such as invoice reconciliation and more."
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Wait": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "For Each Message",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Message Classifier",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Markdown": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Message Classifier",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Message Ref": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Download Attachments",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Has Invoice?": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "File-Based OCR with Gemini 2.0",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Empty Response",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Parse Output": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Empty Response": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Filter Invoices": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Has Invoice?",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"For Each Message": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Microsoft Excel 365",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Message Ref",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Schedule Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Recent Messages",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Extract from File": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Invoice Classifier With Gemini 2.0",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Split Attachments": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Extract from File",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Message Classifier": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "For Each Message",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[]
|
||||
]
|
||||
},
|
||||
"Get Recent Messages": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Markdown",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Download Attachments": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Split Attachments",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"File-Based OCR with Gemini 2.0": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Parse Output",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Empty Response",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Invoice Classifier With Gemini 2.0": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Filter Invoices",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
1142
workflows/Wait/0826_Wait_Splitout_Automation_Webhook.json
Normal file
1142
workflows/Wait/0826_Wait_Splitout_Automation_Webhook.json
Normal file
File diff suppressed because it is too large
Load Diff
583
workflows/Wait/0831_Wait_Code_Monitor_Webhook.json
Normal file
583
workflows/Wait/0831_Wait_Code_Monitor_Webhook.json
Normal file
@@ -0,0 +1,583 @@
|
||||
{
|
||||
"nodes": [
|
||||
{
|
||||
"id": "ffe22db7-06b9-4efe-ab35-758e420dbe57",
|
||||
"name": "END",
|
||||
"type": "n8n-nodes-base.noOp",
|
||||
"position": [
|
||||
-2880,
|
||||
540
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "9480feb6-e12a-4b59-998e-bdc7b119087a",
|
||||
"name": "Workflow 1",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
-2620,
|
||||
-20
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "54492842-137b-48d6-851a-1ce6cc751612",
|
||||
"name": "Workflow 2",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
-2620,
|
||||
200
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "83bbda2c-112b-4ed0-9ccd-c7a5c840100d",
|
||||
"name": "Workflow 3",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
-2620,
|
||||
420
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "74d889d9-5215-495b-8e60-e1c78d79ae8c",
|
||||
"name": "Incoming Webhook Data",
|
||||
"type": "n8n-nodes-base.webhook",
|
||||
"position": [
|
||||
-4760,
|
||||
220
|
||||
],
|
||||
"webhookId": "94d08900-4816-4c74-962a-aacff5077d5d",
|
||||
"parameters": {
|
||||
"path": "94d08900-4816-4c74-962a-aacff5077d5d",
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "cb5e3e72-6678-4efb-8301-f149014444d2",
|
||||
"name": "Fetch Webhook Data & Declare lockValue",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
-4520,
|
||||
220
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "// Parse the Slack payload\nconst payload = JSON.parse($('Incoming Webhook Data').first().json[\"body\"][\"payload\"]);\n\n// Extract button action details\nconst var1 = payload.var1;\nconst var2 = payload.var2;\nconst var3 = payload.var3;\n\n// Log or return the details\nreturn {\n var1 : var1,\n var2: var2,\n var3: var3,\n lockValue : `${var1}-${var2}-${var3}`\n};"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "e118f753-945b-4951-95da-394732fc636c",
|
||||
"name": "Check Redis Lock",
|
||||
"type": "n8n-nodes-base.redis",
|
||||
"position": [
|
||||
-4220,
|
||||
220
|
||||
],
|
||||
"parameters": {
|
||||
"key": "xyz-lock",
|
||||
"options": {},
|
||||
"operation": "get",
|
||||
"propertyName": "Element"
|
||||
},
|
||||
"credentials": {
|
||||
"redis": {
|
||||
"id": "o0RxOKCtencIaop1",
|
||||
"name": "Geoffrey Redis"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "c1488bae-cb82-48ce-94cd-5359d7d10b04",
|
||||
"name": "Acquire Redis Lock",
|
||||
"type": "n8n-nodes-base.redis",
|
||||
"position": [
|
||||
-3520,
|
||||
200
|
||||
],
|
||||
"parameters": {
|
||||
"key": "xyz-lock",
|
||||
"ttl": 180,
|
||||
"value": "={{ $('Fetch Webhook Data & Declare lockValue').item.json.lookupVariable }}",
|
||||
"expire": true,
|
||||
"operation": "set"
|
||||
},
|
||||
"credentials": {
|
||||
"redis": {
|
||||
"id": "o0RxOKCtencIaop1",
|
||||
"name": "Geoffrey Redis"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "0fe5e1d8-f1e4-40e0-a3a4-4c00bbf2b50b",
|
||||
"name": "redisLock existence boolean",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
-4020,
|
||||
220
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "905501b4-718c-44fb-b2a5-a8eaf8605511",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "empty",
|
||||
"singleValue": true
|
||||
},
|
||||
"leftValue": "={{ $json.Element }}",
|
||||
"rightValue": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "3c66fab5-2c2a-4bba-8ba1-ed85e57cd42d",
|
||||
"name": "redisLock acquired booleans",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
-3800,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "6c071e68-a15a-4da8-b962-fe173b1eb145",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "notExists",
|
||||
"singleValue": true
|
||||
},
|
||||
"leftValue": "={{ $json.Element }}",
|
||||
"rightValue": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "787d1c86-1a66-40ea-b8b6-29f50a48737c",
|
||||
"name": "Poll for lock",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
-3520,
|
||||
420
|
||||
],
|
||||
"webhookId": "615b4c18-2c29-418c-a2bf-302ff24e5c65",
|
||||
"parameters": {},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "f5b88169-e97b-4359-890e-969dbdc6d829",
|
||||
"name": "duplicateWebhook boolean",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
-3200,
|
||||
420
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "08500e34-cc7f-4005-87bd-f7250dc076fe",
|
||||
"operator": {
|
||||
"name": "filter.operator.equals",
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $('Fetch Webhook Data & Declare lockValue').item.json.lookupVariable }}",
|
||||
"rightValue": "={{ $input.first().json.Element }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "db4e4149-7970-402c-a3d7-2cfe47b6a5b7",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-4760,
|
||||
-120
|
||||
],
|
||||
"parameters": {
|
||||
"color": 6,
|
||||
"width": 480,
|
||||
"height": 220,
|
||||
"content": "#### 🔒 This workflow demonstrates Redis-based locking to prevent concurrent execution of workflows.\n\n**Steps:**\n+ Try to acquire a lock via Redis\n+ If successful, execute workflow\n+ If duplicate request; ignore request\n+ Release the lock after completion"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "879b7ab5-402b-4ea8-977b-64d29cd9bb39",
|
||||
"name": "Discard Redis Lock",
|
||||
"type": "n8n-nodes-base.redis",
|
||||
"position": [
|
||||
-2320,
|
||||
200
|
||||
],
|
||||
"parameters": {
|
||||
"key": "n8n-rca-lock",
|
||||
"operation": "delete"
|
||||
},
|
||||
"credentials": {
|
||||
"redis": {
|
||||
"id": "o0RxOKCtencIaop1",
|
||||
"name": "Geoffrey Redis"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "494030d6-e731-4f4f-9193-7b46f2d470d0",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-3580,
|
||||
80
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 220,
|
||||
"height": 80,
|
||||
"content": "Attempts to acquire a lock using Redis by setting a key with expiration."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "a643b45e-2067-4c42-8c1c-365b3fea911a",
|
||||
"name": "Workflow Switch",
|
||||
"type": "n8n-nodes-base.switch",
|
||||
"position": [
|
||||
-2880,
|
||||
200
|
||||
],
|
||||
"parameters": {
|
||||
"rules": {
|
||||
"values": [
|
||||
{
|
||||
"outputKey": "1",
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "2761039b-e76c-4606-9aaf-48a569942ab7",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "",
|
||||
"rightValue": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
"renameOutput": true
|
||||
},
|
||||
{
|
||||
"outputKey": "2",
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "ef07c62f-bd3f-4f54-85b9-9dbf64915f2c",
|
||||
"operator": {
|
||||
"name": "filter.operator.equals",
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "",
|
||||
"rightValue": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
"renameOutput": true
|
||||
},
|
||||
{
|
||||
"outputKey": "3",
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "2dfc15de-bf33-4c25-932f-dae16758e2e6",
|
||||
"operator": {
|
||||
"name": "filter.operator.equals",
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "",
|
||||
"rightValue": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
"renameOutput": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 3.2
|
||||
},
|
||||
{
|
||||
"id": "5531d4c3-158c-4f98-b6fa-9ef9a85eef71",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-2940,
|
||||
680
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"height": 80,
|
||||
"content": "Skips execution when duplicate request is received."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "0a159f03-3ecc-4010-ab63-cc24df90df31",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-2320,
|
||||
100
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"height": 80,
|
||||
"content": "Deletes the Redis lock key to release the lock."
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"connections": {
|
||||
"Workflow 1": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Discard Redis Lock",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Workflow 2": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Discard Redis Lock",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Workflow 3": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Discard Redis Lock",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Poll for lock": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "duplicateWebhook boolean",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Workflow Switch": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Workflow 1",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Workflow 2",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Workflow 3",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Check Redis Lock": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "redisLock existence boolean",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Acquire Redis Lock": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Workflow Switch",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Incoming Webhook Data": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Fetch Webhook Data & Declare lockValue",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"duplicateWebhook boolean": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "END",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Check Redis Lock",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"redisLock acquired booleans": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Acquire Redis Lock",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Poll for lock",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"redisLock existence boolean": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Acquire Redis Lock",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "redisLock acquired booleans",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Fetch Webhook Data & Declare lockValue": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Check Redis Lock",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
753
workflows/Wait/0836_Wait_Code_Create_Scheduled.json
Normal file
753
workflows/Wait/0836_Wait_Code_Create_Scheduled.json
Normal file
@@ -0,0 +1,753 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "27b4a6a8d6961d7c3fc76935cbb847cc60b06fde7d9f2077fe73e1a9efa7a010"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "cfb41f0c-9dd3-46c8-aae1-2f6caaf1a1e3",
|
||||
"name": "Schedule Trigger",
|
||||
"type": "n8n-nodes-base.scheduleTrigger",
|
||||
"position": [
|
||||
-2440,
|
||||
220
|
||||
],
|
||||
"parameters": {
|
||||
"rule": {
|
||||
"interval": [
|
||||
{}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "07d78dcb-1a2d-45f4-b595-734e301c25ee",
|
||||
"name": "Edit Fields",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"onError": "continueRegularOutput",
|
||||
"position": [
|
||||
-1440,
|
||||
220
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "f3530e8d-0694-4b73-bd9f-f4ce763c059b",
|
||||
"name": "id",
|
||||
"type": "string",
|
||||
"value": "={{ $json.link }}"
|
||||
},
|
||||
{
|
||||
"id": "e829100d-7301-4ee3-9e8e-782b476b98c3",
|
||||
"name": "title",
|
||||
"type": "string",
|
||||
"value": "={{ $json.title }}"
|
||||
},
|
||||
{
|
||||
"id": "637000e7-a294-4656-b3b2-36d3ff42ce8d",
|
||||
"name": "output",
|
||||
"type": "string",
|
||||
"value": "={{ $json.content }}"
|
||||
},
|
||||
{
|
||||
"id": "6626b922-4ac9-4a04-a55d-d02cebeee7f2",
|
||||
"name": "pubDate",
|
||||
"type": "string",
|
||||
"value": "={{ $json.pubDate }}"
|
||||
},
|
||||
{
|
||||
"id": "134b45eb-3048-40c8-9c1c-2b9d45959de4",
|
||||
"name": "tags",
|
||||
"type": "string",
|
||||
"value": "={{ $json.categories }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "7c7d0915-dfc2-4041-ae0f-6af6e008eab1",
|
||||
"name": "Code",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"onError": "continueRegularOutput",
|
||||
"position": [
|
||||
-1180,
|
||||
220
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "const now = new Date();\nconst setdays = 3; // Edit the Days, if you need the News from more the 3 Days\nconst cutoffDate = new Date();\ncutoffDate.setDate(now.getDate() - setdays); \nreturn $input.all().filter(item => {\n const pubDate = new Date(Date.parse(item.json.pubDate));\n return !isNaN(pubDate.getTime()) && pubDate >= cutoffDate;\n});"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "d5ac9f75-60a4-4bde-b4c1-ccb2f940d5f8",
|
||||
"name": "Markdown",
|
||||
"type": "n8n-nodes-base.markdown",
|
||||
"onError": "continueRegularOutput",
|
||||
"position": [
|
||||
-900,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"html": "={{ $json.output }}",
|
||||
"options": {},
|
||||
"destinationKey": "output"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "e7ec484d-f667-4123-acb4-60e0cbdb62e0",
|
||||
"name": "Loop Over Items",
|
||||
"type": "n8n-nodes-base.splitInBatches",
|
||||
"onError": "continueRegularOutput",
|
||||
"position": [
|
||||
-920,
|
||||
220
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "0065ce76-9840-48b2-860c-c4a2928479a8",
|
||||
"name": "Wait",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"onError": "continueRegularOutput",
|
||||
"position": [
|
||||
-900,
|
||||
880
|
||||
],
|
||||
"webhookId": "85941a4b-202f-4368-a331-dbfdf018326b",
|
||||
"parameters": {
|
||||
"amount": 2.5
|
||||
},
|
||||
"typeVersion": 1.1,
|
||||
"alwaysOutputData": true
|
||||
},
|
||||
{
|
||||
"id": "06edc173-5352-4810-bc9f-cc24cc263ee6",
|
||||
"name": "Loop Over Items1",
|
||||
"type": "n8n-nodes-base.splitInBatches",
|
||||
"onError": "continueRegularOutput",
|
||||
"position": [
|
||||
-1820,
|
||||
220
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "069bc633-9273-471c-a2c7-1559c62eb370",
|
||||
"name": "RSS",
|
||||
"type": "n8n-nodes-base.rssFeedRead",
|
||||
"onError": "continueRegularOutput",
|
||||
"position": [
|
||||
-1800,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"url": "={{ $json.Links }}",
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "6575e570-0a1b-49db-b0b1-938dd2732dd6",
|
||||
"name": "Code1",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"onError": "continueRegularOutput",
|
||||
"position": [
|
||||
-100,
|
||||
220
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "const now = new Date();\nconst setdays = 3; // Edit the Days, if you need the News from more the 3 Days\nconst cutoffDate = new Date();\ncutoffDate.setDate(now.getDate() - setdays); \n\nconst oldRows = $input.all().filter(item => {\n const pubDate = new Date(item.json.pubDate);\n return pubDate < cutoffDate;\n});\noldRows.sort((a, b) => b.json.row_number - a.json.row_number);\nreturn oldRows.map(item => ({ json: { rowNumber: item.json.row_number } }));\n"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "d68a46d3-58ea-4cc7-a1f7-ef014f600908",
|
||||
"name": "Loop Over Items2",
|
||||
"type": "n8n-nodes-base.splitInBatches",
|
||||
"onError": "continueRegularOutput",
|
||||
"position": [
|
||||
240,
|
||||
220
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 3,
|
||||
"alwaysOutputData": true
|
||||
},
|
||||
{
|
||||
"id": "ed132a67-67fa-42e1-9f73-0b645005a332",
|
||||
"name": "Wait1",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"onError": "continueRegularOutput",
|
||||
"position": [
|
||||
260,
|
||||
680
|
||||
],
|
||||
"webhookId": "69b1b17d-85d1-4681-8887-85e2644f4752",
|
||||
"parameters": {
|
||||
"amount": 25
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "61d7aae8-2d3f-4425-9e4b-247aa5fd2cea",
|
||||
"name": "Wait2",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"onError": "continueRegularOutput",
|
||||
"position": [
|
||||
-660,
|
||||
220
|
||||
],
|
||||
"webhookId": "69b1b17d-85d1-4681-8887-85e2644f4752",
|
||||
"parameters": {
|
||||
"unit": "minutes",
|
||||
"amount": 1
|
||||
},
|
||||
"executeOnce": true,
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "8cf26c46-a2e1-4ea0-8c8b-a948bb77e286",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-2480,
|
||||
-120
|
||||
],
|
||||
"parameters": {
|
||||
"width": 500,
|
||||
"height": 1340,
|
||||
"content": "## Timer starts the Update every 24 hours and Read the Links out of a Google Sheets File (RSS-Links)"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "b7eb361f-7ff1-436c-82d1-0c348e652a26",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-1960,
|
||||
-120
|
||||
],
|
||||
"parameters": {
|
||||
"width": 440,
|
||||
"height": 1340,
|
||||
"content": "## Each individual link is scanned and retrieved"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "2037525d-afbe-4aba-9dd4-b00df8560706",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-1500,
|
||||
-120
|
||||
],
|
||||
"parameters": {
|
||||
"width": 480,
|
||||
"height": 1340,
|
||||
"content": "## Everything older than 3 days is removed"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "0e7eff1a-10e0-4f7a-8e2d-4046248878bc",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-1000,
|
||||
-120
|
||||
],
|
||||
"parameters": {
|
||||
"width": 300,
|
||||
"height": 1340,
|
||||
"content": "## Each entry is saved individually with a waiting time in the Google Sheets file (RSS-Feeds), the waiting time is necessary as Google Sheets would otherwise receive too many hits and block access!"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "8cd16f67-ebc8-4009-81a1-54da9aac47ef",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-680,
|
||||
-120
|
||||
],
|
||||
"parameters": {
|
||||
"width": 420,
|
||||
"height": 1340,
|
||||
"content": "## Reading the saved entries in the Google Sheets file (RSS-Feeds)"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "ed9d8dc7-e8e7-4441-a43c-8c86a7e0be52",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-240,
|
||||
-120
|
||||
],
|
||||
"parameters": {
|
||||
"width": 360,
|
||||
"height": 1340,
|
||||
"content": "## Everything that is younger than 3 days will be removed, as we only want to delete the older entries!"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "fbb3391c-bac7-4e2c-8231-a8f48d70c21c",
|
||||
"name": "Sticky Note6",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
140,
|
||||
-120
|
||||
],
|
||||
"parameters": {
|
||||
"width": 360,
|
||||
"height": 1340,
|
||||
"content": "## All entries older than 3 days are deleted here, again with a timer to prevent a Google API block! (RSS-Feeds)"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "3a800065-971b-4f37-bc3f-9c8ade78217e",
|
||||
"name": "Delete News",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"onError": "continueRegularOutput",
|
||||
"position": [
|
||||
260,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"operation": "delete",
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gid=0",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1iFwBIRDfUEZFACoL4bXfeT4Ot2i5vWfEew69fYRfz0A/edit#gid=0",
|
||||
"cachedResultName": "Tabellenblatt1"
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "1iFwBIRDfUEZFACoL4bXfeT4Ot2i5vWfEew69fYRfz0A",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1iFwBIRDfUEZFACoL4bXfeT4Ot2i5vWfEew69fYRfz0A/edit?usp=drivesdk",
|
||||
"cachedResultName": "RSS-Feeds"
|
||||
},
|
||||
"startIndex": "={{ $json.rowNumber }}"
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsOAuth2Api": {
|
||||
"id": "pmmVpF25NsJia8r0",
|
||||
"name": "Google Sheets account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.5,
|
||||
"alwaysOutputData": false
|
||||
},
|
||||
{
|
||||
"id": "31d13f16-c9ad-4b08-b129-bb5ed51d4657",
|
||||
"name": "Read News",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"onError": "continueErrorOutput",
|
||||
"position": [
|
||||
-440,
|
||||
220
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"outputFormatting": {
|
||||
"values": {
|
||||
"date": "FORMATTED_STRING",
|
||||
"general": "FORMATTED_VALUE"
|
||||
}
|
||||
},
|
||||
"dataLocationOnSheet": {
|
||||
"values": {
|
||||
"rangeDefinition": "detectAutomatically"
|
||||
}
|
||||
}
|
||||
},
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gid=0",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1iFwBIRDfUEZFACoL4bXfeT4Ot2i5vWfEew69fYRfz0A/edit#gid=0",
|
||||
"cachedResultName": "Tabellenblatt1"
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "1iFwBIRDfUEZFACoL4bXfeT4Ot2i5vWfEew69fYRfz0A",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1iFwBIRDfUEZFACoL4bXfeT4Ot2i5vWfEew69fYRfz0A/edit?usp=drivesdk",
|
||||
"cachedResultName": "RSS-Feeds"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsOAuth2Api": {
|
||||
"id": "pmmVpF25NsJia8r0",
|
||||
"name": "Google Sheets account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.5,
|
||||
"alwaysOutputData": false
|
||||
},
|
||||
{
|
||||
"id": "13bb0584-96bb-4184-9698-509b34f6be25",
|
||||
"name": "Save News",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"onError": "continueRegularOutput",
|
||||
"position": [
|
||||
-900,
|
||||
680
|
||||
],
|
||||
"parameters": {
|
||||
"columns": {
|
||||
"value": {
|
||||
"id": "={{ $json.id }}",
|
||||
"title": "={{ $json.title }}",
|
||||
"output": "={{ $json.output }}",
|
||||
"pubDate": "={{ $json.pubDate }}",
|
||||
"Category": "={{ $json.tags }}"
|
||||
},
|
||||
"schema": [
|
||||
{
|
||||
"id": "id",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "id",
|
||||
"defaultMatch": true,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "title",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "title",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "output",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "output",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "pubDate",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "pubDate",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Category",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "Category",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
}
|
||||
],
|
||||
"mappingMode": "defineBelow",
|
||||
"matchingColumns": [
|
||||
"id"
|
||||
],
|
||||
"attemptToConvertTypes": false,
|
||||
"convertFieldsToString": false
|
||||
},
|
||||
"options": {
|
||||
"useAppend": true
|
||||
},
|
||||
"operation": "appendOrUpdate",
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gid=0",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1iFwBIRDfUEZFACoL4bXfeT4Ot2i5vWfEew69fYRfz0A/edit#gid=0",
|
||||
"cachedResultName": "Tabellenblatt1"
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "1iFwBIRDfUEZFACoL4bXfeT4Ot2i5vWfEew69fYRfz0A",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1iFwBIRDfUEZFACoL4bXfeT4Ot2i5vWfEew69fYRfz0A/edit?usp=drivesdk",
|
||||
"cachedResultName": "RSS-Feeds"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsOAuth2Api": {
|
||||
"id": "pmmVpF25NsJia8r0",
|
||||
"name": "Google Sheets account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.5,
|
||||
"alwaysOutputData": true
|
||||
},
|
||||
{
|
||||
"id": "d3224fc9-d7a7-47c1-9db2-8615499e1124",
|
||||
"name": "Read Links",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"onError": "continueErrorOutput",
|
||||
"position": [
|
||||
-2200,
|
||||
220
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"outputFormatting": {
|
||||
"values": {
|
||||
"date": "FORMATTED_STRING",
|
||||
"general": "FORMATTED_VALUE"
|
||||
}
|
||||
},
|
||||
"dataLocationOnSheet": {
|
||||
"values": {
|
||||
"rangeDefinition": "detectAutomatically"
|
||||
}
|
||||
}
|
||||
},
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gid=0",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/12p3M0Umh_Xlpm4Y04IpOFqE8YOJcCd97wPJNv80X8u4/edit#gid=0",
|
||||
"cachedResultName": "Tabellenblatt1"
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "12p3M0Umh_Xlpm4Y04IpOFqE8YOJcCd97wPJNv80X8u4",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/12p3M0Umh_Xlpm4Y04IpOFqE8YOJcCd97wPJNv80X8u4/edit?usp=drivesdk",
|
||||
"cachedResultName": "RSS-Links"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsOAuth2Api": {
|
||||
"id": "pmmVpF25NsJia8r0",
|
||||
"name": "Google Sheets account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.5
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"RSS": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop Over Items1",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Code": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop Over Items",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop Over Items",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Code1": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop Over Items2",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait1": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop Over Items2",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait2": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Read News",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Markdown": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Save News",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Read News": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Code1",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[]
|
||||
]
|
||||
},
|
||||
"Save News": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Read Links": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop Over Items1",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[]
|
||||
]
|
||||
},
|
||||
"Delete News": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait1",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Edit Fields": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Code",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Loop Over Items": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait2",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Markdown",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Loop Over Items1": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Edit Fields",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "RSS",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Loop Over Items2": {
|
||||
"main": [
|
||||
[],
|
||||
[
|
||||
{
|
||||
"node": "Delete News",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Schedule Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Read Links",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
915
workflows/Wait/0858_Wait_Schedule_Update_Scheduled.json
Normal file
915
workflows/Wait/0858_Wait_Schedule_Update_Scheduled.json
Normal file
@@ -0,0 +1,915 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "5aaf4236c70e34e423fbdb2c7b754d19253a933bb1476d548f75848a01e473cf",
|
||||
"templateId": "3561"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "f3641141-a880-4400-bad7-909558848c20",
|
||||
"name": "When clicking \"Test workflow\"",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
2260,
|
||||
820
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "7b1ddbd1-f918-4ef9-a05e-2c02e6de75df",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
380,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 1289,
|
||||
"height": 2698,
|
||||
"content": "=======================================\n WORKFLOW DETAILS & GUIDELINES\n=======================================\nName:\n LinkedIn Enrichment & Ice Breaker Generator\n\nPurpose:\n Automate the process of enriching LinkedIn profiles using Bright Data,\n generate personalized ice breakers with an LLM, and update Google Sheets.\n\nTools Needed:\n - n8n Nodes:\n • Manual Trigger or Schedule Trigger\n • Set\n • SplitInBatches\n • HTTP Request\n • If\n • Wait\n • Google Sheets\n • LangChain LLM (Claude via Anthropic)\n - External Services:\n • Bright Data (Dataset API)\n • Anthropic Claude (Haiku)\n • Google Sheets API\n\nAPI Keys & Authentication Required:\n • Bright Data API Key\n → Used in HTTP Request headers as:\n `Authorization: Bearer YOUR_BRIGHTDATA_API_KEY`\n • Google Sheets OAuth2 Credentials\n → Connects n8n to your Google account for reading/writing to Sheets.\n • Anthropic API Key\n → Used for generating ice breakers via Claude models.\n → Must be set in the Anthropic credential section in n8n.\n\nGeneral Guidelines:\n • Use descriptive and consistent naming for all nodes.\n • Add retry limits to polling loops to avoid infinite cycles.\n • Ensure each LinkedIn URL maps to a unique `row_number`.\n • Obfuscate any keys before sharing the workflow publicly.\n\nThings to be Aware Of:\n • Bright Data may require some delay (via Wait node) before snapshot is ready.\n • Retry logic should not exceed API rate limits.\n • If snapshot fails or times out, ensure fallback logging is in place.\n • Claude model IDs and prompt formats may change — validate before updates.\n\nAdditional Notes:\n • Make a copy of the Google Sheet template before use.\n • Replace placeholders in `Authorization` headers and credentials section.\n • Use test data first to avoid exhausting API quotas during setup.\n\n=======================================\n\nThis workflow allows you to enrich LinkedIn profiles using Bright Data,\ngenerate AI-written ice breakers with Claude, and log everything into Google Sheets.\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "215cd515-149b-41b1-adbe-fa203cbc9b5d",
|
||||
"name": "Get rows to enrich",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"position": [
|
||||
2540,
|
||||
820
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gid=0",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1g8Dum0tfZ1nQdd3b6sLhZX2aMu6FzwoVvD0EAXMpPx8/edit#gid=0",
|
||||
"cachedResultName": "input"
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "1g8Dum0tfZ1nQdd3b6sLhZX2aMu6FzwoVvD0EAXMpPx8",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1g8Dum0tfZ1nQdd3b6sLhZX2aMu6FzwoVvD0EAXMpPx8/edit?usp=drivesdk",
|
||||
"cachedResultName": "NoFluff-N8N-Sheet-Template-Hyper Personalization"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsOAuth2Api": {
|
||||
"id": "gq9mwBL5a74eYjfd",
|
||||
"name": "Google Sheets account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.3
|
||||
},
|
||||
{
|
||||
"id": "f140e851-6409-4169-b5af-28ab6f16d99c",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
3220,
|
||||
680
|
||||
],
|
||||
"parameters": {
|
||||
"width": 1420,
|
||||
"height": 460,
|
||||
"content": "Personal Data"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "8878ae56-0772-498a-b153-b628222f6688",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2220,
|
||||
680
|
||||
],
|
||||
"parameters": {
|
||||
"width": 266.12865147126786,
|
||||
"height": 627.5654650079845,
|
||||
"content": "Run the workflow manually or activate it to run on schedule\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "df3f1f83-1092-40fe-bc5d-301e9a118601",
|
||||
"name": "Sticky Note7",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2500,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"width": 194.6864335083109,
|
||||
"height": 525.6560478822986,
|
||||
"content": "In this workflow, I use Google Sheets to store the results. \n\nYou can use my template to get started faster:\n\n1. [Click on this link to get the template](https://docs.google.com/spreadsheets/d/1_jbr5zBllTy_pGbogfGSvyv1_0a77I8tU-Ai7BjTAw4/edit?usp=sharing)\n2. Make a copy of the Sheets\n3. Add the URL to this node and the node **\"Google Sheets - Update Row with data\"**\n\n\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "1c294196-206a-4add-8d47-8558ba99515d",
|
||||
"name": "Sticky Note9",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
380,
|
||||
240
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 1280,
|
||||
"height": 320,
|
||||
"content": "=======================================\n WORKFLOW ASSISTANCE\n=======================================\nFor any questions or support, please contact:\n Yaron@nofluff.online\n\nExplore more tips and tutorials here:\n - YouTube: https://www.youtube.com/@YaronBeen/videos\n - LinkedIn: https://www.linkedin.com/in/yaronbeen/\n=======================================\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "3491b2bf-83a0-4966-9ff5-9c7c55f316e0",
|
||||
"name": "Anthropic Chat Model",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
|
||||
"position": [
|
||||
4800,
|
||||
1240
|
||||
],
|
||||
"parameters": {
|
||||
"model": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "claude-3-5-haiku-20241022",
|
||||
"cachedResultName": "Claude 3.5 Haiku"
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 1.3
|
||||
},
|
||||
{
|
||||
"id": "66b79bfc-3447-4b42-9617-308e490079bb",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
4720,
|
||||
880
|
||||
],
|
||||
"parameters": {
|
||||
"width": 1120,
|
||||
"height": 580,
|
||||
"content": "ICE BREAKER\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "7557e53f-b898-4831-a52e-be9eeb0f4964",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2940,
|
||||
560
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 2980,
|
||||
"height": 1000,
|
||||
"content": "LOOP"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "0119ee4c-bc70-4aef-84e0-881cdea57aa9",
|
||||
"name": "Basic LLM Chain- Ice Breaker",
|
||||
"type": "@n8n/n8n-nodes-langchain.chainLlm",
|
||||
"position": [
|
||||
4920,
|
||||
900
|
||||
],
|
||||
"parameters": {
|
||||
"text": "=Help me with writing a witty Ice breaker to try to persuade {{ $json.name }} from{{ $('BrightData_Get_Linkedin').item.json.city }}. His About section in his Linkedin profile says:{{ $('BrightData_Get_Linkedin').item.json.about }}. \nHe also had a recent post about:{{ $('BrightData_Get_Linkedin').item.json.posts[0].title }}\n\nMake it 4 lines maximum. Focus more on his recent post, not the about. Just to make it feel personalized yet respectful and not creepy.\n\nWRITE THE ICE BREAKER Straight away. Dont write \"here's a draft\" or any other text before your actual response.",
|
||||
"promptType": "define"
|
||||
},
|
||||
"retryOnFail": true,
|
||||
"typeVersion": 1.6
|
||||
},
|
||||
{
|
||||
"id": "e3965132-4d21-4252-ab26-525128d79d29",
|
||||
"name": "BrightData_Get_Linkedin",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
4120,
|
||||
740
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://api.brightdata.com/datasets/v3/snapshot/{{ $json.snapshot_id }}",
|
||||
"options": {},
|
||||
"sendQuery": true,
|
||||
"sendHeaders": true,
|
||||
"queryParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "format",
|
||||
"value": "json"
|
||||
}
|
||||
]
|
||||
},
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"value": "Bearer <BRIGHT_DATA_API_KEY>"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "0e55b67e-7ddb-4431-8250-59be59c6c557",
|
||||
"name": "Adjust_input_for_loop",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
2740,
|
||||
820
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "fcc97354-b9f6-4459-a004-46e87902c77c",
|
||||
"name": "person_input",
|
||||
"type": "string",
|
||||
"value": "={{ $json.Linkedin_URL_Person }}"
|
||||
},
|
||||
{
|
||||
"id": "e5415c49-5204-45b1-a0e9-814157127b12",
|
||||
"name": "row_number",
|
||||
"type": "number",
|
||||
"value": "={{ $json.row_number }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.3
|
||||
},
|
||||
{
|
||||
"id": "0cc85426-64f7-41f8-bd9a-215aaaad3299",
|
||||
"name": "HTTP_Request_Post_Request_BrightData",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
3300,
|
||||
740
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://api.brightdata.com/datasets/v3/trigger",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"jsonBody": "=[\n {\n \"url\": \"{{ $json.person_input }}\"\n }\n]",
|
||||
"sendBody": true,
|
||||
"sendQuery": true,
|
||||
"sendHeaders": true,
|
||||
"specifyBody": "json",
|
||||
"queryParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "dataset_id",
|
||||
"value": "gd_l1viktl72bvl7bjuj0"
|
||||
},
|
||||
{
|
||||
"name": "include_errors",
|
||||
"value": "true"
|
||||
}
|
||||
]
|
||||
},
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"value": "Bearer <BRIGHT_DATA_API_KEY>"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "851b23e0-6a1b-4a47-95e9-d2f769243a57",
|
||||
"name": "Wait_For_API_Call_Results",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
3500,
|
||||
740
|
||||
],
|
||||
"webhookId": "8005a2b3-2195-479e-badb-d90e4240e699",
|
||||
"parameters": {
|
||||
"amount": 10
|
||||
},
|
||||
"executeOnce": false,
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "294a7c03-2268-4d7a-b4e7-a52faa78d929",
|
||||
"name": "API_Call_Snapshot_Progress",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
3660,
|
||||
840
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://api.brightdata.com/datasets/v3/progress/{{ $json.snapshot_id }}",
|
||||
"options": {},
|
||||
"sendHeaders": true,
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"value": "Bearer <Bright_Data_API_KEY>"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "d568403b-c323-4798-b7e5-e4a89dfe7830",
|
||||
"name": "IF-Checking_Status_API_Call",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
3860,
|
||||
900
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "7932282b-71bb-4bbb-ab73-4978e554de7e",
|
||||
"operator": {
|
||||
"name": "filter.operator.equals",
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json.status }}",
|
||||
"rightValue": "running"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "b44b5f4b-8aef-4ea3-bbd7-1e72548dda64",
|
||||
"name": "Google Sheets - Update Row with data From API",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"position": [
|
||||
4500,
|
||||
940
|
||||
],
|
||||
"parameters": {
|
||||
"columns": {
|
||||
"value": {
|
||||
"city": "={{ $json.city }}",
|
||||
"name": "={{ $json.name }}",
|
||||
"about": "={{ $json.about }}",
|
||||
"row_number": "={{ $('Loop Over Items- All Prospects').item.json.row_number }}",
|
||||
"country_code": "={{ $json.country_code }}",
|
||||
"Linkedin_URL_Person": "={{ $json.input.url }}",
|
||||
"current_company.name": "={{ $json.current_company.name }}"
|
||||
},
|
||||
"schema": [
|
||||
{
|
||||
"id": "Linkedin_URL_Person",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Linkedin_URL_Person",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "name",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "name",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "city",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "city",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "country_code",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "country_code",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Position",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Position",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "about",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "about",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "current_company.name",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "current_company.name",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Post 1",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Post 1",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Post 2",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "Post 2",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Post 3",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "Post 3",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Ice Breaker 1",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "Ice Breaker 1",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Ice Breaker 2",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "Ice Breaker 2",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "row_number",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"readOnly": true,
|
||||
"required": false,
|
||||
"displayName": "row_number",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
}
|
||||
],
|
||||
"mappingMode": "defineBelow",
|
||||
"matchingColumns": [
|
||||
"row_number"
|
||||
],
|
||||
"attemptToConvertTypes": false,
|
||||
"convertFieldsToString": false
|
||||
},
|
||||
"options": {},
|
||||
"operation": "update",
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gid=0",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1_jbr5zBllTy_pGbogfGSvyv1_0a77I8tU-Ai7BjTAw4/edit#gid=0",
|
||||
"cachedResultName": "input"
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "1_jbr5zBllTy_pGbogfGSvyv1_0a77I8tU-Ai7BjTAw4",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1_jbr5zBllTy_pGbogfGSvyv1_0a77I8tU-Ai7BjTAw4/edit?usp=drivesdk",
|
||||
"cachedResultName": "NoFluff-N8N-Sheet-Template"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.3,
|
||||
"alwaysOutputData": true
|
||||
},
|
||||
{
|
||||
"id": "081f9e1d-6325-4645-bb0c-368a8ac3be99",
|
||||
"name": "Google Sheets - Update Row with Ice Breaker",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"position": [
|
||||
5400,
|
||||
1340
|
||||
],
|
||||
"parameters": {
|
||||
"columns": {
|
||||
"value": {
|
||||
"row_number": "={{ $('Loop Over Items- All Prospects').item.json.row_number }}",
|
||||
"Ice Breaker 1": "={{ $json.text }}"
|
||||
},
|
||||
"schema": [
|
||||
{
|
||||
"id": "Linkedin_URL_Person",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "Linkedin_URL_Person",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "name",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "name",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "city",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "city",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "country_code",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "country_code",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Position",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "Position",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "about",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "about",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "current_company.name",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "current_company.name",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Post 1",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "Post 1",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Post 2",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "Post 2",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Post 3",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "Post 3",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Ice Breaker 1",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Ice Breaker 1",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Ice Breaker 2",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "Ice Breaker 2",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "row_number",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"readOnly": true,
|
||||
"required": false,
|
||||
"displayName": "row_number",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
}
|
||||
],
|
||||
"mappingMode": "defineBelow",
|
||||
"matchingColumns": [
|
||||
"row_number"
|
||||
],
|
||||
"attemptToConvertTypes": false,
|
||||
"convertFieldsToString": false
|
||||
},
|
||||
"options": {},
|
||||
"operation": "update",
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gid=0",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1_jbr5zBllTy_pGbogfGSvyv1_0a77I8tU-Ai7BjTAw4/edit#gid=0",
|
||||
"cachedResultName": "input"
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "1_jbr5zBllTy_pGbogfGSvyv1_0a77I8tU-Ai7BjTAw4",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1_jbr5zBllTy_pGbogfGSvyv1_0a77I8tU-Ai7BjTAw4/edit?usp=drivesdk",
|
||||
"cachedResultName": "NoFluff-N8N-Sheet-Template"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.3,
|
||||
"alwaysOutputData": true
|
||||
},
|
||||
{
|
||||
"id": "7709c869-5283-4760-b929-fde27167f040",
|
||||
"name": "Run Workflow on a certain Schedule",
|
||||
"type": "n8n-nodes-base.scheduleTrigger",
|
||||
"position": [
|
||||
2260,
|
||||
1000
|
||||
],
|
||||
"parameters": {
|
||||
"rule": {
|
||||
"interval": [
|
||||
{}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "84e08531-b548-43f2-a17a-b2809f833d32",
|
||||
"name": "Loop Over Items- All Prospects",
|
||||
"type": "n8n-nodes-base.splitInBatches",
|
||||
"position": [
|
||||
2980,
|
||||
720
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 3
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Get rows to enrich": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Adjust_input_for_loop",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Anthropic Chat Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Basic LLM Chain- Ice Breaker",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Adjust_input_for_loop": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop Over Items- All Prospects",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"BrightData_Get_Linkedin": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Google Sheets - Update Row with data From API",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait_For_API_Call_Results": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "API_Call_Snapshot_Progress",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"API_Call_Snapshot_Progress": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "IF-Checking_Status_API_Call",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"IF-Checking_Status_API_Call": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait_For_API_Call_Results",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "BrightData_Get_Linkedin",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Basic LLM Chain- Ice Breaker": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Google Sheets - Update Row with Ice Breaker",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When clicking \"Test workflow\"": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get rows to enrich",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Loop Over Items- All Prospects": {
|
||||
"main": [
|
||||
[],
|
||||
[
|
||||
{
|
||||
"node": "HTTP_Request_Post_Request_BrightData",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Run Workflow on a certain Schedule": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get rows to enrich",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"HTTP_Request_Post_Request_BrightData": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait_For_API_Call_Results",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Google Sheets - Update Row with Ice Breaker": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop Over Items- All Prospects",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Google Sheets - Update Row with data From API": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Basic LLM Chain- Ice Breaker",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
813
workflows/Wait/0862_Wait_Code_Create_Webhook.json
Normal file
813
workflows/Wait/0862_Wait_Code_Create_Webhook.json
Normal file
@@ -0,0 +1,813 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "1eadd5bc7c3d70c587c28f782511fd898c6bf6d97963d92e836019d2039d1c79"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "bee233ee-7212-4fbd-b151-0bb49919ca42",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
0,
|
||||
280
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 1289,
|
||||
"height": 4398,
|
||||
"content": "LinkedIn Job Data Scraper to Google Sheets\nScrape live job posts from LinkedIn via Bright Data, clean them, and send to Google Sheets. Use for:\n✅ Job Hunting — fresh, filtered roles\n✅ Sales Prospecting — find companies hiring (aka growing)\n⚙️ What's Used\nn8n Nodes: Form → HTTP Request → Wait → If → Code → Google Sheets\nExternal Tools:\n\nBright Data – Dataset API\nGoogle Sheets – Template Copy\n\n🔑 Setup – Credentials Needed\n\nBright Data API Key → Add to HTTP headers as: Authorization: Bearer YOUR_KEY\nGoogle Sheets OAuth2 → Connect account in n8n\n\n📝 Input Form – Fields\nUsed to define what job data to scrape.\nFieldDescriptionExampleLocationCity/regionNew York, BerlinKeywordRole to searchCMO, Data AnalystCountry2-letter ISO codeUS, UK, DETime RangeHow recent the jobs should be\"Past 24 hours\" or \"Last 7 days\" (recommended)Job TypeFull-time / Part-time / Contract(Optional)ExperienceEntry, Mid, Senior(Optional)RemoteFilter by remote-friendly roles(Optional)CompanyFilter by specific employer(Optional)\n🚀 Workflow Steps\n\nUser fills input form\nTrigger snapshot via Bright Data Dataset API\nWait node + polling checks when data is ready (~1–3 mins)\nCleanup step:\n\nFlattens nested fields (job_poster, base_salary, etc.)\nRemoves HTML from job descriptions\n\n\nSend to Google Sheet\n\nSheet is pre-linked, 1 job per row\nExample columns: job_title, company_name, location, salary_min, apply_link, job_description_plain\n\n\nYou use the data\n\nJob seekers → Apply fast\nSalespeople → Spot buyers & offer help\n\n\n\n💡 Pro Tips\n\nUse \"Past 24 hours\" or \"Last 7 days\" for fresher results\nLeave filters empty if unsure — Bright Data will return broader results\nUse cleaned data for:\n\nCold email personalization\nLinkedIn outreach\nBuilding ICP-based lead lists\n\n\n\n🧪 Example API Body\njson[ \n { \n \"location\": \"New York\", \n \"keyword\": \"Marketing Manager\", \n \"country\": \"US\", \n \"time_range\": \"Past 24 hours\", \n \"job_type\": \"Part-time\", \n \"experience_level\": \"\", \n \"remote\": \"\", \n \"company\": \"\" \n } \n]\n📄 Template & Resources\n\n📋 Google Sheet Template (Make a Copy)\n📘 Bright Data API Reference\n\n🛠️ Customize It\n\nAdd filters to HTTP Body (remote, experience_level, etc.)\nChange polling interval if Bright Data is slow\nAdd custom logic to score/prioritize listings\nSend filtered lists to CRM, Slack, etc.\n\nThis gives you a live stream of hiring signals — whether you're finding a job or pitching a service. One form. One click. Fully automated."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "0fa9d0fe-b3ba-48be-99b9-2bc3aeb18b43",
|
||||
"name": "Sticky Note9",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
0,
|
||||
-60
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 1300,
|
||||
"height": 320,
|
||||
"content": "=======================================\n WORKFLOW ASSISTANCE\n=======================================\nFor any questions or support, please contact:\n Yaron@nofluff.online\n\nExplore more tips and tutorials here:\n - YouTube: https://www.youtube.com/@YaronBeen/videos\n - LinkedIn: https://www.linkedin.com/in/yaronbeen/\n=======================================\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "33cb416e-a7ff-4b55-9701-9b9e95d76f12",
|
||||
"name": "Snapshot Progress",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
2840,
|
||||
360
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://api.brightdata.com/datasets/v3/progress/{{ $('HTTP Request- Post API call to Bright Data').item.json.snapshot_id }}",
|
||||
"options": {},
|
||||
"sendHeaders": true,
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"value": "Bearer <YOUR_BRIGHT_DATA_API_KEY>"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "6b8c9405-8f8c-4a24-85ca-343d33e06141",
|
||||
"name": "Sticky Note10",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
3680,
|
||||
140
|
||||
],
|
||||
"parameters": {
|
||||
"width": 195,
|
||||
"height": 646,
|
||||
"content": "In this workflow, I use Google Sheets to store the results. \n\nYou can use my template to get started faster:\n\n1. [Click on this link to get the template](https://docs.google.com/spreadsheets/d/1_jbr5zBllTy_pGbogfGSvyv1_0a77I8tU-Ai7BjTAw4/edit?usp=sharing)\n2. Make a copy of the Sheets\n3. Add the URL to this node \n\n\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "3d3cd92a-9ea7-4a4f-a9b5-aae689f719e5",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1320,
|
||||
-60
|
||||
],
|
||||
"parameters": {
|
||||
"width": 480,
|
||||
"height": 2240,
|
||||
"content": "# 🔍 LinkedIn Jobs API – Parameter Guide\n\nUse this object to query LinkedIn job listings. \nEach field lets you filter results based on different criteria.\n\n```json\n{\n \"location\": \"{{ $json.Location }}\",\n \"keyword\": \"{{ $json.Keyword }}\",\n \"country\": \"{{ $json.Country }}\",\n \"time_range\": \"Past 24 hours\",\n \"job_type\": \"Part-time\",\n \"experience_level\": \"\",\n \"remote\": \"\",\n \"company\": \"\"\n}\n```\n\n## 🧾 Field Explanations & Valid Options\n\n### 🗺️ location\nCity or region where the job is located.\nUse a city or region name.\n✅ Example: \"Berlin\", \"New York\"\n\n### 🧠 keyword\nJob title or search keywords.\nUse terms like role names or skills.\n✅ Example: \"Data Scientist\", \"Growth Marketing\"\n\n### 🌍 country\nCountry code in ISO 3166-1 alpha-2 format.\n✅ Example: \"US\", \"DE\", \"IL\"\n\n### ⏱️ time_range\nPosting date filter.\nLimits results based on how recently jobs were posted.\nAccepted values:\n- Any Time\n- Past 24 hours\n- Past Week\n- Past Month\n✅ Example: \"Past Week\"\n\n### 💼 job_type\nType of employment.\nUse a single value or comma-separated list.\nAccepted values:\n- Full-time\n- Part-time\n- Contract\n- Temporary\n- Internship\n- Volunteer\n- Other\n✅ Example: \"Full-time,Contract\"\n\n### 🎯 experience_level\nSeniority level of the job.\nAccepted values:\n- Internship\n- Entry level\n- Associate\n- Mid-Senior level\n- Director\n- Executive\n✅ Example: \"Mid-Senior level\"\n\n### 🌐 remote\nWorkplace type.\nAccepted values:\n- Remote\n- On-site\n- Hybrid\n- (leave blank for no preference)\n✅ Example: \"Remote\"\n\n### 🏢 company\nFilter by company name.\nOptional. Use plain text.\n✅ Example: \"Google\", \"Spotify\"\n\n## ✅ Full Example\n\n```json\n{\n \"location\": \"New York\",\n \"keyword\": \"UI Designer\",\n \"country\": \"US\",\n \"time_range\": \"Past Week\",\n \"job_type\": \"Full-time,Contract\",\n \"experience_level\": \"Mid-Senior level\",\n \"remote\": \"Hybrid\",\n \"company\": \"Spotify\"\n}\n```\n\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "1d7a7bb0-1531-4516-9373-5e85a090b143",
|
||||
"name": "On form submission - Discover Jobs",
|
||||
"type": "n8n-nodes-base.formTrigger",
|
||||
"position": [
|
||||
1700,
|
||||
580
|
||||
],
|
||||
"webhookId": "8d0269c7-d1fc-45a1-a411-19634a1e0b82",
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"formTitle": "Linkedin High Intent Prospects And Job Post Hunt",
|
||||
"formFields": {
|
||||
"values": [
|
||||
{
|
||||
"fieldLabel": "Job Location",
|
||||
"placeholder": "example: new york",
|
||||
"requiredField": true
|
||||
},
|
||||
{
|
||||
"fieldLabel": "Keyword",
|
||||
"placeholder": "example: CMO, AI architect",
|
||||
"requiredField": true
|
||||
},
|
||||
{
|
||||
"fieldLabel": "Country (2 letters)",
|
||||
"placeholder": "example: US,UK,IL",
|
||||
"requiredField": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"formDescription": "This form lets you customize your job search / prospecting by choosing:\n\nLocation (city or region)\n\nJob title or keywords\n\nCountry code\n\nFilters like posting date, job type, experience level, and remote options\n\nYou can also optionally narrow results by company name.\n\n🧠 Tip: Leave fields blank if you want broader results."
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "aea569df-eedd-441f-aba5-c3c26a50fa87",
|
||||
"name": "HTTP Request- Post API call to Bright Data",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
2260,
|
||||
620
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://api.brightdata.com/datasets/v3/trigger",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"jsonBody": "=[\n {\n \"location\": \"{{ $json['Job Location'] }}\",\n \"keyword\": \"{{ $json.Keyword }}\",\n \"country\": \"{{ $json['Country (2 letters)'] }}\",\n \"time_range\": \"Past 24 hours\",\n \"job_type\": \"Part-time\",\n \"experience_level\": \"\",\n \"remote\": \"\",\n \"company\": \"\"\n }\n] ",
|
||||
"sendBody": true,
|
||||
"sendQuery": true,
|
||||
"sendHeaders": true,
|
||||
"specifyBody": "json",
|
||||
"queryParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "dataset_id",
|
||||
"value": "gd_lpfll7v5hcqtkxl6l"
|
||||
},
|
||||
{
|
||||
"name": "endpoint",
|
||||
"value": "https://yaron-nofluff.app.n8n.cloud/webhook-test/8c42463d-a631-4a17-a084-4bcbbb3bfc68"
|
||||
},
|
||||
{
|
||||
"name": "notify",
|
||||
"value": "https://yaron-nofluff.app.n8n.cloud/webhook-test/8c42463d-a631-4a17-a084-4bcbbb3bfc68"
|
||||
},
|
||||
{
|
||||
"name": "format",
|
||||
"value": "json"
|
||||
},
|
||||
{
|
||||
"name": "uncompressed_webhook",
|
||||
"value": "true"
|
||||
},
|
||||
{
|
||||
"name": "type",
|
||||
"value": "discover_new"
|
||||
},
|
||||
{
|
||||
"name": "discover_by",
|
||||
"value": "=keyword"
|
||||
}
|
||||
]
|
||||
},
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"value": "Bearer <YOUR_BRIGHT_DATA_API_KEY>"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "8837f055-7243-44b6-87a2-e679d75839d0",
|
||||
"name": "Wait - Polling Bright Data",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
2600,
|
||||
360
|
||||
],
|
||||
"webhookId": "8005a2b3-2195-479e-badb-d90e4240e699",
|
||||
"parameters": {
|
||||
"unit": "minutes"
|
||||
},
|
||||
"executeOnce": false,
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "1f0ebefa-42a1-450c-b30a-64edabdaedaf",
|
||||
"name": "If - Checking status of Snapshot - if data is ready or not",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
3040,
|
||||
360
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "7932282b-71bb-4bbb-ab73-4978e554de7e",
|
||||
"operator": {
|
||||
"name": "filter.operator.equals",
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json.status }}",
|
||||
"rightValue": "running"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "e17b4da0-3f9c-45d5-acdf-ab634acfef97",
|
||||
"name": "HTTP Request - Getting data from Bright Data",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
3320,
|
||||
380
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://api.brightdata.com/datasets/v3/snapshot/{{ $json.snapshot_id }}",
|
||||
"options": {},
|
||||
"sendQuery": true,
|
||||
"sendHeaders": true,
|
||||
"queryParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "format",
|
||||
"value": "json"
|
||||
}
|
||||
]
|
||||
},
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"value": "Bearer <YOUR_BRIGHT_DATA_API_KEY>"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "b5bd6a55-f80d-46f9-a59a-beff28de9da7",
|
||||
"name": "Code - Cleaning Up",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
3600,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "// Helper function to strip HTML tags\nfunction stripHtml(html) {\n return html\n .replace(/<[^>]+>/g, '') // remove all HTML tags\n .replace(/ /g, ' ') // decode HTML entities\n .replace(/&[a-z]+;/g, '') // remove other HTML entities\n .replace(/\\s+/g, ' ') // normalize whitespace\n .trim();\n}\n\nreturn items.map(item => {\n const data = item.json;\n\n // Flatten job_poster\n if (data.job_poster) {\n data.job_poster_name = data.job_poster.name || '';\n data.job_poster_title = data.job_poster.title || '';\n data.job_poster_url = data.job_poster.url || '';\n delete data.job_poster;\n }\n\n // Flatten base_salary\n if (data.base_salary) {\n data.salary_min = data.base_salary.min_amount || '';\n data.salary_max = data.base_salary.max_amount || '';\n data.salary_currency = data.base_salary.currency || '';\n data.salary_period = data.base_salary.payment_period || '';\n delete data.base_salary;\n }\n\n // Clean up job description HTML\n if (data.job_description_formatted) {\n data.job_description_plain = stripHtml(data.job_description_formatted);\n }\n\n return { json: data };\n});\n"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "70f4a4a0-b9ce-4b7a-b232-86014a7f8a3f",
|
||||
"name": "Google Sheets - Adding All Job Posts",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"position": [
|
||||
3940,
|
||||
440
|
||||
],
|
||||
"parameters": {
|
||||
"columns": {
|
||||
"value": {
|
||||
"country_code": "={{ $json.country_code }}"
|
||||
},
|
||||
"schema": [
|
||||
{
|
||||
"id": "url",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "url",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "job_posting_id",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "job_posting_id",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "job_title",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "job_title",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "company_name",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "company_name",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "job_location",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "job_location",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "job_description_plain",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "job_description_plain",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "job_poster_name",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "job_poster_name",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "job_poster_title",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "job_poster_title",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "job_poster_url",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "job_poster_url",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "salary_min",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "salary_min",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "salary_max",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "salary_max",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "salary_currency",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "salary_currency",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "salary_period",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "salary_period",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "application_availability",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "application_availability",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "job_posted_date",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "job_posted_date",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "company_logo",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "company_logo",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "country_code",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "country_code",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "timestamp",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "timestamp",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "company_id",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "company_id",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "job_summary",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "job_summary",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "company_url",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "company_url",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "job_posted_time",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "job_posted_time",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "job_num_applicants",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "job_num_applicants",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "discovery_input",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "discovery_input",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "apply_link",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "apply_link",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "title_id",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "title_id",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "job_description_formatted",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "job_description_formatted",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "input",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "input",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "job_seniority_level",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "job_seniority_level",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "job_function",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "job_function",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "job_employment_type",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "job_employment_type",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "job_industries",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "job_industries",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "job_base_pay_range",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "job_base_pay_range",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
}
|
||||
],
|
||||
"mappingMode": "autoMapInputData",
|
||||
"matchingColumns": [
|
||||
"row_number"
|
||||
],
|
||||
"attemptToConvertTypes": false,
|
||||
"convertFieldsToString": false
|
||||
},
|
||||
"options": {
|
||||
"handlingExtraData": "insertInNewColumn"
|
||||
},
|
||||
"operation": "append",
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gid=0",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1_jbr5zBllTy_pGbogfGSvyv1_0a77I8tU-Ai7BjTAw4/edit#gid=0",
|
||||
"cachedResultName": "input"
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "1_jbr5zBllTy_pGbogfGSvyv1_0a77I8tU-Ai7BjTAw4",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1_jbr5zBllTy_pGbogfGSvyv1_0a77I8tU-Ai7BjTAw4/edit?usp=drivesdk",
|
||||
"cachedResultName": "NoFluff-N8N-Sheet-Template-Job Scraping WIth Bright Data"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsOAuth2Api": {
|
||||
"id": "4RJOMlGAcB9ZoYfm",
|
||||
"name": "Google Sheets account 2"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.3,
|
||||
"alwaysOutputData": true
|
||||
},
|
||||
{
|
||||
"id": "297d778f-afa5-4d2d-baea-3b1fb199f77c",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1940,
|
||||
-40
|
||||
],
|
||||
"parameters": {
|
||||
"width": 300,
|
||||
"height": 880,
|
||||
"content": "🧠 Bright Data Trigger – Customize Your Job Query\n\nThis HTTP Request sends a POST call to Bright Data to start a new dataset snapshot based on your filters.\n\n👋 If you don’t want to use the Form Trigger,\nyou can directly adjust the filters here in this node.\n\nYou can customize:\n\n\"location\" → city, region, or keyword (e.g. \"New York\", \"Remote\")\n\n\"keyword\" → job title or role (e.g. \"CMO\", \"AI Engineer\")\n\n\"country\" → 2-letter country code (e.g. \"US\", \"UK\")\n\n\"time_range\" → \"Past 24 hours\", \"Last 7 days\", etc.\n\n\"job_type\", \"experience_level\", \"remote\", \"company\" → optional filters\n\n📌 Tip:\nUse \"Past 24 hours\" or \"Last 7 days\" for the freshest results."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "54303791-b269-4930-85b5-33e50ae08f33",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2320,
|
||||
220
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 940,
|
||||
"height": 360,
|
||||
"content": "Bright Data Getting Jobs\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "cccb03cb-0432-43ff-9c3a-233de510a775",
|
||||
"name": "Edit Fields",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
1920,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "12067869-0249-4cd2-b9e2-8e4055a0d917",
|
||||
"name": "",
|
||||
"type": "string",
|
||||
"value": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Edit Fields": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "HTTP Request- Post API call to Bright Data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Snapshot Progress": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "If - Checking status of Snapshot - if data is ready or not",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Code - Cleaning Up": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Google Sheets - Adding All Job Posts",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait - Polling Bright Data": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Snapshot Progress",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"On form submission - Discover Jobs": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Edit Fields",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"HTTP Request- Post API call to Bright Data": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait - Polling Bright Data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"HTTP Request - Getting data from Bright Data": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Code - Cleaning Up",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"If - Checking status of Snapshot - if data is ready or not": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait - Polling Bright Data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "HTTP Request - Getting data from Bright Data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
1070
workflows/Wait/0866_Wait_Splitout_Create_Webhook.json
Normal file
1070
workflows/Wait/0866_Wait_Splitout_Create_Webhook.json
Normal file
File diff suppressed because it is too large
Load Diff
1381
workflows/Wait/0867_Wait_Splitout_Create_Webhook.json
Normal file
1381
workflows/Wait/0867_Wait_Splitout_Create_Webhook.json
Normal file
File diff suppressed because it is too large
Load Diff
952
workflows/Wait/0868_Wait_Filter_Create_Webhook.json
Normal file
952
workflows/Wait/0868_Wait_Filter_Create_Webhook.json
Normal file
@@ -0,0 +1,952 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "1eadd5bc7c3d70c587c28f782511fd898c6bf6d97963d92e836019d2039d1c79"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "578905af-9355-47ba-97c0-05bc9e69876c",
|
||||
"name": "Sticky Note9",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-420,
|
||||
-120
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 1280,
|
||||
"height": 320,
|
||||
"content": "=======================================\n WORKFLOW ASSISTANCE\n=======================================\nFor any questions or support, please contact:\n Yaron@nofluff.online\n\nExplore more tips and tutorials here:\n - YouTube: https://www.youtube.com/@YaronBeen/videos\n - LinkedIn: https://www.linkedin.com/in/yaronbeen/\n=======================================\nBright Data Docs: https://docs.brightdata.com/introduction\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "b54542b4-0f68-4076-9ae9-817c1aee0c14",
|
||||
"name": "Snapshot Progress",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
2180,
|
||||
300
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://api.brightdata.com/datasets/v3/progress/{{ $('HTTP Request- Post API call to Bright Data').item.json.snapshot_id }}",
|
||||
"options": {},
|
||||
"sendHeaders": true,
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"value": "Bearer <YOUR_BRIGHT_DATA_API_KEY>"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "8ffd290a-1cc7-4cc9-86a3-397108f8584b",
|
||||
"name": "Sticky Note10",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
3240,
|
||||
80
|
||||
],
|
||||
"parameters": {
|
||||
"width": 195,
|
||||
"height": 646,
|
||||
"content": "In this workflow, I use Google Sheets to store the results. \n\nYou can use my template to get started faster:\n\n1. [Click on this link to get the template](https://docs.google.com/spreadsheets/d/1Zi758ds2_aWzvbDYqwuGiQNaurLgs-leS9wjLWWlbUU/edit?usp=sharing)\n2. Make a copy of the Sheets\n3. Add the URL to this node \n\n\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "d564fdb9-06f6-42c4-96d6-9512fa7217ca",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1200,
|
||||
380
|
||||
],
|
||||
"parameters": {
|
||||
"width": 220,
|
||||
"height": 440,
|
||||
"content": "Add your competitors Trustpilot Link here.\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "8873b276-72db-42cd-8860-1327714d701b",
|
||||
"name": "On form submission - Discover Jobs",
|
||||
"type": "n8n-nodes-base.formTrigger",
|
||||
"position": [
|
||||
1260,
|
||||
520
|
||||
],
|
||||
"webhookId": "8d0269c7-d1fc-45a1-a411-19634a1e0b82",
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"formTitle": "Please Paste The URL of Your Trustpilot competitor",
|
||||
"formFields": {
|
||||
"values": [
|
||||
{
|
||||
"fieldLabel": "Competitor TRUSTPILOT URL (include https://www.trsutpilot.com/review/",
|
||||
"placeholder": "https://www.trustpilot.com/review/www.nike.com",
|
||||
"requiredField": true
|
||||
},
|
||||
{
|
||||
"fieldType": "dropdown",
|
||||
"fieldLabel": "Please select the time frame of reviews you'd like. If it's a big brand go with 30 days",
|
||||
"fieldOptions": {
|
||||
"values": [
|
||||
{
|
||||
"option": "Last 30 days"
|
||||
},
|
||||
{
|
||||
"option": "Last 3 months"
|
||||
},
|
||||
{
|
||||
"option": "Last 6 months"
|
||||
},
|
||||
{
|
||||
"option": "Last 12 months"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "2396fb4f-e3da-4712-b6b5-93704fa69672",
|
||||
"name": "HTTP Request- Post API call to Bright Data",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1560,
|
||||
380
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://api.brightdata.com/datasets/v3/trigger",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"jsonBody": "=[\n {\n \"url\": \"{{ $json['Competitor TRUSTPILOT URL (include https://www.trsutpilot.com/review/'] }}\",\n \"date_posted\": \"{{ $json['Please select the time frame of reviews you\\'d like. If it\\'s a big brand go with 30 days'] }}\"\n }\n]",
|
||||
"sendBody": true,
|
||||
"sendQuery": true,
|
||||
"sendHeaders": true,
|
||||
"specifyBody": "json",
|
||||
"queryParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "dataset_id",
|
||||
"value": "gd_lm5zmhwd2sni130p"
|
||||
},
|
||||
{
|
||||
"name": "include_errors",
|
||||
"value": "true"
|
||||
}
|
||||
]
|
||||
},
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"value": "Bearer <YOUR_BRIGHT_DATA_API_KEY>"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "c90b0e25-c009-4321-9c38-7ce895d78f3f",
|
||||
"name": "Wait - Polling Bright Data",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
1940,
|
||||
300
|
||||
],
|
||||
"webhookId": "8005a2b3-2195-479e-badb-d90e4240e699",
|
||||
"parameters": {
|
||||
"unit": "minutes",
|
||||
"amount": 2
|
||||
},
|
||||
"executeOnce": false,
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "ac37b7e2-04fb-4f04-96f6-c77aa282dc8e",
|
||||
"name": "If - Checking status of Snapshot - if data is ready or not",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
2380,
|
||||
300
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "7932282b-71bb-4bbb-ab73-4978e554de7e",
|
||||
"operator": {
|
||||
"name": "filter.operator.equals",
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json.status }}",
|
||||
"rightValue": "running"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "572ea592-8fd6-4be5-825b-83b0a7a11556",
|
||||
"name": "HTTP Request - Getting data from Bright Data",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
2660,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://api.brightdata.com/datasets/v3/snapshot/{{ $('HTTP Request- Post API call to Bright Data').item.json.snapshot_id }}",
|
||||
"options": {},
|
||||
"sendQuery": true,
|
||||
"sendHeaders": true,
|
||||
"queryParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "format",
|
||||
"value": "json"
|
||||
}
|
||||
]
|
||||
},
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"value": "Bearer <YOUR_BRIGHT_DATA_API_KEY>"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "03c7bfd2-6ae5-4455-8db9-df4858af9417",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1880,
|
||||
160
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 940,
|
||||
"height": 360,
|
||||
"content": "Bright Data Getting Reviews\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "f68ece0c-6061-4204-8c90-b9dba3dae242",
|
||||
"name": "Basic LLM Chain",
|
||||
"type": "@n8n/n8n-nodes-langchain.chainLlm",
|
||||
"position": [
|
||||
4160,
|
||||
380
|
||||
],
|
||||
"parameters": {
|
||||
"text": "=Read the following bad reviews, these are reviews of our competitors:\n{{ $json.Aggregated_reviews }}\n\n---\nAfter reading them, summarize their weakest points.\nDon't mention the competitor name.\n\nWrite 3 different ads copy for our Facebook ads campaign, addressing these concerns",
|
||||
"promptType": "define"
|
||||
},
|
||||
"typeVersion": 1.6
|
||||
},
|
||||
{
|
||||
"id": "d07aa5c9-c0b0-440d-b9a8-21b5be269db3",
|
||||
"name": "OpenAI Chat Model",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
4260,
|
||||
600
|
||||
],
|
||||
"parameters": {
|
||||
"model": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gpt-4o-mini"
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "MX2lQOZcGpmRvdVD",
|
||||
"name": "OpenAi account 2"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "0dceb7f9-7133-40cd-87c7-7b786e104a2f",
|
||||
"name": "Send Summary To Marketers",
|
||||
"type": "n8n-nodes-base.gmail",
|
||||
"position": [
|
||||
4800,
|
||||
400
|
||||
],
|
||||
"webhookId": "6787416d-689c-46ee-a7b5-97edd1fd1a00",
|
||||
"parameters": {
|
||||
"sendTo": "youremail@gmail.com",
|
||||
"message": "=Based on the following Trustpilot page: \n{{ $('On form submission - Discover Jobs').item.json['Competitor TRUSTPILOT URL (include https://www.trsutpilot.com/review/'] }}\n\nHere is a summary of recent complaints including ideas for ad copy:\n{{ $json.text }}\n-----------------------------\n\nI'm also attaching a break down of all recent complaints {{ $('Aggregating all filtered reviews').item.json.Aggregated_reviews }}\n",
|
||||
"options": {},
|
||||
"subject": "=Summary of Complaints of competitor: {{ $('On form submission - Discover Jobs').item.json['Competitor TRUSTPILOT URL (include https://www.trsutpilot.com/review/'] }}",
|
||||
"emailType": "text"
|
||||
},
|
||||
"credentials": {
|
||||
"gmailOAuth2": {
|
||||
"id": "TLJ5oxgGtoxdGOTZ",
|
||||
"name": "Gmail account 2"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "14516602-fe16-4a1f-8ada-690a4188429d",
|
||||
"name": "Filtering only bad reviews",
|
||||
"type": "n8n-nodes-base.filter",
|
||||
"position": [
|
||||
3520,
|
||||
380
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "loose"
|
||||
},
|
||||
"combinator": "or",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "7aaa3c61-27d5-4165-aaf3-4783d0ef0db0",
|
||||
"operator": {
|
||||
"name": "filter.operator.equals",
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json.review_rating }}",
|
||||
"rightValue": "1"
|
||||
},
|
||||
{
|
||||
"id": "7aab561d-2454-4d4b-a5d6-51c0582ea85b",
|
||||
"operator": {
|
||||
"name": "filter.operator.equals",
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json.review_rating }}",
|
||||
"rightValue": "2"
|
||||
}
|
||||
]
|
||||
},
|
||||
"looseTypeValidation": true
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "a93f9763-4eaa-4654-9bb1-93a1c8b468f9",
|
||||
"name": "Aggregating all filtered reviews",
|
||||
"type": "n8n-nodes-base.aggregate",
|
||||
"position": [
|
||||
3780,
|
||||
380
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldsToAggregate": {
|
||||
"fieldToAggregate": [
|
||||
{
|
||||
"renameField": true,
|
||||
"outputFieldName": "Aggregated_reviews",
|
||||
"fieldToAggregate": "review_content"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "effec41f-a19f-48c7-a540-ec69968850ee",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
4120,
|
||||
140
|
||||
],
|
||||
"parameters": {
|
||||
"width": 360,
|
||||
"height": 820,
|
||||
"content": "Adjust This Prompt with:\n1. Add info about your company and offer.\n\n2. The template requires the LLM to generate ad copy, but you can change it to any marketing material you'd like.\nExamples:\n- Suggest ideas for FAQ\n- Suggest copy for UGC scripts\n- Suggest copy for Add to cart email flow etc\n\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "e9bf2453-8f98-4d43-ac0c-f3e4b45787c9",
|
||||
"name": "Google Sheets - Adding All Reviews",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"position": [
|
||||
3280,
|
||||
380
|
||||
],
|
||||
"parameters": {
|
||||
"columns": {
|
||||
"value": {},
|
||||
"schema": [
|
||||
{
|
||||
"id": "company_name",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "company_name",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "review_id",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "review_id",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "review_date",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "review_date",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "review_rating",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "review_rating",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "review_title",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "review_title",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "review_content",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "review_content",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "is_verified_review",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "is_verified_review",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "review_date_of_experience",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "review_date_of_experience",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "reviewer_location",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "reviewer_location",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "reviews_posted_overall",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "reviews_posted_overall",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "review_replies",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "review_replies",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "review_useful_count",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "review_useful_count",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "reviewer_name",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "reviewer_name",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "company_logo",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "company_logo",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "url",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "url",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "company_overall_rating",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "company_overall_rating",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "is_verified_company",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "is_verified_company",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "company_total_reviews",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "company_total_reviews",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "5_star",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "5_star",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "4_star",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "4_star",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "3_star",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "3_star",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "2_star",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "2_star",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "1_star",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "1_star",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "company_about",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "company_about",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "company_phone",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "company_phone",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "company_location",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "company_location",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "company_country",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "company_country",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "breadcrumbs",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "breadcrumbs",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "company_category",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "company_category",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "company_id",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "company_id",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "company_website",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "company_website",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "company_other_categories",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "company_other_categories",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "review_url",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "review_url",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "date_posted",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "date_posted",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "timestamp",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "timestamp",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "input",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "input",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
}
|
||||
],
|
||||
"mappingMode": "autoMapInputData",
|
||||
"matchingColumns": [],
|
||||
"attemptToConvertTypes": false,
|
||||
"convertFieldsToString": false
|
||||
},
|
||||
"options": {},
|
||||
"operation": "append",
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gid=0",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Zi758ds2_aWzvbDYqwuGiQNaurLgs-leS9wjLWWlbUU/edit#gid=0",
|
||||
"cachedResultName": "input"
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "1Zi758ds2_aWzvbDYqwuGiQNaurLgs-leS9wjLWWlbUU",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Zi758ds2_aWzvbDYqwuGiQNaurLgs-leS9wjLWWlbUU/edit?usp=drivesdk",
|
||||
"cachedResultName": "NoFluff-N8N-Sheet-Template- Trust PIlot Reviews Scraping WIth Bright Data"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsOAuth2Api": {
|
||||
"id": "4RJOMlGAcB9ZoYfm",
|
||||
"name": "Google Sheets account 2"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.3,
|
||||
"alwaysOutputData": true
|
||||
},
|
||||
{
|
||||
"id": "a3911ad6-be39-4bba-9b1c-96c5a7017da4",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-400,
|
||||
220
|
||||
],
|
||||
"parameters": {
|
||||
"width": 860,
|
||||
"height": 380,
|
||||
"content": "### Scrape Trustpilot Reviews Using Bright Data for Winning Ad Insights\n\nThis **n8n workflow** scrapes Trustpilot reviews of a specified competitor using **Bright Data's dataset API**. Users input the competitor's Trustpilot URL and select a timeframe (30 days, 3 months, 6 months, or 12 months) via an n8n form.\n\n**Workflow steps:**\n\n- Sends a request to Bright Data to fetch Trustpilot reviews based on user input.\n- Polls Bright Data until the dataset is ready.\n- Retrieves the reviews and logs them into a Google Sheet.\n- Filters the results to isolate negative reviews (ratings of 1 or 2 stars).\n- Aggregates negative reviews into summarized text.\n- Uses OpenAI's GPT-4o-mini to analyze competitor weaknesses and generate three Facebook ad copy variations addressing these pain points.\n- Emails the summary, including suggested ad copy and aggregated reviews, to the marketing team.\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Basic LLM Chain": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Send Summary To Marketers",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Basic LLM Chain",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Snapshot Progress": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "If - Checking status of Snapshot - if data is ready or not",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Filtering only bad reviews": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Aggregating all filtered reviews",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait - Polling Bright Data": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Snapshot Progress",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Aggregating all filtered reviews": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Basic LLM Chain",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Google Sheets - Adding All Reviews": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Filtering only bad reviews",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"On form submission - Discover Jobs": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "HTTP Request- Post API call to Bright Data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"HTTP Request- Post API call to Bright Data": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait - Polling Bright Data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"HTTP Request - Getting data from Bright Data": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Google Sheets - Adding All Reviews",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"If - Checking status of Snapshot - if data is ready or not": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait - Polling Bright Data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "HTTP Request - Getting data from Bright Data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
828
workflows/Wait/0869_Wait_Datetime_Send_Scheduled.json
Normal file
828
workflows/Wait/0869_Wait_Datetime_Send_Scheduled.json
Normal file
File diff suppressed because one or more lines are too long
790
workflows/Wait/0871_Wait_HTTP_Create_Webhook.json
Normal file
790
workflows/Wait/0871_Wait_HTTP_Create_Webhook.json
Normal file
@@ -0,0 +1,790 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "1eadd5bc7c3d70c587c28f782511fd898c6bf6d97963d92e836019d2039d1c79"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "58da2884-6dd9-446e-beca-cacae1e8df7c",
|
||||
"name": "Sticky Note9",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
4940,
|
||||
340
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 1280,
|
||||
"height": 320,
|
||||
"content": "=======================================\n WORKFLOW ASSISTANCE\n=======================================\nFor any questions or support, please contact:\n Yaron@nofluff.online\n\nExplore more tips and tutorials here:\n - YouTube: https://www.youtube.com/@YaronBeen/videos\n - LinkedIn: https://www.linkedin.com/in/yaronbeen/\n=======================================\nBright Data Docs: https://docs.brightdata.com/introduction\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "d2aa5abc-6a8b-4ad3-9b87-1349f3dd80b9",
|
||||
"name": "Snapshot Progress",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
7540,
|
||||
760
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://api.brightdata.com/datasets/v3/progress/{{ $('HTTP Request- Post API call to Bright Data').item.json.snapshot_id }}",
|
||||
"options": {},
|
||||
"sendHeaders": true,
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"value": "Bearer <YOUR_BRIGHT_DATA_API_KEY>"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "fba84a88-1775-4bc9-85cb-1bda621b4c2c",
|
||||
"name": "Sticky Note10",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
8600,
|
||||
540
|
||||
],
|
||||
"parameters": {
|
||||
"width": 195,
|
||||
"height": 646,
|
||||
"content": "In this workflow, I use Google Sheets to store the results. \n\nYou can use my template to get started faster:\n\n1. [Click on this link to get the template](https://docs.google.com/spreadsheets/d/1IR-yMQwEFTjbTCSPvVlQ54zQsnG0IRauTjPGoBWmR8U/edit?usp=sharing)\n2. Make a copy of the Sheets\n3. Add the URL to this node \n\n\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "4b235825-1445-42d1-a9fa-d017974819fe",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
6560,
|
||||
840
|
||||
],
|
||||
"parameters": {
|
||||
"width": 220,
|
||||
"height": 440,
|
||||
"content": "Add your competitors Amazon link here.\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "d6a75b46-e968-4dab-962d-1f81b643b768",
|
||||
"name": "HTTP Request- Post API call to Bright Data",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
6920,
|
||||
840
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://api.brightdata.com/datasets/v3/trigger",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"jsonBody": "=[\n {\n \"url\": \"{{ $json['Amazon Product URL'] }}\"\n }\n]",
|
||||
"sendBody": true,
|
||||
"sendQuery": true,
|
||||
"sendHeaders": true,
|
||||
"specifyBody": "json",
|
||||
"queryParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "dataset_id",
|
||||
"value": "gd_le8e811kzy4ggddlq"
|
||||
},
|
||||
{
|
||||
"name": "include_errors",
|
||||
"value": "true"
|
||||
}
|
||||
]
|
||||
},
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"value": "Bearer <YOUR_BRIGHT_DATA_API_KEY>"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "50a6c73a-dd82-40af-ad5a-88ef4fd5fc7c",
|
||||
"name": "Wait - Polling Bright Data",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
7300,
|
||||
760
|
||||
],
|
||||
"webhookId": "8005a2b3-2195-479e-badb-d90e4240e699",
|
||||
"parameters": {
|
||||
"unit": "minutes",
|
||||
"amount": 1
|
||||
},
|
||||
"executeOnce": false,
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "8af8f713-6d5d-4113-ad5e-86b29fc8f441",
|
||||
"name": "If - Checking status of Snapshot - if data is ready or not",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
7740,
|
||||
760
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "7932282b-71bb-4bbb-ab73-4978e554de7e",
|
||||
"operator": {
|
||||
"name": "filter.operator.equals",
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json.status }}",
|
||||
"rightValue": "running"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "98166378-3766-4c69-b891-48891a18e175",
|
||||
"name": "HTTP Request - Getting data from Bright Data",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
8020,
|
||||
780
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://api.brightdata.com/datasets/v3/snapshot/{{ $('HTTP Request- Post API call to Bright Data').item.json.snapshot_id }}",
|
||||
"options": {},
|
||||
"sendQuery": true,
|
||||
"sendHeaders": true,
|
||||
"queryParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "format",
|
||||
"value": "json"
|
||||
}
|
||||
]
|
||||
},
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"value": "Bearer <YOUR_BRIGHT_DATA_API_KEY>"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "217cc982-0550-4e27-afd5-12b46eafcd04",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
7240,
|
||||
620
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 940,
|
||||
"height": 400,
|
||||
"content": "Bright Data Getting Reviews\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "5fd57531-25f4-4b10-9d95-bbeda1b336cf",
|
||||
"name": "OpenAI Chat Model",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
9620,
|
||||
1060
|
||||
],
|
||||
"parameters": {
|
||||
"model": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gpt-4o-mini"
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "MX2lQOZcGpmRvdVD",
|
||||
"name": "OpenAi account 2"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "d79c7504-0ccc-4491-bf7a-3697b31fa71a",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
9480,
|
||||
600
|
||||
],
|
||||
"parameters": {
|
||||
"width": 360,
|
||||
"height": 820,
|
||||
"content": "Adjust This Prompt with:\n1. Add info about your company and offer.\n\n2. The template requires the LLM to generate a summary of recent reviews but you can adjust it\n\n\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "413669e5-2b75-499d-ba00-766b3cce0d69",
|
||||
"name": "Google Sheets - Adding All Reviews",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"position": [
|
||||
8640,
|
||||
840
|
||||
],
|
||||
"parameters": {
|
||||
"columns": {
|
||||
"value": {},
|
||||
"schema": [
|
||||
{
|
||||
"id": "url",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "url",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "product_name",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "product_name",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "product_rating",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "product_rating",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "product_rating_object",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "product_rating_object",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "product_rating_max",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "product_rating_max",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "rating",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "rating",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "author_name",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "author_name",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "asin",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "asin",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "product_rating_count",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "product_rating_count",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "review_header",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "review_header",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "review_id",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "review_id",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "review_text",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "review_text",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "author_id",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "author_id",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "author_link",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "author_link",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "badge",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "badge",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "brand",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "brand",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "review_posted_date",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "review_posted_date",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "review_country",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "review_country",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "review_images",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "review_images",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "helpful_count",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "helpful_count",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "is_amazon_vine",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "is_amazon_vine",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "is_verified",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "is_verified",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "variant_asin",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "variant_asin",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "variant_name",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "variant_name",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "videos",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "videos",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "timestamp",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "timestamp",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "input",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "input",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
}
|
||||
],
|
||||
"mappingMode": "autoMapInputData",
|
||||
"matchingColumns": [],
|
||||
"attemptToConvertTypes": false,
|
||||
"convertFieldsToString": false
|
||||
},
|
||||
"options": {},
|
||||
"operation": "append",
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gid=0",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1IR-yMQwEFTjbTCSPvVlQ54zQsnG0IRauTjPGoBWmR8U/edit#gid=0",
|
||||
"cachedResultName": "input"
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "1IR-yMQwEFTjbTCSPvVlQ54zQsnG0IRauTjPGoBWmR8U",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1IR-yMQwEFTjbTCSPvVlQ54zQsnG0IRauTjPGoBWmR8U/edit?usp=drivesdk",
|
||||
"cachedResultName": "NoFluff-N8N-Sheet-Template- AMAZON Reviews Scraping WIth Bright Data"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsOAuth2Api": {
|
||||
"id": "4RJOMlGAcB9ZoYfm",
|
||||
"name": "Google Sheets account 2"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.3,
|
||||
"alwaysOutputData": true
|
||||
},
|
||||
{
|
||||
"id": "e1d58479-4008-4801-8523-fa2304ea9ef0",
|
||||
"name": "On form submission - Amazon Reviews",
|
||||
"type": "n8n-nodes-base.formTrigger",
|
||||
"position": [
|
||||
6620,
|
||||
980
|
||||
],
|
||||
"webhookId": "8d0269c7-d1fc-45a1-a411-19634a1e0b82",
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"formTitle": "Please Paste The URL of the Amazon Product",
|
||||
"formFields": {
|
||||
"values": [
|
||||
{
|
||||
"fieldLabel": "Amazon Product URL",
|
||||
"placeholder": "https://www.amazon.com/Quencher-Cupholder-Compatible-Insulated-Stainless/dp/B0DCDQ1RFV",
|
||||
"requiredField": true
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "2d79e9d2-a867-447e-91f9-b90c2e56427a",
|
||||
"name": "Aggregating all reviews",
|
||||
"type": "n8n-nodes-base.aggregate",
|
||||
"position": [
|
||||
9140,
|
||||
840
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldsToAggregate": {
|
||||
"fieldToAggregate": [
|
||||
{
|
||||
"renameField": true,
|
||||
"outputFieldName": "Aggregated_reviews",
|
||||
"fieldToAggregate": "review_text"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "937ef1c4-32b3-4966-abb4-f4ae09aa12a7",
|
||||
"name": "Basic LLM Chain - Summary of Recent reviews",
|
||||
"type": "@n8n/n8n-nodes-langchain.chainLlm",
|
||||
"position": [
|
||||
9520,
|
||||
840
|
||||
],
|
||||
"parameters": {
|
||||
"text": "=Read the following reviews, these are reviews of our competitors:\n{{ $json.Aggregated_reviews }}\n\n---\nAfter reading them, summarize their weakest points.\nDon't mention the competitor name.\n\n",
|
||||
"promptType": "define"
|
||||
},
|
||||
"typeVersion": 1.6
|
||||
},
|
||||
{
|
||||
"id": "2ccf1e0f-a738-44ee-bd8f-65a02a92ca91",
|
||||
"name": "OpenAI- Generating image",
|
||||
"type": "@n8n/n8n-nodes-langchain.openAi",
|
||||
"position": [
|
||||
10160,
|
||||
840
|
||||
],
|
||||
"parameters": {
|
||||
"prompt": "={\n \"ad_dimensions\": {\n \"width\": 1080,\n \"height\": 1080\n },\n \"target_audience\": \"B2C customer\",\n \"pain_points_source\": \"choose one pain point based on this {{ $json.text }}\",\n \"ad_requirements\": {\n \"image_style\": \"weird-and-fun\",\n \"weird_objects\": [\n \"Fruit with Faces\",\n \"Realistic People\"\n ],\n \"focus\": \"address the biggest pain point of competitors\",\n \"avoid_naming_competitors\": true,\n \"headline\": {\n \"position\": \"No\",\n \"text_only\": \"No\",\n \"other_text\": \"No\"\n },\n \"background\": [\n \"bold red\",\n \"black\"\n ]\n }\n}",
|
||||
"options": {},
|
||||
"resource": "image"
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "MX2lQOZcGpmRvdVD",
|
||||
"name": "OpenAi account 2"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.8
|
||||
},
|
||||
{
|
||||
"id": "ebb11f25-66f5-495e-a7bc-4212c6db10d5",
|
||||
"name": "Gmail - Sending creative to Media Buyers",
|
||||
"type": "n8n-nodes-base.gmail",
|
||||
"position": [
|
||||
10580,
|
||||
840
|
||||
],
|
||||
"webhookId": "41184a90-65fd-49a8-b0de-d838b94c790c",
|
||||
"parameters": {
|
||||
"sendTo": "yaron.been@gmail.com",
|
||||
"message": "=Hey, \n\nWe have analyzed our competitors recent reviews.\nAnalysis data:\n{{ $today }}\n\nHere's a summary:\n{{ $('Basic LLM Chain - Summary of Recent reviews').item.json.text }}\n\nPlease see attached an AI generated 1080x1080 image which you can use in Meta ads.\n\n",
|
||||
"options": {
|
||||
"attachmentsUi": {
|
||||
"attachmentsBinary": [
|
||||
{}
|
||||
]
|
||||
}
|
||||
},
|
||||
"subject": "=Static Creatives Based on Our competitor {{ $now }}",
|
||||
"emailType": "text"
|
||||
},
|
||||
"credentials": {
|
||||
"gmailOAuth2": {
|
||||
"id": "TLJ5oxgGtoxdGOTZ",
|
||||
"name": "Gmail account 2"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
}
|
||||
],
|
||||
"pinData": {
|
||||
"Basic LLM Chain - Summary of Recent reviews": [
|
||||
{
|
||||
"text": "The reviews highlight several common weaknesses among the products:\n\n1. **Quality Control Issues**: Some customers reported receiving cups with dents or damages upon arrival, raising concerns about packaging and quality assurance during shipping.\n\n2. **Durability Concerns**: While many praised the durability, a few mentioned that the cups could spill if tipped over, indicating that they might not be fully leak-proof.\n\n3. **Ease of Use**: Several users experienced difficulties with lids getting stuck or indicated that the tumblers are not spill-proof, particularly when used for non-water beverages.\n\n4. **Size and Weight**: A few reviewers commented on the heaviness of larger sizes, suggesting they may not be convenient for frequent carrying, especially for those with smaller bags or during outings.\n\n5. **Cleaning Issues**: Some users noted that certain models could be challenging to clean, particularly if not hand-washed to maintain appearance.\n\n6. **Authenticity Doubts**: There were instances where customers questioned the authenticity of the product based on packaging or markings, which could affect their overall satisfaction.\n\n7. **Price**: A few reviewers mentioned that while the products are of good quality, they are considered pricey, leading to questions about whether the value matches the cost. \n\nOverall, despite many positive comments, issues related to packaging, spillability, and price emerged as notable weaknesses."
|
||||
}
|
||||
]
|
||||
},
|
||||
"connections": {
|
||||
"OpenAI Chat Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Basic LLM Chain - Summary of Recent reviews",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Snapshot Progress": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "If - Checking status of Snapshot - if data is ready or not",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Aggregating all reviews": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Basic LLM Chain - Summary of Recent reviews",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI- Generating image": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Gmail - Sending creative to Media Buyers",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait - Polling Bright Data": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Snapshot Progress",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Google Sheets - Adding All Reviews": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Aggregating all reviews",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"On form submission - Amazon Reviews": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "HTTP Request- Post API call to Bright Data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"HTTP Request- Post API call to Bright Data": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait - Polling Bright Data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Basic LLM Chain - Summary of Recent reviews": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "OpenAI- Generating image",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"HTTP Request - Getting data from Bright Data": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Google Sheets - Adding All Reviews",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"If - Checking status of Snapshot - if data is ready or not": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait - Polling Bright Data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "HTTP Request - Getting data from Bright Data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
405
workflows/Wait/0888_Wait_Code_Send_Webhook.json
Normal file
405
workflows/Wait/0888_Wait_Code_Send_Webhook.json
Normal file
@@ -0,0 +1,405 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "4359279a248a64f23ddf72d3bc2de4dead8a687e643e9296f8a007dd65120396"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "74a81d54-6cc9-4c17-88fe-aca27d491b73",
|
||||
"name": "Webhook",
|
||||
"type": "n8n-nodes-base.webhook",
|
||||
"position": [
|
||||
640,
|
||||
40
|
||||
],
|
||||
"webhookId": "1d3d0c06-f979-4573-b644-1a5b13153471",
|
||||
"parameters": {
|
||||
"path": "paypal-NVP-SOAP-Webhook",
|
||||
"options": {},
|
||||
"httpMethod": "POST"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "59caade5-a67d-4d22-822c-bec8bf9baf69",
|
||||
"name": "Event Capture Type",
|
||||
"type": "n8n-nodes-base.switch",
|
||||
"position": [
|
||||
1160,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"rules": {
|
||||
"values": [
|
||||
{
|
||||
"outputKey": "Payment",
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "68917137-6042-4e47-9432-d006dca17872",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json.body.event_type }}",
|
||||
"rightValue": "=PAYMENT.CAPTURE.COMPLETED"
|
||||
}
|
||||
]
|
||||
},
|
||||
"renameOutput": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 3.2
|
||||
},
|
||||
{
|
||||
"id": "cba1ef91-2e34-4bd5-9972-565296137851",
|
||||
"name": "Get Order Details",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1360,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://api.paypal.com/v2/checkout/orders/{{ $json.body.resource.supplementary_data.related_ids.order_id }}",
|
||||
"options": {},
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "oAuth2Api"
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "ecab1f76-8c53-459c-8c5f-26356ec9e675",
|
||||
"name": "Email Data",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
1540,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "8d56c774-9adb-4981-9295-6f6f2ec59749",
|
||||
"name": "First Name",
|
||||
"type": "string",
|
||||
"value": "={{ $json.payment_source.paypal.name.given_name }}"
|
||||
},
|
||||
{
|
||||
"id": "0f6136eb-f5e1-47b9-a829-f42dff2b7c9e",
|
||||
"name": "Last Name",
|
||||
"type": "string",
|
||||
"value": "={{ $json.payment_source.paypal.name.surname }}"
|
||||
},
|
||||
{
|
||||
"id": "f4da90dc-b4d5-4951-91b8-2ef4b2bf870d",
|
||||
"name": "EmaiID",
|
||||
"type": "string",
|
||||
"value": "={{ $json.payment_source.paypal.email_address }}"
|
||||
},
|
||||
{
|
||||
"id": "f7a31ec1-4305-4df0-8791-0f59a04f0c7e",
|
||||
"name": "Product Purchased",
|
||||
"type": "string",
|
||||
"value": "={{ $json.purchase_units[0].items[0].name }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "211fbba0-67b1-4ece-b6a7-79b7c5cd0f7a",
|
||||
"name": "Wait",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
920,
|
||||
40
|
||||
],
|
||||
"webhookId": "16debf49-5196-473a-8b55-b2450b9b575a",
|
||||
"parameters": {},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "c4b9bcab-42ab-4fca-b064-ab262cdcf05e",
|
||||
"name": "getJSON",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
2060,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://your-json-template-in-ase-you-are-sellig.json",
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "b92f72a4-25c2-4c6d-9cc1-366cd1dc2dd1",
|
||||
"name": "Event Capture Type1",
|
||||
"type": "n8n-nodes-base.switch",
|
||||
"position": [
|
||||
1760,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"rules": {
|
||||
"values": [
|
||||
{
|
||||
"outputKey": "SocialMedia",
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "68917137-6042-4e47-9432-d006dca17872",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json[\"Product Purchased\"] }}",
|
||||
"rightValue": "=AI-Powered Social Media Content Generator & Publisher"
|
||||
}
|
||||
]
|
||||
},
|
||||
"renameOutput": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 3.2
|
||||
},
|
||||
{
|
||||
"id": "10f88f6c-1062-48c5-8a90-116c18954d95",
|
||||
"name": "Conver to File",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
2280,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "const content = JSON.stringify($json, null, 2); // Pretty-print JSON\n\nreturn [\n {\n binary: {\n data: {\n data: Buffer.from(content).toString('base64'),\n mimeType: 'application/json',\n fileName: 'data.json'\n }\n }\n }\n];\n"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "4c95905c-0c77-488a-8fb3-e8f4f4b83e54",
|
||||
"name": "Send Email",
|
||||
"type": "n8n-nodes-base.emailSend",
|
||||
"position": [
|
||||
2600,
|
||||
0
|
||||
],
|
||||
"webhookId": "e2895df8-6c42-44ff-ba08-fbf7a9df93c6",
|
||||
"parameters": {
|
||||
"html": "=<!DOCTYPE html>\n<html>\n<head>\n <meta charset=\"UTF-8\">\n <title>{{ $('Event Capture Type1').item.json['Product Purchased'] }}</title>\n</head>\n<body style=\"margin:0; padding:0; font-family: Arial, sans-serif; background-color: #f9f9f9;\">\n <table align=\"center\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"max-width:600px; background-color:#ffffff; margin:20px auto; border-radius:8px; box-shadow:0 0 10px rgba(0,0,0,0.05);\">\n <tr>\n <td style=\"padding:30px; text-align:center;\">\n <h2 style=\"color:#333;\">Hi {{ $('Event Capture Type1').item.json['First Name'] }} {{ $('Event Capture Type1').item.json['Last Name'] }} ,</h2>\n <p style=\"font-size:16px; color:#555;\">Thank you for purchasing <strong> {{ $('Event Capture Type1').item.json['Product Purchased'] }} - n8n workflow template</strong> from <strong>SyncBricks</strong>! 🚀</p>\n <p style=\"font-size:16px; color:#555;\">Your template is attached with this email. We hope it helps you build powerful automations with ease.</p>\n <hr style=\"margin:30px 0; border:none; border-top:1px solid #eee;\">\n <p style=\"font-size:16px; color:#555;\">Here are some helpful resources to take things further:</p>\n <ul style=\"list-style:none; padding:0; font-size:16px; color:#333;\">\n <li style=\"margin-bottom:10px;\"><a href=\"https://www.udemy.com/course/mastering-n8n-ai-agents-api-automation-webhooks-no-code/?referralCode=0309FD70BE2D72630C09\" style=\"color:#0066cc; text-decoration:none;\">📘 Enroll for the n8n Mastery Course</a></li>\n <li style=\"margin-bottom:10px;\"><a href=\"https://lms.syncbricks.com/books/n8n/\" style=\"color:#0066cc; text-decoration:none;\">📖 Get the Book: Mastering n8n</a></li>\n <li style=\"margin-bottom:10px;\"><a href=\"https://n8n.syncbricks.com\" style=\"color:#0066cc; text-decoration:none;\">☁️ Try n8n Cloud – Use Code <strong>AMJID10</strong> for Discount</a></li>\n </ul>\n\n<p style=\"font-size:16px; color:#555;\">🎥 Watch a quick guide on how to use your template:</p>\n<a href=\"https://www.youtube.com/watch?v=-Oc_HfreJJE\" target=\"_blank\" style=\"display:inline-block; text-decoration:none;\">\n <img src=\"https://img.youtube.com/vi/-Oc_HfreJJE/hqdefault.jpg\" alt=\"Watch on YouTube\" style=\"width:100%; max-width:500px; border-radius:6px; box-shadow:0 0 10px rgba(0,0,0,0.1); margin:10px 0;\">\n</a>\n\n\n <p style=\"font-size:14px; color:#999; margin-top:40px;\">Need help or have questions? Just reply to this email .</p>\n </td>\n </tr>\n </table>\n</body>\n</html>\n",
|
||||
"options": {
|
||||
"attachments": "data",
|
||||
"appendAttribution": false
|
||||
},
|
||||
"subject": "=Your Order : {{ $('Get Order Details').item.json.purchase_units[0].items[0].name }}",
|
||||
"toEmail": "={{ $('Email Data').item.json.EmaiID }}",
|
||||
"fromEmail": "Syncbricks <info@syncbricks.com>"
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "d859f5b9-db4f-4df8-a806-a806349092ee",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
580,
|
||||
-160
|
||||
],
|
||||
"parameters": {
|
||||
"width": 520,
|
||||
"height": 500,
|
||||
"content": "## Paypal Webhook\n**Go to Paypal Developer\nClick on Apps and Credentails\nGo to NVP SOAP Webhooks\nAdd this Webhook in Paypal\n\n- Wait node is to ensure that Transaction is completed\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "f4c545d8-f978-4b49-8cdb-3b6b427544f8",
|
||||
"name": "Sticky Note11",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-400,
|
||||
-180
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 955,
|
||||
"height": 516,
|
||||
"content": "## Developed by Amjid Ali\n\nThank you for using this workflow template. It has taken me countless hours of hard work, research, and dedication to develop, and I sincerely hope it adds value to your work.\n\nIf you find this template helpful, I kindly ask you to consider supporting my efforts. Your support will help me continue improving and creating more valuable resources.\n\nYou can contribute via PayPal here:\n\nhttp://paypal.me/pmptraining\n\nFor Full Course about ERPNext or Automation using AI follow below link\n\nhttp://lms.syncbricks.com\n\nAdditionally, when sharing this template, I would greatly appreciate it if you include my original information to ensure proper credit is given.\n\nThank you for your generosity and support!\nEmail : amjid@amjidali.com\nhttps://linkedin.com/in/amjidali\nhttps://syncbricks.com\nhttps://youtube.com/@syncbricks"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "769fc3b3-0cbe-4334-a990-83c86a0e5fc2",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1120,
|
||||
-160
|
||||
],
|
||||
"parameters": {
|
||||
"width": 580,
|
||||
"height": 500,
|
||||
"content": "## Payment Detials are Selected\n**The webhook gets all the Events but here we are filtering only the payments that we got agains the order.\n** It will get the customer name, Email Address and the Product customer has bought"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "835a6eb1-0b73-4d52-92b1-253fb1f150ac",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1720,
|
||||
-160
|
||||
],
|
||||
"parameters": {
|
||||
"width": 280,
|
||||
"height": 500,
|
||||
"content": "## Filter the Product \n** Each Product can have multiple Product Links on successful Purchase"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "54a284f2-566b-4dea-9e5f-6e55f5faefa4",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2020,
|
||||
-160
|
||||
],
|
||||
"parameters": {
|
||||
"width": 420,
|
||||
"height": 500,
|
||||
"content": "## n8n Template Sale\n** as I am selling n8n template, it will download json file and will convert that into binay file"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "20645f67-af3d-4ebf-bab1-488937182205",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2460,
|
||||
-160
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 420,
|
||||
"height": 500,
|
||||
"content": "## Send Email to Custoer\n** The download file will be attafched and my Custom Email will be sent to Customer"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Wait": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Event Capture Type",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Webhook": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"getJSON": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Conver to File",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Email Data": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Event Capture Type1",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Conver to File": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Send Email",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Order Details": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Email Data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Event Capture Type": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Order Details",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Event Capture Type1": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "getJSON",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
966
workflows/Wait/0903_Wait_Redis_Automate_Triggered.json
Normal file
966
workflows/Wait/0903_Wait_Redis_Automate_Triggered.json
Normal file
@@ -0,0 +1,966 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "d1b9b74c805fea7fca1b903ee192d1d4090b516d3c254da86beb2f13b7c2ed2e",
|
||||
"templateCredsSetupCompleted": true
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "be902a85-fc31-442c-b308-a2350ec5aabb",
|
||||
"name": "When clicking ‘Test workflow’",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
-760,
|
||||
440
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "d229b686-9de4-4633-9dba-3e1fe71eedf1",
|
||||
"name": "No Operation, do nothing1",
|
||||
"type": "n8n-nodes-base.noOp",
|
||||
"position": [
|
||||
1820,
|
||||
800
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "f583bc97-8da8-488e-ab04-5167dc7a7701",
|
||||
"name": "Information Extractor",
|
||||
"type": "@n8n/n8n-nodes-langchain.informationExtractor",
|
||||
"position": [
|
||||
2420,
|
||||
540
|
||||
],
|
||||
"parameters": {
|
||||
"text": "={{ $json.buffer.reverse().toJsonString() }}",
|
||||
"options": {
|
||||
"systemPromptTemplate": "Eres un experto extrayendo información, tu objetivo es recolectar todos los mensajes. Procura no dejar duplicados. como resultado debes retornar un solo párrafo con todo los mensajes."
|
||||
},
|
||||
"schemaType": "fromJson",
|
||||
"jsonSchemaExample": "{\n\t\"message\": \"all consolidated messages\"\n}"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "5b719416-4886-4d38-9d00-30b6237db168",
|
||||
"name": "OpenAI Chat Model",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
2440,
|
||||
760
|
||||
],
|
||||
"parameters": {
|
||||
"model": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gpt-4.1-nano",
|
||||
"cachedResultName": "gpt-4.1-nano"
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "IogsrRzOBSmZJS5C",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "3d149fc0-caa7-4361-9bf9-33b6252b39eb",
|
||||
"name": "get wait seconds",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
-260,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "// Function: Compute waitSeconds\nconst wordCount = $json.message.split(' ').filter(w=>w).length;\nreturn [{ json: { \n context_id: $json.context_id,\n message: $json.message,\n waitSeconds: wordCount < 5 ? 45 : 30 \n}}];\n"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "cc670735-d126-465f-b0a3-3a4c5e390fd7",
|
||||
"name": "Set last_seen",
|
||||
"type": "n8n-nodes-base.redis",
|
||||
"position": [
|
||||
280,
|
||||
380
|
||||
],
|
||||
"parameters": {
|
||||
"key": "=last_seen:{{ $json.context_id}}",
|
||||
"ttl": "={{ $json.waitSeconds + 60 }}",
|
||||
"value": "={{$now.toMillis()}}",
|
||||
"expire": true,
|
||||
"keyType": "string",
|
||||
"operation": "set"
|
||||
},
|
||||
"credentials": {
|
||||
"redis": {
|
||||
"id": "zJtRI38KhsyVjUvP",
|
||||
"name": "Redis account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1,
|
||||
"alwaysOutputData": true
|
||||
},
|
||||
{
|
||||
"id": "20d97d1d-70d4-4c3c-aa12-b1aa31795240",
|
||||
"name": "Get waiting_reply",
|
||||
"type": "n8n-nodes-base.redis",
|
||||
"position": [
|
||||
180,
|
||||
780
|
||||
],
|
||||
"parameters": {
|
||||
"key": "=waiting_reply:{{$json.context_id}}",
|
||||
"options": {},
|
||||
"operation": "get",
|
||||
"propertyName": "waiting_reply"
|
||||
},
|
||||
"credentials": {
|
||||
"redis": {
|
||||
"id": "zJtRI38KhsyVjUvP",
|
||||
"name": "Redis account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "7a2fc681-692f-4f72-9fab-f3ada4bda54b",
|
||||
"name": "Mod input",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
340,
|
||||
800
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "7ff99444-753d-4ef7-865c-7115761526b8",
|
||||
"name": "waiting_reply",
|
||||
"type": "string",
|
||||
"value": "={{ $json.waiting_reply }}"
|
||||
},
|
||||
{
|
||||
"id": "58ad6981-c35a-4dd6-b1cd-7c446b85e738",
|
||||
"name": "context_id",
|
||||
"type": "string",
|
||||
"value": "={{$('When Executed by Another Workflow').item.json.context_id }}"
|
||||
},
|
||||
{
|
||||
"id": "bd0535a2-be03-436b-8a2e-222c3e26fd04",
|
||||
"name": "message",
|
||||
"type": "string",
|
||||
"value": "={{$('When Executed by Another Workflow').item.json.message }}"
|
||||
},
|
||||
{
|
||||
"id": "2f583f32-f231-4407-b773-c08b38d464f0",
|
||||
"name": "waitSeconds",
|
||||
"type": "number",
|
||||
"value": "={{ $('get wait seconds').item.json.waitSeconds }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"includeOtherFields": true
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "84213bef-32be-4cd9-8387-cd76aff5cb38",
|
||||
"name": "waiting_reply?",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
540,
|
||||
800
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "8136ea21-d798-41fd-81ed-5c0e7fda73c5",
|
||||
"operator": {
|
||||
"type": "boolean",
|
||||
"operation": "true",
|
||||
"singleValue": true
|
||||
},
|
||||
"leftValue": "={{ $json.waiting_reply != null}}",
|
||||
"rightValue": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "a8472217-aa83-4247-9d7d-3a471e24478a",
|
||||
"name": "When chat message received",
|
||||
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
|
||||
"position": [
|
||||
-740,
|
||||
640
|
||||
],
|
||||
"webhookId": "85115343-bb86-4bb8-b7a8-c4efded80b3f",
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "ba4c81ba-92e2-4bef-a9e2-6f8d4c0aa722",
|
||||
"name": "Set waiting_reply",
|
||||
"type": "n8n-nodes-base.redis",
|
||||
"position": [
|
||||
840,
|
||||
720
|
||||
],
|
||||
"parameters": {
|
||||
"key": "=waiting_reply:{{ $json.context_id }}",
|
||||
"ttl": "={{ $json.waitSeconds }}",
|
||||
"value": "true",
|
||||
"expire": true,
|
||||
"operation": "set"
|
||||
},
|
||||
"credentials": {
|
||||
"redis": {
|
||||
"id": "zJtRI38KhsyVjUvP",
|
||||
"name": "Redis account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "0ce783b6-b76b-4a5d-96ae-11708b7532ba",
|
||||
"name": "Get buffer",
|
||||
"type": "n8n-nodes-base.redis",
|
||||
"position": [
|
||||
1820,
|
||||
600
|
||||
],
|
||||
"parameters": {
|
||||
"key": "=buffer_in:{{ $('get wait seconds').item.json.context_id }}",
|
||||
"options": {},
|
||||
"operation": "get",
|
||||
"propertyName": "buffer"
|
||||
},
|
||||
"credentials": {
|
||||
"redis": {
|
||||
"id": "zJtRI38KhsyVjUvP",
|
||||
"name": "Redis account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "21864061-1d1f-4528-a03f-1237e9c69a31",
|
||||
"name": "Delete buffer_in",
|
||||
"type": "n8n-nodes-base.redis",
|
||||
"position": [
|
||||
2940,
|
||||
680
|
||||
],
|
||||
"parameters": {
|
||||
"key": "=buffer_in:{{$json.context_id}}",
|
||||
"operation": "delete"
|
||||
},
|
||||
"credentials": {
|
||||
"redis": {
|
||||
"id": "zJtRI38KhsyVjUvP",
|
||||
"name": "Redis account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "8828aa7b-6153-4677-84a8-3ef2f884792c",
|
||||
"name": "Delete waiting_reply",
|
||||
"type": "n8n-nodes-base.redis",
|
||||
"position": [
|
||||
2940,
|
||||
840
|
||||
],
|
||||
"parameters": {
|
||||
"key": "=waiting_reply:{{$json.context_id}}",
|
||||
"operation": "delete"
|
||||
},
|
||||
"credentials": {
|
||||
"redis": {
|
||||
"id": "zJtRI38KhsyVjUvP",
|
||||
"name": "Redis account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "fc369067-7213-4d8c-b515-c34c4db997e4",
|
||||
"name": "WaitSeconds",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
1020,
|
||||
720
|
||||
],
|
||||
"webhookId": "c218d471-2f0f-4bd7-87d1-5431ac602211",
|
||||
"parameters": {
|
||||
"amount": "={{ $json.waitSeconds }} "
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "2daa2ab9-756a-4fdb-8573-b4570c58d6e5",
|
||||
"name": "Buffer messages",
|
||||
"type": "n8n-nodes-base.redis",
|
||||
"position": [
|
||||
-40,
|
||||
440
|
||||
],
|
||||
"parameters": {
|
||||
"list": "=buffer_in:{{$json.context_id}}",
|
||||
"operation": "push",
|
||||
"messageData": "={\"text\": \"{{ $json.message }}\", \"timestamp\": \"{{$now}}\"}"
|
||||
},
|
||||
"credentials": {
|
||||
"redis": {
|
||||
"id": "zJtRI38KhsyVjUvP",
|
||||
"name": "Redis account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "4d5bc5f0-11ce-4f7f-b44b-0514a5ab5671",
|
||||
"name": "Set buffer_count increment",
|
||||
"type": "n8n-nodes-base.redis",
|
||||
"position": [
|
||||
280,
|
||||
560
|
||||
],
|
||||
"parameters": {
|
||||
"key": "=buffer_count:{{$json.context_id}}",
|
||||
"expire": "={{$json.waitSeconds + 60}}",
|
||||
"operation": "incr"
|
||||
},
|
||||
"credentials": {
|
||||
"redis": {
|
||||
"id": "zJtRI38KhsyVjUvP",
|
||||
"name": "Redis account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1,
|
||||
"alwaysOutputData": true
|
||||
},
|
||||
{
|
||||
"id": "dcaee1a8-ea32-4a9d-b32f-f0418644027c",
|
||||
"name": "Get last_seen",
|
||||
"type": "n8n-nodes-base.redis",
|
||||
"position": [
|
||||
1220,
|
||||
720
|
||||
],
|
||||
"parameters": {
|
||||
"key": "=last_seen:{{$json.context_id}}",
|
||||
"options": {},
|
||||
"operation": "get",
|
||||
"propertyName": "last_seen"
|
||||
},
|
||||
"credentials": {
|
||||
"redis": {
|
||||
"id": "zJtRI38KhsyVjUvP",
|
||||
"name": "Redis account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "908c4a4c-1c60-4e90-827a-064a0b4d6bfd",
|
||||
"name": "Get buffer_count",
|
||||
"type": "n8n-nodes-base.redis",
|
||||
"position": [
|
||||
1400,
|
||||
720
|
||||
],
|
||||
"parameters": {
|
||||
"key": "=buffer_count:{{ $('Mod input').item.json.context_id }}",
|
||||
"options": {},
|
||||
"operation": "get",
|
||||
"propertyName": "count"
|
||||
},
|
||||
"credentials": {
|
||||
"redis": {
|
||||
"id": "zJtRI38KhsyVjUvP",
|
||||
"name": "Redis account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "1ceb472b-3944-4d74-994b-867ade006e4e",
|
||||
"name": "Map ouput",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
3140,
|
||||
380
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "e8d80ab4-74a2-4c30-8500-8dddc5802eec",
|
||||
"name": "message",
|
||||
"type": "string",
|
||||
"value": "={{ $json.output.message }}"
|
||||
},
|
||||
{
|
||||
"id": "7e7fcee4-14b3-4393-b516-b07a53c018b3",
|
||||
"name": "context_id",
|
||||
"type": "string",
|
||||
"value": "={{$('get wait seconds').item.json.context_id }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "0be7e5eb-1972-4a95-b5bf-4e564fc4ef7c",
|
||||
"name": "Check Inactivity + Count",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
1580,
|
||||
720
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "loose"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "0f294c51-0629-4ae1-a009-68c2f5fd30b5",
|
||||
"operator": {
|
||||
"type": "boolean",
|
||||
"operation": "true",
|
||||
"singleValue": true
|
||||
},
|
||||
"leftValue": "={{$json.count != null && Number($json.count) >= 1}}",
|
||||
"rightValue": ""
|
||||
},
|
||||
{
|
||||
"id": "1626238d-fb00-4ce8-89df-a40a4f29f52a",
|
||||
"operator": {
|
||||
"type": "boolean",
|
||||
"operation": "true",
|
||||
"singleValue": true
|
||||
},
|
||||
"leftValue": "={{$('Get last_seen').item.json.last_seen != null}}",
|
||||
"rightValue": ""
|
||||
},
|
||||
{
|
||||
"id": "df819099-1f6e-4bee-a017-32b729c836a3",
|
||||
"operator": {
|
||||
"type": "boolean",
|
||||
"operation": "true",
|
||||
"singleValue": true
|
||||
},
|
||||
"leftValue": "={{($now.toMillis() - $('Get last_seen').item.json.last_seen) >= $('Mod input').item.json.waitSeconds * 1000}}",
|
||||
"rightValue": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
"looseTypeValidation": true
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "0c3bd62b-8cf6-4b34-8010-ebe819db9667",
|
||||
"name": "Delete waiting_reply1",
|
||||
"type": "n8n-nodes-base.redis",
|
||||
"position": [
|
||||
2940,
|
||||
1000
|
||||
],
|
||||
"parameters": {
|
||||
"key": "=buffer_count:{{$json.context_id}}",
|
||||
"operation": "delete"
|
||||
},
|
||||
"credentials": {
|
||||
"redis": {
|
||||
"id": "zJtRI38KhsyVjUvP",
|
||||
"name": "Redis account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "bbf45966-833b-4f5f-ae11-0578614eb156",
|
||||
"name": "No Operation, do nothing2",
|
||||
"type": "n8n-nodes-base.noOp",
|
||||
"position": [
|
||||
720,
|
||||
540
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "5683eebf-ba51-4a6b-a803-de6acf1b1ea8",
|
||||
"name": "Wait",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
2080,
|
||||
880
|
||||
],
|
||||
"webhookId": "b8e2e214-f82b-49c2-96e2-91e093137857",
|
||||
"parameters": {
|
||||
"amount": "={{ Math.max(0, Math.ceil(( $('Mod input').item.json.waitSeconds * 1000 - ($now.toMillis() - $('Get last_seen').item.json.last_seen)) / 1000)) }}"
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "c0478f60-944e-4c85-bb9c-9abe0d4238c0",
|
||||
"name": "When Executed by Another Workflow",
|
||||
"type": "n8n-nodes-base.executeWorkflowTrigger",
|
||||
"position": [
|
||||
-480,
|
||||
720
|
||||
],
|
||||
"parameters": {
|
||||
"workflowInputs": {
|
||||
"values": [
|
||||
{
|
||||
"name": "context_id"
|
||||
},
|
||||
{
|
||||
"name": "message"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "91a650b7-ddd4-4dbf-a300-523f72f0bdb5",
|
||||
"name": "Mock input data",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
-500,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "0543fdb7-4a22-4530-bdb7-ae7064732fae",
|
||||
"name": "context_id",
|
||||
"type": "string",
|
||||
"value": "={{ $json.sessionId1 || '1lap075ha12' }}"
|
||||
},
|
||||
{
|
||||
"id": "bead5646-a689-4deb-8f4b-b22aa97b51ca",
|
||||
"name": "message",
|
||||
"type": "string",
|
||||
"value": "={{ $json.chatInput || 'Chat 2'}}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "cb450e32-7e19-469c-9a5c-3d9da5bf1dfa",
|
||||
"name": "No Operation, do nothing3",
|
||||
"type": "n8n-nodes-base.noOp",
|
||||
"position": [
|
||||
3320,
|
||||
840
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "b463e405-3355-48a2-a043-42941d7025c3",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2880,
|
||||
660
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 700,
|
||||
"height": 780,
|
||||
"content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n### 🧹 Buffer Cleanup\n\nAfter consolidation and reply:\n\n* **DELETE** keys:\n\n * `buffer_in:{{context_id}}`\n * `buffer_count:{{context_id}}`\n * `waiting_reply:{{context_id}}`\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "1b5397f8-aa7e-4b2b-afb9-5da97d99e049",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-80,
|
||||
60
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 920,
|
||||
"height": 940,
|
||||
"content": "### 📥 Input Buffer\n\n1. **Save incoming message**\n\n * Push the new message into Redis list `buffer_in:{{context_id}}`.\n2. **Update metadata**\n\n * Set `last_seen:{{context_id}}` to the current timestamp (with a TTL of `waitSeconds + 60`).\n * INCR the counter key `buffer_count:{{context_id}}` (also expiring after `waitSeconds + 60`).\n3. **Check “waiting” flag**\n\n * GET `waiting_reply:{{context_id}}`.\n * If it’s null (no batch in flight), SET it to `true` with TTL `waitSeconds` to block concurrent triggers."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "edc07500-ccad-4e72-adc1-1a63a3a06609",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1180,
|
||||
340
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 1200,
|
||||
"height": 820,
|
||||
"content": "### ⏳ Inactivity & Threshold Check\n\n1. **Fetch state**\n\n * GET `last_seen:{{context_id}}` (when the last message arrived)\n * GET `buffer_count:{{context_id}}` (how many messages are queued)\n2. **Evaluate trigger**\n\n * **Inactivity:** `(now – last_seen) ≥ waitSeconds * 1000`\n * **Or threshold:** `buffer_count ≥ 1` (or your desired batch size)\n3. **Branch**\n\n * **True:** proceed to “Get buffer” and consolidate.\n * **False:** exit (noOp) and let the waiting‐node/flag mechanism retry later."
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"pinData": {
|
||||
"When Executed by Another Workflow": [
|
||||
{
|
||||
"message": "Mensaje del usuario despues de pasar por el workflow de n8n:\nTexto: ¡Hola! Quiero más información.;\nImagen: ;\nAudio: ;",
|
||||
"context_id": "573058148988@s.whatsapp.net"
|
||||
}
|
||||
]
|
||||
},
|
||||
"connections": {
|
||||
"Wait": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Check Inactivity + Count",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Map ouput": {
|
||||
"main": [
|
||||
[]
|
||||
]
|
||||
},
|
||||
"Mod input": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "waiting_reply?",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get buffer": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Information Extractor",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"WaitSeconds": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get last_seen",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get last_seen": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get buffer_count",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Set last_seen": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "No Operation, do nothing2",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"waiting_reply?": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "No Operation, do nothing2",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Set waiting_reply",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Buffer messages": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Set buffer_count increment",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Set last_seen",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Get waiting_reply",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Mock input data": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "get wait seconds",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Delete buffer_in": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "No Operation, do nothing3",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get buffer_count": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Check Inactivity + Count",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"get wait seconds": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Buffer messages",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get waiting_reply": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Mod input",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Information Extractor",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Set waiting_reply": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "WaitSeconds",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Delete waiting_reply": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "No Operation, do nothing3",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Delete waiting_reply1": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "No Operation, do nothing3",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Information Extractor": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Map ouput",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Delete buffer_in",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Delete waiting_reply",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Delete waiting_reply1",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Check Inactivity + Count": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get buffer",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "No Operation, do nothing1",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"No Operation, do nothing1": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Set buffer_count increment": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "No Operation, do nothing2",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When chat message received": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Mock input data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When Executed by Another Workflow": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "get wait seconds",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When clicking ‘Test workflow’": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Mock input data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
255
workflows/Wait/0904_Wait_Code_Create_Webhook.json
Normal file
255
workflows/Wait/0904_Wait_Code_Create_Webhook.json
Normal file
@@ -0,0 +1,255 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "2e4938c532d5f4536554a31b1fe1b04df825b7a8238ff0fb3c5eaaa749e140bd"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "04b7d4d7-6639-4559-9a7a-7eb7b83e16fa",
|
||||
"name": "Generate A-Z Queries",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"notes": "This code adds \n- a blank space\n- and a letter, starting from a, b, c... up to z\nIt processes all the 26 possible letters.\n\nEx :\nn8n a\nn8n b\nn8n c\n...\nn8n z",
|
||||
"position": [
|
||||
180,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "const keyword = $input.first().json.chatInput;\nconst alphabet = \"abcdefghijklmnopqrstuvwxyz\".split(\"\");\n\nreturn alphabet.map(letter => ({\n json: { query: `${keyword} ${letter}` }\n}));"
|
||||
},
|
||||
"notesInFlow": false,
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "0c6ae163-3d08-4a40-aaa9-921f583940df",
|
||||
"name": "Google Autocomplete",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
560,
|
||||
100
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://suggestqueries.google.com/complete/search?client=firefox&hl=en&oe=utf-8&q={{ $json.query }}",
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 4
|
||||
},
|
||||
{
|
||||
"id": "21f0aeaa-2d64-497c-a890-6bd84ade624f",
|
||||
"name": "Loop Over Items",
|
||||
"type": "n8n-nodes-base.splitInBatches",
|
||||
"notes": "The 26 items (one for each alphabet letter) are treated by batches of 10.\nThis setting + the wait time help not to be blocked by Google's API.",
|
||||
"position": [
|
||||
360,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"batchSize": 10
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "6fca90c9-c8f0-4a86-b746-2eedd670404a",
|
||||
"name": "Wait 1s",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"notes": "This wait time is necessary, otherwise Google API might block the call and make an error.",
|
||||
"position": [
|
||||
920,
|
||||
100
|
||||
],
|
||||
"webhookId": "844dc802-f7d5-47f0-a389-ad60c4970aa0",
|
||||
"parameters": {
|
||||
"unit": "seconds"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "1a1a1a69-736b-4353-9353-bf80b4082f2c",
|
||||
"name": "Code",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
740,
|
||||
100
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "const data = JSON.parse($json.data);\nreturn {\n json: {\n keywords: data[1]\n }\n};\n"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "6af6e3e1-85b7-49a7-8589-bf49d34ff429",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-40,
|
||||
-340
|
||||
],
|
||||
"parameters": {
|
||||
"width": 400,
|
||||
"height": 320,
|
||||
"content": "## Type a Keyword and Discover What People Search on Google\n\nThis workflow scrapes Google autocomplete results by combining **your keyword** with every letter from **A to Z**.\n\n**Example:** \nKeyword: `n8n` \nResults: \n- n8n agent \n- n8n automation \n- n8n api \n- ...and so on\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "87673f0f-19ef-4bf7-a2bb-6d7e823a4f57",
|
||||
"name": "Get Keyword",
|
||||
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
|
||||
"notes": "You could also get this initial keyword from :\n- a line in a Google Sheet\n- a webhook and a form on a website\n- a messaging app like Telegram or Whatsapp",
|
||||
"position": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"webhookId": "add903d6-ee86-435a-b876-12b2f6264631",
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"notesInFlow": false,
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "ce6f882e-69dc-41a4-a9bf-b4fd6c55b87f",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
740,
|
||||
-360
|
||||
],
|
||||
"parameters": {
|
||||
"width": 480,
|
||||
"height": 240,
|
||||
"content": "## Exporting the Keywords\n\nYou can easily add a node to export the keywords in various ways:\n\n- via a webhook\n- by email\n- as a file (e.g., saved to Google Drive)\n- directly to a website"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "2675a52d-1018-4d33-914d-fc46225a3cc5",
|
||||
"name": "Extract Keywords",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"notes": "This code gathers all the keywords in one list.",
|
||||
"position": [
|
||||
560,
|
||||
-100
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "let mergedKeywords = [];\n\nfor (const item of $input.all()) {\n mergedKeywords.push(...item.json.keywords);\n}\n\nreturn { json: { keywords: mergedKeywords } };\n"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "95376c0e-43a8-408d-9542-ca9c0c4999c7",
|
||||
"name": "Return Keywords",
|
||||
"type": "n8n-nodes-base.respondToWebhook",
|
||||
"notes": "Use this node",
|
||||
"position": [
|
||||
740,
|
||||
-100
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "9355b89b-5366-4bbb-a06b-081ced4c2134",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
540,
|
||||
280
|
||||
],
|
||||
"parameters": {
|
||||
"width": 560,
|
||||
"height": 280,
|
||||
"content": "## Adapt the Language\n\nAutocomplete results depend on the selected language.\n\nYou can change the `&hl=en` parameter in the **Google Autocomplete** node. \nReplace the `\"en\"` part with the language code of your choice.\n\n**Examples:** \n- `&hl=fr` → French \n- `&hl=es` → Spanish \n- `&hl=de` → German\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Code": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait 1s",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait 1s": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop Over Items",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Keyword": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Generate A-Z Queries",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Loop Over Items": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Extract Keywords",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Google Autocomplete",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Extract Keywords": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Return Keywords",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Google Autocomplete": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Code",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Generate A-Z Queries": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop Over Items",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
913
workflows/Wait/0905_Wait_Schedule_Create_Webhook.json
Normal file
913
workflows/Wait/0905_Wait_Schedule_Create_Webhook.json
Normal file
@@ -0,0 +1,913 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "02e782574ebb30fbddb2c3fd832c946466d718819d25f6fe4b920124ff3fc2c1",
|
||||
"templateCredsSetupCompleted": true
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "c53bc70a-2e85-465a-b977-73cfd268ba41",
|
||||
"name": "Scheduled Start: Check for New Posts",
|
||||
"type": "n8n-nodes-base.scheduleTrigger",
|
||||
"position": [
|
||||
-1240,
|
||||
-380
|
||||
],
|
||||
"parameters": {
|
||||
"rule": {
|
||||
"interval": [
|
||||
{}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "aa73f2af-f311-465b-8270-b027b17eec0d",
|
||||
"name": "1. Get Next Post Idea from Sheet",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"position": [
|
||||
-920,
|
||||
-380
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"returnFirstMatch": true
|
||||
},
|
||||
"filtersUI": {
|
||||
"values": [
|
||||
{
|
||||
"lookupValue": "0",
|
||||
"lookupColumn": "Status"
|
||||
}
|
||||
]
|
||||
},
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": 1510137257,
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1hG2NMi-4fMa7D5qGonCN8bsYVya4L2TOB_8mI4XK-9k/edit#gid=1510137257",
|
||||
"cachedResultName": "Postİ"
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "1hG2NMi-4fMa7D5qGonCN8bsYVya4L2TOB_8mI4XK-9k",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1hG2NMi-4fMa7D5qGonCN8bsYVya4L2TOB_8mI4XK-9k/edit?usp=drivesdk",
|
||||
"cachedResultName": "Medium Post Automation"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsOAuth2Api": {
|
||||
"id": "VV5AyFvgYkc4TfC7",
|
||||
"name": "Onur Drive "
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.5
|
||||
},
|
||||
{
|
||||
"id": "42e129d0-5e4f-4226-a86f-b7fd04c8c497",
|
||||
"name": "2. Prepare Input Variables (Topic, Audience, etc.)",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
-620,
|
||||
-380
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "aa3b9a02-ac6a-4d7f-937f-a0e6e566a0c8",
|
||||
"name": "Topic",
|
||||
"type": "string",
|
||||
"value": "={{ $json.Topic }}"
|
||||
},
|
||||
{
|
||||
"id": "e48783e8-5f6b-4c54-bf4f-c004414dc510",
|
||||
"name": "TargetAudience",
|
||||
"type": "string",
|
||||
"value": "={{ $json.Audience }}"
|
||||
},
|
||||
{
|
||||
"id": "c499a954-b4c6-4702-ab86-3656aa2b1783",
|
||||
"name": "BrandVoice",
|
||||
"type": "string",
|
||||
"value": "={{ $json.Voice }}"
|
||||
},
|
||||
{
|
||||
"id": "210f7103-4d6b-42e9-9168-fd99dff94b5a",
|
||||
"name": "Platform",
|
||||
"type": "string",
|
||||
"value": "={{ $json.Platform }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "5036db9b-1a1b-48d7-bfaa-1839ba5331b5",
|
||||
"name": "3a. Generate Content Concept (Gemini)",
|
||||
"type": "@n8n/n8n-nodes-langchain.chainLlm",
|
||||
"position": [
|
||||
-160,
|
||||
-380
|
||||
],
|
||||
"parameters": {
|
||||
"text": "=",
|
||||
"messages": {
|
||||
"messageValues": [
|
||||
{
|
||||
"message": "=<prompt> <role> You are a **highly imaginative Social Media Strategist** specializing in generating **unique, platform-aware content CONCEPTS** for **Instagram and LinkedIn**. You think beyond basic formats and consider audience engagement. </role> <task> Based *only* on the `Topic`, `Target Audience`, `Brand Voice`, AND **target `Platform` ('Instagram' or 'LinkedIn')**, generate **exactly 1 creative content CONCEPT**. Focus on the **core message, angle, or hook**. The suggested format **MUST be \"Single Image\"**. 1. **Platform Optimization:** **Explicitly tailor** the *type* and *angle* of the concept to the specified `Platform`. Consider typical user expectations and content formats: * **Instagram:** Often more visual, storytelling, personal, community-focused, impactful single images. * **LinkedIn:** Can utilize impactful single images to convey data points, key takeaways, or thought-provoking visuals supporting a concise message. 2. **Originality:** Avoid common tropes (like basic quotes) unless the input strongly suggests it. Explore diverse angles: striking visual representations of data, metaphorical imagery, thought-provoking questions presented visually, behind-the-scenes moments captured in a compelling image, key message highlighted graphically. 3. **Format Suggestion:** The format **MUST be \"Single Image\"**. The **CONCEPT is primary, the format is fixed**. </task> <input_context> <param name=\"Topic\">{{ $json.Topic }}</param> <param name=\"TargetAudience\">{{ $json.TargetAudience }}</param> <param name=\"BrandVoice\">{{ $json.BrandVoice }}</param> <param name=\"Platform\">{{ $json.Platform }}</param> </input_context> <output_instructions> Your response MUST be a single, valid JSON object containing exactly one key: `ideas`. The value of `ideas` MUST be an array containing exactly 1 object. The object in the array MUST have two keys: `concept` (string: the descriptive concept text) and `suggested_format` (string: **MUST be \"Single Image\"**). Example: `{\"ideas\": [{\"concept\": \"Concept text...\", \"suggested_format\": \"Single Image\"}]}` Do NOT include any other text, explanations, or formatting outside the JSON structure. </output_instructions> </prompt>"
|
||||
}
|
||||
]
|
||||
},
|
||||
"promptType": "define",
|
||||
"hasOutputParser": true
|
||||
},
|
||||
"typeVersion": 1.5
|
||||
},
|
||||
{
|
||||
"id": "5a882770-53af-466c-a297-856b088eb2b9",
|
||||
"name": "(LLM Model for Concept)",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
|
||||
"position": [
|
||||
-160,
|
||||
-220
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"modelName": "models/gemini-2.0-flash-001"
|
||||
},
|
||||
"credentials": {
|
||||
"googlePalmApi": {
|
||||
"id": "hAoasnlx3jlRA3Kf",
|
||||
"name": "BCP Gemini"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "a4132a05-def7-4c4f-ad1d-092533f3b9f2",
|
||||
"name": "(Parse Concept JSON)",
|
||||
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
|
||||
"position": [
|
||||
0,
|
||||
-220
|
||||
],
|
||||
"parameters": {
|
||||
"schemaType": "manual",
|
||||
"inputSchema": "{\n \"type\": \"object\",\n \"properties\": {\n \"ideas\": {\n \"type\": \"array\",\n \"description\": \"An array containing exactly 1 content concept.\",\n \"minItems\": 1,\n \"maxItems\": 1,\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"concept\": {\n \"type\": \"string\",\n \"description\": \"The detailed text describing the content concept for a Single Image.\"\n },\n \"suggested_format\": {\n \"type\": \"string\",\n \"description\": \"The post format, which MUST be 'Single Image'.\",\n \"const\": \"Single Image\"\n }\n },\n \"required\": [\n \"concept\",\n \"suggested_format\"\n ]\n }\n }\n },\n \"required\": [\n \"ideas\"\n ]\n}"
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "46338aad-5f7d-464f-a7fe-e9ae00aacad5",
|
||||
"name": "3b. Generate Image Prompt Options (Gemini)",
|
||||
"type": "@n8n/n8n-nodes-langchain.chainLlm",
|
||||
"position": [
|
||||
580,
|
||||
-380
|
||||
],
|
||||
"parameters": {
|
||||
"text": "=",
|
||||
"messages": {
|
||||
"messageValues": [
|
||||
{
|
||||
"message": "=<prompt>\n <role>\n You are an **Expert Instagram/LinkedIn Content Strategist and AI Image Prompt Engineer**. You excel at elaborating concepts based on user feedback and crafting distinct, detailed, and visually consistent prompt options tailored for the target platform.\n </role>\n\n <task>\n 1. **Analyze** the `Chosen Idea`, `User Visual Input` (if provided and relevant), and **target `Platform`** to determine the optimal post format (in this case, assumed to be Single Image based on the output) and elaborate this into a practical `expanded_post_concept`. **Justify format choice based on concept AND platform norms.**\n 2. **Incorporate** the user's visual direction (if any) into the concept description. If no specific visual input was given, propose a clear visual direction that aligns with the concept and platform.\n 3. Generate **TWO DISTINCT OPTIONS** for the image prompts based on the `expanded_post_concept`. **Tailor the visual style and content nuances** described in the prompts to the target `Platform`. (E.g., LinkedIn visuals might be cleaner, more data-oriented; Instagram more lifestyle or emotive).\n 4. **Ensure Distinction:** The two options should offer meaningful variety (e.g., style, composition, focus) while remaining true to the core concept.\n 5. **Detail:** Prompts should be highly detailed, suitable for advanced AI image generators (include subject, action, setting, style, mood, composition, lighting, color palette keywords).\n </task>\n\n <input_context>\n <param name=\"ChosenIdea\">{{ $json.output.ideas[0].concept }}</param>\n <param name=\"OriginalTopic\"> {{ $('2. Prepare Input Variables (Topic, Audience, etc.)').item.json.Topic }}</param>\n <param name=\"TargetAudience\"> {{ $('2. Prepare Input Variables (Topic, Audience, etc.)').item.json.TargetAudience }}</param>\n <param name=\"BrandVoice\"> {{ $('2. Prepare Input Variables (Topic, Audience, etc.)').item.json.BrandVoice }}</param>\n <param name=\"Platform\"> {{ $('2. Prepare Input Variables (Topic, Audience, etc.)').item.json.Platform }}</param>\n </input_context>\n\n <output_instructions>\n Your response MUST be a single, valid JSON object containing exactly two keys: `expanded_post_concept` and `prompt_options`.\n - `expanded_post_concept` (string): The elaborated visual concept, stating Single Image format and incorporating user input/platform considerations.\n - `prompt_options` (array): MUST contain exactly TWO objects.\n - Each object represents one prompt option and MUST have two keys:\n - `option_description` (string): Briefly describe the distinct angle/style of this option (e.g., \"Option 1: Hyperrealistic...\").\n - `prompts` (array of strings): Contains ONE string representing the detailed prompt for the single image.\n \n \n Do NOT include any text outside this JSON structure. Do NOT generate captions here.\n </output_instructions>\n</prompt>"
|
||||
}
|
||||
]
|
||||
},
|
||||
"promptType": "define",
|
||||
"hasOutputParser": true
|
||||
},
|
||||
"typeVersion": 1.5
|
||||
},
|
||||
{
|
||||
"id": "950b7c2f-cebc-41ae-aad8-38b139c1b2ea",
|
||||
"name": "(LLM Model for Prompts)",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
|
||||
"position": [
|
||||
580,
|
||||
-220
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"modelName": "models/gemini-2.0-flash-001"
|
||||
},
|
||||
"credentials": {
|
||||
"googlePalmApi": {
|
||||
"id": "hAoasnlx3jlRA3Kf",
|
||||
"name": "BCP Gemini"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "bfda2858-3a3a-4997-b30c-ce64429bd255",
|
||||
"name": "(Parse Prompts JSON)",
|
||||
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
|
||||
"position": [
|
||||
740,
|
||||
-220
|
||||
],
|
||||
"parameters": {
|
||||
"schemaType": "manual",
|
||||
"inputSchema": "{\n \"type\": \"object\",\n \"properties\": {\n \"expanded_post_concept\": {\n \"type\": \"string\",\n \"description\": \"The elaborated visual concept, stating Single Image format and incorporating user input/platform considerations.\"\n },\n \"prompt_options\": {\n \"type\": \"array\",\n \"description\": \"An array containing exactly TWO prompt options for the single image concept.\",\n \"minItems\": 2,\n \"maxItems\": 2,\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"option_description\": {\n \"type\": \"string\",\n \"description\": \"Briefly describes the distinct angle/style of this option (e.g., 'Option 1: Hyperrealistic...').\"\n },\n \"prompts\": {\n \"type\": \"array\",\n \"description\": \"Contains ONE detailed prompt string for the single image.\",\n \"minItems\": 1,\n \"maxItems\": 1,\n \"items\": {\n \"type\": \"string\",\n \"description\": \"A detailed image generation prompt.\"\n }\n }\n },\n \"required\": [\n \"option_description\",\n \"prompts\"\n ]\n }\n }\n },\n \"required\": [\n \"expanded_post_concept\",\n \"prompt_options\"\n ]\n}"
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "0151450f-fca2-4628-a268-f90186a79b9e",
|
||||
"name": "3c. Generate Post Caption (Gemini)",
|
||||
"type": "@n8n/n8n-nodes-langchain.chainLlm",
|
||||
"position": [
|
||||
1540,
|
||||
-380
|
||||
],
|
||||
"parameters": {
|
||||
"text": "=",
|
||||
"messages": {
|
||||
"messageValues": [
|
||||
{
|
||||
"message": "=<prompt>\n <role>\n You are an AI Instagram/LinkedIn **Caption Writer**. You specialize in crafting concise, engaging, and contextually relevant captions based on a generated image (represented by its prompt) and the overall content strategy, specifically tailored for the target platform.\n </role>\n\n <task>\n Write a short, effective social media caption **specifically tailored for the target `Platform` ('Instagram' or 'LinkedIn')**.\n * The caption must complement the image described by `ImagePrompt` and align with all context parameters (`ChosenIdea`, `OriginalTopic`, `TargetAudience`, `BrandVoice`).\n * **Platform Style:** Adapt tone, length, calls-to-action, and hashtag usage:\n * **Instagram:** Can be more conversational, use more emojis, ask engaging questions, often benefits from slightly longer, more storytelling captions if relevant. Use a mix of popular and niche hashtags (3-7 recommended).\n * **LinkedIn:** Generally more professional, concise, focused on insights or value proposition. Calls-to-action often relate to reading more, commenting with professional opinions, or business objectives. Use targeted, professional hashtags (1-3 recommended).\n * Include 1-5 relevant, platform-appropriate hashtags.\n </task>\n\n <input_context>\n <param name=\"ImagePrompt\">{{ $json.output.prompt_options[0].prompts[0] }}</param>\n <param name=\"ChosenIdea\">{{ $('3a. Generate Content Concept (Gemini)').item.json.output.ideas[0].concept }} </param>\n <param name=\"OriginalTopic\">{{ $('1. Get Next Post Idea from Sheet').item.json.Topic }} </param>\n <param name=\"TargetAudience\">{{ $('1. Get Next Post Idea from Sheet').item.json.Audience }}</param>\n <param name=\"BrandVoice\">{{ $('1. Get Next Post Idea from Sheet').item.json.Voice }} </param>\n <param name=\"Platform\">{{ $('1. Get Next Post Idea from Sheet').item.json.Platform }} </param>\n </input_context>\n\n <output_instructions>\n Your response MUST be a single, valid JSON object containing exactly one key: `Caption`.\n The value of `Caption` MUST be a string containing the generated caption text, including hashtags.\n Example: `{\"Caption\": \"Caption text tailored for LinkedIn goes here. #ProfessionalDevelopment #IndustryInsights\"}`\n Do NOT include any other text, explanations, or formatting outside the JSON structure.\n </output_instructions>\n</prompt>"
|
||||
}
|
||||
]
|
||||
},
|
||||
"promptType": "define",
|
||||
"hasOutputParser": true
|
||||
},
|
||||
"typeVersion": 1.5
|
||||
},
|
||||
{
|
||||
"id": "d4667681-a5aa-4b63-802c-2adf8c111bb9",
|
||||
"name": "(LLM Model for Caption)",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
|
||||
"position": [
|
||||
1560,
|
||||
-220
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"modelName": "models/gemini-2.0-flash"
|
||||
},
|
||||
"credentials": {
|
||||
"googlePalmApi": {
|
||||
"id": "hAoasnlx3jlRA3Kf",
|
||||
"name": "BCP Gemini"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "59da1f6c-ee55-4095-8c95-d60d1177c142",
|
||||
"name": "(Parse Caption JSON)",
|
||||
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
|
||||
"position": [
|
||||
1700,
|
||||
-220
|
||||
],
|
||||
"parameters": {
|
||||
"jsonSchemaExample": "{\n\t\"Caption\": \"Thee future of call centers is here!\"\n}"
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "a8d38be7-85b5-4a39-bd39-7f765699d471",
|
||||
"name": "4. Generate Image using Prompt 1 (Replicate Flux)",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
2360,
|
||||
-380
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://api.replicate.com/v1/models/black-forest-labs/flux-1.1-pro-ultra/predictions",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"jsonBody": "={\n \"input\": {\n \"raw\": false,\n \"prompt\": \"{{ $('3b. Generate Image Prompt Options (Gemini)').item.json.output.prompt_options[0].prompts[0] }}\",\n \"aspect_ratio\": \"1:1\",\n \"output_format\": \"jpg\",\n \"safety_tolerance\": 6\n }\n}",
|
||||
"sendBody": true,
|
||||
"sendHeaders": true,
|
||||
"specifyBody": "json",
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpHeaderAuth",
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Prefer",
|
||||
"value": "wait"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "iEtPzDTSlZBfz1RP",
|
||||
"name": "Replicate"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "cc0f0035-0d63-4988-8ec8-89260261960a",
|
||||
"name": "5. Prepare Data for Instagram API",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
2880,
|
||||
-380
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "8a4260ba-3bde-4444-8f42-8a8abd51ff0c",
|
||||
"name": "ImageURL",
|
||||
"type": "string",
|
||||
"value": "={{ $json.output }}"
|
||||
},
|
||||
{
|
||||
"id": "1953ae03-6a86-4847-8686-5a928637be1d",
|
||||
"name": "Caption",
|
||||
"type": "string",
|
||||
"value": "={{ $('3c. Generate Post Caption (Gemini)').item.json.output.Caption }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "f010c17f-1af3-4d04-a69c-8b03c70fc8f0",
|
||||
"name": "6a. Create Instagram Media Container",
|
||||
"type": "n8n-nodes-base.facebookGraphApi",
|
||||
"position": [
|
||||
3180,
|
||||
-380
|
||||
],
|
||||
"parameters": {
|
||||
"edge": "media",
|
||||
"node": "17841473009917118",
|
||||
"options": {
|
||||
"queryParameters": {
|
||||
"parameter": [
|
||||
{
|
||||
"name": "caption",
|
||||
"value": "={{ $json.Caption }}"
|
||||
},
|
||||
{
|
||||
"name": "image_url",
|
||||
"value": "={{ $json.ImageURL }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"graphApiVersion": "v22.0",
|
||||
"httpRequestMethod": "POST"
|
||||
},
|
||||
"credentials": {
|
||||
"facebookGraphApi": {
|
||||
"id": "vF0cZWKe6sYiEaHo",
|
||||
"name": "n8n Bot Access"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "c69f1856-efa2-48a5-9e41-71ab67bcaeca",
|
||||
"name": "6b. Wait for Container Processing",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
3480,
|
||||
-380
|
||||
],
|
||||
"webhookId": "1b14c8bf-151a-4054-8215-093dd5b6cbcc",
|
||||
"parameters": {},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "516b61f0-825e-468b-8eb7-80f757171465",
|
||||
"name": "6c. Publish Post to Instagram",
|
||||
"type": "n8n-nodes-base.facebookGraphApi",
|
||||
"position": [
|
||||
3780,
|
||||
-380
|
||||
],
|
||||
"parameters": {
|
||||
"edge": "media_publish",
|
||||
"node": "17841473009917118",
|
||||
"options": {
|
||||
"queryParameters": {
|
||||
"parameter": [
|
||||
{
|
||||
"name": "creation_id",
|
||||
"value": "={{ $json.id }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"graphApiVersion": "v22.0",
|
||||
"httpRequestMethod": "POST"
|
||||
},
|
||||
"credentials": {
|
||||
"facebookGraphApi": {
|
||||
"id": "vF0cZWKe6sYiEaHo",
|
||||
"name": "n8n Bot Access"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "1a94c8ba-7b59-4337-ae07-5c0b2b8349dd",
|
||||
"name": "7. Update Post Status in Sheet",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"position": [
|
||||
4440,
|
||||
-380
|
||||
],
|
||||
"parameters": {
|
||||
"columns": {
|
||||
"value": {
|
||||
"Topic": "={{ $('1. Get Next Post Idea from Sheet').item.json.Topic }}",
|
||||
"Status": "1"
|
||||
},
|
||||
"schema": [
|
||||
{
|
||||
"id": "Topic",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Topic",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Audience",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "Audience",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Voice",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "Voice",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Platform",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "Platform",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Status",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "Status",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "row_number",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"readOnly": true,
|
||||
"required": false,
|
||||
"displayName": "row_number",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
}
|
||||
],
|
||||
"mappingMode": "defineBelow",
|
||||
"matchingColumns": [
|
||||
"Topic"
|
||||
],
|
||||
"attemptToConvertTypes": false,
|
||||
"convertFieldsToString": false
|
||||
},
|
||||
"options": {},
|
||||
"operation": "update",
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": 1510137257,
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1hG2NMi-4fMa7D5qGonCN8bsYVya4L2TOB_8mI4XK-9k/edit#gid=1510137257",
|
||||
"cachedResultName": "Postİ"
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "1hG2NMi-4fMa7D5qGonCN8bsYVya4L2TOB_8mI4XK-9k",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1hG2NMi-4fMa7D5qGonCN8bsYVya4L2TOB_8mI4XK-9k/edit?usp=drivesdk",
|
||||
"cachedResultName": "Medium Post Automation"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsOAuth2Api": {
|
||||
"id": "VV5AyFvgYkc4TfC7",
|
||||
"name": "Onur Drive "
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.5
|
||||
},
|
||||
{
|
||||
"id": "68651653-07fb-435a-a82d-b8ee911b4161",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-240,
|
||||
-820
|
||||
],
|
||||
"parameters": {
|
||||
"width": 460,
|
||||
"height": 740,
|
||||
"content": "# 01. Content Concept Generation\n\n**Purpose:** This step uses Google Gemini to generate **one unique content concept** tailored for the specified platform (Instagram/LinkedIn), based on the input topic, audience, and brand voice. The format is fixed to \"Single Image\".\n\n**Input (from Node '2. Prepare Input Variables'):**\n* `Topic` (string)\n* `TargetAudience` (string)\n* `BrandVoice` (string)\n* `Platform` (string: 'Instagram' )\n\n**Output (JSON):**\n* `{\"ideas\": [{\"concept\": \"Generated concept text...\", \"suggested_format\": \"Single Image\"}]}`"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "c463e2b6-6b2b-498d-8672-a0a9b15c06b8",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2220,
|
||||
-820
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 380,
|
||||
"height": 740,
|
||||
"content": "# 03b. Image Generation\n\n**Purpose:** Generates the actual image using the **first detailed prompt** created in step 3b. It sends this prompt to the Replicate API, specifically using the 'Flux 1.1 Pro Ultra' model.\n\n**Input (from Node '3b. Generate Image Prompt Options'):**\n* `prompt` (string: The *first* prompt string from `prompt_options[0].prompts[0]`)\n\n**Output (from Replicate API):**\n* JSON containing the `output` URL of the generated image (e.g., `{\"output\": \"https://replicate.delivery/...\"}`)"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "4636ef23-11e1-45dd-94c1-5774ad612811",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
400,
|
||||
-820
|
||||
],
|
||||
"parameters": {
|
||||
"color": 2,
|
||||
"width": 740,
|
||||
"height": 740,
|
||||
"content": "# 02. Image Prompt Elaboration & Options\n\n**Purpose:** Takes the generated content concept and expands on it to create **two distinct, detailed image generation prompts**. These prompts are optimized for the target platform and suitable for AI image generators like Replicate Flux.\n\n**Input (from Nodes '2. Prepare Input Variables' & '3a. Generate Content Concept'):**\n* `ChosenIdea` (string: Concept from step 3a)\n* `OriginalTopic` (string)\n* `TargetAudience` (string)\n* `BrandVoice` (string)\n* `Platform` (string: 'Instagram')\n\n**Output (JSON):**\n* `{\"expanded_post_concept\": \"Elaborated concept description...\", \"prompt_options\": [{\"option_description\": \"Option 1: ...\", \"prompts\": [\"Detailed prompt 1...\"]}, {\"option_description\": \"Option 2: ...\", \"prompts\": [\"Detailed prompt 2...\"]}]}`\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "1996f6d0-42bc-4b23-a1af-59c4bb1cb3ee",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1380,
|
||||
-820
|
||||
],
|
||||
"parameters": {
|
||||
"color": 3,
|
||||
"width": 620,
|
||||
"height": 740,
|
||||
"content": "# 03a. Caption Generation\n\n**Purpose:** Uses Google Gemini to write a short, engaging social media caption **specifically tailored for the target platform**. The caption complements the image (represented by the first generated prompt) and aligns with the overall content strategy. Includes relevant hashtags.\n\n**Input (from Nodes '1. Get Next Post Idea', '3a. Generate Content Concept', '3b. Generate Image Prompt Options'):**\n* `ImagePrompt` (string: The *first* prompt from step 3b)\n* `ChosenIdea` (string: Concept from step 3a)\n* `OriginalTopic` (string)\n* `TargetAudience` (string)\n* `BrandVoice` (string)\n* `Platform` (string: 'Instagram' or 'LinkedIn')\n\n**Output (JSON):**\n* `{\"Caption\": \"Generated caption text with #hashtags...\"}`"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "25e2ae24-c0c5-46fd-8c81-39a9fcafe472",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2800,
|
||||
-820
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 1160,
|
||||
"height": 740,
|
||||
"content": "# 04. Instagram Publishing\n\n**Purpose:** This block takes the final image URL and caption, prepares them for the Instagram Graph API, uploads the media to create a container, waits for Instagram to process it, and finally publishes the container as a post to the connected Instagram account.\n\n**Input (from Nodes '3c. Generate Post Caption (Gemini)' & '4. Generate Image using Prompt 1 (Replicate Flux)'):**\n* `ImageURL` (string: URL of the generated image from Replicate)\n* `Caption` (string: Generated post text with hashtags from Gemini)\n\n**Process:**\n1. **Format Data (`5. Prepare Data...`):** Organizes the ImageURL and Caption into the required structure.\n2. **Create Media Container (`6a. Create...`):** Sends the `image_url` and `caption` to the Instagram Graph API (`media` edge) to initiate the upload. Receives a container `id`.\n3. **Wait for Processing (`6b. Wait...`):** Pauses the workflow to allow Instagram's servers time to process the uploaded media. *Note: Wait time might need adjustment depending on media size and API responsiveness.*\n4. **Publish Media (`6c. Publish...`):** Sends the container `id` (as `creation_id`) to the Instagram Graph API (`media_publish` edge) to make the post live.\n\n**Output:** The content is published as a new post on the target Instagram profile. The final node (`6c. Publish Post...`) returns the `id` of the successfully published media object on Instagram."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "d7082400-def2-40eb-9dbc-3e15d24c8f8f",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
4640,
|
||||
-480
|
||||
],
|
||||
"parameters": {
|
||||
"color": 6,
|
||||
"width": 380,
|
||||
"height": 300,
|
||||
"content": "# 05. Finalize: Update Sheet Status\n\n**Purpose:** Marks the processed post idea as completed in the Google Sheet.\n\n**Action:** Finds the corresponding row in the sheet (using the 'Topic' to match) and updates its 'Status' column to '1'. This prevents the same idea from being processed again by the workflow in future runs."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "4e5433ff-5d04-424a-8165-6fd85cca1ad0",
|
||||
"name": "Sticky Note6",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-100,
|
||||
-300
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "71bf2b4d-eaa1-423b-b798-8c0f737f4371",
|
||||
"name": "Sticky Note7",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-1760,
|
||||
-440
|
||||
],
|
||||
"parameters": {
|
||||
"width": 420,
|
||||
"height": 240,
|
||||
"content": "# 00. Scheduled Start & Input Preparation\n\n**Purpose:** Initiates the workflow automatically based on the user-defined schedule. Fetches the next available post idea (Status=0) from Google Sheets and prepares the necessary input variables (`Topic`, `Audience`, `Voice`, `Platform`) for the content generation steps."
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"pinData": {
|
||||
"3c. Generate Post Caption (Gemini)": [
|
||||
{
|
||||
"output": {
|
||||
"Caption": "The future of call centers is here, and it's all about human + AI collaboration ✨. We believe AI should enhance, not replace, the human touch, leading to better customer experiences and happier agents. Ready to see how AI can transform your customer interactions? 🤔 \n\n#AIinCX #CallCenterAI #CustomerExperience #ArtificialIntelligence #TechInnovation #FutureofWork #HumanAI"
|
||||
}
|
||||
}
|
||||
],
|
||||
"3a. Generate Content Concept (Gemini)": [
|
||||
{
|
||||
"output": {
|
||||
"ideas": [
|
||||
{
|
||||
"concept": "Visually striking image of a human hand interacting with a glowing AI interface. Caption highlights how AI enhances, not replaces, human connection in call centers, leading to better customer experiences. Focus on the seamless collaboration between humans and AI.",
|
||||
"suggested_format": "Single Image"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"3b. Generate Image Prompt Options (Gemini)": [
|
||||
{
|
||||
"output": {
|
||||
"prompt_options": [
|
||||
{
|
||||
"prompts": [
|
||||
"Close-up shot of a diverse human hand gently touching a shimmering, holographic AI interface that displays abstract data visualizations. The background is blurred, showing a modern, bright call center environment. Soft, diffused lighting with hints of neon blue and teal. Ethereal, optimistic mood. Style: Digital art, futuristic, ethereal. Color palette: Pastel blues, teals, and whites with subtle glowing accents. Composition: Focus on the hand and interface, using shallow depth of field."
|
||||
],
|
||||
"option_description": "Option 1: Ethereal and futuristic. Focus on soft, diffused lighting and glowing elements to create a dreamlike, optimistic atmosphere."
|
||||
},
|
||||
{
|
||||
"prompts": [
|
||||
"A slightly wider shot showcasing a human hand confidently interacting with a vibrant, glowing AI interface displaying customer profiles and real-time data. The background shows a bustling call center with diverse agents working collaboratively. Dramatic, focused lighting with strong shadows and vibrant color accents. Energetic, innovative mood. Style: High-resolution photograph, modern, bold. Color palette: Deep blues, purples, and oranges with bright yellow accents on the interface. Composition: Dynamic angle, leading lines towards the interface and agents in the background, creating depth."
|
||||
],
|
||||
"option_description": "Option 2: Bold and dynamic. Focus on contrast and vibrant colors to create a visually striking and energetic image."
|
||||
}
|
||||
],
|
||||
"expanded_post_concept": "Single Image post for Instagram showcasing a human hand interacting with a glowing AI interface. The image should convey a sense of collaboration and enhancement, not replacement, emphasizing the positive impact of AI on human connection in call centers. Given Instagram's visual nature, the image should be aesthetically pleasing, modern, and slightly stylized to attract attention and reflect an innovative brand voice."
|
||||
}
|
||||
}
|
||||
],
|
||||
"4. Generate Image using Prompt 1 (Replicate Flux)": [
|
||||
{
|
||||
"id": "be6ctjws49rma0cpjcy8ej169r",
|
||||
"logs": "",
|
||||
"urls": {
|
||||
"get": "https://api.replicate.com/v1/predictions/be6ctjws49rma0cpjcy8ej169r",
|
||||
"cancel": "https://api.replicate.com/v1/predictions/be6ctjws49rma0cpjcy8ej169r/cancel",
|
||||
"stream": "https://stream.replicate.com/v1/files/bcwr-kvewu3jt6ec4id3svfazffgcxpyifayvqjhxloix3oncveoazwya"
|
||||
},
|
||||
"error": null,
|
||||
"input": {
|
||||
"raw": false,
|
||||
"prompt": "Close-up shot of a diverse human hand gently touching a shimmering, holographic AI interface that displays abstract data visualizations. The background is blurred, showing a modern, bright call center environment. Soft, diffused lighting with hints of neon blue and teal. Ethereal, optimistic mood. Style: Digital art, futuristic, ethereal. Color palette: Pastel blues, teals, and whites with subtle glowing accents. Composition: Focus on the hand and interface, using shallow depth of field.",
|
||||
"aspect_ratio": "1:1",
|
||||
"output_format": "jpg",
|
||||
"safety_tolerance": 6
|
||||
},
|
||||
"model": "black-forest-labs/flux-1.1-pro-ultra",
|
||||
"output": "https://replicate.delivery/xezq/LJHVcPdaiexmPyfQnkDBi6o2HpkFWKzeoktHmS5uEvgSIgRpA/tmptt54uqf7.jpg",
|
||||
"status": "processing",
|
||||
"version": "hidden",
|
||||
"created_at": "2025-05-02T23:02:24.29Z",
|
||||
"data_removed": false
|
||||
}
|
||||
],
|
||||
"2. Prepare Input Variables (Topic, Audience, etc.)": [
|
||||
{
|
||||
"Topic": "Call Center Transformation with Artificial Intelligence",
|
||||
"Platform": "Instagram",
|
||||
"BrandVoice": "Informative, reassuring, innovative",
|
||||
"TargetAudience": "Enterprise customers, tech enthusiasts, customer experience professionals"
|
||||
}
|
||||
]
|
||||
},
|
||||
"connections": {
|
||||
"(Parse Caption JSON)": {
|
||||
"ai_outputParser": [
|
||||
[
|
||||
{
|
||||
"node": "3c. Generate Post Caption (Gemini)",
|
||||
"type": "ai_outputParser",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"(Parse Concept JSON)": {
|
||||
"ai_outputParser": [
|
||||
[
|
||||
{
|
||||
"node": "3a. Generate Content Concept (Gemini)",
|
||||
"type": "ai_outputParser",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"(Parse Prompts JSON)": {
|
||||
"ai_outputParser": [
|
||||
[
|
||||
{
|
||||
"node": "3b. Generate Image Prompt Options (Gemini)",
|
||||
"type": "ai_outputParser",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"(LLM Model for Caption)": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "3c. Generate Post Caption (Gemini)",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"(LLM Model for Concept)": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "3a. Generate Content Concept (Gemini)",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"(LLM Model for Prompts)": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "3b. Generate Image Prompt Options (Gemini)",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"6c. Publish Post to Instagram": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "7. Update Post Status in Sheet",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"1. Get Next Post Idea from Sheet": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "2. Prepare Input Variables (Topic, Audience, etc.)",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"5. Prepare Data for Instagram API": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "6a. Create Instagram Media Container",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"6b. Wait for Container Processing": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "6c. Publish Post to Instagram",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"3c. Generate Post Caption (Gemini)": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "4. Generate Image using Prompt 1 (Replicate Flux)",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"6a. Create Instagram Media Container": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "6b. Wait for Container Processing",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Scheduled Start: Check for New Posts": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "1. Get Next Post Idea from Sheet",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"3a. Generate Content Concept (Gemini)": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "3b. Generate Image Prompt Options (Gemini)",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"3b. Generate Image Prompt Options (Gemini)": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "3c. Generate Post Caption (Gemini)",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"4. Generate Image using Prompt 1 (Replicate Flux)": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "5. Prepare Data for Instagram API",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"2. Prepare Input Variables (Topic, Audience, etc.)": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "3a. Generate Content Concept (Gemini)",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
559
workflows/Wait/1135_Wait_Code_Create_Webhook.json
Normal file
559
workflows/Wait/1135_Wait_Code_Create_Webhook.json
Normal file
@@ -0,0 +1,559 @@
|
||||
{
|
||||
"id": "7ZIG5xxEACMBgj4Z",
|
||||
"meta": {
|
||||
"instanceId": "1b1e85a338c6ce950207b3b471d43405c7b292e6b980ee5b66c1a9e5af2a50f8"
|
||||
},
|
||||
"name": "Create Threads on Bluesky",
|
||||
"tags": [
|
||||
{
|
||||
"id": "f3JGorUk16BX0hZI",
|
||||
"name": "Bluesky",
|
||||
"createdAt": "2025-01-19T09:37:40.989Z",
|
||||
"updatedAt": "2025-01-19T09:37:40.989Z"
|
||||
},
|
||||
{
|
||||
"id": "hTHZamkzaTBmF3yo",
|
||||
"name": "Template",
|
||||
"createdAt": "2025-01-16T04:45:44.377Z",
|
||||
"updatedAt": "2025-01-16T04:45:44.377Z"
|
||||
}
|
||||
],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "5fea442d-80e7-4e9c-9214-12fa8bc98a71",
|
||||
"name": "Create Bluesky Session",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
-2160,
|
||||
540
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://bsky.social/xrpc/com.atproto.server.createSession",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"sendBody": true,
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "identifier",
|
||||
"value": "={{ $json.BlueskyHandle }}"
|
||||
},
|
||||
{
|
||||
"name": "password",
|
||||
"value": "={{ $json.BlueskyAppPassword }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "8339e67d-87f8-48a5-a9c9-48d90d9baf49",
|
||||
"name": "Create Reply",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
-1200,
|
||||
540
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://bsky.social/xrpc/com.atproto.repo.createRecord",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"jsonBody": "={{ $('Create Reply Text').item.json.toJsonString() }}",
|
||||
"sendBody": true,
|
||||
"sendHeaders": true,
|
||||
"specifyBody": "json",
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"value": "=Bearer {{ $('Create Bluesky Session').item.json.accessJwt}}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "16fa4a6c-ab93-4ea1-9a9b-2f9e9804e25a",
|
||||
"name": "Run Daily at 9 AM",
|
||||
"type": "n8n-nodes-base.scheduleTrigger",
|
||||
"position": [
|
||||
-2640,
|
||||
540
|
||||
],
|
||||
"parameters": {
|
||||
"rule": {
|
||||
"interval": [
|
||||
{
|
||||
"triggerAtHour": 9
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "7c06e67d-a524-457b-a6ce-955aab353352",
|
||||
"name": "Set Bluesky Credentials",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
-2380,
|
||||
540
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "ec07f538-0164-40c5-a199-45e2a8a4604a",
|
||||
"name": "BlueskyHandle",
|
||||
"type": "string",
|
||||
"value": "[enter your bluesky handle here]"
|
||||
},
|
||||
{
|
||||
"id": "463e906c-c49b-41e0-9176-04bd2c175d0b",
|
||||
"name": "BlueskyAppPassword",
|
||||
"type": "string",
|
||||
"value": "[enter your app password here]"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "156da8f4-5cc7-4a58-9a6c-75b1bd6df4cd",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-2440,
|
||||
340
|
||||
],
|
||||
"parameters": {
|
||||
"color": 3,
|
||||
"width": 440,
|
||||
"height": 360,
|
||||
"content": "## Bluesky Authentication\nSet your Bluesky social link and also your App Password."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "2bd742a8-3955-4452-95c8-9c9a7b8071e2",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-1960,
|
||||
340
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 440,
|
||||
"height": 360,
|
||||
"content": "## Initial Post [A]\nWhen the first post is created two identifiers are returned:\n- URI (an at:// link to the post)\n- CID (a content-hash of the post)"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "e6e258e8-e4a7-4e33-bd7c-40dd4eb8842f",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-1480,
|
||||
340
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 460,
|
||||
"height": 360,
|
||||
"content": "## First Reply Post [B]\nHere we set the 'ROOT' and the 'PARENT' values.\n\nWe use both URI and CID as ROOT and PARENT, as this is the first child of the root post (Initial Post [A]).\n\nWe receive a new URI and CID in return."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "8e3808d3-ec7d-4f46-89b7-9b27350801de",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-2440,
|
||||
740
|
||||
],
|
||||
"parameters": {
|
||||
"width": 440,
|
||||
"height": 380,
|
||||
"content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Sibling Post [C]\nSet 'ROOT' using URI/CID from the root post (Initial Post [A]).\n\nFor the PARENT, we use the URI and CID returned by the preceeding post (First Reply Post [B])."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "0b9d8329-2dde-4b3b-bd9e-42d5aa367225",
|
||||
"name": "Create Reply Text",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
-1420,
|
||||
540
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "// Create the reply text\nconst replyText = \"[reply post - hidden]\";\n\n// Calculate timestamp 1 second from now\nconst futureDate = new Date(Date.now() + 1000);\n\n// Create the reply post object\nconst replyPostData = {\n repo: $('Set Bluesky Credentials').first().json.BlueskyHandle,\n collection: \"app.bsky.feed.post\",\n record: {\n \"$type\": \"app.bsky.feed.post\",\n text: replyText,\n reply: {\n root: {\n cid: $('Create Initial Post').first().json.cid,\n uri: $('Create Initial Post').first().json.uri\n },\n parent: {\n cid: $('Create Initial Post').first().json.cid,\n uri: $('Create Initial Post').first().json.uri\n }\n },\n createdAt: futureDate.toISOString()\n }\n};\n\nreturn replyPostData;"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "abfbef84-1b94-4ec4-ae96-345d0ea888ce",
|
||||
"name": "Create Sibling Text",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
-2380,
|
||||
780
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "// Create the sibling text\nconst siblingText = \"[first sibling - hidden]\";\n\n// Calculate timestamp 2 seconds from now\nconst futureDate = new Date(Date.now() + 2000);\n\n// Create the sibling post object\nconst siblingPostData = {\n repo: $('Set Bluesky Credentials').first().json.BlueskyHandle,\n collection: \"app.bsky.feed.post\",\n record: {\n \"$type\": \"app.bsky.feed.post\",\n text: siblingText,\n reply: {\n root: {\n cid: $('Create Initial Post').first().json.cid,\n uri: $('Create Initial Post').first().json.uri\n },\n parent: {\n cid: $('Create Reply').first().json.cid,\n uri: $('Create Reply').first().json.uri\n }\n },\n createdAt: futureDate.toISOString()\n }\n};\n\nreturn siblingPostData;"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "f554f5bc-bd81-4b09-887b-6c4167e8f5f1",
|
||||
"name": "Create Sibling",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
-2160,
|
||||
780
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://bsky.social/xrpc/com.atproto.repo.createRecord",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"jsonBody": "={{ $('Create Sibling Text').item.json.toJsonString() }}",
|
||||
"sendBody": true,
|
||||
"sendHeaders": true,
|
||||
"specifyBody": "json",
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"value": "=Bearer {{ $('Create Bluesky Session').item.json.accessJwt}}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "7a7025fe-4b35-44db-8974-2bc81c59eead",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-2700,
|
||||
340
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 220,
|
||||
"height": 360,
|
||||
"content": "## Trigger"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "097767bc-fbb2-4e71-af68-b87d354b796e",
|
||||
"name": "Sticky Note6",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-1960,
|
||||
740
|
||||
],
|
||||
"parameters": {
|
||||
"color": 6,
|
||||
"width": 940,
|
||||
"height": 380,
|
||||
"content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Sibling Posts using Loop node [D]\nHere we set the 'ROOT' using both URI and CID from the root post (Initial Post [A]), and for all future siblings.\n\nFor the PARENT, we use the URI and CID returned by the preceeding post.\nSo the first loop iteration gets it from the 'Create Sibling' node, and after that from the 'Create Post' node."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "5f8e88ef-0f56-4d81-921f-17dbfea41eec",
|
||||
"name": "Loop Posts",
|
||||
"type": "n8n-nodes-base.splitInBatches",
|
||||
"position": [
|
||||
-1720,
|
||||
780
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "449a0269-61cb-477c-b315-943daada65ba",
|
||||
"name": "Create Initial Post",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
-1680,
|
||||
540
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://bsky.social/xrpc/com.atproto.repo.createRecord",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"jsonBody": "={{ $('Create Post Text').item.json.toJsonString() }}",
|
||||
"sendBody": true,
|
||||
"sendHeaders": true,
|
||||
"specifyBody": "json",
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"value": "=Bearer {{ $('Create Bluesky Session').item.json.accessJwt}}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "e29aa109-2b11-44c7-9a85-b5199ef4923c",
|
||||
"name": "Create Post",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
-1360,
|
||||
780
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://bsky.social/xrpc/com.atproto.repo.createRecord",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"jsonBody": "={{ $('Create Sibling Text (Loop)').item.json.toJsonString() }}",
|
||||
"sendBody": true,
|
||||
"sendHeaders": true,
|
||||
"specifyBody": "json",
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"value": "=Bearer {{ $('Create Bluesky Session').item.json.accessJwt}}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "51c05a08-797b-448b-b291-753be14d7c78",
|
||||
"name": "Wait",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
-1200,
|
||||
780
|
||||
],
|
||||
"webhookId": "0414c5a9-938c-427d-98a2-1295eb02380d",
|
||||
"parameters": {
|
||||
"amount": 2
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "b9f1bd23-e8f2-472b-ab61-05e85ffece12",
|
||||
"name": "Create Post Text",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
-1900,
|
||||
540
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "runOnceForEachItem",
|
||||
"jsCode": "// Create the initial post text\nconst postText = \"[initial post - visible]\";\n\n// Create the parent post object\nconst postData = {\n repo: $('Set Bluesky Credentials').first().json.BlueskyHandle,\n collection: \"app.bsky.feed.post\",\n record: {\n $type: \"app.bsky.feed.post\",\n text: postText,\n createdAt: $now\n }\n};\n\nreturn postData;"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "6c1e26df-564e-4b49-8aff-bc6e5bedcbb8",
|
||||
"name": "Create Sibling Array",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
-1900,
|
||||
780
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "const items = [\n { id: 2, name: '[sibling two - hidden]' },\n { id: 3, name: '[sibling three - hidden]' },\n { id: 4, name: '[sibling four - hidden]' },\n { id: 5, name: '[sibling five - hidden]' },\n { id: 6, name: '[sibling six - hidden]' },\n { id: 7, name: '[sibling seven - hidden]' },\n { id: 8, name: '[sibling eight - hidden]' },\n { id: 9, name: '[sibling nine - visible]' },\n { id: 10, name: '[sibling ten - visible]' }\n];\n\nreturn items;"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "5a91aff4-1b9d-4c69-beed-fa906c2a133b",
|
||||
"name": "Create Sibling Text (Loop)",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
-1540,
|
||||
780
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "runOnceForEachItem",
|
||||
"jsCode": "// Create the sibling text\nconst siblingText = `[${$json.name}]`;\n\n// For the first iteration, use the parent IDs from Create Sibling node\n// For subsequent iterations, use the Create Post node\nconst isFirstIteration = $runIndex === 0;\nconst cid = isFirstIteration \n ? $('Create Sibling').first().json.cid \n : $('Create Post').first().json.cid;\nconst uri = isFirstIteration \n ? $('Create Sibling').first().json.uri \n : $('Create Post').first().json.uri;\n\n// Calculate timestamp 2 seconds from now\nconst futureDate = new Date(Date.now() + 2000);\n\n// Create the sibling post object\nconst siblingPostData = {\n repo: $('Set Bluesky Credentials').first().json.BlueskyHandle,\n collection: \"app.bsky.feed.post\",\n record: {\n \"$type\": \"app.bsky.feed.post\",\n text: siblingText,\n reply: {\n root: {\n cid: $('Create Initial Post').first().json.cid,\n uri: $('Create Initial Post').first().json.uri\n },\n parent: {\n cid: cid,\n uri: uri\n }\n },\n createdAt: futureDate.toISOString()\n }\n};\n\nreturn siblingPostData;"
|
||||
},
|
||||
"typeVersion": 2
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "d0c40145-fbf4-46b5-9df0-5b5c9c896d9c",
|
||||
"connections": {
|
||||
"Wait": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop Posts",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Loop Posts": {
|
||||
"main": [
|
||||
[],
|
||||
[
|
||||
{
|
||||
"node": "Create Sibling Text (Loop)",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Create Post": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Create Reply": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Create Sibling Text",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Create Sibling": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Create Sibling Array",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Create Post Text": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Create Initial Post",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Create Reply Text": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Create Reply",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Run Daily at 9 AM": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Set Bluesky Credentials",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Create Initial Post": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Create Reply Text",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Create Sibling Text": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Create Sibling",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Create Sibling Array": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop Posts",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Create Bluesky Session": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Create Post Text",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Set Bluesky Credentials": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Create Bluesky Session",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Create Sibling Text (Loop)": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Create Post",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
613
workflows/Wait/1145_Wait_Splitout_Automation_Webhook.json
Normal file
613
workflows/Wait/1145_Wait_Splitout_Automation_Webhook.json
Normal file
@@ -0,0 +1,613 @@
|
||||
{
|
||||
"id": "7i2RqqCYaKHUt4n3",
|
||||
"meta": {
|
||||
"instanceId": "fb924c73af8f703905bc09c9ee8076f48c17b596ed05b18c0ff86915ef8a7c4a"
|
||||
},
|
||||
"name": "Google Site Index - sitemap.xml example",
|
||||
"tags": [],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "4da50fbf-7707-42ea-badc-6748c4ee30db",
|
||||
"name": "When clicking \"Test workflow\"",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
-927,
|
||||
472
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "9e5bd6c8-a056-462b-b746-60d86bfbe398",
|
||||
"name": "Split Out",
|
||||
"type": "n8n-nodes-base.splitOut",
|
||||
"position": [
|
||||
480,
|
||||
360
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldToSplitOut": "urlset.url"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "0d4acf98-31c5-4a0d-bb29-c1d045c0705c",
|
||||
"name": "Check status",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"onError": "continueErrorOutput",
|
||||
"position": [
|
||||
1540,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://indexing.googleapis.com/v3/urlNotifications/metadata?url={{ encodeURIComponent($json.loc) }}",
|
||||
"options": {
|
||||
"response": {
|
||||
"response": {
|
||||
"fullResponse": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"authentication": "predefinedCredentialType",
|
||||
"nodeCredentialType": "googleOAuth2Api"
|
||||
},
|
||||
"credentials": {
|
||||
"googleOAuth2Api": {
|
||||
"id": "K8Cz9Dy3TR68udv2",
|
||||
"name": "Google account"
|
||||
}
|
||||
},
|
||||
"retryOnFail": false,
|
||||
"typeVersion": 4.1
|
||||
},
|
||||
{
|
||||
"id": "eee0eba6-3aa3-4841-9d48-8407db1212e2",
|
||||
"name": "Loop Over Items",
|
||||
"type": "n8n-nodes-base.splitInBatches",
|
||||
"position": [
|
||||
1340,
|
||||
360
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "47745d33-8358-45a8-a67d-60f9f0574bae",
|
||||
"name": "Wait",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
2080,
|
||||
400
|
||||
],
|
||||
"webhookId": "44364241-e54b-4b44-aaa1-0d8121a7f497",
|
||||
"parameters": {
|
||||
"unit": "seconds",
|
||||
"amount": "={{ Math.min(1.5,0.3+3*Math.random()).toFixed(2) }}"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "9f1bf72e-8ecd-4239-b96f-b77be4c86b18",
|
||||
"name": "URL Updated",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1840,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://indexing.googleapis.com/v3/urlNotifications:publish",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"sendBody": true,
|
||||
"authentication": "predefinedCredentialType",
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "url",
|
||||
"value": "={{ $('Loop Over Items').item.json.loc }}"
|
||||
},
|
||||
{
|
||||
"name": "type",
|
||||
"value": "URL_UPDATED"
|
||||
}
|
||||
]
|
||||
},
|
||||
"nodeCredentialType": "googleOAuth2Api"
|
||||
},
|
||||
"credentials": {
|
||||
"googleOAuth2Api": {
|
||||
"id": "K8Cz9Dy3TR68udv2",
|
||||
"name": "Google account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.1
|
||||
},
|
||||
{
|
||||
"id": "629eaf34-ef3c-4e9c-9537-69a03310dd9c",
|
||||
"name": "Schedule Trigger",
|
||||
"type": "n8n-nodes-base.scheduleTrigger",
|
||||
"position": [
|
||||
-927,
|
||||
272
|
||||
],
|
||||
"parameters": {
|
||||
"rule": {
|
||||
"interval": [
|
||||
{
|
||||
"triggerAtHour": 2,
|
||||
"triggerAtMinute": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "2f95065c-fdc9-4773-87b0-37007ae4f9a5",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-87,
|
||||
192
|
||||
],
|
||||
"parameters": {
|
||||
"width": 851.3475816949383,
|
||||
"height": 340.39627039627067,
|
||||
"content": "## Collect list of URLs\n\nThis part extracts all pages from all sitemaps and sorts by the last modified date `lastmod` (from newest to oldest)"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "33798da1-4fd3-43dc-9ff4-753bae798535",
|
||||
"name": "is new?",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
1700,
|
||||
280
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"looseTypeValidation": true
|
||||
},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "loose"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "c8566fc4-57cf-4272-841e-014bb354a37d",
|
||||
"operator": {
|
||||
"type": "dateTime",
|
||||
"operation": "after"
|
||||
},
|
||||
"leftValue": "={{ $('Loop Over Items').item.json.lastmod }}",
|
||||
"rightValue": "={{ $json.body.latestUpdate.notifyTime }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "b5d538ec-d7bc-40ac-9b9e-e5ead9378387",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1500,
|
||||
121.07782938758908
|
||||
],
|
||||
"parameters": {
|
||||
"width": 504.2424242424241,
|
||||
"height": 431.1089918072487,
|
||||
"content": "## Check URL metadata and update, if:\n* Google returns error (404 error means that this URL was not previously added)\n* Date of article update is after the date of last request to re-index"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "2cc0b088-b09f-4dc2-8027-9e0ff442576b",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-640,
|
||||
196.4335593220339
|
||||
],
|
||||
"parameters": {
|
||||
"width": 515.8058994999984,
|
||||
"height": 335.72259887005646,
|
||||
"content": "## Get sitemap.xml\nVarious CMS systems often have multiple sitemaps for different content (posts, tags, pages etc). Need to fetch all sitemaps first and then extract all pages from all sitemaps.\n### Remember to update the real sitemap URL!"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "d8dc3b65-0d47-49a7-9042-33dbc5a2e245",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-662.5490981963931,
|
||||
120.2098305084748
|
||||
],
|
||||
"parameters": {
|
||||
"color": 6,
|
||||
"width": 1458.468937875752,
|
||||
"height": 453.3292476478371,
|
||||
"content": "## Feel free to adapt this part depending on your website CMS\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "a763f582-500c-4cc8-b780-672ebc3d0845",
|
||||
"name": "Get content-specific sitemaps",
|
||||
"type": "n8n-nodes-base.splitOut",
|
||||
"position": [
|
||||
-260,
|
||||
360
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldToSplitOut": "sitemapindex.sitemap"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "e7aa9728-eb9b-454d-a710-561d76841d7a",
|
||||
"name": "Convert sitemap to JSON",
|
||||
"type": "n8n-nodes-base.xml",
|
||||
"position": [
|
||||
-440,
|
||||
360
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "496366d7-0d4e-401c-a375-8ca8882e8a32",
|
||||
"name": "Force urlset.url to array",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
320,
|
||||
360
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "8d16114b-1d1a-4522-a550-6c799a44538a",
|
||||
"name": "=urlset.url",
|
||||
"type": "array",
|
||||
"value": "={{ $json.urlset.url[0] ? $json.urlset.url : [$json.urlset.url] }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.3
|
||||
},
|
||||
{
|
||||
"id": "3a8e00a6-2fa4-4903-943d-890e0078181e",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
820,
|
||||
120
|
||||
],
|
||||
"parameters": {
|
||||
"color": 3,
|
||||
"width": 459.2224448897797,
|
||||
"height": 451.39712985292624,
|
||||
"content": "## Update the `lastmod` and `loc` fields\nThese are pre-defined fields according to [the XML schema for the Sitemap protocol](https://www.sitemaps.org/protocol.html).\n\nIf your CMS system has different field names, please rename them here:\n* the last modified field `lastmod`\n* URL of the page in `loc` field"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "9d841026-ede6-4396-a67b-e1787ffe9a17",
|
||||
"name": "Assign mandatiry sitemap fields",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
1000,
|
||||
360
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "bb0e1337-6fda-4a22-9963-d0b1271fc2a6",
|
||||
"name": "lastmod",
|
||||
"type": "string",
|
||||
"value": "={{ $json.lastmod }}"
|
||||
},
|
||||
{
|
||||
"id": "e7517c23-f989-4d75-9078-d82c75e51c65",
|
||||
"name": "loc",
|
||||
"type": "string",
|
||||
"value": "={{ $json.loc }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.3
|
||||
},
|
||||
{
|
||||
"id": "99787654-f554-4650-afc0-c4fa65392c2b",
|
||||
"name": "convert page data to JSON",
|
||||
"type": "n8n-nodes-base.xml",
|
||||
"position": [
|
||||
120,
|
||||
360
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"explicitArray": false
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "f5cc1725-955c-4eb2-a66f-93153ebf35d1",
|
||||
"name": "Get sitemap.xml",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
-620,
|
||||
360
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://wordpress.org/sitemap.xml",
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 4.1
|
||||
},
|
||||
{
|
||||
"id": "789076f0-4aa1-469b-afac-af717c0b03c3",
|
||||
"name": "Get content of each sitemap",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
-60,
|
||||
360
|
||||
],
|
||||
"parameters": {
|
||||
"url": "={{ $json.loc }}",
|
||||
"options": {
|
||||
"batching": {
|
||||
"batch": {
|
||||
"batchSize": 1,
|
||||
"batchInterval": 150
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.1
|
||||
},
|
||||
{
|
||||
"id": "b0bdc6d6-1306-4c0c-bec2-7e59d587db69",
|
||||
"name": "Sort",
|
||||
"type": "n8n-nodes-base.sort",
|
||||
"position": [
|
||||
640,
|
||||
360
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"sortFieldsUi": {
|
||||
"sortField": [
|
||||
{
|
||||
"order": "descending",
|
||||
"fieldName": "lastmod"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"callerPolicy": "workflowsFromSameOwner",
|
||||
"errorWorkflow": "6",
|
||||
"executionOrder": "v1",
|
||||
"saveManualExecutions": true,
|
||||
"saveDataSuccessExecution": "all"
|
||||
},
|
||||
"versionId": "5c21ebb6-67df-4bde-9aea-6cc9a7621fc0",
|
||||
"connections": {
|
||||
"Sort": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Assign mandatiry sitemap fields",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop Over Items",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"is new?": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "URL Updated",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Wait",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Split Out": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Sort",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"URL Updated": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Check status": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "is new?",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "URL Updated",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get sitemap.xml": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Convert sitemap to JSON",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Loop Over Items": {
|
||||
"main": [
|
||||
[],
|
||||
[
|
||||
{
|
||||
"node": "Check status",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Schedule Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get sitemap.xml",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Convert sitemap to JSON": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get content-specific sitemaps",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Force urlset.url to array": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Split Out",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"convert page data to JSON": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Force urlset.url to array",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get content of each sitemap": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "convert page data to JSON",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get content-specific sitemaps": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get content of each sitemap",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When clicking \"Test workflow\"": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get sitemap.xml",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Assign mandatiry sitemap fields": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop Over Items",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
2113
workflows/Wait/1282_Wait_Code_Import_Webhook.json
Normal file
2113
workflows/Wait/1282_Wait_Code_Import_Webhook.json
Normal file
File diff suppressed because it is too large
Load Diff
3777
workflows/Wait/1293_Wait_Splitout_Automation_Webhook.json
Normal file
3777
workflows/Wait/1293_Wait_Splitout_Automation_Webhook.json
Normal file
File diff suppressed because it is too large
Load Diff
2774
workflows/Wait/1312_Wait_Schedule_Create_Webhook.json
Normal file
2774
workflows/Wait/1312_Wait_Schedule_Create_Webhook.json
Normal file
File diff suppressed because it is too large
Load Diff
1147
workflows/Wait/1359_Wait_Splitout_Create_Webhook.json
Normal file
1147
workflows/Wait/1359_Wait_Splitout_Create_Webhook.json
Normal file
File diff suppressed because it is too large
Load Diff
650
workflows/Wait/1362_Wait_Webhook_Create_Webhook.json
Normal file
650
workflows/Wait/1362_Wait_Webhook_Create_Webhook.json
Normal file
@@ -0,0 +1,650 @@
|
||||
{
|
||||
"id": "QO4Mg23JvVfNCICy",
|
||||
"meta": {
|
||||
"instanceId": "a2b23892dd6989fda7c1209b381f5850373a7d2b85609624d7c2b7a092671d44",
|
||||
"templateCredsSetupCompleted": true
|
||||
},
|
||||
"name": "Build a Phone Agent to qualify outbound leads and inbound calls with RetellAI -vide",
|
||||
"tags": [
|
||||
{
|
||||
"id": "12w64ydbjEKDaM0B",
|
||||
"name": "inbound",
|
||||
"createdAt": "2025-05-06T20:31:43.427Z",
|
||||
"updatedAt": "2025-05-06T20:31:43.427Z"
|
||||
},
|
||||
{
|
||||
"id": "xSqaFWDcbJCRECKZ",
|
||||
"name": "outbound",
|
||||
"createdAt": "2025-05-06T20:31:38.072Z",
|
||||
"updatedAt": "2025-05-06T20:31:38.072Z"
|
||||
}
|
||||
],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "78f39980-c9f8-49b6-93bb-a1f61d347ac3",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-240,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"width": 1260,
|
||||
"height": 320,
|
||||
"content": "# Outbound lead qualification call workflow"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "661006b9-dac7-4ac0-882a-2e0cba9dbae1",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-240,
|
||||
360
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 1260,
|
||||
"height": 320,
|
||||
"content": "# Inbound call appointment scheduler workflow"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "96a278b9-8d2e-4f85-9f6a-2997932a7ca4",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1060,
|
||||
-420
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 1400,
|
||||
"height": 1100,
|
||||
"content": "# Post-call workflow\n## Triggers when a new lead is added in Google Sheets:\n\n### 1 -Sends SMS to remind rep to call in 5 min\n### 2- (Optional delay step)\n### 3- Triggers RetellAI to place an automated call to the lead\n\n## 💡 Requires phone numbers to be formatted in E.164"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "d082f904-f185-4615-b0d8-9438c731786f",
|
||||
"name": "Detect new lead in Google Sheets",
|
||||
"type": "n8n-nodes-base.googleSheetsTrigger",
|
||||
"position": [
|
||||
-160,
|
||||
100
|
||||
],
|
||||
"parameters": {
|
||||
"event": "rowAdded",
|
||||
"options": {},
|
||||
"pollTimes": {
|
||||
"item": [
|
||||
{
|
||||
"mode": "everyHour"
|
||||
}
|
||||
]
|
||||
},
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "id",
|
||||
"value": "="
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "id",
|
||||
"value": "="
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsTriggerOAuth2Api": {
|
||||
"id": "pXaVMshaL2QzVDYh",
|
||||
"name": "Google Sheets Trigger account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "c61172c2-7795-47be-acaa-d4824ca69680",
|
||||
"name": "Send SMS reminder to call lead in 5 minutes",
|
||||
"type": "n8n-nodes-base.twilio",
|
||||
"position": [
|
||||
140,
|
||||
100
|
||||
],
|
||||
"parameters": {
|
||||
"to": "={{ $json['Phone Number'] }}",
|
||||
"from": "+33600000000",
|
||||
"message": "Hello, thanks for your interest in our roofing services. We'll be calling you shortly to ask about your project!",
|
||||
"options": {},
|
||||
"resource": "call"
|
||||
},
|
||||
"credentials": {
|
||||
"twilioApi": {
|
||||
"id": "udXVmM3xHYZbMW4g",
|
||||
"name": "Twilio account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "d88573d4-ec99-40e4-8603-f1e910d034d1",
|
||||
"name": "Wait 5 minutes before making call",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
460,
|
||||
100
|
||||
],
|
||||
"webhookId": "344c2d5d-5629-4466-866b-ac6359b3b042",
|
||||
"parameters": {
|
||||
"unit": "minutes",
|
||||
"amount": 1
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "d6778895-90dd-471e-9d9d-c48a35154291",
|
||||
"name": "Call new lead using RetellAI",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
760,
|
||||
100
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://api.retellai.com/v2/create-phone-call",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"jsonBody": "={\n \"from_number\": \"+33600000000\",\n \"to_number\": \"{{ $json['Phone Number'] }}\",\n \"retell_llm_dynamic_variables\": {\n \"uuid\": \"{{ $('Detect new lead in Google Sheets').item.json.UUID }}\"\n }\n}",
|
||||
"sendBody": true,
|
||||
"sendHeaders": true,
|
||||
"specifyBody": "json",
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"value": "Bearer key_XXXXXXXXX"
|
||||
},
|
||||
{
|
||||
"name": "Content-Type",
|
||||
"value": "application/json"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "8e7e7c0c-2600-4b20-ba30-b855d456d302",
|
||||
"name": "Receive inbound call from RetellAI (webhook)",
|
||||
"type": "n8n-nodes-base.webhook",
|
||||
"position": [
|
||||
-160,
|
||||
460
|
||||
],
|
||||
"webhookId": "ebd11c9b-129c-4b59-8c27-9a4b567305f7",
|
||||
"parameters": {
|
||||
"path": "ebd11c9b-129c-4b59-8c27-9a4b567305f7",
|
||||
"options": {},
|
||||
"httpMethod": "POST",
|
||||
"responseMode": "responseNode"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "36bf25b0-d39d-4127-b005-5e3619069744",
|
||||
"name": "Check if phone number exists in Google Sheets",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"position": [
|
||||
300,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"filtersUI": {
|
||||
"values": [
|
||||
{
|
||||
"lookupValue": "={{ $json.body.call_inbound.from_number }}",
|
||||
"lookupColumn": "Phone Number"
|
||||
}
|
||||
]
|
||||
},
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "id",
|
||||
"value": "="
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "id",
|
||||
"value": "="
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsOAuth2Api": {
|
||||
"id": "51us92xkOlrvArhV",
|
||||
"name": "Google Sheets account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.5
|
||||
},
|
||||
{
|
||||
"id": "0b2dc7b9-84c1-488b-9d02-47cf6ee460c7",
|
||||
"name": "Send response to inbound webhook call",
|
||||
"type": "n8n-nodes-base.respondToWebhook",
|
||||
"position": [
|
||||
760,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"respondWith": "json",
|
||||
"responseBody": "={\n \"call_inbound\": {\n \"dynamic_variables\": {\n \"name\": \"{{ $json.Name }}\"\n }\n }\n}"
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "063a4a31-429f-4cf0-b248-869131e92633",
|
||||
"name": "Receive post-call data from RetellAI (webhook)",
|
||||
"type": "n8n-nodes-base.webhook",
|
||||
"position": [
|
||||
1180,
|
||||
80
|
||||
],
|
||||
"webhookId": "f8878b78-43ea-4caa-b16c-cde9aaf2e9b1",
|
||||
"parameters": {
|
||||
"path": "f8878b78-43ea-4caa-b16c-cde9aaf2e9b1",
|
||||
"options": {},
|
||||
"httpMethod": "POST"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "215e2031-983a-4785-b46d-026f64c115e4",
|
||||
"name": "Filter for analyzed calls only",
|
||||
"type": "n8n-nodes-base.filter",
|
||||
"position": [
|
||||
1400,
|
||||
80
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "a0e40476-0054-43ec-b7a7-e872d1c6061a",
|
||||
"operator": {
|
||||
"name": "filter.operator.equals",
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json.body.event }}",
|
||||
"rightValue": "call_analyzed"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "f8cae0c3-1b5d-47e6-b7fd-b47558c30d3f",
|
||||
"name": "Check if call was outbound",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
1620,
|
||||
80
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "46590184-4e33-48fd-a9f4-c63b13f88c1f",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json.body.call.direction }}",
|
||||
"rightValue": "outbound"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "8997d5ec-bfb9-4ce9-9e13-6035f02b634e",
|
||||
"name": "Update lead record in Google Sheets",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"position": [
|
||||
1860,
|
||||
-40
|
||||
],
|
||||
"parameters": {
|
||||
"columns": {
|
||||
"value": {
|
||||
"UUID": "={{ $json.body.call.retell_llm_dynamic_variables.uuid }}",
|
||||
"Qualification": "={{ $json.body.call.call_analysis.custom_analysis_data.qualification }}"
|
||||
},
|
||||
"schema": [
|
||||
{
|
||||
"id": "UUID",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "UUID",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Name",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "Name",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Phone Number",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "Phone Number",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Datetime Called",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "Datetime Called",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Qualification",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "Qualification",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "row_number",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"readOnly": true,
|
||||
"required": false,
|
||||
"displayName": "row_number",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
}
|
||||
],
|
||||
"mappingMode": "defineBelow",
|
||||
"matchingColumns": [
|
||||
"UUID"
|
||||
],
|
||||
"attemptToConvertTypes": false,
|
||||
"convertFieldsToString": false
|
||||
},
|
||||
"options": {},
|
||||
"operation": "update",
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "id",
|
||||
"value": "="
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "id",
|
||||
"value": "="
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsOAuth2Api": {
|
||||
"id": "51us92xkOlrvArhV",
|
||||
"name": "Google Sheets account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.5
|
||||
},
|
||||
{
|
||||
"id": "20757ff8-6604-4c80-96ec-32bfac983ed7",
|
||||
"name": "Send call summary email",
|
||||
"type": "n8n-nodes-base.gmail",
|
||||
"position": [
|
||||
2220,
|
||||
-40
|
||||
],
|
||||
"webhookId": "806ec3f9-8bcb-48ef-8e22-9d1ce3b06bf0",
|
||||
"parameters": {
|
||||
"sendTo": "youremail@gmail.com",
|
||||
"message": "=Name:\n{{ $json.body.call.call_analysis.custom_analysis_data.first_name }}\n\nNumber:\n{{ $json.body.call.call_analysis.custom_analysis_data.phone_number }}\n\nQualification:\n{{ $json.body.call.call_analysis.custom_analysis_data.qualification }}\n\n\nCall Summary:\n{{ $json.body.call.call_analysis.custom_analysis_data.call_summary }}",
|
||||
"options": {},
|
||||
"subject": "=New Lead - Call Summary",
|
||||
"emailType": "text"
|
||||
},
|
||||
"credentials": {
|
||||
"gmailOAuth2": {
|
||||
"id": "rKxQHWZ2F5XLJmwF",
|
||||
"name": "Gmail account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "753bd92d-b95b-4710-bf49-6da89a43223f",
|
||||
"name": "Generate call summary with OpenAI",
|
||||
"type": "@n8n/n8n-nodes-langchain.openAi",
|
||||
"position": [
|
||||
1860,
|
||||
180
|
||||
],
|
||||
"parameters": {
|
||||
"modelId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gpt-4.1",
|
||||
"cachedResultName": "GPT-4.1"
|
||||
},
|
||||
"options": {},
|
||||
"messages": {
|
||||
"values": [
|
||||
{
|
||||
"content": "=Analyze this call transcript to identify how the call went and identify possible improvements to the voice prompt:\n\n{{ $json.body.call.transcript }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "6h3DfVhNPw9I25nO",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.8
|
||||
},
|
||||
{
|
||||
"id": "cf600277-bb07-4f7a-a9b7-3e20017f716d",
|
||||
"name": "Send confirmation email to lead",
|
||||
"type": "n8n-nodes-base.gmail",
|
||||
"position": [
|
||||
2220,
|
||||
180
|
||||
],
|
||||
"webhookId": "453fe9d9-1de6-40a2-bd0c-88cb9c1cc7ef",
|
||||
"parameters": {
|
||||
"sendTo": "youremail@gmail.com",
|
||||
"message": "=New roofing appointment:\n\nClient Name:\n{{ $('Check if call was outbound').item.json.body.call.call_analysis.custom_analysis_data.first_name }}\n\nClient Number:\n{{ $('Check if call was outbound').item.json.body.call.call_analysis.custom_analysis_data.phone_number }}\n\nAvailabilities:\n{{ $('Check if call was outbound').item.json.body.call.call_analysis.custom_analysis_data.availabilities }}\n\n\nCall Summary:\n{{ $('Check if call was outbound').item.json.body.call.call_analysis.call_summary }}\n\n\nChatGPT analysis of how the call went and suggestions for improving the voice prompt:\n{{ $json.message.content }}",
|
||||
"options": {},
|
||||
"subject": "=Roofing Appointment Scheduled",
|
||||
"emailType": "text"
|
||||
},
|
||||
"credentials": {
|
||||
"gmailOAuth2": {
|
||||
"id": "rKxQHWZ2F5XLJmwF",
|
||||
"name": "Gmail account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "f75763b6-0867-4625-89e1-cafa3c9e6e44",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-240,
|
||||
-420
|
||||
],
|
||||
"parameters": {
|
||||
"width": 1260,
|
||||
"height": 400,
|
||||
"content": "# ✅ General Workflow Explanation\n## This workflow automates outbound and inbound lead calls with RetellAI, Google Sheets, OpenAI, and Gmail. It handles:\n\nScheduling and reminding outbound qualification calls\nHandling inbound appointment calls\nAutomatically updating records and sending summaries post-call\n\n## 👉 Dependencies:\n\nActive RetellAI API key\nGoogle Sheet set up with lead data\nGmail API credentials configured"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "879f8e4d-91d7-41fc-825d-08f2ef283c25",
|
||||
"connections": {
|
||||
"Check if call was outbound": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Update lead record in Google Sheets",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Generate call summary with OpenAI",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Filter for analyzed calls only": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Check if call was outbound",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Detect new lead in Google Sheets": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Send SMS reminder to call lead in 5 minutes",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Generate call summary with OpenAI": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Send confirmation email to lead",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait 5 minutes before making call": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Call new lead using RetellAI",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Update lead record in Google Sheets": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Send call summary email",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Send SMS reminder to call lead in 5 minutes": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait 5 minutes before making call",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Receive inbound call from RetellAI (webhook)": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Check if phone number exists in Google Sheets",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Check if phone number exists in Google Sheets": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Send response to inbound webhook call",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Receive post-call data from RetellAI (webhook)": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Filter for analyzed calls only",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
1184
workflows/Wait/1366_Wait_Code_Automation_Webhook.json
Normal file
1184
workflows/Wait/1366_Wait_Code_Automation_Webhook.json
Normal file
File diff suppressed because it is too large
Load Diff
427
workflows/Wait/1389_Wait_Limit_Import_Webhook.json
Normal file
427
workflows/Wait/1389_Wait_Limit_Import_Webhook.json
Normal file
@@ -0,0 +1,427 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "6b6a2db47bdf8371d21090c511052883cc9a3f6af5d0d9d567c702d74a18820e"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "f4570aad-db25-4dcd-8589-b1c8335935de",
|
||||
"name": "When clicking \u2018Test workflow\u2019",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
-180,
|
||||
3800
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "bd481559-85f2-4865-8d85-e50e72369f26",
|
||||
"name": "Wait",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
940,
|
||||
3620
|
||||
],
|
||||
"webhookId": "f10708f0-38c6-4c75-b635-37222d5b183a",
|
||||
"parameters": {
|
||||
"amount": 45
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "cc9e9947-19e4-47c5-95b0-a631d688a8b6",
|
||||
"name": "Sticky Note36",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
549.7858793743054,
|
||||
3709.534654112671
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 327.8244990224782,
|
||||
"height": 268.48353140372035,
|
||||
"content": "**40 at a time seems to be the memory limit on my server - run until complete with batches of 40 or increase based on your server memory**\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "9ebbd993-9194-40b1-a98e-352eb3a3f9eb",
|
||||
"name": "Sticky Note28",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-50.797941767307435,
|
||||
3729.028866440868
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 574.7594700148138,
|
||||
"height": 248.90718753310907,
|
||||
"content": "**Firecrawl.dev retrieves markdown inc. title, description, links & content. First define the URLs you'd like to scrape**\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "71c0f975-c0f9-47ae-a245-f852387ad461",
|
||||
"name": "Connect to your own data source",
|
||||
"type": "n8n-nodes-base.noOp",
|
||||
"position": [
|
||||
1380,
|
||||
3820
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "fba918e7-2c88-4de3-a789-cadbf4f2584e",
|
||||
"name": "Get urls from own data source",
|
||||
"type": "n8n-nodes-base.noOp",
|
||||
"position": [
|
||||
0,
|
||||
3800
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "221a75eb-0bc8-4747-9ec1-1879c46d9163",
|
||||
"name": "Example fields from data source",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"notes": "Define URLs in array",
|
||||
"position": [
|
||||
200,
|
||||
3800
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "cc2c6af0-68d3-49eb-85fe-3288d2ed0f6b",
|
||||
"name": "Page",
|
||||
"type": "array",
|
||||
"value": "[\"https://www.automake.io/\", \"https://www.n8n.io/\"]"
|
||||
}
|
||||
]
|
||||
},
|
||||
"includeOtherFields": true
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "5a914964-e8ef-4064-8ecb-f1866de0d8c6",
|
||||
"name": "Sticky Note33",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-40,
|
||||
4000
|
||||
],
|
||||
"parameters": {
|
||||
"color": 3,
|
||||
"width": 510.3561134140244,
|
||||
"height": 94.13486342358942,
|
||||
"content": "**REQUIRED**\nConnect to your database of urls to input. Name the column `Page` like in the `Example fields from data source` node and make sure it has one link per row like `split out page urls`"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "5c004d5c-afeb-47c9-b30b-eb88880f87b9",
|
||||
"name": "Sticky Note34",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
900,
|
||||
4000
|
||||
],
|
||||
"parameters": {
|
||||
"color": 3,
|
||||
"width": 284.87764467541297,
|
||||
"height": 168.68864948728321,
|
||||
"content": "**REQUIRED**\nUpdate the Auth parameter to your own [Firecrawl](https://firecrawl.dev) dev token\n\n**Header Auth parameter**\nname - Authorization\nvalue - your-own-api-key"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "53d97054-a5e4-4819-bdd9-f8632c33eba2",
|
||||
"name": "Sticky Note35",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1360,
|
||||
4000
|
||||
],
|
||||
"parameters": {
|
||||
"color": 3,
|
||||
"width": 284.87764467541297,
|
||||
"height": 91.91340067739628,
|
||||
"content": "**REQUIRED** \nOutput the data to your own data source e.g. Airtable"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "357a463f-7581-43ba-8930-af27e4762905",
|
||||
"name": "Sticky Note37",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
900,
|
||||
3570.2075673933587
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 181.96744211154697,
|
||||
"height": 189.23753199986137,
|
||||
"content": "**Respect API limits (10 requests per min)**\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "77311c67-f50f-427a-87fd-b29b1f542bbc",
|
||||
"name": "40 items at a time",
|
||||
"type": "n8n-nodes-base.limit",
|
||||
"position": [
|
||||
580,
|
||||
3800
|
||||
],
|
||||
"parameters": {
|
||||
"maxItems": 40
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "43557ab1-4e52-4598-83a9-e39d5afc6de7",
|
||||
"name": "10 at a time",
|
||||
"type": "n8n-nodes-base.splitInBatches",
|
||||
"position": [
|
||||
740,
|
||||
3800
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"batchSize": 10
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "555d52e7-010b-462b-9382-26804493de1c",
|
||||
"name": "Markdown data and Links",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
1160,
|
||||
3820
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "3a959c64-4c3c-4072-8427-67f6f6ecba1b",
|
||||
"name": "title",
|
||||
"type": "string",
|
||||
"value": "={{ $json.data.metadata.title }}"
|
||||
},
|
||||
{
|
||||
"id": "d2da0859-a7a0-4c39-913a-150ecb95d075",
|
||||
"name": "description",
|
||||
"type": "string",
|
||||
"value": "={{ $json.data.metadata.description }}"
|
||||
},
|
||||
{
|
||||
"id": "62bd2d76-b78d-4501-a59b-a25ed7b345b0",
|
||||
"name": "content",
|
||||
"type": "string",
|
||||
"value": "={{ $json.data.markdown }}"
|
||||
},
|
||||
{
|
||||
"id": "d4c712fa-b52a-498f-8abc-26dc72be61f7",
|
||||
"name": "links",
|
||||
"type": "string",
|
||||
"value": "={{ $json.data.links }} "
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "aac948e6-ac86-4cea-be84-f27919d6d936",
|
||||
"name": "Split out page URLs",
|
||||
"type": "n8n-nodes-base.splitOut",
|
||||
"position": [
|
||||
380,
|
||||
3800
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldToSplitOut": "Page"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "71c5a0d4-540e-4766-ae99-bdc427019dac",
|
||||
"name": "Retrieve Page Markdown and Links",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"notes": "curl -X POST https://api.firecrawl.dev/v1/scrape \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer YOUR_API_KEY' \\\n -d '{\n \"url\": \"https://docs.firecrawl.dev\",\n \"formats\" : [\"markdown\", \"html\"]\n }'\n",
|
||||
"position": [
|
||||
960,
|
||||
3820
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://api.firecrawl.dev/v1/scrape",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"jsonBody": "={\n \"url\": \"{{ $json.Page }}\",\n \"formats\" : [\"markdown\", \"links\"]\n} ",
|
||||
"sendBody": true,
|
||||
"sendHeaders": true,
|
||||
"specifyBody": "json",
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpHeaderAuth",
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Content-Type",
|
||||
"value": "application/json"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "nbamiF1MDku2NNz7",
|
||||
"name": "Firecrawl Bearer"
|
||||
}
|
||||
},
|
||||
"retryOnFail": true,
|
||||
"typeVersion": 4.2,
|
||||
"waitBetweenTries": 5000
|
||||
},
|
||||
{
|
||||
"id": "a2f12929-262e-4354-baa3-f9e3c05ec2eb",
|
||||
"name": "Sticky Note38",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-840,
|
||||
3340
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 581.9949654101088,
|
||||
"height": 818.5240734585421,
|
||||
"content": "## Convert URL HTML to Markdown and Get Page Links\n\n## Use Case\nTransform web pages into AI-friendly markdown format:\n- You need to process webpage content for LLM analysis\n- You want to extract both content and links from web pages\n- You need clean, formatted text without HTML markup\n- You want to respect API rate limits while crawling pages\n\n## What this Workflow Does\nThe workflow uses Firecrawl.dev API to process webpages:\n- Converts HTML content to markdown format\n- Extracts all links from each webpage\n- Handles API rate limiting automatically\n- Processes URLs in batches from your database\n\n## Setup\n1. Create a [Firecrawl.dev](https://www.firecrawl.dev/) account and get your API key\n2. Add your Firecrawl API key to the HTTP Request node's Authorization header\n3. Connect your URL database to the input node (column name must be \"Page\") or edit the array in `Example fields from data source`\n4. Configure your preferred output database connection\n\n## How to Adjust it to Your Needs\n- Modify input source to pull URLs from different databases\n- Adjust rate limiting parameters if needed\n- Customize output format for your specific use case\n\n\nMade by Simon @ [automake.io](https://automake.io)\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Wait": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "10 at a time",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"10 at a time": {
|
||||
"main": [
|
||||
null,
|
||||
[
|
||||
{
|
||||
"node": "Retrieve Page Markdown and Links",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"40 items at a time": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "10 at a time",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Split out page URLs": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "40 items at a time",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Markdown data and Links": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Connect to your own data source",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get urls from own data source": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Example fields from data source",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Connect to your own data source": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Example fields from data source": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Split out page URLs",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Retrieve Page Markdown and Links": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Markdown data and Links",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When clicking \u2018Test workflow\u2019": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get urls from own data source",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
1859
workflows/Wait/1395_Wait_Code_Create_Webhook.json
Normal file
1859
workflows/Wait/1395_Wait_Code_Create_Webhook.json
Normal file
File diff suppressed because it is too large
Load Diff
1328
workflows/Wait/1400_Wait_Code_Automation_Webhook.json
Normal file
1328
workflows/Wait/1400_Wait_Code_Automation_Webhook.json
Normal file
File diff suppressed because it is too large
Load Diff
665
workflows/Wait/1405_Wait_Splitout_Automation_Webhook.json
Normal file
665
workflows/Wait/1405_Wait_Splitout_Automation_Webhook.json
Normal file
@@ -0,0 +1,665 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "7858a8e25b8fc4dae485c1ef345e6fe74effb1f5060433ef500b4c186c965c18"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "49ab7596-665e-4a0f-bb8b-9dc04525ce88",
|
||||
"name": "Gmail",
|
||||
"type": "n8n-nodes-base.gmail",
|
||||
"position": [
|
||||
2340,
|
||||
1440
|
||||
],
|
||||
"parameters": {
|
||||
"message": "={{ $json.html }}",
|
||||
"options": {},
|
||||
"subject": "Podcast Review"
|
||||
},
|
||||
"credentials": {
|
||||
"gmailOAuth2": {
|
||||
"id": "1MUdv1HbrQUFABiZ",
|
||||
"name": "Gmail account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "40aa23f4-69d6-46e5-84a2-b46a64a3f0af",
|
||||
"name": "TaddyTopDaily",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1620,
|
||||
820
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://api.taddy.org/",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"sendBody": true,
|
||||
"sendHeaders": true,
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "query",
|
||||
"value": "=query { getTopChartsByGenres( limitPerPage:10, filterByCountry:UNITED_STATES_OF_AMERICA, taddyType:PODCASTEPISODE, genres:PODCASTSERIES_{{ $json.genre }}){ topChartsId podcastEpisodes{ uuid name audioUrl podcastSeries{ uuid name } } } }"
|
||||
}
|
||||
]
|
||||
},
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "X-USER-ID"
|
||||
},
|
||||
{
|
||||
"name": "X-API-KEY"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "42eea23b-b09c-49ee-af5b-12abb3960390",
|
||||
"name": "Genre",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
1420,
|
||||
820
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "e995cd5b-b91c-4a9d-8215-44d7dfe3f52f",
|
||||
"name": "genre",
|
||||
"type": "string",
|
||||
"value": "TECHNOLOGY"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "da256fbf-ed7b-4a26-9fa8-33d1c2b717a5",
|
||||
"name": "Split Out",
|
||||
"type": "n8n-nodes-base.splitOut",
|
||||
"position": [
|
||||
1840,
|
||||
820
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldToSplitOut": "data.getTopChartsByGenres.podcastEpisodes"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "069ab68c-dcd6-406f-8e7f-2597f62a04f5",
|
||||
"name": "Whisper Transcribe Audio",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1880,
|
||||
1120
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://api.openai.com/v1/audio/transcriptions",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"sendBody": true,
|
||||
"contentType": "multipart-form-data",
|
||||
"authentication": "predefinedCredentialType",
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "model",
|
||||
"value": "whisper-1"
|
||||
},
|
||||
{
|
||||
"name": "file",
|
||||
"parameterType": "formBinaryData",
|
||||
"inputDataFieldName": "data"
|
||||
}
|
||||
]
|
||||
},
|
||||
"nodeCredentialType": "openAiApi"
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "tTOOlpAaNT3QoKbQ",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "ffa67b8d-8601-4e1d-8f72-b6266e6b3327",
|
||||
"name": "Final Data",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
2320,
|
||||
1120
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "raw",
|
||||
"options": {},
|
||||
"jsonOutput": "={\n\"podcast\": \"{{ $('TaddyTopDaily').item.json.data.getTopChartsByGenres.podcastEpisodes[$itemIndex].podcastSeries.name }}\",\n\"name\": \"{{ $('TaddyTopDaily').item.json.data.getTopChartsByGenres.podcastEpisodes[$itemIndex].name.replace(/\\\"/g,'\\\"') }}\",\n \"url\":\"{{ $('TaddyTopDaily').item.json.data.getTopChartsByGenres.podcastEpisodes[$itemIndex].audioUrl.replace(/\"/g,'') }}\",\n\"summary\":\"{{ $json.message.content.replace(/\\\\/g, '\\\\\\\\').replace(/\"/g, '\\\\\"').replace(/\\n/g, '<br/>').replace(/\\r/g, '\\\\r').replace(/\\t/g, '\\\\t') }}\"\n \n}\n"
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "88cd1fa5-07ae-4dcd-b4f8-85cbf7c98d73",
|
||||
"name": "Merge Results",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
1900,
|
||||
1440
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "return [{fields:$input.all().map(x=>x.json)}]"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "4c2c80d1-750f-42f1-a0f1-343dec325b0f",
|
||||
"name": "HTML",
|
||||
"type": "n8n-nodes-base.html",
|
||||
"position": [
|
||||
2120,
|
||||
1440
|
||||
],
|
||||
"parameters": {
|
||||
"html": "<!DOCTYPE html>\n<html>\n<head>\n <meta charset=\"UTF-8\" />\n</head>\n<body>\n <table>\n <tr> \n {{ ['Podcast', 'Episode', 'Summary'].map(propname=>'<td><h4>'+propname+'</h4></td>').join('') }}\n </tr>\n {{ $json.fields.map(ep=>{ return `<tr><td>${ep.podcast}</td><td><a href=\"${ep.url}\">${ep.name}</a></td><td>${ep.summary}</td><td></td></tr>`} ) }}\n </table>\n</body>\n</html>\n\n<style>\ntr { \n border: 1px solid #000; \n padding: 8px; \n }\n.container {\n background-color: #ffffff;\n text-align: center;\n padding: 16px;\n border-radius: 8px;\n}\n\nh1 {\n color: #ff6d5a;\n font-size: 24px;\n font-weight: bold;\n padding: 8px;\n}\n\nh2 {\n color: #909399;\n font-size: 18px;\n font-weight: bold;\n padding: 8px;\n}\n</style>\n"
|
||||
},
|
||||
"executeOnce": true,
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "f1d13556-2c3a-48e5-84a1-5b82f338c6ba",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
340,
|
||||
760
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 547.952991050529,
|
||||
"height": 683.5200847858991,
|
||||
"content": "## Daily Podcast Summary\n### This workflow will summarize the content in the day's top podcasts for a certain genre, then send you the podcasts with summaries by email\n\n## Setup:\n 1. Create a free API key on Taddy here: https://taddy.org/signup/developers\n 2. Input your user number and API key into the `TaddyTopDaily` node in the header parameters X-USER-ID and X-API-KEY respectively.\n 3. Create access credentials for your Gmail as described here: https://developers.google.com/workspace/guides/create-credentials. Use the credentials from your *client_secret.json* in the `Gmail` node.\n 4. In the `Genre` node, set the genre of podcasts you want a summary for. Valid values are: TECHNOLOGY, NEWS, ARTS, COMEDY, SPORTS, FICTION, etc. Look at api.taddy.org for the full list (they will be displayed in the help docs as PODCASTSERIES_TECHNOLOGY, PODCASTSERIES_NEWS, etc.)\n 5. Enter your email address in the `Gmail` node.\n 6. Change the schedule time for sending email from `Schedule` to whichever time you want to receive the email.\n \n\n## Test:\n- Link a `Test Workflow` node in place of the `Schedule` node.\n- Hit Test Workflow.\n- Check your email for the results."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "5aee7279-349e-47cd-99dc-7a32677b5a20",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1820,
|
||||
1060
|
||||
],
|
||||
"parameters": {
|
||||
"width": 651.4454343326669,
|
||||
"height": 252.64899257060446,
|
||||
"content": "### Whisper transcribes and Open AI summarizes the podcast"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "f8b4a203-b27f-4a11-90ef-a7e1561219f5",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1100,
|
||||
760
|
||||
],
|
||||
"parameters": {
|
||||
"width": 1189.7320416038633,
|
||||
"height": 249.2202456997519,
|
||||
"content": "### Get daily list of top podcasts (according to Apple charts) and download audio, then crop for OpenAI"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "7045c9c8-5509-4dc0-b167-ddd4d6c90c22",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1825,
|
||||
1384
|
||||
],
|
||||
"parameters": {
|
||||
"width": 645.0210885124873,
|
||||
"height": 227.94126205257731,
|
||||
"content": "### Finally, send the email!"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "8dc9583b-cec3-4ac0-a74a-329f6c3b4801",
|
||||
"name": "Summarize Podcast",
|
||||
"type": "n8n-nodes-base.openAi",
|
||||
"position": [
|
||||
2140,
|
||||
1120
|
||||
],
|
||||
"parameters": {
|
||||
"model": "gpt-4o-mini",
|
||||
"prompt": {
|
||||
"messages": [
|
||||
{
|
||||
"content": "=Summarize the major points of the following podcast: {{ $json.text }}. Start your answer by saying 'This episode focuses on', 'This episode is about', etc. Contain your answer to 3-4 paragraphs max, and focus on only key information. "
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {
|
||||
"maxTokens": 500
|
||||
},
|
||||
"resource": "chat",
|
||||
"requestOptions": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "tTOOlpAaNT3QoKbQ",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "e8d122f1-29f9-41ca-9c6b-b72269686fd6",
|
||||
"name": "Schedule",
|
||||
"type": "n8n-nodes-base.scheduleTrigger",
|
||||
"position": [
|
||||
1220,
|
||||
820
|
||||
],
|
||||
"parameters": {
|
||||
"rule": {
|
||||
"interval": [
|
||||
{
|
||||
"triggerAtHour": 8
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "67bc7a5b-8d0a-4de4-918d-410551dad4d7",
|
||||
"name": "Request Audio Crop",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1000,
|
||||
1220
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://api.products.aspose.app/audio/cutter/api/cutter",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"sendBody": true,
|
||||
"contentType": "multipart-form-data",
|
||||
"sendHeaders": true,
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "1",
|
||||
"parameterType": "formBinaryData",
|
||||
"inputDataFieldName": "data"
|
||||
},
|
||||
{
|
||||
"name": "convertOption",
|
||||
"value": "{\"startTime\":\"00:08:00\",\"endTime\":\"00:24:00\",\"audioFormat\":\"mp3\"}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Accept",
|
||||
"value": "*/*("
|
||||
},
|
||||
{
|
||||
"name": "Connection",
|
||||
"value": "keep-alive"
|
||||
},
|
||||
{
|
||||
"name": "Origin",
|
||||
"value": "https://products.aspose.app"
|
||||
},
|
||||
{
|
||||
"name": "Referer",
|
||||
"value": "https://products.aspose.app"
|
||||
},
|
||||
{
|
||||
"name": "Sec-Fetch-Dest",
|
||||
"value": "empty"
|
||||
},
|
||||
{
|
||||
"name": "Sec-Fetch-Mode",
|
||||
"value": "cors"
|
||||
},
|
||||
{
|
||||
"name": "Sec-Fetch-Site",
|
||||
"value": "same-site"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "0dc62507-3fea-45d7-a0dc-e92fb8e2600f",
|
||||
"name": "Get Download Link",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1200,
|
||||
1220
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://api.products.aspose.app/audio/cutter/api/cutter/HandleStatus?fileRequestId={{ $('Request Audio Crop').item.json.Data.FileRequestId }}",
|
||||
"options": {},
|
||||
"sendHeaders": true,
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Accept",
|
||||
"value": "application/json, text/javascript, */*; q=0.01"
|
||||
},
|
||||
{
|
||||
"name": "Connection",
|
||||
"value": "keep-alive"
|
||||
},
|
||||
{
|
||||
"name": "Origin",
|
||||
"value": "https://products.aspose.app"
|
||||
},
|
||||
{
|
||||
"name": "Referer",
|
||||
"value": "https://products.aspose.app"
|
||||
},
|
||||
{
|
||||
"name": "Sec-Fetch-Dest",
|
||||
"value": "empty"
|
||||
},
|
||||
{
|
||||
"name": "Sec-Fetch-Dest",
|
||||
"value": "cors"
|
||||
},
|
||||
{
|
||||
"name": "Sec-Fetch-Dest",
|
||||
"value": "same-site"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "8aa65189-2a4b-4ac4-9915-45ccd679a5da",
|
||||
"name": "Download Cut MP3",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1660,
|
||||
1140
|
||||
],
|
||||
"parameters": {
|
||||
"url": "={{ $json.Data.DownloadLink }}",
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "4e7318df-dbaa-4d9f-858d-4455ead763c1",
|
||||
"name": "Download Podcast",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
2060,
|
||||
820
|
||||
],
|
||||
"parameters": {
|
||||
"url": "={{ $json.audioUrl }}",
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "ab4601c6-7387-4f2f-a2f3-4256f88c0b3e",
|
||||
"name": "Wait",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
1600,
|
||||
1360
|
||||
],
|
||||
"webhookId": "bc28bc57-d9ea-430e-88db-78d088a058cb",
|
||||
"parameters": {},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "a0b300b9-aaad-48f1-8319-a03700e0d298",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
920,
|
||||
1100
|
||||
],
|
||||
"parameters": {
|
||||
"width": 898.7483569555845,
|
||||
"height": 387.3779915472271,
|
||||
"content": "### Crop the podcast down before analysis"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "34ca89fe-4ed1-491f-b3b9-32e97040959b",
|
||||
"name": "If Downloads Ready",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
1380,
|
||||
1180
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "loose"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "49440938-0cb3-41c8-bcab-b7ad96973f77",
|
||||
"operator": {
|
||||
"type": "boolean",
|
||||
"operation": "true",
|
||||
"singleValue": true
|
||||
},
|
||||
"leftValue": "={{ $input.all().map(x=>x.json.Data.DownloadLink).reduce((accumulator, currentValue) => accumulator && currentValue, true)\n}}",
|
||||
"rightValue": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
"looseTypeValidation": true
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"HTML": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Gmail",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Download Link",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Genre": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "TaddyTopDaily",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Schedule": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Genre",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Split Out": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Download Podcast",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Final Data": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge Results",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Merge Results": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "HTML",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"TaddyTopDaily": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Split Out",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Download Cut MP3": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Whisper Transcribe Audio",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Download Podcast": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Request Audio Crop",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Download Link": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "If Downloads Ready",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Summarize Podcast": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Final Data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"If Downloads Ready": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Download Cut MP3",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Wait",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Request Audio Crop": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Download Link",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Whisper Transcribe Audio": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Summarize Podcast",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
457
workflows/Wait/1431_Wait_Redis_Send_Triggered.json
Normal file
457
workflows/Wait/1431_Wait_Redis_Send_Triggered.json
Normal file
@@ -0,0 +1,457 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "26ba763460b97c249b82942b23b6384876dfeb9327513332e743c5f6219c2b8e"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "d61d8ff3-532a-4b0d-a5a7-e02d2e79ddce",
|
||||
"name": "OpenAI Chat Model",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
2660,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "8gccIjcuf3gvaoEr",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "b6d5c1cf-b4a1-4901-b001-0c375747ee63",
|
||||
"name": "No Operation, do nothing",
|
||||
"type": "n8n-nodes-base.noOp",
|
||||
"position": [
|
||||
1660,
|
||||
520
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "f4e08e32-bb96-4b5d-852e-26ad6fec3c8c",
|
||||
"name": "Add to Messages Stack",
|
||||
"type": "n8n-nodes-base.redis",
|
||||
"position": [
|
||||
1340,
|
||||
200
|
||||
],
|
||||
"parameters": {
|
||||
"list": "=chat-buffer:{{ $json.From }}",
|
||||
"tail": true,
|
||||
"operation": "push",
|
||||
"messageData": "={{ $json.Body }}"
|
||||
},
|
||||
"credentials": {
|
||||
"redis": {
|
||||
"id": "zU4DA70qSDrZM1El",
|
||||
"name": "Redis account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "181ae99e-ebe7-4e99-b5a5-999acc249621",
|
||||
"name": "Should Continue?",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
1660,
|
||||
360
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "ec39573f-f92a-4fe4-a832-0a137de8e7d0",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $('Get Latest Message Stack').item.json.messages.last() }}",
|
||||
"rightValue": "={{ $('Twilio Trigger').item.json.Body }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "640c63ca-2798-48a9-8484-b834c1a36301",
|
||||
"name": "Window Buffer Memory",
|
||||
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
|
||||
"position": [
|
||||
2780,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"sessionKey": "=chat-debouncer:{{ $('Twilio Trigger').item.json.From }}",
|
||||
"sessionIdType": "customKey"
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "123c35c5-f7b2-4b4d-b220-0e5273e25115",
|
||||
"name": "Twilio Trigger",
|
||||
"type": "n8n-nodes-base.twilioTrigger",
|
||||
"position": [
|
||||
940,
|
||||
360
|
||||
],
|
||||
"webhookId": "0ca3da0e-e4e1-4e94-8380-06207bf9b429",
|
||||
"parameters": {
|
||||
"updates": [
|
||||
"com.twilio.messaging.inbound-message.received"
|
||||
]
|
||||
},
|
||||
"credentials": {
|
||||
"twilioApi": {
|
||||
"id": "TJv4H4lXxPCLZT50",
|
||||
"name": "Twilio account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "f4e86455-7f4d-4401-8f61-a859be1433a9",
|
||||
"name": "Get Latest Message Stack",
|
||||
"type": "n8n-nodes-base.redis",
|
||||
"position": [
|
||||
1500,
|
||||
360
|
||||
],
|
||||
"parameters": {
|
||||
"key": "=chat-buffer:{{ $json.From }}",
|
||||
"keyType": "list",
|
||||
"options": {},
|
||||
"operation": "get",
|
||||
"propertyName": "messages"
|
||||
},
|
||||
"credentials": {
|
||||
"redis": {
|
||||
"id": "zU4DA70qSDrZM1El",
|
||||
"name": "Redis account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1,
|
||||
"alwaysOutputData": false
|
||||
},
|
||||
{
|
||||
"id": "02f8e7f5-12b4-4a5a-9ce9-5f0558e447aa",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1232.162872321277,
|
||||
-50.203627749982275
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 632.8309394802918,
|
||||
"height": 766.7069233634998,
|
||||
"content": "## Step 2. Buffer Incoming Messages\n[Learn more about using Redis](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.redis)\n\n* New messages are captured into a list.\n* After X seconds, we get a fresh copy of this list\n* If the last message on the list is the same as the incoming message, then we know no new follow-on messages were sent within the last 5 seconds. Hence the user should be waiting and it is safe to reply.\n* But if the reverse is true, then we will abort the execution here."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "311c0d69-a735-4435-91b6-e80bf7d4c012",
|
||||
"name": "Send Reply",
|
||||
"type": "n8n-nodes-base.twilio",
|
||||
"position": [
|
||||
3000,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"to": "={{ $('Twilio Trigger').item.json.From }}",
|
||||
"from": "={{ $('Twilio Trigger').item.json.To }}",
|
||||
"message": "={{ $json.output }}",
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"twilioApi": {
|
||||
"id": "TJv4H4lXxPCLZT50",
|
||||
"name": "Twilio account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "c0e0cd08-66e3-4ca3-9441-8436c0d9e664",
|
||||
"name": "Wait 5 seconds",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
1340,
|
||||
360
|
||||
],
|
||||
"webhookId": "d486979c-8074-4ecb-958e-fcb24455086b",
|
||||
"parameters": {},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "c7959fa2-69a5-46b4-8e67-1ef824860f4e",
|
||||
"name": "Get Chat History",
|
||||
"type": "@n8n/n8n-nodes-langchain.memoryManager",
|
||||
"position": [
|
||||
2000,
|
||||
280
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"groupMessages": true
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "55933c54-5546-4770-8b36-a31496163528",
|
||||
"name": "Window Buffer Memory1",
|
||||
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
|
||||
"position": [
|
||||
2000,
|
||||
420
|
||||
],
|
||||
"parameters": {
|
||||
"sessionKey": "=chat-debouncer:{{ $('Twilio Trigger').item.json.From }}",
|
||||
"sessionIdType": "customKey"
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "459c0181-d239-4eec-88b6-c9603868d518",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
774.3250485705519,
|
||||
198.07493876489747
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 431.1629802181097,
|
||||
"height": 357.49804533541777,
|
||||
"content": "## Step 1. Listen for Twilio Messages\n[Read more about Twilio Trigger](https://docs.n8n.io/integrations/builtin/trigger-nodes/n8n-nodes-base.twiliotrigger)\n\nIn this example, we'll use the sender's phone number as the session ID. This will be important in retrieving chat history."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "e06313a9-066a-4387-a36c-a6c6ff57d6f9",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1900,
|
||||
80
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 618.970917763344,
|
||||
"height": 501.77420646931444,
|
||||
"content": "## Step 3. Get Messages Since Last Reply\n[Read more about using Chat Memory](https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.memorymanager)\n\nOnce conditions are met and we allow the agent to reply, we'll need to find the bot's last reply and work out the buffer of user messages since then. We can do this by looking using chat memory and comparing this to the latest message in our redis messages stack."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "601a71f6-c6f8-4b73-98c7-cfa11b1facaa",
|
||||
"name": "Get Messages Buffer",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
2320,
|
||||
280
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "01434acb-c224-46d2-99b0-7a81a2bb50c5",
|
||||
"name": "messages",
|
||||
"type": "string",
|
||||
"value": "={{\n$('Get Latest Message Stack').item.json.messages\n .slice(\n $('Get Latest Message Stack').item.json.messages.lastIndexOf(\n $('Get Chat History').item.json.messages.last().human\n || $('Twilio Trigger').item.json.chatInput\n ),\n $('Get Latest Message Stack').item.json.messages.length\n )\n .join('\\n')\n}}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "9e49f2de-89e6-4152-8e9c-ed47c5fc4654",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2549,
|
||||
120
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 670.2274698011594,
|
||||
"height": 522.5993538768389,
|
||||
"content": "## Step 4. Send Single Agent Reply For Many Messages\n[Learn more about using AI Agents](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent)\n\nFinally, our buffered messages are sent to the AI Agent that can formulate a single response for all. This could potentially improve the conversation experience if the chat interaction is naturally more rapid and spontaneous. A drawback however is that responses could be feel much slower - tweak the wait threshold to suit your needs!"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "be13c74a-467c-4ab1-acca-44878c68dba4",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
380,
|
||||
80
|
||||
],
|
||||
"parameters": {
|
||||
"width": 375.55385425077225,
|
||||
"height": 486.69228315530853,
|
||||
"content": "## Try It Out!\n### This workflow demonstrates a simple approach to stagger an AI Agent's reply if users often send in a sequence of partial messages and in short bursts.\n\n* Twilio webhook receives user's messages which are recorded in a message stack powered by Redis.\n* The execution is immediately paused for 5 seconds and then another check is done against the message stack for the latest message.\n* The purpose of this check lets use know if the user is sending more messages or if they are waiting for a reply.\n* The execution is aborted if the latest message on the stack differs from the incoming message and continues if they are the same.\n* For the latter, the agent receives buffered messages and is able to respond to all in a single reply."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "334d38e1-ec16-46f2-a57d-bf531adb8d3d",
|
||||
"name": "AI Agent",
|
||||
"type": "@n8n/n8n-nodes-langchain.agent",
|
||||
"position": [
|
||||
2660,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"text": "={{ $json.messages }}",
|
||||
"agent": "conversationalAgent",
|
||||
"options": {},
|
||||
"promptType": "define"
|
||||
},
|
||||
"typeVersion": 1.6
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"AI Agent": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Send Reply",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Twilio Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Add to Messages Stack",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Wait 5 seconds",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait 5 seconds": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Latest Message Stack",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Chat History": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Messages Buffer",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Should Continue?": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Chat History",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "No Operation, do nothing",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Messages Buffer": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Window Buffer Memory": {
|
||||
"ai_memory": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_memory",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Window Buffer Memory1": {
|
||||
"ai_memory": [
|
||||
[
|
||||
{
|
||||
"node": "Get Chat History",
|
||||
"type": "ai_memory",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Latest Message Stack": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Should Continue?",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
380
workflows/Wait/1456_Wait_HTTP_Automation_Webhook.json
Normal file
380
workflows/Wait/1456_Wait_HTTP_Automation_Webhook.json
Normal file
@@ -0,0 +1,380 @@
|
||||
{
|
||||
"id": "nJwkSOrJIFvutw1n",
|
||||
"meta": {
|
||||
"instanceId": "08daa2aa5b6032ff63690600b74f68f5b0f34a3b100102e019b35c4419168977"
|
||||
},
|
||||
"name": "Flux Dev Image Generation Fal.ai",
|
||||
"tags": [],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "00f3a7d9-9931-40a4-8eb5-5b9086d6995c",
|
||||
"name": "Fal Flux",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
420,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://queue.fal.run/fal-ai/flux/dev",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"jsonBody": "={\n \"prompt\": \"{{ $json.Prompt }}\",\n \"image_size\": {\n \"width\": {{ $json.Width }},\n \"height\": {{ $json.Height }}\n},\n \"num_inference_steps\": {{ $json.Steps }},\n \"guidance_scale\": {{ $json.Guidance }},\n \"num_images\": 1,\n \"enable_safety_checker\": true\n}",
|
||||
"sendBody": true,
|
||||
"specifyBody": "json",
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpHeaderAuth"
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "lNxvZHlUafPAHBYN",
|
||||
"name": "Fal Flux Header Auth account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "3032a543-2e21-415e-a5bd-d56ea33e4411",
|
||||
"name": "Get Image Result URL",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1220,
|
||||
-20
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://queue.fal.run/fal-ai/flux/requests/{{ $json.request_id }}",
|
||||
"options": {},
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpHeaderAuth"
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "lNxvZHlUafPAHBYN",
|
||||
"name": "Fal Flux Header Auth account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "56e13e53-1697-4970-9bea-b75e0e849425",
|
||||
"name": "Download Image",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1400,
|
||||
-20
|
||||
],
|
||||
"parameters": {
|
||||
"url": "={{ $json.images[0].url }}",
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "dd2efd2c-8712-4a77-8786-cccebdec876b",
|
||||
"name": "Google Drive",
|
||||
"type": "n8n-nodes-base.googleDrive",
|
||||
"position": [
|
||||
1580,
|
||||
-20
|
||||
],
|
||||
"parameters": {
|
||||
"name": "={{ $binary.data.fileName }}",
|
||||
"driveId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "My Drive"
|
||||
},
|
||||
"options": {},
|
||||
"folderId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "1R3PSyHXWHlY9DRFdOUEAPEop2fZy-_-K",
|
||||
"cachedResultUrl": "https://drive.google.com/drive/folders/1R3PSyHXWHlY9DRFdOUEAPEop2fZy-_-K",
|
||||
"cachedResultName": "Flux Image"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleDriveOAuth2Api": {
|
||||
"id": "CFiX9XTXGg4hGaGV",
|
||||
"name": "Google Drive account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "a598d868-0461-41fc-b6aa-f9998e9d6146",
|
||||
"name": "When clicking \u2018Test workflow\u2019",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
-60,
|
||||
0
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "a576d7b6-b2f3-4d53-8e7f-bb6449ff9c64",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
80,
|
||||
-120
|
||||
],
|
||||
"parameters": {
|
||||
"width": 260,
|
||||
"height": 120,
|
||||
"content": "## Set Parameter Here \nset Image Prompt and related settings"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "d39e85a8-3ddd-4f10-ba4c-beb86a850e10",
|
||||
"name": "Wait 3 Sec",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
640,
|
||||
0
|
||||
],
|
||||
"webhookId": "61a8626c-e281-4d4b-abb0-b9d87d1b4e7c",
|
||||
"parameters": {
|
||||
"amount": 3
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "b27ac2f1-3f14-467e-81c4-af8b8fb37138",
|
||||
"name": "Check Status",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
840,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://queue.fal.run/fal-ai/flux/requests/{{ $json.request_id }}/status",
|
||||
"options": {},
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpHeaderAuth"
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "lNxvZHlUafPAHBYN",
|
||||
"name": "Fal Flux Header Auth account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "7ee45dab-8e31-44de-bbb1-e99a565ee19c",
|
||||
"name": "Completed?",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
1020,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "299a7c34-dcff-4991-a73f-5b1a84f188ea",
|
||||
"operator": {
|
||||
"name": "filter.operator.equals",
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json.status }}",
|
||||
"rightValue": "COMPLETED"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "c5036a7d-1879-449f-8ce9-9c1cf2c7426b",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1300,
|
||||
-100
|
||||
],
|
||||
"parameters": {
|
||||
"width": 220,
|
||||
"height": 100,
|
||||
"content": "## Set Drive Folder Here "
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "c8887168-6234-486c-b7cb-cc0752c6341c",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
360,
|
||||
-180
|
||||
],
|
||||
"parameters": {
|
||||
"width": 260,
|
||||
"height": 180,
|
||||
"content": "### Generic Credential Type\n### Header : Authorization\nKey $FAL_KEY\"\n\nfor example:\nKey 6f2960baxxxxxxxxx"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "587043c4-e808-4c3f-910f-60f5eb8aff15",
|
||||
"name": "Edit Fields",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
180,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "f0a033cf-fa2b-4930-93b9-ff9c45fa7c14",
|
||||
"name": "Prompt",
|
||||
"type": "string",
|
||||
"value": "Thai young woman net idol 25 yrs old, walking on the street"
|
||||
},
|
||||
{
|
||||
"id": "2b56185d-5c61-4c17-85f1-53ac4aab2b18",
|
||||
"name": "Width",
|
||||
"type": "number",
|
||||
"value": 1024
|
||||
},
|
||||
{
|
||||
"id": "51eb65c0-ae0a-4ce7-ab00-9d13f05ce1e6",
|
||||
"name": "Height",
|
||||
"type": "number",
|
||||
"value": 768
|
||||
},
|
||||
{
|
||||
"id": "8e89fca7-d380-4876-b973-69caa0394bc5",
|
||||
"name": "Steps",
|
||||
"type": "number",
|
||||
"value": 30
|
||||
},
|
||||
{
|
||||
"id": "875e06b7-352a-4dde-8595-3274e9969c9c",
|
||||
"name": "Guidance",
|
||||
"type": "number",
|
||||
"value": 3.5
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "82877b10-5bbc-4c59-828b-4abc3ad53a5f",
|
||||
"connections": {
|
||||
"Fal Flux": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait 3 Sec",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Completed?": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Image Result URL",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Wait 3 Sec",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait 3 Sec": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Check Status",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Edit Fields": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Fal Flux",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Check Status": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Completed?",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Download Image": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Google Drive",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Image Result URL": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Download Image",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When clicking \u2018Test workflow\u2019": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Edit Fields",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
738
workflows/Wait/1465_Wait_Splitout_Create_Webhook.json
Normal file
738
workflows/Wait/1465_Wait_Splitout_Create_Webhook.json
Normal file
@@ -0,0 +1,738 @@
|
||||
{
|
||||
"id": "GW4dTYPBXwOrCUxo",
|
||||
"meta": {
|
||||
"instanceId": "95a1299fb2b16eb2219cb044f54e72c2d00dcd2c72efe717b3c308d200f29927",
|
||||
"templateCredsSetupCompleted": true
|
||||
},
|
||||
"name": "Search LinkedIn companies, Score with AI and add them to Google Sheet CRM",
|
||||
"tags": [],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "a6af7206-4b90-421a-aee6-d71aa02e2182",
|
||||
"name": "Process Each Company",
|
||||
"type": "n8n-nodes-base.splitInBatches",
|
||||
"onError": "continueRegularOutput",
|
||||
"position": [
|
||||
-260,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 3,
|
||||
"alwaysOutputData": false
|
||||
},
|
||||
{
|
||||
"id": "7a003d97-ff9b-4cac-a2e3-95b00e590904",
|
||||
"name": "Get Company Info",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"onError": "continueRegularOutput",
|
||||
"position": [
|
||||
-20,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://api.ghostgenius.fr/v2/company",
|
||||
"options": {
|
||||
"batching": {
|
||||
"batch": {
|
||||
"batchSize": 1,
|
||||
"batchInterval": 2000
|
||||
}
|
||||
}
|
||||
},
|
||||
"sendQuery": true,
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpHeaderAuth",
|
||||
"queryParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "url",
|
||||
"value": "={{ $json.url }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "XdFg4wGkcxwRPUMo",
|
||||
"name": "Header Auth account 4"
|
||||
}
|
||||
},
|
||||
"retryOnFail": true,
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "9bee1921-c96e-4373-8321-cce33a3184d6",
|
||||
"name": "Filter Valid Companies",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"onError": "continueRegularOutput",
|
||||
"position": [
|
||||
200,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "5ea943a6-8f6c-4cb0-b194-8c92d4b2aacc",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "notEmpty",
|
||||
"singleValue": true
|
||||
},
|
||||
"leftValue": "={{ $json.website }}",
|
||||
"rightValue": "[null]"
|
||||
},
|
||||
{
|
||||
"id": "8235b9bb-3cd4-4ed4-a5dc-921127ff47c7",
|
||||
"operator": {
|
||||
"type": "number",
|
||||
"operation": "gt"
|
||||
},
|
||||
"leftValue": "={{ $json.followers_count }}",
|
||||
"rightValue": 200
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "5913869a-4811-4b6f-bbf5-ec6a1f4ee50a",
|
||||
"name": "Is New Company?",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
600,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "050c33be-c648-44d7-901c-51f6ff024e97",
|
||||
"operator": {
|
||||
"type": "object",
|
||||
"operation": "empty",
|
||||
"singleValue": true
|
||||
},
|
||||
"leftValue": "={{ $('Check If Company Exists').all().first().json }}",
|
||||
"rightValue": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "ebb0ba8c-beec-4ec0-97b6-a5e706c73546",
|
||||
"name": "Set Variables",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
-1000,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "e81e4891-4786-4dd9-a338-d1095e27f382",
|
||||
"name": "Your target",
|
||||
"type": "string",
|
||||
"value": "Growth Marketing Agency"
|
||||
},
|
||||
{
|
||||
"id": "ed2b6b08-66aa-4d4b-b68c-698b5e841930",
|
||||
"name": "B: 1-10 employees, C: 11-50 employees, D: 51-200 employees, E: 201-500 employees, F: 501-1000 employees, G: 1001-5000 employees, H: 5001-10,000 employees, I: 10,001+ employees",
|
||||
"type": "string",
|
||||
"value": "C"
|
||||
},
|
||||
{
|
||||
"id": "f1d02f1a-8115-4e0c-a5ec-59bf5b54263b",
|
||||
"name": "Location (find it on : https://www.ghostgenius.fr/tools/search-sales-navigator-locations-id)",
|
||||
"type": "string",
|
||||
"value": "103644278"
|
||||
},
|
||||
{
|
||||
"id": "21bdb871-9327-4553-bb4a-a138be9f735c",
|
||||
"name": "Your product or service",
|
||||
"type": "string",
|
||||
"value": "our CRM implementation services"
|
||||
},
|
||||
{
|
||||
"id": "31f5adfc-8a8f-498c-9e57-24584c42f7de",
|
||||
"name": "Positive indicators (3-5 specific factors that indicate a company might need your product)",
|
||||
"type": "string",
|
||||
"value": "- Mentions challenges with customer relationships or sales processes \n- Company is in growth phase with expanding client base \n- Mentions need for better data organization or customer insights \n- References marketing automation, sales pipelines, or customer retention "
|
||||
},
|
||||
{
|
||||
"id": "630807cb-9d06-41ee-8534-a652ed76cb4c",
|
||||
"name": "Negative indicators (3-5 specific factors that indicate a company might NOT need your product)",
|
||||
"type": "string",
|
||||
"value": "- Very small companies (1-5 employees) or extremely large enterprises \n- Already mentions using advanced CRM solutions \n- No indication of sales process or customer relationship management in description \n- Pure manufacturing or product-based business with minimal customer interaction \n- Non-profit or government entity with unique relationship management needs"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "d2392572-3ef0-44e7-a2a1-ee6a1967ad16",
|
||||
"name": "Search Companies",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
-800,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://api.ghostgenius.fr/v2/search/companies",
|
||||
"options": {
|
||||
"pagination": {
|
||||
"pagination": {
|
||||
"parameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "page",
|
||||
"value": "={{ $pageCount + 1 }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"maxRequests": 3,
|
||||
"requestInterval": 2000,
|
||||
"limitPagesFetched": true,
|
||||
"completeExpression": "={{ $response.body.data.isEmpty() }}",
|
||||
"paginationCompleteWhen": "other"
|
||||
}
|
||||
}
|
||||
},
|
||||
"sendQuery": true,
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpHeaderAuth",
|
||||
"queryParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "keywords",
|
||||
"value": "={{ $json['Your target'] }}"
|
||||
},
|
||||
{
|
||||
"name": "locations",
|
||||
"value": "={{ $json['Location (find it on : https://www'].ghostgenius['fr/tools/search-sales-navigator-locations-id)'] }}"
|
||||
},
|
||||
{
|
||||
"name": "company_size",
|
||||
"value": "={{ $json['B: 1-10 employees, C: 11-50 employees, D: 51-200 employees, E: 201-500 employees, F: 501-1000 employees, G: 1001-5000 employees, H: 5001-10,000 employees, I: 10,001+ employees'] }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "XdFg4wGkcxwRPUMo",
|
||||
"name": "Header Auth account 4"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "7ecac7ee-b51e-4a14-8295-b122974c0a14",
|
||||
"name": "Extract Company Data",
|
||||
"type": "n8n-nodes-base.splitOut",
|
||||
"onError": "continueRegularOutput",
|
||||
"position": [
|
||||
-600,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldToSplitOut": "data"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "a4b63dcd-0d5d-46dd-9279-c7872ac721d6",
|
||||
"name": "Check If Company Exists",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"position": [
|
||||
420,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"filtersUI": {
|
||||
"values": [
|
||||
{
|
||||
"lookupValue": "={{ $json.id }}",
|
||||
"lookupColumn": "ID"
|
||||
}
|
||||
]
|
||||
},
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gid=0",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1LfhqpyjimLjyQcmWY8mUr6YtNBcifiOVLIhAJGV9jiM/edit#gid=0",
|
||||
"cachedResultName": "Companies"
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "1LfhqpyjimLjyQcmWY8mUr6YtNBcifiOVLIhAJGV9jiM",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1LfhqpyjimLjyQcmWY8mUr6YtNBcifiOVLIhAJGV9jiM/edit?usp=drivesdk",
|
||||
"cachedResultName": "CRM"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsOAuth2Api": {
|
||||
"id": "Y8D8KsfgZCZmP2Vh",
|
||||
"name": "Google Sheets account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.5,
|
||||
"alwaysOutputData": true
|
||||
},
|
||||
{
|
||||
"id": "dfbd3bdb-0efb-4e09-99ae-3dc9a0d9e64d",
|
||||
"name": "AI Company Scoring",
|
||||
"type": "@n8n/n8n-nodes-langchain.openAi",
|
||||
"position": [
|
||||
920,
|
||||
340
|
||||
],
|
||||
"parameters": {
|
||||
"modelId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gpt-4.1",
|
||||
"cachedResultName": "GPT-4.1"
|
||||
},
|
||||
"options": {
|
||||
"temperature": 0.2
|
||||
},
|
||||
"messages": {
|
||||
"values": [
|
||||
{
|
||||
"role": "system",
|
||||
"content": "=You are an AI assistant that evaluates companies to determine if they might be interested in {{ $('Set Variables').item.json['Your product or service'] }}.\n\nEvaluate the company information provided on a scale of 0 to 10, where:\n- 0 = Not at all likely to be interested\n- 10 = Extremely likely to be interested\n\nBase your evaluation on these criteria:\n1. Industry fit: How well does the company's industry align with {{ $('Set Variables').item.json['Your product or service'] }}?\n2. Company profile: Is the company size, growth stage, and location appropriate for {{ $('Set Variables').item.json['Your product or service'] }}?\n3. Pain points: Based on their description, do they likely have challenges that {{ $('Set Variables').item.json['Your product or service'] }} solves?\n\nFactors that indicate a good fit:\n{{ $('Set Variables').item.json['Positive indicators (3-5 specific factors that indicate a company might need your product)'] }}\n\nFactors that indicate a poor fit:\n{{ $('Set Variables').item.json['Negative indicators (3-5 specific factors that indicate a company might NOT need your product)'] }}\n\nRespond ONLY with this JSON format:\n```json\n{\n \"score\": [number between 0 and 10],\n}"
|
||||
},
|
||||
{
|
||||
"content": "=Here is the company to analyze:\nName: {{ $('Filter Valid Companies').item.json.name }}\n{{ $('Filter Valid Companies').item.json.tagline }}\n{{ $('Filter Valid Companies').item.json.description }}\nNumber of employees: {{ $('Filter Valid Companies').item.json.staff_count }}\nIndustry: {{ $('Filter Valid Companies').item.json.industries }}\nSpecialties: {{ $('Filter Valid Companies').item.json.specialities }}\nLocation: {{ $('Filter Valid Companies').item.json.locations?.toJsonString() }}\nFounded in: {{ $('Filter Valid Companies').item.json.founded_on }}\nFunding: {{ $('Filter Valid Companies').item.json.funding?.toJsonString() }}\n"
|
||||
}
|
||||
]
|
||||
},
|
||||
"jsonOutput": true
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "SSQ6BcbSKW6I0uSn",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.8
|
||||
},
|
||||
{
|
||||
"id": "b50d1d4f-63bb-4d51-8db6-bdc1ab52783f",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-1280,
|
||||
-20
|
||||
],
|
||||
"parameters": {
|
||||
"color": 6,
|
||||
"width": 860,
|
||||
"height": 560,
|
||||
"content": "## LinkedIn Company Search\nThis section initiates the workflow and searches for your target companies on LinkedIn using the Ghost Genius API.\n\nYou can filter and refine your search using keywords, company size, location, industry, or even whether the company has active job postings. Use the \"Set Variables\" node for it (this node also allows you to customize the AI Lead Scoring prompt).\n\nNote that you can retrieve a maximum of 1000 companies per search (corresponding to 100 LinkedIn pages), so it's important not to exceed this number of results to avoid losing prospects.\n\nExample: Let's say I want to target Growth Marketing Agencies with 11-50 employees. I do my search and see that there are 10,000 results. So I refine my search by using location to go country by country and retrieve all 10,000 results in several batches ranging from 500 to 1000 depending on the country.\n\nTips: To test the workflow or to see the number of results of your search, change the pagination parameter (Max Pages) in the \"Search Companies\" node. It will be displayed at the very top of the response JSON."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "74c0b7a1-3d98-4eb6-b195-fe025cb06202",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-340,
|
||||
-20
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 1120,
|
||||
"height": 560,
|
||||
"content": "## Company Data Processing \nThis section processes each company individually.\n\nWe retrieve all the company information using Get Company Details by using the LinkedIn link obtained from the previous section.\n\nThen we filter the company based on the number of followers, which gives us a first indication of the company's credibility (200 in this case), and whether their LinkedIn page has a website listed.\n\nThe workflow implements batch processing with a 2-second delay between requests to respect API rate limits. This methodical approach ensures reliable data collection while preventing API timeouts.\n\nYou can adjust these thresholds based on your target market - increasing the follower count for more established businesses or decreasing it for emerging markets.\n\nThe last two modules checks if the company already exists in your database (using LinkedIn ID) to prevent duplicates because when you do close enough searches, some companies may come up several times."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "440959e6-151c-4e4f-ad62-72bb99ba6135",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
860,
|
||||
-20
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 780,
|
||||
"height": 560,
|
||||
"content": "## AI Scoring and Storage\nThis section scores the company and stores it in a Google Sheet.\n\nIt's important to properly fill in the \"Set variables\" node at the beginning of the workflow to get a result relevant to your use case. You can also manually modify the system prompt.\n\nRegardless of the score obtained, it's very important to always store the company. Note that we add a 2-second \"wait\" module to respect Google Sheet's rate limits.\n\nWe add the company to the \"Companies\" sheet in this [Google Sheet](https://docs.google.com/spreadsheets/d/1LfhqpyjimLjyQcmWY8mUr6YtNBcifiOVLIhAJGV9jiM/edit?usp=sharing) which you can make a copy of and use.\n\nThis AI scoring functionality is extremely impressive once perfectly configured, so I recommend taking some time to test with several companies to ensure the scoring system works well for your needs!\n\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "7de84aac-73a0-4362-bc1e-9e917a45699b",
|
||||
"name": "Wait 2s",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
1280,
|
||||
340
|
||||
],
|
||||
"webhookId": "d22fd305-d8f6-4fc3-8a96-62386fa30f94",
|
||||
"parameters": {
|
||||
"amount": 2
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "565f8580-fc51-481f-81f6-cc86142e67af",
|
||||
"name": "Add Company to CRM",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"position": [
|
||||
1480,
|
||||
340
|
||||
],
|
||||
"parameters": {
|
||||
"columns": {
|
||||
"value": {
|
||||
"ID": "={{ $('Get Company Info').item.json.id }}",
|
||||
"Name": "={{ $('Get Company Info').item.json.name }}",
|
||||
"Score": "={{ $json.message.content.score }}",
|
||||
"State": "Qualified",
|
||||
"Summary": "={{ $('Get Company Info').item.json.description }}",
|
||||
"Website": "={{ $('Get Company Info').item.json.website }}",
|
||||
"LinkedIn": "={{ $('Get Company Info').item.json.url }}"
|
||||
},
|
||||
"schema": [
|
||||
{
|
||||
"id": "Name",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "Name",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Website",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "Website",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "LinkedIn",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "LinkedIn",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "ID",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "ID",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Summary",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "Summary",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Score",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "Score",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "State",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "State",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
}
|
||||
],
|
||||
"mappingMode": "defineBelow",
|
||||
"matchingColumns": [],
|
||||
"attemptToConvertTypes": false,
|
||||
"convertFieldsToString": false
|
||||
},
|
||||
"options": {},
|
||||
"operation": "append",
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gid=0",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/10lxvwdeCf7vrAuWsNRGIsSTICEI3z-SUCDVHr8XzAYQ/edit#gid=0",
|
||||
"cachedResultName": "Companies"
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "1LfhqpyjimLjyQcmWY8mUr6YtNBcifiOVLIhAJGV9jiM",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1LfhqpyjimLjyQcmWY8mUr6YtNBcifiOVLIhAJGV9jiM/edit?usp=drivesdk",
|
||||
"cachedResultName": "CRM"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsOAuth2Api": {
|
||||
"id": "Y8D8KsfgZCZmP2Vh",
|
||||
"name": "Google Sheets account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.5
|
||||
},
|
||||
{
|
||||
"id": "5878ea6f-3ea4-4a25-8f45-111cfeb267e2",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-780,
|
||||
-460
|
||||
],
|
||||
"parameters": {
|
||||
"width": 600,
|
||||
"height": 380,
|
||||
"content": "## Introduction\nWelcome to my template! Before explaining how to set it up, here's some important information:\n\nThis automation is an alternative version of [this template](https://n8n.io/workflows/3717-search-linkedin-companies-and-add-them-to-airtable-crm/) that differs by using Google Sheets instead of Airtable and adding a Lead Scoring system allowing for more precision in our targeting.\n\nThis automation therefore allows you, starting from a LinkedIn search, to enrich company data and score them to determine if they might be interested in your services/product.\n\nFor any questions, you can send me a DM on my [LinkedIn](https://www.linkedin.com/in/matthieu-belin83/) :) "
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "45ee97ed-5200-40dc-b786-24f26518769b",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-100,
|
||||
-460
|
||||
],
|
||||
"parameters": {
|
||||
"width": 600,
|
||||
"height": 380,
|
||||
"content": "## Setup\n- Create an account on [Ghost Genius API](ghostgenius.fr) and get your API key.\n\n- Configure the Search Companies and Get Company Info modules by creating a \"Header Auth\" credential:\n**Name: \"Authorization\"**\n**Value: \"Bearer api_key\"**\n\n- Create a copy of this [Google Sheet](https://docs.google.com/spreadsheets/d/1LfhqpyjimLjyQcmWY8mUr6YtNBcifiOVLIhAJGV9jiM/edit?usp=sharing) by clicking on File => Make a copy (in Google Sheet).\n\n- Configure your Google Sheet credential by following the n8n documentation.\n\n- Create an OpenAI key [here](https://platform.openai.com/docs/overview) and add the credential to the \"AI Company Scoring\" node following the n8n documentation.\n\n- Add your information to the \"Set Variables\" node."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "da0f35e1-c377-4362-af91-c6558c59cf47",
|
||||
"name": "Sticky Note6",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
580,
|
||||
-460
|
||||
],
|
||||
"parameters": {
|
||||
"width": 600,
|
||||
"height": 380,
|
||||
"content": "## Tools \n**(You can use the API and CRM of your choice; this is only a suggestion)**\n\n- API Linkedin : [Ghost Genius API](https://ghostgenius.fr) \n\n- API Documentation : [Documentation](https://ghostgenius.fr/docs)\n\n- CRM : [Google Sheet](https://workspace.google.com/intl/en/products/sheets/)\n\n- AI : [OpenAI](https://openai.com)\n\n- LinkedIn Location ID Finder : [Ghost Genius Locations ID Finder](https://ghostgenius.fr/tools/search-sales-navigator-locations-id)"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "b681dc61-85f9-4e38-9e86-1ad399161153",
|
||||
"name": "Start",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
-1200,
|
||||
320
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "b2dc41db-f86c-407b-a2bd-1e81d72bb5fc",
|
||||
"connections": {
|
||||
"Start": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Set Variables",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait 2s": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Add Company to CRM",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Set Variables": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Search Companies",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Is New Company?": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "AI Company Scoring",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Process Each Company",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Company Info": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Filter Valid Companies",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Search Companies": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Extract Company Data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"AI Company Scoring": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait 2s",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Add Company to CRM": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Process Each Company",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Extract Company Data": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Process Each Company",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Process Each Company": {
|
||||
"main": [
|
||||
[],
|
||||
[
|
||||
{
|
||||
"node": "Get Company Info",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Filter Valid Companies": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Check If Company Exists",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Process Each Company",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Check If Company Exists": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Is New Company?",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
1975
workflows/Wait/1469_Wait_Splitout_Automation_Webhook.json
Normal file
1975
workflows/Wait/1469_Wait_Splitout_Automation_Webhook.json
Normal file
File diff suppressed because it is too large
Load Diff
398
workflows/Wait/1484_Wait_Code_Create_Webhook.json
Normal file
398
workflows/Wait/1484_Wait_Code_Create_Webhook.json
Normal file
@@ -0,0 +1,398 @@
|
||||
{
|
||||
"id": "HBUhVkSsjslXAojw",
|
||||
"meta": {
|
||||
"instanceId": "1e003a7ea4715b6b35e9947791386a7d07edf3b5bf8d4c9b7ee4fdcbec0447d7"
|
||||
},
|
||||
"name": "Motion-illustration Workflow Generated with Midjourney and Kling API",
|
||||
"tags": [],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "963603c8-dbe5-4d07-bd1e-74518ddd7a4c",
|
||||
"name": "When clicking ‘Test workflow’",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
-1780,
|
||||
-80
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "76717322-4eee-483b-9ab9-dd4e9b0f510a",
|
||||
"name": "Kling Video Generator",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
-820,
|
||||
-180
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://api.piapi.ai/api/v1/task",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"jsonBody": "={\n \"model\": \"kling\",\n \"task_type\": \"video_generation\",\n \"input\": {\n \"version\": \"1.6\",\n \n \"image_url\":\"{{ $json.random_temp_url }}\",\n\n \"prompt\": \"A young girl sits on a sunlit grassy meadow, gently petting a fluffy white rabbit\"\n \n }\n} ",
|
||||
"sendBody": true,
|
||||
"sendHeaders": true,
|
||||
"specifyBody": "json",
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "x-api-key"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "842c1874-47ab-4efb-baad-155071fd29bb",
|
||||
"name": "Get Video",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
-620,
|
||||
-60
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://api.piapi.ai/api/v1/task/{{ $json.data.task_id }}",
|
||||
"options": {},
|
||||
"sendHeaders": true,
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "x-api-key"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "9f36d2ba-ea56-48b8-9c83-60d741c394cb",
|
||||
"name": "Get Image",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
-1000,
|
||||
-180
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "// JavaScript Code for Function Node\nreturn {\n random_temp_url: $input.all()[0].json.data.output.temporary_image_urls[\n Math.floor(Math.random() * $input.all()[0].json.data.output.temporary_image_urls.length)\n ]\n};"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "14995fd1-937a-4e82-a2bb-19dbb65773c4",
|
||||
"name": "Basic Prompt",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
-1560,
|
||||
-80
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://api.piapi.ai/api/v1/task",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"jsonBody": "{\n \"model\": \"midjourney\",\n \"task_type\": \"imagine\",\n \"input\": {\n \"prompt\": \"A gentle girl and a fluffy rabbit explore a sunlit forest together, playing by a sparkling stream. Butterflies flutter around them as golden sunlight filters through green leaves. Warm and peaceful atmosphere, 4K nature documentary style. --s 500 --sref 4028286908 --niji 6\",\n \"aspect_ratio\": \"1:1\",\n \"process_mode\": \"turbo\",\n \"skip_prompt_check\": false\n }\n}",
|
||||
"sendBody": true,
|
||||
"sendHeaders": true,
|
||||
"specifyBody": "json",
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "x-api-key"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "791dae4a-4d99-4bdf-a259-20d3df12b92c",
|
||||
"name": "Get Data Status",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
-1180,
|
||||
-80
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "a0f8758e-d6fd-44f8-bd79-bc3c4dceddcf",
|
||||
"operator": {
|
||||
"name": "filter.operator.equals",
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json.data.status }}",
|
||||
"rightValue": "completed"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "adb13639-1dd9-45af-be7e-c99b6b1219f3",
|
||||
"name": "Wait for Image Generation",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
-1220,
|
||||
200
|
||||
],
|
||||
"webhookId": "f3bcf634-8c4b-4bf9-a7f2-d4ee369f5349",
|
||||
"parameters": {},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "58ad9c2d-fad7-471b-ad5d-f248b3cfbe29",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-1820,
|
||||
-300
|
||||
],
|
||||
"parameters": {
|
||||
"width": 280,
|
||||
"content": "## Motion-illustration\nThis workflow is primarily designed to generate dynamic illustrations for content creators and social media professionals with APIs provided by PiAPI."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "2571d9ea-1f32-49b0-84da-ad12177714f3",
|
||||
"name": "Midjourney Image Generator",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
-1360,
|
||||
-80
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://api.piapi.ai/api/v1/task/{{ $json.data.task_id }}",
|
||||
"options": {},
|
||||
"sendHeaders": true,
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "x-api-key"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "159df2d3-6c5d-436d-b229-1b3d527daf48",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-1820,
|
||||
160
|
||||
],
|
||||
"parameters": {
|
||||
"width": 360,
|
||||
"height": 200,
|
||||
"content": "## Step-by-step Instruction\n1. Fill in your x-api-key of your PiAPI account in the Midjourney Image Generator and Kling Video Generator nodes.\n2. Enter your desired image prompt in **Basic Prompt** node.\n3. Click Test workflow."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "00de8ec3-102b-41b4-9839-e8fc8cd48253",
|
||||
"name": "Wait for Video Generation",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
-440,
|
||||
200
|
||||
],
|
||||
"webhookId": "c7b2590d-96a3-4c7c-8821-3023fead254b",
|
||||
"parameters": {
|
||||
"amount": 20
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "75531dff-04d5-4439-ae04-3291ef9cfcde",
|
||||
"name": "Get Final Video URL",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
-140,
|
||||
80
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "// Process the entire response\nreturn {\n video_url: $input.all()[0].json.data.output.video_url,\n watermark_free_url: $input.all()[0].json.data.output.works[0].video.resource_without_watermark\n};"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "1fe883e9-64ee-4bec-8b12-238251089df3",
|
||||
"name": "Verify Data Status",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
-440,
|
||||
-60
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "f36fa981-22e0-46db-af8c-c2ac55242c27",
|
||||
"operator": {
|
||||
"name": "filter.operator.equals",
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json.data.status }}",
|
||||
"rightValue": "completed"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "7f0854bb-7c13-4e67-ba32-809959f47647",
|
||||
"connections": {
|
||||
"Get Image": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Kling Video Generator",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Video": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Verify Data Status",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Basic Prompt": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Midjourney Image Generator",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Data Status": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Image",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Wait for Image Generation",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Verify Data Status": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Final Video URL",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Wait for Video Generation",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Kling Video Generator": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Video",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait for Image Generation": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Midjourney Image Generator",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait for Video Generation": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Video",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Midjourney Image Generator": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Data Status",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When clicking ‘Test workflow’": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Basic Prompt",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
608
workflows/Wait/1508_Wait_Manual_Automation_Webhook.json
Normal file
608
workflows/Wait/1508_Wait_Manual_Automation_Webhook.json
Normal file
@@ -0,0 +1,608 @@
|
||||
{
|
||||
"id": "TTj6BiN7bQKTa6FM",
|
||||
"meta": {
|
||||
"instanceId": "885b4fb4a6a9c2cb5621429a7b972df0d05bb724c20ac7dac7171b62f1c7ef40",
|
||||
"templateCredsSetupCompleted": true
|
||||
},
|
||||
"name": "Indeed Company Data Scraper & Summarization with Airtable, Bright Data and Google Gemini",
|
||||
"tags": [
|
||||
{
|
||||
"id": "Kujft2FOjmOVQAmJ",
|
||||
"name": "Engineering",
|
||||
"createdAt": "2025-04-09T01:31:00.558Z",
|
||||
"updatedAt": "2025-04-09T01:31:00.558Z"
|
||||
},
|
||||
{
|
||||
"id": "ddPkw7Hg5dZhQu2w",
|
||||
"name": "AI",
|
||||
"createdAt": "2025-04-13T05:38:08.053Z",
|
||||
"updatedAt": "2025-04-13T05:38:08.053Z"
|
||||
},
|
||||
{
|
||||
"id": "rKOa98eAi3IETrLu",
|
||||
"name": "HR",
|
||||
"createdAt": "2025-04-13T04:59:30.580Z",
|
||||
"updatedAt": "2025-04-13T04:59:30.580Z"
|
||||
}
|
||||
],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "390ebd32-6ce4-4894-9b4f-7b376db5b724",
|
||||
"name": "When clicking ‘Test workflow’",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
-220,
|
||||
-545
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "8ba6b208-b4ad-443c-8b24-c51b3b5ad880",
|
||||
"name": "Google Gemini Chat Model For Summarization",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
|
||||
"position": [
|
||||
1784,
|
||||
-300
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"modelName": "models/gemini-2.0-flash-exp"
|
||||
},
|
||||
"credentials": {
|
||||
"googlePalmApi": {
|
||||
"id": "YeO7dHZnuGBVQKVZ",
|
||||
"name": "Google Gemini(PaLM) Api account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "394a7291-618a-42f0-8e1b-18ed7c8496c3",
|
||||
"name": "Webhook HTTP Request",
|
||||
"type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
|
||||
"position": [
|
||||
2280,
|
||||
-160
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://webhook.site/daf9d591-a130-4010-b1d3-0c66f8fcf467",
|
||||
"method": "POST",
|
||||
"sendBody": true,
|
||||
"parametersBody": {
|
||||
"values": [
|
||||
{
|
||||
"name": "search_summary",
|
||||
"value": "={{ $json.response.text }}",
|
||||
"valueProvider": "fieldValue"
|
||||
},
|
||||
{
|
||||
"name": "search_result"
|
||||
}
|
||||
]
|
||||
},
|
||||
"toolDescription": "Extract the response and format a structured JSON response"
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "4e1352a5-0fa6-4fee-a93d-cc0a0a4fdd6f",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-240,
|
||||
-1080
|
||||
],
|
||||
"parameters": {
|
||||
"width": 400,
|
||||
"height": 320,
|
||||
"content": "## Note\n\nDeals with the Company web scraping by utilizing Bright Data Web Unlocker Product.\n\nThe Basic LLM Chain, Summarization and AI Agent are being used to demonstrate the usage of the n8n AI capabilities.\n\n**Please make sure to connect to Airtable with the Base Table as \"Indeed\" and the default Table1 filled with the indeed links to scrape. \n\nAlso make sure to update the Webhook Notification URL**"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "bf184d27-ed62-44fa-bed2-65a1f703179e",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
720,
|
||||
-1080
|
||||
],
|
||||
"parameters": {
|
||||
"width": 480,
|
||||
"height": 320,
|
||||
"content": "## LLM Usages\n\nGoogle Gemini Flash Exp model is being used.\n\nBasic LLM Chain Data Extractor.\n\nSummarization Chain is being used for the summarization of search results.\n\nThe AI Agent formats the search result and pushes it to the Webhook via HTTP Request"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "78f32ce2-1e79-4f3e-8561-4a5e07d88696",
|
||||
"name": "Perform Indeed Web Request",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1100,
|
||||
-670
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://api.brightdata.com/request",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"sendBody": true,
|
||||
"sendHeaders": true,
|
||||
"authentication": "genericCredentialType",
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "zone",
|
||||
"value": "={{ $('Set Bright Data Zone').item.json.zone }}"
|
||||
},
|
||||
{
|
||||
"name": "url",
|
||||
"value": "=https://www.indeed.com/cmp/{{ encodeURI($('Airtable').item.json.Link) }}?product=unlocker&method=api"
|
||||
},
|
||||
{
|
||||
"name": "format",
|
||||
"value": "raw"
|
||||
},
|
||||
{
|
||||
"name": "data_format",
|
||||
"value": "markdown"
|
||||
}
|
||||
]
|
||||
},
|
||||
"genericAuthType": "httpHeaderAuth",
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "kdbqXuxIR8qIxF7y",
|
||||
"name": "Header Auth account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "3738e714-59aa-4b0b-876c-c2f15a1d7479",
|
||||
"name": "Indeed Expert AI Agent",
|
||||
"type": "@n8n/n8n-nodes-langchain.agent",
|
||||
"position": [
|
||||
2072,
|
||||
-395
|
||||
],
|
||||
"parameters": {
|
||||
"text": "=You are an Indeed Expert. You need to format the search result and push it to the Webhook via HTTP Request. Here is the search result - {{ $('Markdown to Textual Data Extractor').item.json.text }}",
|
||||
"options": {},
|
||||
"promptType": "define"
|
||||
},
|
||||
"typeVersion": 1.8
|
||||
},
|
||||
{
|
||||
"id": "47e96e87-8ac7-43d7-af6f-b52404be4eec",
|
||||
"name": "Google Gemini Chat Model",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
|
||||
"position": [
|
||||
1408,
|
||||
-300
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"modelName": "models/gemini-2.0-flash-exp"
|
||||
},
|
||||
"credentials": {
|
||||
"googlePalmApi": {
|
||||
"id": "YeO7dHZnuGBVQKVZ",
|
||||
"name": "Google Gemini(PaLM) Api account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "b2b8f3f6-ef13-47ff-8e6e-4c262b352b2e",
|
||||
"name": "Markdown to Textual Data Extractor",
|
||||
"type": "@n8n/n8n-nodes-langchain.chainLlm",
|
||||
"position": [
|
||||
1320,
|
||||
-520
|
||||
],
|
||||
"parameters": {
|
||||
"text": "=You need to analyze the below markdown and convert to textual data.\n\n{{ $json.data }}",
|
||||
"messages": {
|
||||
"messageValues": [
|
||||
{
|
||||
"message": "You are a markdown expert"
|
||||
}
|
||||
]
|
||||
},
|
||||
"promptType": "define"
|
||||
},
|
||||
"typeVersion": 1.6
|
||||
},
|
||||
{
|
||||
"id": "791d5991-0baa-4aff-8dbe-465c1335889f",
|
||||
"name": "Convert Markdown to HTML",
|
||||
"type": "n8n-nodes-base.markdown",
|
||||
"position": [
|
||||
1398,
|
||||
-820
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "markdownToHtml",
|
||||
"options": {},
|
||||
"markdown": "={{ $json.data }}"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "844c49a6-edd0-4a63-944e-44310e39ab09",
|
||||
"name": "Initiate a Webhook Notification for Markdown to HTML Response",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1774,
|
||||
-820
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://webhook.site/daf9d591-a130-4010-b1d3-0c66f8fcf467",
|
||||
"options": {},
|
||||
"sendBody": true,
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "html_response",
|
||||
"value": "={{ $json.data }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "cb7b971d-17a9-4b49-8807-7a9d4f7550d2",
|
||||
"name": "Set Bright Data Zone",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
0,
|
||||
-545
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "4e7ee31d-da89-422f-8079-2ff2d357a0ba",
|
||||
"name": "zone",
|
||||
"type": "string",
|
||||
"value": "web_unlocker1"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "47702b8b-5722-4fe0-93fc-950470b043c8",
|
||||
"name": "Loop Over Items",
|
||||
"type": "n8n-nodes-base.splitInBatches",
|
||||
"position": [
|
||||
440,
|
||||
-545
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "cb42b109-0950-45cb-ae74-3a87b724f6fc",
|
||||
"name": "Airtable",
|
||||
"type": "n8n-nodes-base.airtable",
|
||||
"position": [
|
||||
220,
|
||||
-545
|
||||
],
|
||||
"parameters": {
|
||||
"base": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "appHnxLQRVHbCzDyj",
|
||||
"cachedResultUrl": "https://airtable.com/appHnxLQRVHbCzDyj",
|
||||
"cachedResultName": "Indeed"
|
||||
},
|
||||
"table": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "tblS1f5XWVMfdyjOz",
|
||||
"cachedResultUrl": "https://airtable.com/appHnxLQRVHbCzDyj/tblS1f5XWVMfdyjOz",
|
||||
"cachedResultName": "Table 1"
|
||||
},
|
||||
"options": {},
|
||||
"operation": "search"
|
||||
},
|
||||
"credentials": {
|
||||
"airtableTokenApi": {
|
||||
"id": "yXTVs1Lgka4VUTCB",
|
||||
"name": "Airtable Personal Access Token account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "faf3d158-e625-4829-8e90-2549d747e674",
|
||||
"name": "If Link field is not empty",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
880,
|
||||
-670
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "42eae1de-1d71-4418-862d-9cb9f8fb44e6",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "notEmpty",
|
||||
"singleValue": true
|
||||
},
|
||||
"leftValue": "={{ $json.Link }}",
|
||||
"rightValue": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "d81941a5-b267-4cac-9134-42caac9948ef",
|
||||
"name": "Wait",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
660,
|
||||
-670
|
||||
],
|
||||
"webhookId": "f348d66e-ee91-40d4-8e52-83d8d3ca32f2",
|
||||
"parameters": {
|
||||
"amount": 10
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "6903a767-ab81-4a01-8b98-914afab45c63",
|
||||
"name": "Indeed Summarizer",
|
||||
"type": "@n8n/n8n-nodes-langchain.chainSummarization",
|
||||
"position": [
|
||||
1696,
|
||||
-520
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "1cd297e9-30b9-4cb3-b2b4-96bc1e3e9d95",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
200,
|
||||
-1080
|
||||
],
|
||||
"parameters": {
|
||||
"width": 480,
|
||||
"height": 320,
|
||||
"content": "## Airtable Table Data Sample \n[\n {\n \"id\": \"recCDNhVfdlc97cgf\",\n \"createdTime\": \"2025-04-14T02:55:31.000Z\",\n \"Tab\": \"Starbucks\",\n \"Link\": \"https://www.indeed.com/cmp/Starbucks\"\n },\n {\n \"id\": \"recR7VEJrwXX7XjVl\",\n \"createdTime\": \"2025-04-14T02:55:31.000Z\",\n \"Tab\": \"BrightData\",\n \"Link\": \"https://www.indeed.com/cmp/bright-data\"\n }\n]"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "d125e31f-845b-498e-9b3c-e5e8c14ed166",
|
||||
"name": "Google Gemini Chat Model for AI Agent",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
|
||||
"position": [
|
||||
2080,
|
||||
-160
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"modelName": "models/gemini-2.0-flash-exp"
|
||||
},
|
||||
"credentials": {
|
||||
"googlePalmApi": {
|
||||
"id": "YeO7dHZnuGBVQKVZ",
|
||||
"name": "Google Gemini(PaLM) Api account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "98d3cc1a-123e-468e-814f-7a96d38b8e36",
|
||||
"connections": {
|
||||
"Wait": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "If Link field is not empty",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Airtable": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop Over Items",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Loop Over Items": {
|
||||
"main": [
|
||||
[],
|
||||
[
|
||||
{
|
||||
"node": "Wait",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Indeed Summarizer": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Indeed Expert AI Agent",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Set Bright Data Zone": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Airtable",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Webhook HTTP Request": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "Indeed Expert AI Agent",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Indeed Expert AI Agent": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop Over Items",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Convert Markdown to HTML": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Initiate a Webhook Notification for Markdown to HTML Response",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Google Gemini Chat Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Markdown to Textual Data Extractor",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"If Link field is not empty": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Perform Indeed Web Request",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Perform Indeed Web Request": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Markdown to Textual Data Extractor",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Convert Markdown to HTML",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When clicking ‘Test workflow’": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Set Bright Data Zone",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Markdown to Textual Data Extractor": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Indeed Summarizer",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Google Gemini Chat Model for AI Agent": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Indeed Expert AI Agent",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Google Gemini Chat Model For Summarization": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Indeed Summarizer",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
991
workflows/Wait/1512_Wait_Splitout_Process_Webhook.json
Normal file
991
workflows/Wait/1512_Wait_Splitout_Process_Webhook.json
Normal file
@@ -0,0 +1,991 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "26ba763460b97c249b82942b23b6384876dfeb9327513332e743c5f6219c2b8e"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "7076854e-c7e8-45b5-9e5e-16678bffa254",
|
||||
"name": "OpenAI Model",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmOpenAi",
|
||||
"position": [
|
||||
2420,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"model": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gpt-3.5-turbo-1106",
|
||||
"cachedResultName": "gpt-3.5-turbo-1106"
|
||||
},
|
||||
"options": {
|
||||
"temperature": 0
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "8gccIjcuf3gvaoEr",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "00819f1c-2c60-4b7c-b395-445ec05fd898",
|
||||
"name": "Structured Output Parser",
|
||||
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
|
||||
"position": [
|
||||
2600,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"jsonSchema": "{\n \"Invoice date\": { \"type\": \"date\" },\n \"invoice number\": { \"type\": \"string\" },\n \"Purchase order number\": { \"type\": \"string\" },\n \"Supplier name\": { \"type\": \"string\" },\n \"Supplier address\": {\n \"type\": \"object\",\n \"properties\": {\n \"address 1\": { \"type\": \"string\" },\n \"address 2\": { \"type\": \"string\" },\n \"city\": { \"type\": \"string\" },\n \"postcode\": { \"type\": \"string\" }\n }\n },\n \"Supplier VAT identification number\": { \"type\": \"string\" },\n \"Customer name\": { \"type\": \"string\" },\n \"Customer address\": {\n \"type\": \"object\",\n \"properties\": {\n \"address 1\": { \"type\": \"string\" },\n \"address 2\": { \"type\": \"string\" },\n \"city\": { \"type\": \"string\" },\n \"postcode\": { \"type\": \"string\" }\n }\n },\n \"Customer VAT identification number\": { \"type\": \"string\" }, \n \"Shipping addresses\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"address 1\": { \"type\": \"string\" },\n \"address 2\": { \"type\": \"string\" },\n \"city\": { \"type\": \"string\" },\n \"postcode\": { \"type\": \"string\" }\n }\n }\n },\n \"Line items\": {\n \"type\": \"array\",\n \"items\": {\n \"name\": \"string\",\n \"description\": \"string\",\n \"price\": \"number\",\n \"discount\": \"number\"\n }\n },\n \"Subtotal without VAT\": { \"type\": \"number\" },\n \"Subtotal with VAT\": { \"type\": \"number\" },\n \"Total price\": { \"type\": \"number\" }\n}"
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "3b40d506-aabc-4105-853a-a318375cea73",
|
||||
"name": "Upload to LlamaParse",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1620,
|
||||
420
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://api.cloud.llamaindex.ai/api/parsing/upload",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"sendBody": true,
|
||||
"contentType": "multipart-form-data",
|
||||
"sendHeaders": true,
|
||||
"authentication": "genericCredentialType",
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "file",
|
||||
"parameterType": "formBinaryData",
|
||||
"inputDataFieldName": "=attachment_0"
|
||||
}
|
||||
]
|
||||
},
|
||||
"genericAuthType": "httpHeaderAuth",
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "accept",
|
||||
"value": "application/json"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "pZ4YmwFIkyGnbUC7",
|
||||
"name": "LlamaIndex API"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "57a5d331-8838-4d44-8fac-a44dba35fcc4",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1540,
|
||||
140
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 785.9525375246163,
|
||||
"height": 623.4951418211454,
|
||||
"content": "## 2. Advanced PDF Processing with LlamaParse\n[Read more about using HTTP Requests](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.httprequest/)\n\nLlamaIndex's LlamaCloud is a cloud-based service that allows you to upload,\nparse, and index document. LlamaParse is a tool offered by LlamaCloud\nto parse for complex PDFs with embedded objects ie PDF Tables and figures.\n\nAt time of writing, you can parse 1000 pdfs/day with LlamaCloud's free plan\nby signing up at [https://cloud.llamaindex.ai/](https://cloud.llamaindex.ai/?ref=n8n.io)."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "a4504d83-da3b-41bc-891f-f8f9314a6af5",
|
||||
"name": "Receiving Invoices",
|
||||
"type": "n8n-nodes-base.gmailTrigger",
|
||||
"position": [
|
||||
780,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"simple": false,
|
||||
"filters": {
|
||||
"q": "has:attachment",
|
||||
"sender": "invoices@paypal.com"
|
||||
},
|
||||
"options": {
|
||||
"downloadAttachments": true
|
||||
},
|
||||
"pollTimes": {
|
||||
"item": [
|
||||
{
|
||||
"mode": "everyMinute"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"gmailOAuth2": {
|
||||
"id": "Sf5Gfl9NiFTNXFWb",
|
||||
"name": "Gmail account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "02bd4636-f35b-4a3a-8a5f-9ae7aeed2bf4",
|
||||
"name": "Append to Reconciliation Sheet",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"position": [
|
||||
2960,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"columns": {
|
||||
"value": {},
|
||||
"schema": [
|
||||
{
|
||||
"id": "Invoice date",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Invoice date",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "invoice number",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "invoice number",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Purchase order number",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Purchase order number",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Supplier name",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Supplier name",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Supplier address",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Supplier address",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Supplier VAT identification number",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Supplier VAT identification number",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Customer name",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Customer name",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Customer address",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Customer address",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Customer VAT identification number",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Customer VAT identification number",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Shipping addresses",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Shipping addresses",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Line items",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Line items",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Subtotal without VAT",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Subtotal without VAT",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Subtotal with VAT",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Subtotal with VAT",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Total price",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Total price",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
}
|
||||
],
|
||||
"mappingMode": "autoMapInputData",
|
||||
"matchingColumns": [
|
||||
"output"
|
||||
]
|
||||
},
|
||||
"options": {},
|
||||
"operation": "append",
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "id",
|
||||
"value": "gid=0"
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "1omHDl1jpjHyrtga2ZHBddUkbkdatEr1ga9vHc4fQ1pI",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1omHDl1jpjHyrtga2ZHBddUkbkdatEr1ga9vHc4fQ1pI/edit?usp=drivesdk",
|
||||
"cachedResultName": "Invoice Reconciliation"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsOAuth2Api": {
|
||||
"id": "XHvC7jIRR8A2TlUl",
|
||||
"name": "Google Sheets account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.3
|
||||
},
|
||||
{
|
||||
"id": "cdb0a7ee-068d-465a-b4ae-d5221d5e7400",
|
||||
"name": "Get Processing Status",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1800,
|
||||
420
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://api.cloud.llamaindex.ai/api/parsing/job/{{ $json.id }}",
|
||||
"options": {},
|
||||
"sendHeaders": true,
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpHeaderAuth",
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "accept",
|
||||
"value": "application/json"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "pZ4YmwFIkyGnbUC7",
|
||||
"name": "LlamaIndex API"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "b68a01ab-d8e6-42f4-ab1d-81e746695eef",
|
||||
"name": "Wait to stay within service limits",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
2120,
|
||||
560
|
||||
],
|
||||
"webhookId": "17a96ed6-b5ff-47bb-a8a2-39c1eb40185a",
|
||||
"parameters": {
|
||||
"amount": 1
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "41bd28d2-665a-4f71-a456-98eeb26b6655",
|
||||
"name": "Is Job Ready?",
|
||||
"type": "n8n-nodes-base.switch",
|
||||
"position": [
|
||||
1960,
|
||||
420
|
||||
],
|
||||
"parameters": {
|
||||
"rules": {
|
||||
"values": [
|
||||
{
|
||||
"outputKey": "SUCCESS",
|
||||
"conditions": {
|
||||
"options": {
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "300fce8c-b19a-4d0c-86e8-f62853c70ce2",
|
||||
"operator": {
|
||||
"name": "filter.operator.equals",
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json.status }}",
|
||||
"rightValue": "SUCCESS"
|
||||
}
|
||||
]
|
||||
},
|
||||
"renameOutput": true
|
||||
},
|
||||
{
|
||||
"outputKey": "ERROR",
|
||||
"conditions": {
|
||||
"options": {
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "e6058aa0-a3e2-4ce3-9bed-6ff41a5be052",
|
||||
"operator": {
|
||||
"name": "filter.operator.equals",
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json.status }}",
|
||||
"rightValue": "ERROR"
|
||||
}
|
||||
]
|
||||
},
|
||||
"renameOutput": true
|
||||
},
|
||||
{
|
||||
"outputKey": "CANCELED",
|
||||
"conditions": {
|
||||
"options": {
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "ceb6338f-4261-40ac-be11-91f61c7302ba",
|
||||
"operator": {
|
||||
"name": "filter.operator.equals",
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json.status }}",
|
||||
"rightValue": "CANCELED"
|
||||
}
|
||||
]
|
||||
},
|
||||
"renameOutput": true
|
||||
},
|
||||
{
|
||||
"outputKey": "PENDING",
|
||||
"conditions": {
|
||||
"options": {
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "0fa97d86-432a-409a-917e-5f1a002b1ab9",
|
||||
"operator": {
|
||||
"name": "filter.operator.equals",
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json.status }}",
|
||||
"rightValue": "PENDING"
|
||||
}
|
||||
]
|
||||
},
|
||||
"renameOutput": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {
|
||||
"allMatchingOutputs": true
|
||||
}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "f7157abe-b1ee-46b3-adb2-1be056d9d75d",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
694.0259411218055,
|
||||
139.97202236910687
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 808.8727491350096,
|
||||
"height": 709.5781339256318,
|
||||
"content": "## 1. Watch for Invoice Emails\n[Read more about Gmail Triggers](https://docs.n8n.io/integrations/builtin/trigger-nodes/n8n-nodes-base.gmailtrigger)\n\nThe Gmail node can watch for all incoming messages and filter based on a condition. We'll set our Gmail node to wait for:\n* a message from particular email address.\n* having an attachment which should be the invoice PDF\n* not having a label \"invoice synced\", which is what we use to avoid duplicate processing."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "ff7cb6e4-5a60-4f12-b15e-74e7a4a302ce",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2360,
|
||||
70.48792658995046
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 805.0578351924228,
|
||||
"height": 656.5014186128178,
|
||||
"content": "## 3. Use LLMs to Extract Values from Data\n[Read more about Basic LLM Chain](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.chainllm/)\n\nLarge language models are perfect for data extraction tasks as they can work across a range of document layouts without human intervention. The extracted data can then be sent to a variety of datastores such as spreadsheets, accounting systems and/or CRMs.\n\n**Tip:** The \"Structured Output Parser\" ensures the AI output can be\ninserted to our spreadsheet without additional clean up and/or formatting. "
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "0d510631-440b-41f5-b1aa-9b7279e9c8e3",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1934,
|
||||
774
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 394.15089838126653,
|
||||
"height": 154.49585536070904,
|
||||
"content": "### \ud83d\ude4b\u200d\u2642\ufe0f Why not just use the built-in PDF convertor?\nA common issue with PDF-to-text convertors are that they ignore important data structures like tables. These structures can be important for data extraction. For example, being able to distinguish between seperate line items in an invoice."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "fe7fdb90-3c85-4f29-a7d3-16f927f48682",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
3200,
|
||||
157.65172434465347
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 362.3535748101346,
|
||||
"height": 440.3435768155051,
|
||||
"content": "## 4. Add Label to Avoid Duplication\n[Read more about working with Gmail](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.gmail/)\n\nTo finish off the workflow, we'll add the \"invoice synced\" label to the original invoice email to flag that the extraction was successful. This can be useful if working with a shared inbox and for quality control purposes later."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "1acf2c60-c2b9-4f78-94a4-0711c8bd71ab",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
300,
|
||||
140
|
||||
],
|
||||
"parameters": {
|
||||
"width": 360.0244620907562,
|
||||
"height": 573.2443601155958,
|
||||
"content": "## Try Me Out!\n\n**This workflow does the following:**\n* Waits for email invoices with PDF attachments.\n* Uses the LlamaParse service to convert the invoice PDF into a markdown file.\n* Uses a LLM to extract invoice data from the Markdown file.\n* Exports the extracted data to a Google Sheet.\n\n### Follow along with the blog here\nhttps://blog.n8n.io/how-to-extract-data-from-pdf-to-excel-spreadsheet-advance-parsing-with-n8n-io-and-llamaparse/\n\n### Good to know\n* You'll need to create the label \"invoice synced\" in gmail before using this workflow.\n\n### Need Help?\nJoin the [Discord](https://discord.com/invite/XPKeKXeB7d) or ask in the [Forum](https://community.n8n.io/)!\n\nHappy Hacking!"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "3802c538-acf9-48d8-b011-bfe2fb817350",
|
||||
"name": "Add \"invoice synced\" Label",
|
||||
"type": "n8n-nodes-base.gmail",
|
||||
"position": [
|
||||
3320,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"labelIds": [
|
||||
"Label_5511644430826409825"
|
||||
],
|
||||
"messageId": "={{ $('Receiving Invoices').item.json.id }}",
|
||||
"operation": "addLabels"
|
||||
},
|
||||
"credentials": {
|
||||
"gmailOAuth2": {
|
||||
"id": "Sf5Gfl9NiFTNXFWb",
|
||||
"name": "Gmail account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "ffabd8c5-c440-4473-8e44-b849426c70cf",
|
||||
"name": "Get Parsed Invoice Data",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
2160,
|
||||
280
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://api.cloud.llamaindex.ai/api/parsing/job/{{ $json.id }}/result/markdown",
|
||||
"options": {
|
||||
"redirect": {
|
||||
"redirect": {}
|
||||
}
|
||||
},
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpHeaderAuth"
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "pZ4YmwFIkyGnbUC7",
|
||||
"name": "LlamaIndex API"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "5f9b507f-4dc1-4853-bf71-a64f2f4b55c1",
|
||||
"name": "Map Output",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
2760,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "raw",
|
||||
"options": {},
|
||||
"jsonOutput": "={{ $json.output }}"
|
||||
},
|
||||
"typeVersion": 3.3
|
||||
},
|
||||
{
|
||||
"id": "d22744cd-151d-4b92-b4f2-4a5b9ceb4ee7",
|
||||
"name": "Apply Data Extraction Rules",
|
||||
"type": "@n8n/n8n-nodes-langchain.chainLlm",
|
||||
"position": [
|
||||
2420,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"text": "=Given the following invoice in the <invoice> xml tags, extract the following information as listed below.\nIf you cannot the information for a specific item, then leave blank and skip to the next. \n\n* Invoice date\n* invoice number\n* Purchase order number\n* Supplier name\n* Supplier address\n* Supplier VAT identification number\n* Customer name\n* Customer address\n* Customer VAT identification number\n* Shipping addresses\n* Line items, including a description of the goods or services rendered\n* Price with and without VAT\n* Total price\n\n<invoice>{{ $json.markdown }}</invoice>",
|
||||
"promptType": "define",
|
||||
"hasOutputParser": true
|
||||
},
|
||||
"typeVersion": 1.4
|
||||
},
|
||||
{
|
||||
"id": "3735a124-9fab-4400-8b94-8b5aa9f951fe",
|
||||
"name": "Should Process Email?",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
1340,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "e5649a2b-6e12-4cc4-8001-4639cc9cc2c2",
|
||||
"operator": {
|
||||
"name": "filter.operator.equals",
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $input.item.binary.attachment_0.mimeType }}",
|
||||
"rightValue": "application/pdf"
|
||||
},
|
||||
{
|
||||
"id": "4c57ab9b-b11c-455a-a63d-daf48418b06e",
|
||||
"operator": {
|
||||
"type": "array",
|
||||
"operation": "notContains",
|
||||
"rightType": "any"
|
||||
},
|
||||
"leftValue": "={{ $json.labels }}",
|
||||
"rightValue": "invoice synced"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "12a23527-39f3-4f72-8691-3d5cf59f9909",
|
||||
"name": "Split Out Labels",
|
||||
"type": "n8n-nodes-base.splitOut",
|
||||
"position": [
|
||||
980,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldToSplitOut": "labelIds"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "88ff6e22-d3d3-403d-b0b2-2674487140a7",
|
||||
"name": "Get Labels Names",
|
||||
"type": "n8n-nodes-base.gmail",
|
||||
"position": [
|
||||
980,
|
||||
540
|
||||
],
|
||||
"parameters": {
|
||||
"labelId": "={{ $json.labelIds }}",
|
||||
"resource": "label",
|
||||
"operation": "get"
|
||||
},
|
||||
"credentials": {
|
||||
"gmailOAuth2": {
|
||||
"id": "Sf5Gfl9NiFTNXFWb",
|
||||
"name": "Gmail account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "88accb8e-6531-40be-8d35-1bba594149af",
|
||||
"name": "Combine Label Names",
|
||||
"type": "n8n-nodes-base.aggregate",
|
||||
"position": [
|
||||
980,
|
||||
680
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldsToAggregate": {
|
||||
"fieldToAggregate": [
|
||||
{
|
||||
"renameField": true,
|
||||
"outputFieldName": "labels",
|
||||
"fieldToAggregate": "name"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "d233ff33-cabf-434e-876d-879693ecaf58",
|
||||
"name": "Email with Label Names",
|
||||
"type": "n8n-nodes-base.merge",
|
||||
"position": [
|
||||
1160,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "combine",
|
||||
"options": {},
|
||||
"combinationMode": "multiplex"
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "733fc285-e069-4e4e-b13e-dfc1c259ac12",
|
||||
"name": "Sticky Note6",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2540,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"width": 192.26896179623753,
|
||||
"height": 213.73043662572252,
|
||||
"content": "\n\n\n\n\n\n\n\n\n\n\n\n**Need more attributes?**\nChange it here!"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "83aa6ed0-ce3b-48d7-aded-475c337ae86e",
|
||||
"name": "Sticky Note7",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2880,
|
||||
300
|
||||
],
|
||||
"parameters": {
|
||||
"width": 258.29345180972877,
|
||||
"height": 397.0641952938746,
|
||||
"content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\ud83d\udea8**Required**\n* Set Your Google Sheet URL here\n* Set the Name of your Sheet\n\n\n**Don't use GSheets?**\nSwap this for Excel, Airtable or a Database!"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "720070f6-2d6c-45ef-80c2-e950862a002b",
|
||||
"name": "Sticky Note8",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
740,
|
||||
380
|
||||
],
|
||||
"parameters": {
|
||||
"width": 174.50671517518518,
|
||||
"height": 274.6295678979021,
|
||||
"content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\ud83d\udea8**Required**\n* Change the email filters here!"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Map Output": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Append to Reconciliation Sheet",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Apply Data Extraction Rules",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Is Job Ready?": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Parsed Invoice Data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
null,
|
||||
null,
|
||||
[
|
||||
{
|
||||
"node": "Wait to stay within service limits",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Labels Names": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Combine Label Names",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Split Out Labels": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Labels Names",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Receiving Invoices": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Split Out Labels",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Email with Label Names",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Combine Label Names": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Email with Label Names",
|
||||
"type": "main",
|
||||
"index": 1
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Upload to LlamaParse": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Processing Status",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Processing Status": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Is Job Ready?",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Should Process Email?": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Upload to LlamaParse",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Email with Label Names": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Should Process Email?",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Parsed Invoice Data": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Apply Data Extraction Rules",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Structured Output Parser": {
|
||||
"ai_outputParser": [
|
||||
[
|
||||
{
|
||||
"node": "Apply Data Extraction Rules",
|
||||
"type": "ai_outputParser",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Apply Data Extraction Rules": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Map Output",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Append to Reconciliation Sheet": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Add \"invoice synced\" Label",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait to stay within service limits": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Processing Status",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
991
workflows/Wait/1513_Wait_Splitout_Process_Webhook.json
Normal file
991
workflows/Wait/1513_Wait_Splitout_Process_Webhook.json
Normal file
@@ -0,0 +1,991 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "26ba763460b97c249b82942b23b6384876dfeb9327513332e743c5f6219c2b8e"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "7076854e-c7e8-45b5-9e5e-16678bffa254",
|
||||
"name": "OpenAI Model",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmOpenAi",
|
||||
"position": [
|
||||
2420,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"model": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gpt-3.5-turbo-1106",
|
||||
"cachedResultName": "gpt-3.5-turbo-1106"
|
||||
},
|
||||
"options": {
|
||||
"temperature": 0
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "8gccIjcuf3gvaoEr",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "00819f1c-2c60-4b7c-b395-445ec05fd898",
|
||||
"name": "Structured Output Parser",
|
||||
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
|
||||
"position": [
|
||||
2600,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"jsonSchema": "{\n \"Invoice date\": { \"type\": \"date\" },\n \"invoice number\": { \"type\": \"string\" },\n \"Purchase order number\": { \"type\": \"string\" },\n \"Supplier name\": { \"type\": \"string\" },\n \"Supplier address\": {\n \"type\": \"object\",\n \"properties\": {\n \"address 1\": { \"type\": \"string\" },\n \"address 2\": { \"type\": \"string\" },\n \"city\": { \"type\": \"string\" },\n \"postcode\": { \"type\": \"string\" }\n }\n },\n \"Supplier VAT identification number\": { \"type\": \"string\" },\n \"Customer name\": { \"type\": \"string\" },\n \"Customer address\": {\n \"type\": \"object\",\n \"properties\": {\n \"address 1\": { \"type\": \"string\" },\n \"address 2\": { \"type\": \"string\" },\n \"city\": { \"type\": \"string\" },\n \"postcode\": { \"type\": \"string\" }\n }\n },\n \"Customer VAT identification number\": { \"type\": \"string\" }, \n \"Shipping addresses\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"address 1\": { \"type\": \"string\" },\n \"address 2\": { \"type\": \"string\" },\n \"city\": { \"type\": \"string\" },\n \"postcode\": { \"type\": \"string\" }\n }\n }\n },\n \"Line items\": {\n \"type\": \"array\",\n \"items\": {\n \"name\": \"string\",\n \"description\": \"string\",\n \"price\": \"number\",\n \"discount\": \"number\"\n }\n },\n \"Subtotal without VAT\": { \"type\": \"number\" },\n \"Subtotal with VAT\": { \"type\": \"number\" },\n \"Total price\": { \"type\": \"number\" }\n}"
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "3b40d506-aabc-4105-853a-a318375cea73",
|
||||
"name": "Upload to LlamaParse",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1620,
|
||||
420
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://api.cloud.llamaindex.ai/api/parsing/upload",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"sendBody": true,
|
||||
"contentType": "multipart-form-data",
|
||||
"sendHeaders": true,
|
||||
"authentication": "genericCredentialType",
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "file",
|
||||
"parameterType": "formBinaryData",
|
||||
"inputDataFieldName": "=attachment_0"
|
||||
}
|
||||
]
|
||||
},
|
||||
"genericAuthType": "httpHeaderAuth",
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "accept",
|
||||
"value": "application/json"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "pZ4YmwFIkyGnbUC7",
|
||||
"name": "LlamaIndex API"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "57a5d331-8838-4d44-8fac-a44dba35fcc4",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1540,
|
||||
140
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 785.9525375246163,
|
||||
"height": 623.4951418211454,
|
||||
"content": "## 2. Advanced PDF Processing with LlamaParse\n[Read more about using HTTP Requests](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.httprequest/)\n\nLlamaIndex's LlamaCloud is a cloud-based service that allows you to upload,\nparse, and index document. LlamaParse is a tool offered by LlamaCloud\nto parse for complex PDFs with embedded objects ie PDF Tables and figures.\n\nAt time of writing, you can parse 1000 pdfs/day with LlamaCloud's free plan\nby signing up at [https://cloud.llamaindex.ai/](https://cloud.llamaindex.ai/?ref=n8n.io)."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "a4504d83-da3b-41bc-891f-f8f9314a6af5",
|
||||
"name": "Receiving Invoices",
|
||||
"type": "n8n-nodes-base.gmailTrigger",
|
||||
"position": [
|
||||
780,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"simple": false,
|
||||
"filters": {
|
||||
"q": "has:attachment",
|
||||
"sender": "invoices@paypal.com"
|
||||
},
|
||||
"options": {
|
||||
"downloadAttachments": true
|
||||
},
|
||||
"pollTimes": {
|
||||
"item": [
|
||||
{
|
||||
"mode": "everyMinute"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"gmailOAuth2": {
|
||||
"id": "Sf5Gfl9NiFTNXFWb",
|
||||
"name": "Gmail account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "02bd4636-f35b-4a3a-8a5f-9ae7aeed2bf4",
|
||||
"name": "Append to Reconciliation Sheet",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"position": [
|
||||
2960,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"columns": {
|
||||
"value": {},
|
||||
"schema": [
|
||||
{
|
||||
"id": "Invoice date",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Invoice date",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "invoice number",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "invoice number",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Purchase order number",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Purchase order number",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Supplier name",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Supplier name",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Supplier address",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Supplier address",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Supplier VAT identification number",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Supplier VAT identification number",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Customer name",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Customer name",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Customer address",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Customer address",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Customer VAT identification number",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Customer VAT identification number",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Shipping addresses",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Shipping addresses",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Line items",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Line items",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Subtotal without VAT",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Subtotal without VAT",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Subtotal with VAT",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Subtotal with VAT",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Total price",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Total price",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
}
|
||||
],
|
||||
"mappingMode": "autoMapInputData",
|
||||
"matchingColumns": [
|
||||
"output"
|
||||
]
|
||||
},
|
||||
"options": {},
|
||||
"operation": "append",
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "id",
|
||||
"value": "gid=0"
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "1omHDl1jpjHyrtga2ZHBddUkbkdatEr1ga9vHc4fQ1pI",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1omHDl1jpjHyrtga2ZHBddUkbkdatEr1ga9vHc4fQ1pI/edit?usp=drivesdk",
|
||||
"cachedResultName": "Invoice Reconciliation"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsOAuth2Api": {
|
||||
"id": "XHvC7jIRR8A2TlUl",
|
||||
"name": "Google Sheets account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.3
|
||||
},
|
||||
{
|
||||
"id": "cdb0a7ee-068d-465a-b4ae-d5221d5e7400",
|
||||
"name": "Get Processing Status",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1800,
|
||||
420
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://api.cloud.llamaindex.ai/api/parsing/job/{{ $json.id }}",
|
||||
"options": {},
|
||||
"sendHeaders": true,
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpHeaderAuth",
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "accept",
|
||||
"value": "application/json"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "pZ4YmwFIkyGnbUC7",
|
||||
"name": "LlamaIndex API"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "b68a01ab-d8e6-42f4-ab1d-81e746695eef",
|
||||
"name": "Wait to stay within service limits",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
2120,
|
||||
560
|
||||
],
|
||||
"webhookId": "17a96ed6-b5ff-47bb-a8a2-39c1eb40185a",
|
||||
"parameters": {
|
||||
"amount": 1
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "41bd28d2-665a-4f71-a456-98eeb26b6655",
|
||||
"name": "Is Job Ready?",
|
||||
"type": "n8n-nodes-base.switch",
|
||||
"position": [
|
||||
1960,
|
||||
420
|
||||
],
|
||||
"parameters": {
|
||||
"rules": {
|
||||
"values": [
|
||||
{
|
||||
"outputKey": "SUCCESS",
|
||||
"conditions": {
|
||||
"options": {
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "300fce8c-b19a-4d0c-86e8-f62853c70ce2",
|
||||
"operator": {
|
||||
"name": "filter.operator.equals",
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json.status }}",
|
||||
"rightValue": "SUCCESS"
|
||||
}
|
||||
]
|
||||
},
|
||||
"renameOutput": true
|
||||
},
|
||||
{
|
||||
"outputKey": "ERROR",
|
||||
"conditions": {
|
||||
"options": {
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "e6058aa0-a3e2-4ce3-9bed-6ff41a5be052",
|
||||
"operator": {
|
||||
"name": "filter.operator.equals",
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json.status }}",
|
||||
"rightValue": "ERROR"
|
||||
}
|
||||
]
|
||||
},
|
||||
"renameOutput": true
|
||||
},
|
||||
{
|
||||
"outputKey": "CANCELED",
|
||||
"conditions": {
|
||||
"options": {
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "ceb6338f-4261-40ac-be11-91f61c7302ba",
|
||||
"operator": {
|
||||
"name": "filter.operator.equals",
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json.status }}",
|
||||
"rightValue": "CANCELED"
|
||||
}
|
||||
]
|
||||
},
|
||||
"renameOutput": true
|
||||
},
|
||||
{
|
||||
"outputKey": "PENDING",
|
||||
"conditions": {
|
||||
"options": {
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "0fa97d86-432a-409a-917e-5f1a002b1ab9",
|
||||
"operator": {
|
||||
"name": "filter.operator.equals",
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json.status }}",
|
||||
"rightValue": "PENDING"
|
||||
}
|
||||
]
|
||||
},
|
||||
"renameOutput": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {
|
||||
"allMatchingOutputs": true
|
||||
}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "f7157abe-b1ee-46b3-adb2-1be056d9d75d",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
694.0259411218055,
|
||||
139.97202236910687
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 808.8727491350096,
|
||||
"height": 709.5781339256318,
|
||||
"content": "## 1. Watch for Invoice Emails\n[Read more about Gmail Triggers](https://docs.n8n.io/integrations/builtin/trigger-nodes/n8n-nodes-base.gmailtrigger)\n\nThe Gmail node can watch for all incoming messages and filter based on a condition. We'll set our Gmail node to wait for:\n* a message from particular email address.\n* having an attachment which should be the invoice PDF\n* not having a label \"invoice synced\", which is what we use to avoid duplicate processing."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "ff7cb6e4-5a60-4f12-b15e-74e7a4a302ce",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2360,
|
||||
70.48792658995046
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 805.0578351924228,
|
||||
"height": 656.5014186128178,
|
||||
"content": "## 3. Use LLMs to Extract Values from Data\n[Read more about Basic LLM Chain](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.chainllm/)\n\nLarge language models are perfect for data extraction tasks as they can work across a range of document layouts without human intervention. The extracted data can then be sent to a variety of datastores such as spreadsheets, accounting systems and/or CRMs.\n\n**Tip:** The \"Structured Output Parser\" ensures the AI output can be\ninserted to our spreadsheet without additional clean up and/or formatting. "
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "0d510631-440b-41f5-b1aa-9b7279e9c8e3",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1934,
|
||||
774
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 394.15089838126653,
|
||||
"height": 154.49585536070904,
|
||||
"content": "### \ud83d\ude4b\u200d\u2642\ufe0f Why not just use the built-in PDF convertor?\nA common issue with PDF-to-text convertors are that they ignore important data structures like tables. These structures can be important for data extraction. For example, being able to distinguish between seperate line items in an invoice."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "fe7fdb90-3c85-4f29-a7d3-16f927f48682",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
3200,
|
||||
157.65172434465347
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 362.3535748101346,
|
||||
"height": 440.3435768155051,
|
||||
"content": "## 4. Add Label to Avoid Duplication\n[Read more about working with Gmail](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.gmail/)\n\nTo finish off the workflow, we'll add the \"invoice synced\" label to the original invoice email to flag that the extraction was successful. This can be useful if working with a shared inbox and for quality control purposes later."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "1acf2c60-c2b9-4f78-94a4-0711c8bd71ab",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
300,
|
||||
140
|
||||
],
|
||||
"parameters": {
|
||||
"width": 360.0244620907562,
|
||||
"height": 573.2443601155958,
|
||||
"content": "## Try Me Out!\n\n**This workflow does the following:**\n* Waits for email invoices with PDF attachments.\n* Uses the LlamaParse service to convert the invoice PDF into a markdown file.\n* Uses a LLM to extract invoice data from the Markdown file.\n* Exports the extracted data to a Google Sheet.\n\n### Follow along with the blog here\nhttps://blog.n8n.io/how-to-extract-data-from-pdf-to-excel-spreadsheet-advance-parsing-with-n8n-io-and-llamaparse/\n\n### Good to know\n* You'll need to create the label \"invoice synced\" in gmail before using this workflow.\n\n### Need Help?\nJoin the [Discord](https://discord.com/invite/XPKeKXeB7d) or ask in the [Forum](https://community.n8n.io/)!\n\nHappy Hacking!"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "3802c538-acf9-48d8-b011-bfe2fb817350",
|
||||
"name": "Add \"invoice synced\" Label",
|
||||
"type": "n8n-nodes-base.gmail",
|
||||
"position": [
|
||||
3320,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"labelIds": [
|
||||
"Label_5511644430826409825"
|
||||
],
|
||||
"messageId": "={{ $('Receiving Invoices').item.json.id }}",
|
||||
"operation": "addLabels"
|
||||
},
|
||||
"credentials": {
|
||||
"gmailOAuth2": {
|
||||
"id": "Sf5Gfl9NiFTNXFWb",
|
||||
"name": "Gmail account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "ffabd8c5-c440-4473-8e44-b849426c70cf",
|
||||
"name": "Get Parsed Invoice Data",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
2160,
|
||||
280
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://api.cloud.llamaindex.ai/api/parsing/job/{{ $json.id }}/result/markdown",
|
||||
"options": {
|
||||
"redirect": {
|
||||
"redirect": {}
|
||||
}
|
||||
},
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpHeaderAuth"
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "pZ4YmwFIkyGnbUC7",
|
||||
"name": "LlamaIndex API"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "5f9b507f-4dc1-4853-bf71-a64f2f4b55c1",
|
||||
"name": "Map Output",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
2760,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "raw",
|
||||
"options": {},
|
||||
"jsonOutput": "={{ $json.output }}"
|
||||
},
|
||||
"typeVersion": 3.3
|
||||
},
|
||||
{
|
||||
"id": "d22744cd-151d-4b92-b4f2-4a5b9ceb4ee7",
|
||||
"name": "Apply Data Extraction Rules",
|
||||
"type": "@n8n/n8n-nodes-langchain.chainLlm",
|
||||
"position": [
|
||||
2420,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"text": "=Given the following invoice in the <invoice> xml tags, extract the following information as listed below.\nIf you cannot the information for a specific item, then leave blank and skip to the next. \n\n* Invoice date\n* invoice number\n* Purchase order number\n* Supplier name\n* Supplier address\n* Supplier VAT identification number\n* Customer name\n* Customer address\n* Customer VAT identification number\n* Shipping addresses\n* Line items, including a description of the goods or services rendered\n* Price with and without VAT\n* Total price\n\n<invoice>{{ $json.markdown }}</invoice>",
|
||||
"promptType": "define",
|
||||
"hasOutputParser": true
|
||||
},
|
||||
"typeVersion": 1.4
|
||||
},
|
||||
{
|
||||
"id": "3735a124-9fab-4400-8b94-8b5aa9f951fe",
|
||||
"name": "Should Process Email?",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
1340,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "e5649a2b-6e12-4cc4-8001-4639cc9cc2c2",
|
||||
"operator": {
|
||||
"name": "filter.operator.equals",
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $input.item.binary.attachment_0.mimeType }}",
|
||||
"rightValue": "application/pdf"
|
||||
},
|
||||
{
|
||||
"id": "4c57ab9b-b11c-455a-a63d-daf48418b06e",
|
||||
"operator": {
|
||||
"type": "array",
|
||||
"operation": "notContains",
|
||||
"rightType": "any"
|
||||
},
|
||||
"leftValue": "={{ $json.labels }}",
|
||||
"rightValue": "invoice synced"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "12a23527-39f3-4f72-8691-3d5cf59f9909",
|
||||
"name": "Split Out Labels",
|
||||
"type": "n8n-nodes-base.splitOut",
|
||||
"position": [
|
||||
980,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldToSplitOut": "labelIds"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "88ff6e22-d3d3-403d-b0b2-2674487140a7",
|
||||
"name": "Get Labels Names",
|
||||
"type": "n8n-nodes-base.gmail",
|
||||
"position": [
|
||||
980,
|
||||
540
|
||||
],
|
||||
"parameters": {
|
||||
"labelId": "={{ $json.labelIds }}",
|
||||
"resource": "label",
|
||||
"operation": "get"
|
||||
},
|
||||
"credentials": {
|
||||
"gmailOAuth2": {
|
||||
"id": "Sf5Gfl9NiFTNXFWb",
|
||||
"name": "Gmail account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "88accb8e-6531-40be-8d35-1bba594149af",
|
||||
"name": "Combine Label Names",
|
||||
"type": "n8n-nodes-base.aggregate",
|
||||
"position": [
|
||||
980,
|
||||
680
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldsToAggregate": {
|
||||
"fieldToAggregate": [
|
||||
{
|
||||
"renameField": true,
|
||||
"outputFieldName": "labels",
|
||||
"fieldToAggregate": "name"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "d233ff33-cabf-434e-876d-879693ecaf58",
|
||||
"name": "Email with Label Names",
|
||||
"type": "n8n-nodes-base.merge",
|
||||
"position": [
|
||||
1160,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "combine",
|
||||
"options": {},
|
||||
"combinationMode": "multiplex"
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "733fc285-e069-4e4e-b13e-dfc1c259ac12",
|
||||
"name": "Sticky Note6",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2540,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"width": 192.26896179623753,
|
||||
"height": 213.73043662572252,
|
||||
"content": "\n\n\n\n\n\n\n\n\n\n\n\n**Need more attributes?**\nChange it here!"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "83aa6ed0-ce3b-48d7-aded-475c337ae86e",
|
||||
"name": "Sticky Note7",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2880,
|
||||
300
|
||||
],
|
||||
"parameters": {
|
||||
"width": 258.29345180972877,
|
||||
"height": 397.0641952938746,
|
||||
"content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\ud83d\udea8**Required**\n* Set Your Google Sheet URL here\n* Set the Name of your Sheet\n\n\n**Don't use GSheets?**\nSwap this for Excel, Airtable or a Database!"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "720070f6-2d6c-45ef-80c2-e950862a002b",
|
||||
"name": "Sticky Note8",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
740,
|
||||
380
|
||||
],
|
||||
"parameters": {
|
||||
"width": 174.50671517518518,
|
||||
"height": 274.6295678979021,
|
||||
"content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\ud83d\udea8**Required**\n* Change the email filters here!"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Map Output": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Append to Reconciliation Sheet",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Apply Data Extraction Rules",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Is Job Ready?": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Parsed Invoice Data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
null,
|
||||
null,
|
||||
[
|
||||
{
|
||||
"node": "Wait to stay within service limits",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Labels Names": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Combine Label Names",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Split Out Labels": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Labels Names",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Receiving Invoices": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Split Out Labels",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Email with Label Names",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Combine Label Names": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Email with Label Names",
|
||||
"type": "main",
|
||||
"index": 1
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Upload to LlamaParse": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Processing Status",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Processing Status": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Is Job Ready?",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Should Process Email?": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Upload to LlamaParse",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Email with Label Names": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Should Process Email?",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Parsed Invoice Data": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Apply Data Extraction Rules",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Structured Output Parser": {
|
||||
"ai_outputParser": [
|
||||
[
|
||||
{
|
||||
"node": "Apply Data Extraction Rules",
|
||||
"type": "ai_outputParser",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Apply Data Extraction Rules": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Map Output",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Append to Reconciliation Sheet": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Add \"invoice synced\" Label",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait to stay within service limits": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Processing Status",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
653
workflows/Wait/1549_Wait_Dropbox_Automation_Webhook.json
Normal file
653
workflows/Wait/1549_Wait_Dropbox_Automation_Webhook.json
Normal file
@@ -0,0 +1,653 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "cd478e616d2616186f4f92b70cfe0c2ed95b5b209f749f2b873b38bdc56c47c9"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "f4b1bdd8-654d-4643-a004-ff1b2f32b5ae",
|
||||
"name": "When clicking \u2018Test workflow\u2019",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
580,
|
||||
1100
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "d6b1c410-81c3-486d-bdcb-86a4c6f7bf9e",
|
||||
"name": "Create Asset",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1940,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://pdf-services.adobe.io/assets",
|
||||
"method": "POST",
|
||||
"options": {
|
||||
"redirect": {
|
||||
"redirect": {}
|
||||
}
|
||||
},
|
||||
"sendBody": true,
|
||||
"sendHeaders": true,
|
||||
"authentication": "genericCredentialType",
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "mediaType",
|
||||
"value": "application/pdf"
|
||||
}
|
||||
]
|
||||
},
|
||||
"genericAuthType": "httpHeaderAuth",
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"value": "=Bearer {{ $json.access_token }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "PU8GmSwXswwM1Fzq",
|
||||
"name": "Adobe API calls"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.1
|
||||
},
|
||||
{
|
||||
"id": "9e900a45-d792-4dc5-938c-0d5cdfd2e647",
|
||||
"name": "Execute Workflow Trigger",
|
||||
"type": "n8n-nodes-base.executeWorkflowTrigger",
|
||||
"position": [
|
||||
1140,
|
||||
440
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "859f369d-f36f-4c3f-a50d-a17214fef2a3",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
20,
|
||||
140
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 667.6107231291055,
|
||||
"height": 715.2927406867177,
|
||||
"content": "# Adobe API Wrapper\n\nSee Adobe documentation:\n- https://developer.adobe.com/document-services/docs/overview/pdf-services-api/howtos/\n- https://developer.adobe.com/document-services/docs/overview/pdf-extract-api/gettingstarted/\n\nIn short, this workflow does the following steps :\n\n- Authentication\n- Upload an asset (pdf) to adobe\n- Wait for the asset to be processed by Adobe\n- Download the result\n\n## Credential\n\nCredentials are not \"predefined\" and you'll have to create 2 custom credentials, detailed in the workflow.\n\n## Result\n\nThe result will depend on the transformation requested. It could be 1 of various files (json, zip...) accessible via download URL returned by the workflow.\n\nWorkflow can be tested with a PDF filed fetched with Dorpbox for example or any storage provider. "
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "450199c5-e588-486d-81cf-eb69cf729ab1",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
560,
|
||||
900
|
||||
],
|
||||
"parameters": {
|
||||
"width": 857.2064431277577,
|
||||
"height": 463.937514110429,
|
||||
"content": "## Testing for development"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "311a75d6-4fbe-4d8f-89b3-d4b0ee21f7ae",
|
||||
"name": "Adobe API Query",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
900,
|
||||
1000
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "62bb6466-acf4-41e5-9444-c9ef608a6822",
|
||||
"name": "endpoint",
|
||||
"type": "string",
|
||||
"value": "extractpdf"
|
||||
},
|
||||
{
|
||||
"id": "0352f585-1434-4ab7-a704-a1e187fffa96",
|
||||
"name": "json_payload",
|
||||
"type": "object",
|
||||
"value": "={{ \n{\n \"renditionsToExtract\": [\n \"tables\"\n ],\n \"elementsToExtract\": [\n \"text\",\n \"tables\"\n ]\n }\n}}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "abf20778-db50-4787-a5f4-7af5d5c76efe",
|
||||
"name": "Load a test pdf file",
|
||||
"type": "n8n-nodes-base.dropbox",
|
||||
"position": [
|
||||
900,
|
||||
1180
|
||||
],
|
||||
"parameters": {
|
||||
"path": "/valerian/w/prod/_freelance/ADEZIF/AI/Source data/Brochures pour GPT/Brochure 3M/3M_doc_emballage VERSION FINALE.pdf",
|
||||
"operation": "download",
|
||||
"authentication": "oAuth2"
|
||||
},
|
||||
"credentials": {
|
||||
"dropboxOAuth2Api": {
|
||||
"id": "9",
|
||||
"name": "Dropbox account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "8bb2ae0c-df61-4110-af44-b1040b4340a2",
|
||||
"name": "Query + File",
|
||||
"type": "n8n-nodes-base.merge",
|
||||
"position": [
|
||||
1180,
|
||||
1080
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "combine",
|
||||
"options": {},
|
||||
"combinationMode": "mergeByPosition"
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "92afa6d6-daf8-4358-8c95-36473b810dc2",
|
||||
"name": "Query + File + Asset information",
|
||||
"type": "n8n-nodes-base.merge",
|
||||
"position": [
|
||||
2180,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "combine",
|
||||
"options": {},
|
||||
"combinationMode": "mergeByPosition"
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "5d88b8e4-0b0a-463a-88db-c45d5e87e823",
|
||||
"name": "Process Query",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
2640,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://pdf-services.adobe.io/operation/{{ $('Query + File + Asset information').item.json.endpoint }}",
|
||||
"method": "POST",
|
||||
"options": {
|
||||
"redirect": {
|
||||
"redirect": {}
|
||||
},
|
||||
"response": {
|
||||
"response": {
|
||||
"fullResponse": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"jsonBody": "={{ \n{\n...{ \"assetID\":$('Query + File + Asset information').first().json.assetID },\n...$('Query + File + Asset information').first().json.json_payload\n}\n}}",
|
||||
"sendBody": true,
|
||||
"sendHeaders": true,
|
||||
"specifyBody": "json",
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpHeaderAuth",
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"value": "=Bearer {{ $('Authenticartion (get token)').first().json[\"access_token\"] }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "PU8GmSwXswwM1Fzq",
|
||||
"name": "Adobe API calls"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.1
|
||||
},
|
||||
{
|
||||
"id": "47278b2f-dd04-4609-90ab-52f34b9a0e72",
|
||||
"name": "Wait 5 second",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
2860,
|
||||
580
|
||||
],
|
||||
"webhookId": "ed00a9a8-d599-4a98-86f8-a15176352c0a",
|
||||
"parameters": {
|
||||
"unit": "seconds",
|
||||
"amount": 5
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "691b52ae-132a-4105-b1e4-bb7d55d0e347",
|
||||
"name": "Try to download the result",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
3080,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"url": "={{ $('Process Query').item.json[\"headers\"][\"location\"] }}",
|
||||
"options": {},
|
||||
"sendHeaders": true,
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpHeaderAuth",
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"value": "=Bearer {{ $('Authenticartion (get token)').first().json[\"access_token\"] }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "PU8GmSwXswwM1Fzq",
|
||||
"name": "Adobe API calls"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.1
|
||||
},
|
||||
{
|
||||
"id": "277dea14-de8d-4719-aff1-f4008d6d5c67",
|
||||
"name": "Switch",
|
||||
"type": "n8n-nodes-base.switch",
|
||||
"position": [
|
||||
3260,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"rules": {
|
||||
"values": [
|
||||
{
|
||||
"outputKey": "in progress",
|
||||
"conditions": {
|
||||
"options": {
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json.status }}",
|
||||
"rightValue": "in progress"
|
||||
}
|
||||
]
|
||||
},
|
||||
"renameOutput": true
|
||||
},
|
||||
{
|
||||
"outputKey": "failed",
|
||||
"conditions": {
|
||||
"options": {
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "6d6917f6-abb9-4175-a070-a2f500d9f34f",
|
||||
"operator": {
|
||||
"name": "filter.operator.equals",
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json.status }}",
|
||||
"rightValue": "failed"
|
||||
}
|
||||
]
|
||||
},
|
||||
"renameOutput": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {
|
||||
"fallbackOutput": "extra"
|
||||
}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "8f6f8273-43ed-4a44-bb27-6ce137000472",
|
||||
"name": "Forward response to origin workflow",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
3820,
|
||||
600
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": []
|
||||
},
|
||||
"includeOtherFields": true
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "00e2d7e3-94cd-49e5-a975-2fdc1a7a95fd",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2780,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"width": 741.3069226712129,
|
||||
"height": 336.57433650102917,
|
||||
"content": "## Wait for file do be processed"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "3667b1ba-b9a6-4e1a-94b1-61b37f1e7adc",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1324.6733934850213,
|
||||
147.59707015795897
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 402.63171535688423,
|
||||
"height": 700.9473619571734,
|
||||
"content": "### 1- Credential for token request\n\nCreate a \"Custom Auth\" credential like this :\n\n```\n{\n \"headers\": {\n \"Content-Type\":\"application/x-www-form-urlencoded\"\n }, \n \"body\" : {\n \"client_id\": \"****\", \n \"client_secret\":\"****\"\n }\n}\n```"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "718bb738-8ce4-4b38-94e4-6ccac1adf9ec",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1800,
|
||||
152.6219700851708
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 1752.5923360342827,
|
||||
"height": 692.0175575715904,
|
||||
"content": "### 2- Credential for all other Queries\n\nCreate a \"Header Auth\" credential like this : \n\n```\nX-API-Key: **** (same value as client_id)\n```"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "d6bc8011-699d-4388-82f5-e5f90ba8672a",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
740,
|
||||
140
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 529.7500231395039,
|
||||
"height": 718.8735380890446,
|
||||
"content": "## Workflow Input\n\n- endpoint: splitpdf, extractpdf, ...\n- json_payload : all endpoint payload except assetID which is handled in current workflow\n- **PDF Data as n8n Binary**\n\n\n### Example for **split** : \n\n```\n{\n \"endpoint\": \"splitpdf\",\n \"json_payload\": {\n \"splitoption\": \n { \"pageRanges\": [{\"start\": 1,\"end\": 2}]}\n }\n }\n}\n```\n\n### Example for **extractpdf**\n\n```\n{\n \"endpoint\": \"splitpdf\",\n \"json_payload\": {\n \"renditionsToExtract\": [\n \"tables\"\n ],\n \"elementsToExtract\": [\n \"text\",\n \"tables\"\n ]\n }\n}\n```"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "2bbf6d9d-8399-49ba-94ea-b90795ef44ba",
|
||||
"name": "Authenticartion (get token)",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1500,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://pdf-services.adobe.io/token",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"sendBody": true,
|
||||
"contentType": "form-urlencoded",
|
||||
"authentication": "genericCredentialType",
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{}
|
||||
]
|
||||
},
|
||||
"genericAuthType": "httpCustomAuth"
|
||||
},
|
||||
"credentials": {
|
||||
"httpCustomAuth": {
|
||||
"id": "djeOoXpBafK4aiGX",
|
||||
"name": "Adobe API"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.1
|
||||
},
|
||||
{
|
||||
"id": "be4e87e8-6e56-408f-b932-320023382f98",
|
||||
"name": "Upload PDF File (asset)",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
2440,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"url": "={{ $json.uploadUri }}",
|
||||
"method": "PUT",
|
||||
"options": {
|
||||
"redirect": {
|
||||
"redirect": {}
|
||||
}
|
||||
},
|
||||
"sendBody": true,
|
||||
"sendQuery": true,
|
||||
"contentType": "binaryData",
|
||||
"queryParameters": {
|
||||
"parameters": [
|
||||
{}
|
||||
]
|
||||
},
|
||||
"inputDataFieldName": "data"
|
||||
},
|
||||
"typeVersion": 4.1
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Switch": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait 5 second",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Forward response to origin workflow",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Forward response to origin workflow",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Create Asset": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Query + File + Asset information",
|
||||
"type": "main",
|
||||
"index": 1
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Query + File": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Authenticartion (get token)",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Query + File + Asset information",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Process Query": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait 5 second",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait 5 second": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Try to download the result",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Adobe API Query": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Query + File",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Load a test pdf file": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Query + File",
|
||||
"type": "main",
|
||||
"index": 1
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Upload PDF File (asset)": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Process Query",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Execute Workflow Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Authenticartion (get token)",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Query + File + Asset information",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Try to download the result": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Switch",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Authenticartion (get token)": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Create Asset",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Query + File + Asset information": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Upload PDF File (asset)",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When clicking \u2018Test workflow\u2019": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Load a test pdf file",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Adobe API Query",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
444
workflows/Wait/1563_Wait_Schedule_Monitor_Scheduled.json
Normal file
444
workflows/Wait/1563_Wait_Schedule_Monitor_Scheduled.json
Normal file
@@ -0,0 +1,444 @@
|
||||
{
|
||||
"id": "NMGsDLoVZ7DUukGs",
|
||||
"meta": {
|
||||
"instanceId": "28a947b92b197fc2524eaba16e57560338657b2b0b5796300b2f1cedc1d0d355"
|
||||
},
|
||||
"name": "PG&E Daily Cost Tracker",
|
||||
"tags": [
|
||||
{
|
||||
"id": "yJGnIHoS9KZ1HkjS",
|
||||
"name": "template",
|
||||
"createdAt": "2025-04-17T20:22:38.913Z",
|
||||
"updatedAt": "2025-04-17T20:22:38.913Z"
|
||||
}
|
||||
],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "814cc9ac-382b-42b3-b5b8-90eda0dc2889",
|
||||
"name": "Schedule Trigger",
|
||||
"type": "n8n-nodes-base.scheduleTrigger",
|
||||
"position": [
|
||||
-2640,
|
||||
100
|
||||
],
|
||||
"parameters": {
|
||||
"rule": {
|
||||
"interval": [
|
||||
{
|
||||
"triggerAtHour": 8
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "310bfb08-2086-4f0f-8790-02c2c186bae2",
|
||||
"name": "Type password",
|
||||
"type": "n8n-nodes-base.airtop",
|
||||
"position": [
|
||||
-1540,
|
||||
100
|
||||
],
|
||||
"parameters": {
|
||||
"text": "={{ $('Variables').item.json.PGE_Password }}",
|
||||
"resource": "interaction",
|
||||
"windowId": "={{ $('Create browser window').item.json.windowId }}",
|
||||
"operation": "type",
|
||||
"sessionId": "={{ $('Create session').item.json.sessionId }}",
|
||||
"pressEnterKey": true,
|
||||
"additionalFields": {
|
||||
"waitForNavigation": "networkidle0"
|
||||
},
|
||||
"elementDescription": "PASSWORD Text Box"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "b0de782e-9c54-4a40-b7e8-8e7ab3655986",
|
||||
"name": "Variables",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
-2420,
|
||||
100
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "3a765a8e-14d8-4a32-b894-b6f90e5db246",
|
||||
"name": "PGE_Username",
|
||||
"type": "string",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"id": "81a94ea1-714b-4f9f-b63a-47fee5f51e3a",
|
||||
"name": "PGE_Password",
|
||||
"type": "string",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"id": "e90a5678-4c62-443c-ab1d-57efd6ca69eb",
|
||||
"name": "Email",
|
||||
"type": "string",
|
||||
"value": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "69cca1c7-9a83-43a7-95e7-98ba24f9575b",
|
||||
"name": "Go to \"Energy Costs\"",
|
||||
"type": "n8n-nodes-base.airtop",
|
||||
"position": [
|
||||
-660,
|
||||
100
|
||||
],
|
||||
"parameters": {
|
||||
"resource": "interaction",
|
||||
"windowId": "={{ $('Create browser window').item.json.data.windowId }}",
|
||||
"sessionId": "={{ $('Create session').item.json.sessionId }}",
|
||||
"additionalFields": {
|
||||
"waitForNavigation": "load"
|
||||
},
|
||||
"elementDescription": "ENERGY COSTS"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "184206ce-4b4d-4bb0-b468-cbb61f45b61b",
|
||||
"name": "Go to \"Electricity and Gas\"",
|
||||
"type": "n8n-nodes-base.airtop",
|
||||
"onError": "continueRegularOutput",
|
||||
"position": [
|
||||
-440,
|
||||
100
|
||||
],
|
||||
"parameters": {
|
||||
"resource": "interaction",
|
||||
"windowId": "={{ $('Create browser window').item.json.data.windowId }}",
|
||||
"sessionId": "={{ $('Create session').item.json.sessionId }}",
|
||||
"additionalFields": {
|
||||
"waitForNavigation": "networkidle0"
|
||||
},
|
||||
"elementDescription": "COMBINED"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "424b5209-97e7-4eef-a496-ac9f08d84d3d",
|
||||
"name": "Extract Costs",
|
||||
"type": "n8n-nodes-base.airtop",
|
||||
"notes": "Some PG&E accounts have a \"Combined\" view for gas and electricity",
|
||||
"position": [
|
||||
-220,
|
||||
100
|
||||
],
|
||||
"parameters": {
|
||||
"prompt": "Extract the daily energy costs from the webpage content, including both natural gas and electricity costs. Format the information as a daily update email, listing the costs from the most recent date to the earliest. Ensure the email format is clear and concise, without including a subject line or greeting. Include the date, total combined costs, natural gas costs, and electricity costs for each day. \n\nIf natural gas costs are not provided, ignore them, ignore Total Combined Costs and report only on electricity \n\nFor example, if the webpage content provides the following data:\n\n- Date: 2023-10-01, Total Combined Costs: $15.00, Natural Gas Costs: $5.00, Electricity Costs: $10.00\n- Date: 2023-09-30, Total Combined Costs: $14.50, Natural Gas Costs: $4.50, Electricity Costs: $10.00\n\nThe output should be formatted as an easy to read email:\n\n<!DOCTYPE html>\n<html>\n<body>\n<p>October 1, 2023</p>\n<p>Total Combined Costs: $15.00<br>\nNatural Gas Costs: $5.00<br>\nElectricity Costs: $10.00</p>\n\n<p>September 30, 2023</p>\n<p>Total Combined Costs: $14.50<br>\nNatural Gas Costs: $4.50<br>\nElectricity Costs: $10.00</p>\n</body>\n</html>\n",
|
||||
"resource": "extraction",
|
||||
"windowId": "={{ $('Create browser window').item.json.data.windowId }}",
|
||||
"operation": "query",
|
||||
"sessionId": "={{ $('Create session').item.json.sessionId }}",
|
||||
"additionalFields": {}
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "b0cf1ebc-157d-4ab3-9ed6-267c81293feb",
|
||||
"name": "Go to \"Energy Usage Details\"",
|
||||
"type": "n8n-nodes-base.airtop",
|
||||
"position": [
|
||||
-880,
|
||||
100
|
||||
],
|
||||
"parameters": {
|
||||
"resource": "interaction",
|
||||
"windowId": "={{ $('Create browser window').item.json.windowId }}",
|
||||
"sessionId": "={{ $('Create session').item.json.sessionId }}",
|
||||
"additionalFields": {
|
||||
"waitForNavigation": "load"
|
||||
},
|
||||
"elementDescription": "Click on the box that says ENERGY USAGE DETAILS See usage & costs over time"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "485f8071-9c54-4f79-9378-d354260b2038",
|
||||
"name": "Wait 5 secs",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
-1100,
|
||||
100
|
||||
],
|
||||
"webhookId": "371deac7-bd64-4385-8bc5-a14a0db2bcc7",
|
||||
"parameters": {},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "87d68490-1064-4180-89d9-534c9308c6c9",
|
||||
"name": "Close modal (if any)",
|
||||
"type": "n8n-nodes-base.airtop",
|
||||
"position": [
|
||||
-1320,
|
||||
100
|
||||
],
|
||||
"parameters": {
|
||||
"resource": "interaction",
|
||||
"windowId": "={{ $('Create browser window').item.json.windowId }}",
|
||||
"sessionId": "={{ $('Create session').item.json.sessionId }}",
|
||||
"additionalFields": {},
|
||||
"elementDescription": "If there is a modal on the page, click on the button to dismiss the modal"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "80018e55-6557-4641-a07b-926517a72bb0",
|
||||
"name": "Create session",
|
||||
"type": "n8n-nodes-base.airtop",
|
||||
"position": [
|
||||
-2200,
|
||||
100
|
||||
],
|
||||
"parameters": {
|
||||
"profileName": "cesar-prod",
|
||||
"timeoutMinutes": 5
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "05711cf0-9c20-4f41-854e-dea872eee3d8",
|
||||
"name": "Create browser window",
|
||||
"type": "n8n-nodes-base.airtop",
|
||||
"position": [
|
||||
-1980,
|
||||
100
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://m.pge.com/",
|
||||
"resource": "window",
|
||||
"getLiveView": true,
|
||||
"disableResize": true,
|
||||
"additionalFields": {
|
||||
"waitUntil": "load"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "d673347d-ef40-4349-a7e7-2ba594400d2c",
|
||||
"name": "Type username",
|
||||
"type": "n8n-nodes-base.airtop",
|
||||
"position": [
|
||||
-1760,
|
||||
100
|
||||
],
|
||||
"parameters": {
|
||||
"text": "={{ $('Variables').item.json.PGE_Username }}",
|
||||
"resource": "interaction",
|
||||
"operation": "type",
|
||||
"additionalFields": {},
|
||||
"elementDescription": "USERNAME text box"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "b64a04b1-d00b-4d04-b9e3-7d2c86800923",
|
||||
"name": "Send email",
|
||||
"type": "n8n-nodes-base.gmail",
|
||||
"position": [
|
||||
0,
|
||||
200
|
||||
],
|
||||
"webhookId": "7586d2f6-00b8-41ee-89d0-f2768b402165",
|
||||
"parameters": {
|
||||
"sendTo": "={{ $('Variables').item.json.Email }}",
|
||||
"message": "={{ $json['data'].modelResponse }}",
|
||||
"options": {
|
||||
"senderName": "Airtop Monitor",
|
||||
"appendAttribution": false
|
||||
},
|
||||
"subject": "Daily energy costs report"
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "d402443c-ed67-4df7-b5c8-032f4a2ea941",
|
||||
"name": "End session",
|
||||
"type": "n8n-nodes-base.airtop",
|
||||
"position": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"operation": "terminate",
|
||||
"sessionId": "={{ $('Create session').item.json.sessionId }}"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "076e7eed-e71f-4ef7-8038-ea3dcc188b9c",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-2480,
|
||||
-40
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"height": 340,
|
||||
"content": "## Heads up!\nTo get this workflow running correctly, please enter your PG&E credentials below"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "0d0d4991-e9c1-4f51-be90-bb8337e40bc2",
|
||||
"connections": {
|
||||
"Variables": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Create session",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait 5 secs": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Go to \"Energy Usage Details\"",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Extract Costs": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "End session",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Send email",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Type password": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Close modal (if any)",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Type username": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Type password",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Create session": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Create browser window",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Schedule Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Variables",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Close modal (if any)": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait 5 secs",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Go to \"Energy Costs\"": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Go to \"Electricity and Gas\"",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Create browser window": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Type username",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Go to \"Electricity and Gas\"": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Extract Costs",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Go to \"Energy Usage Details\"": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Go to \"Energy Costs\"",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
581
workflows/Wait/1566_Wait_Splitout_Automation_Webhook.json
Normal file
581
workflows/Wait/1566_Wait_Splitout_Automation_Webhook.json
Normal file
@@ -0,0 +1,581 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "408f9fb9940c3cb18ffdef0e0150fe342d6e655c3a9fac21f0f644e8bedabcd9"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "6d16b5be-8f7b-49f2-8523-9b84c62f2759",
|
||||
"name": "OpenAI Chat Model",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
1960,
|
||||
660
|
||||
],
|
||||
"parameters": {
|
||||
"model": "gpt-4o-2024-08-06",
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "8gccIjcuf3gvaoEr",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "a6084f09-9a4f-478a-ac1a-ab1413628c1f",
|
||||
"name": "Capture Frames",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
720,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "runOnceForEachItem",
|
||||
"language": "python",
|
||||
"pythonCode": "import cv2\nimport numpy as np\nimport base64\n\ndef extract_evenly_distributed_frames_from_base64(base64_string, max_frames=90):\n # Decode the Base64 string into bytes\n video_bytes = base64.b64decode(base64_string)\n \n # Write the bytes to a temporary file\n video_path = '/tmp/temp_video.mp4'\n with open(video_path, 'wb') as video_file:\n video_file.write(video_bytes)\n \n # Open the video file using OpenCV\n video_capture = cv2.VideoCapture(video_path)\n \n # Get the total number of frames in the video\n total_frames = int(video_capture.get(cv2.CAP_PROP_FRAME_COUNT))\n \n # Calculate the step size to take 'max_frames' evenly distributed frames\n step_size = max(1, total_frames // (max_frames - 1))\n \n # List to store selected frames as base64\n selected_frames_base64 = []\n \n for i in range(0, total_frames, step_size):\n # Set the current frame position\n video_capture.set(cv2.CAP_PROP_POS_FRAMES, i)\n \n # Read the frame\n ret, frame = video_capture.read()\n if ret:\n # Convert frame (NumPy array) to a Base64 string\n frame_base64 = convert_frame_to_base64(frame)\n selected_frames_base64.append(frame_base64)\n if len(selected_frames_base64) >= max_frames:\n break\n \n # Release the video capture object\n video_capture.release()\n\n return selected_frames_base64\n\ndef convert_frame_to_base64(frame):\n # Convert the frame (NumPy array) to JPEG format\n ret, buffer = cv2.imencode('.jpg', frame)\n if not ret:\n return None\n\n # Encode JPEG image to Base64\n frame_base64 = base64.b64encode(buffer).decode('utf-8')\n return frame_base64\n\nbase64_video = _input.item.binary.data.data\nframes_base64 = extract_evenly_distributed_frames_from_base64(base64_video, max_frames=90)\n\nreturn { \"output\": frames_base64 }"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "b45e82a4-f304-4733-a9cf-07cae6df13ea",
|
||||
"name": "Split Out Frames",
|
||||
"type": "n8n-nodes-base.splitOut",
|
||||
"position": [
|
||||
920,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldToSplitOut": "output"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "83d29c51-a415-476d-b380-1ca5f0d4f521",
|
||||
"name": "Download Video",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
329,
|
||||
346
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://cdn.pixabay.com/video/2016/05/12/3175-166339863_small.mp4",
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "0304ebb5-945d-4b0b-9597-f83ae8c1fe31",
|
||||
"name": "Convert to Binary",
|
||||
"type": "n8n-nodes-base.convertToFile",
|
||||
"position": [
|
||||
1480,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"operation": "toBinary",
|
||||
"sourceProperty": "output"
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "32a21e1d-1d8b-411e-8281-8d0e68a06889",
|
||||
"name": "When clicking \u2018Test workflow\u2019",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
149,
|
||||
346
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "0ad2ea6a-e1f4-4b26-a4de-9103ecbb3831",
|
||||
"name": "Combine Script",
|
||||
"type": "n8n-nodes-base.aggregate",
|
||||
"position": [
|
||||
2640,
|
||||
360
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"aggregate": "aggregateAllItemData"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "2d9bb91a-3369-4268-882f-f97e73897bb8",
|
||||
"name": "Upload to GDrive",
|
||||
"type": "n8n-nodes-base.googleDrive",
|
||||
"position": [
|
||||
3040,
|
||||
360
|
||||
],
|
||||
"parameters": {
|
||||
"name": "=narrating-video-using-vision-ai-{{ $now.format('yyyyMMddHHmmss') }}.mp3",
|
||||
"driveId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "My Drive",
|
||||
"cachedResultUrl": "https://drive.google.com/drive/my-drive",
|
||||
"cachedResultName": "My Drive"
|
||||
},
|
||||
"options": {},
|
||||
"folderId": {
|
||||
"__rl": true,
|
||||
"mode": "id",
|
||||
"value": "1dBJZL_SCh6F2U7N7kIMsnSiI4QFxn2xD"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleDriveOAuth2Api": {
|
||||
"id": "yOwz41gMQclOadgu",
|
||||
"name": "Google Drive account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "137185f6-ba32-4c68-844f-f50c7a5a261d",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-440,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"width": 476.34074202271484,
|
||||
"height": 586.0597334122469,
|
||||
"content": "## Try It Out!\n\n### This n8n template takes a video and extracts frames from it which are used with a multimodal LLM to generate a script. The script is then passed to the same multimodal LLM to generate a voiceover clip.\n\nThis template was inspired by [Processing and narrating a video with GPT's visual capabilities and the TTS API](https://cookbook.openai.com/examples/gpt_with_vision_for_video_understanding)\n\n* Video is downloaded using the HTTP node.\n* Python code node is used to extract the frames using OpenCV.\n* Loop node is used o batch the frames for the LLM to generate partial scripts.\n* All partial scripts are combined to form the full script which is then sent to OpenAI to generate audio from it.\n* The finished voiceover clip is uploaded to Google Drive.\n\nSample the finished product here: https://drive.google.com/file/d/1-XCoii0leGB2MffBMPpCZoxboVyeyeIX/view?usp=sharing\n\n\n### Need Help?\nJoin the [Discord](https://discord.com/invite/XPKeKXeB7d) or ask in the [Forum](https://community.n8n.io/)!"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "23700b04-2549-4121-b442-4b92adf7f6d6",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
60,
|
||||
120
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 459.41860465116287,
|
||||
"height": 463.313953488372,
|
||||
"content": "## 1. Download Video\n[Learn more about the HTTP Request node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.httprequest/)\n\nIn this demonstration, we'll download a stock video from pixabay using the HTTP Request node. Feel free to use other sources but ensure they are in a format support by OpenCV ([See docs](https://docs.opencv.org/3.4/dd/d43/tutorial_py_video_display.html))"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "0a42aeb0-96cd-401c-abeb-c50e0f04f7ad",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
560,
|
||||
120
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 605.2674418604653,
|
||||
"height": 522.6860465116279,
|
||||
"content": "## 2. Split Video into Frames\n[Learn more about the Code node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.code/)\n\nWe need to think of videos are a sum of 2 parts; a visual track and an audio track. The visual track is technically just a collection of images displayed one after the other and are typically referred to as frames. When we want LLM to understand videos, most of the time we can do so by giving it a series of frames as images to process.\n\nHere, we use the Python Code node to extract the frames from the video using OpenCV, a computer vision library. For performance reasons, we'll also capture only a max of 90 frames from the video but ensure they are evenly distributed across the video. This step takes about 1-2 mins to complete on a 3mb video."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "b518461c-13f1-45ae-a156-20ae6051fc19",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
560,
|
||||
660
|
||||
],
|
||||
"parameters": {
|
||||
"color": 3,
|
||||
"width": 418.11627906976724,
|
||||
"height": 132.89534883720933,
|
||||
"content": "### \ud83d\udea8 PERFORMANCE WARNING!\nUsing large videos or capturing a large number of frames is really memory intensive and could crash your n8n instance. Be sure you have sufficient memory and to optimise the video beforehand! "
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "585f7a7f-1676-4bc3-a6fb-eace443aa5da",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1200,
|
||||
118.69767441860472
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 1264.8139534883715,
|
||||
"height": 774.3720930232558,
|
||||
"content": "## 3. Use Vision AI to Narrate on Batches of Frames\n[Read more about the Basic LLM node](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.chainllm/)\n\nTo keep within token limits of our LLM, we'll need to send our frames in sequential batches to represent chunks of our original video. We'll use the loop node to create batches of 15 frames - this is because of our max of 90 frames, this fits perfectly for a total of 6 loops. Next, we'll convert each frame to a binary image so we can resize for and attach to the Basic LLM node. One trick to point out is that within the Basic LLM node, previous iterations of the generation are prepended to form a cohesive script. Without, the LLM will assume it needs to start fresh for each batch of frames.\n\nA wait node is used to stay within service rate limits. This is useful for new users who are still on lower tiers. If you do not have such restrictions, feel free to remove this wait node!"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "42c002a3-37f6-4dd7-af14-20391b19cb5a",
|
||||
"name": "Stay Within Service Limits",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
2280,
|
||||
640
|
||||
],
|
||||
"webhookId": "677fa706-b4dd-4fe3-ba17-feea944c3193",
|
||||
"parameters": {},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "5beb17fa-8a57-4c72-9c3b-b7fdf41b545a",
|
||||
"name": "For Every 15 Frames",
|
||||
"type": "n8n-nodes-base.splitInBatches",
|
||||
"position": [
|
||||
1320,
|
||||
380
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"batchSize": 15
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "9a57256a-076a-4823-8cad-3b64a17ff705",
|
||||
"name": "Resize Frame",
|
||||
"type": "n8n-nodes-base.editImage",
|
||||
"position": [
|
||||
1640,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"width": 768,
|
||||
"height": 768,
|
||||
"options": {
|
||||
"format": "jpeg"
|
||||
},
|
||||
"operation": "resize"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "3e776939-1a25-4ea0-8106-c3072d108106",
|
||||
"name": "Aggregate Frames",
|
||||
"type": "n8n-nodes-base.aggregate",
|
||||
"position": [
|
||||
1800,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"includeBinaries": true
|
||||
},
|
||||
"aggregate": "aggregateAllItemData"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "3a973a9c-2c7a-43c5-9c45-a14d49b56622",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2500,
|
||||
120.6860465116277
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 769.1860465116274,
|
||||
"height": 487.83720930232533,
|
||||
"content": "## 4. Generate Voice Over Clip Using TTS\n[Read more about the OpenAI node](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-langchain.openai)\n\nFinally with our generated script parts, we can combine them into one and use OpenAI's Audio generation capabilities to generate a voice over from the full script. Once we have the output mp3, we can upload it to somewhere like Google Drive for later use.\n\nHave a listen to the finished product here: https://drive.google.com/file/d/1-XCoii0leGB2MffBMPpCZoxboVyeyeIX/view?usp=sharing"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "92e07c18-4058-4098-a448-13451bd8a17a",
|
||||
"name": "Use Text-to-Speech",
|
||||
"type": "@n8n/n8n-nodes-langchain.openAi",
|
||||
"position": [
|
||||
2840,
|
||||
360
|
||||
],
|
||||
"parameters": {
|
||||
"input": "={{ $json.data.map(item => item.text).join('\\n') }}",
|
||||
"options": {
|
||||
"response_format": "mp3"
|
||||
},
|
||||
"resource": "audio"
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "8gccIjcuf3gvaoEr",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.5
|
||||
},
|
||||
{
|
||||
"id": "0696c336-1814-4ad4-aa5e-b86489a4231e",
|
||||
"name": "Sticky Note6",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
61,
|
||||
598
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 458.1279069767452,
|
||||
"height": 296.8139534883723,
|
||||
"content": "**The video used in this demonstration is**\n© [Coverr-Free-Footage](https://pixabay.com/users/coverr-free-footage-1281706/) via [Pixabay](https://pixabay.com/videos/india-street-busy-rickshaw-people-3175/)\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "81185ac4-c7fd-4921-937f-109662d5dfa5",
|
||||
"name": "Generate Narration Script",
|
||||
"type": "@n8n/n8n-nodes-langchain.chainLlm",
|
||||
"position": [
|
||||
1960,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"text": "=These are frames of a video. Create a short voiceover script in the style of David Attenborough. Only include the narration.\n{{\n$('Generate Narration Script').isExecuted\n ? `Continue from this script:\\n${$('Generate Narration Script').all().map(item => item.json.text.replace(/\\n/g,'')).join('\\n')}`\n : ''\n}}",
|
||||
"messages": {
|
||||
"messageValues": [
|
||||
{
|
||||
"type": "HumanMessagePromptTemplate",
|
||||
"messageType": "imageBinary"
|
||||
},
|
||||
{
|
||||
"type": "HumanMessagePromptTemplate",
|
||||
"messageType": "imageBinary",
|
||||
"binaryImageDataKey": "data_1"
|
||||
},
|
||||
{
|
||||
"type": "HumanMessagePromptTemplate",
|
||||
"messageType": "imageBinary",
|
||||
"binaryImageDataKey": "data_2"
|
||||
},
|
||||
{
|
||||
"type": "HumanMessagePromptTemplate",
|
||||
"messageType": "imageBinary",
|
||||
"binaryImageDataKey": "data_3"
|
||||
},
|
||||
{
|
||||
"type": "HumanMessagePromptTemplate",
|
||||
"messageType": "imageBinary",
|
||||
"binaryImageDataKey": "data_4"
|
||||
},
|
||||
{
|
||||
"type": "HumanMessagePromptTemplate",
|
||||
"messageType": "imageBinary",
|
||||
"binaryImageDataKey": "data_5"
|
||||
},
|
||||
{
|
||||
"type": "HumanMessagePromptTemplate",
|
||||
"messageType": "imageBinary",
|
||||
"binaryImageDataKey": "data_6"
|
||||
},
|
||||
{
|
||||
"type": "HumanMessagePromptTemplate",
|
||||
"messageType": "imageBinary",
|
||||
"binaryImageDataKey": "data_7"
|
||||
},
|
||||
{
|
||||
"type": "HumanMessagePromptTemplate",
|
||||
"messageType": "imageBinary",
|
||||
"binaryImageDataKey": "data_8"
|
||||
},
|
||||
{
|
||||
"type": "HumanMessagePromptTemplate",
|
||||
"messageType": "imageBinary",
|
||||
"binaryImageDataKey": "data_9"
|
||||
},
|
||||
{
|
||||
"type": "HumanMessagePromptTemplate",
|
||||
"messageType": "imageBinary",
|
||||
"binaryImageDataKey": "data_10"
|
||||
},
|
||||
{
|
||||
"type": "HumanMessagePromptTemplate",
|
||||
"messageType": "imageBinary",
|
||||
"binaryImageDataKey": "data_11"
|
||||
},
|
||||
{
|
||||
"type": "HumanMessagePromptTemplate",
|
||||
"messageType": "imageBinary",
|
||||
"binaryImageDataKey": "data_12"
|
||||
},
|
||||
{
|
||||
"type": "HumanMessagePromptTemplate",
|
||||
"messageType": "imageBinary",
|
||||
"binaryImageDataKey": "data_13"
|
||||
},
|
||||
{
|
||||
"type": "HumanMessagePromptTemplate",
|
||||
"messageType": "imageBinary",
|
||||
"binaryImageDataKey": "data_14"
|
||||
}
|
||||
]
|
||||
},
|
||||
"promptType": "define"
|
||||
},
|
||||
"typeVersion": 1.4
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Resize Frame": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Aggregate Frames",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Capture Frames": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Split Out Frames",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Combine Script": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Use Text-to-Speech",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Download Video": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Capture Frames",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Aggregate Frames": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Generate Narration Script",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Split Out Frames": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "For Every 15 Frames",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Convert to Binary": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Resize Frame",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Generate Narration Script",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Use Text-to-Speech": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Upload to GDrive",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"For Every 15 Frames": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Combine Script",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Convert to Binary",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Generate Narration Script": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Stay Within Service Limits",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Stay Within Service Limits": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "For Every 15 Frames",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When clicking \u2018Test workflow\u2019": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Download Video",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
671
workflows/Wait/1572_Wait_Schedule_Automate_Scheduled.json
Normal file
671
workflows/Wait/1572_Wait_Schedule_Automate_Scheduled.json
Normal file
@@ -0,0 +1,671 @@
|
||||
{
|
||||
"id": "NzoLNV2FbS4eurJ7",
|
||||
"meta": {
|
||||
"instanceId": "fb924c73af8f703905bc09c9ee8076f48c17b596ed05b18c0ff86915ef8a7c4a",
|
||||
"templateCredsSetupCompleted": true
|
||||
},
|
||||
"name": "WhatsApp business bot",
|
||||
"tags": [],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "4ca5e25a-f67b-4874-af20-680d1a6ac731",
|
||||
"name": "Sent notification template",
|
||||
"type": "n8n-nodes-base.whatsApp",
|
||||
"position": [
|
||||
1140,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"template": "test_appointment_button|en_US",
|
||||
"components": {
|
||||
"component": [
|
||||
{
|
||||
"type": "header",
|
||||
"headerParameters": {
|
||||
"parameter": [
|
||||
{
|
||||
"text": "📅"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"bodyParameters": {
|
||||
"parameter": [
|
||||
{
|
||||
"text": "={{ $json[\"Your name\"] }}"
|
||||
},
|
||||
{
|
||||
"text": "={{ DateTime.fromFormat($json[\"Please pick a day and time of your appointment\"], \"M/d/yyyy HH:mm:ss\").toLocaleString(DateTime.DATE_HUGE); }}"
|
||||
},
|
||||
{
|
||||
"text": "={{ $json[\"Please pick a day and time of your appointment\"].split(' ')[1] }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"phoneNumberId": "=244242975437240",
|
||||
"requestOptions": {},
|
||||
"recipientPhoneNumber": "={{ $json[\"Your mobile number\"] }}"
|
||||
},
|
||||
"credentials": {
|
||||
"whatsAppApi": {
|
||||
"id": "mm0r1xKc6N8XktAD",
|
||||
"name": "WhatsApp account 2"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "877c62c5-9869-48fc-bd74-35897dbd2276",
|
||||
"name": "WhatsApp Trigger",
|
||||
"type": "n8n-nodes-base.whatsAppTrigger",
|
||||
"position": [
|
||||
700,
|
||||
800
|
||||
],
|
||||
"webhookId": "b06b387a-481e-43f1-9035-01a87123ad88",
|
||||
"parameters": {
|
||||
"updates": [
|
||||
"messages"
|
||||
]
|
||||
},
|
||||
"credentials": {
|
||||
"whatsAppTriggerApi": {
|
||||
"id": "bWqGRWeDXvGTdSq5",
|
||||
"name": "WhatsApp Trigger"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "6c0edf48-20af-42fb-a436-aee3a9a4f6cc",
|
||||
"name": "Is message?",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
920,
|
||||
800
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"looseTypeValidation": true
|
||||
},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "loose"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "8a765e57-8e39-4547-a99a-0458df2b75f4",
|
||||
"operator": {
|
||||
"type": "object",
|
||||
"operation": "exists",
|
||||
"singleValue": true
|
||||
},
|
||||
"leftValue": "={{ $json.messages[0] }}",
|
||||
"rightValue": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "00006406-47be-4693-9763-a21d06b13d51",
|
||||
"name": "Schedule Trigger",
|
||||
"type": "n8n-nodes-base.scheduleTrigger",
|
||||
"position": [
|
||||
680,
|
||||
1184
|
||||
],
|
||||
"parameters": {
|
||||
"rule": {
|
||||
"interval": [
|
||||
{
|
||||
"field": "minutes"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "b9919c0d-eeb2-4a5e-a91f-3dad11b778f8",
|
||||
"name": "Loop Over Items",
|
||||
"type": "n8n-nodes-base.splitInBatches",
|
||||
"position": [
|
||||
1120,
|
||||
1184
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "8f0dc664-715f-4074-b0f7-98d3c7f563a5",
|
||||
"name": "Get new answers",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"position": [
|
||||
900,
|
||||
1184
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"filtersUI": {
|
||||
"values": [
|
||||
{
|
||||
"lookupValue": "Ready",
|
||||
"lookupColumn": "Status"
|
||||
}
|
||||
]
|
||||
},
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": 1621824221,
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1T-B0yepcrCHxQpn7Sj6QjTa0VqwwVBQhO5ZcIUSxWJE/edit#gid=1621824221",
|
||||
"cachedResultName": "WA-messages"
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "1T-B0yepcrCHxQpn7Sj6QjTa0VqwwVBQhO5ZcIUSxWJE",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1T-B0yepcrCHxQpn7Sj6QjTa0VqwwVBQhO5ZcIUSxWJE/edit?usp=drivesdk",
|
||||
"cachedResultName": "WhatsApp Appointments (Responses)"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsOAuth2Api": {
|
||||
"id": "RtRiRezoxiWkzZQt",
|
||||
"name": "Ted's Tech Talks Google account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.4
|
||||
},
|
||||
{
|
||||
"id": "a7b07f7e-1287-4e8f-b28a-4c656f386f8a",
|
||||
"name": "Reply to the user",
|
||||
"type": "n8n-nodes-base.whatsApp",
|
||||
"position": [
|
||||
1340,
|
||||
1184
|
||||
],
|
||||
"parameters": {
|
||||
"textBody": "={{ $json.ReplyText }}",
|
||||
"operation": "send",
|
||||
"phoneNumberId": "244242975437240",
|
||||
"requestOptions": {},
|
||||
"additionalFields": {},
|
||||
"recipientPhoneNumber": "=+{{ $json.UserPhone }}"
|
||||
},
|
||||
"credentials": {
|
||||
"whatsAppApi": {
|
||||
"id": "mm0r1xKc6N8XktAD",
|
||||
"name": "WhatsApp account 2"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "30f0a7da-c3ce-448c-ad05-b8b75da3d319",
|
||||
"name": "Update message status",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"position": [
|
||||
1520,
|
||||
1184
|
||||
],
|
||||
"parameters": {
|
||||
"columns": {
|
||||
"value": {
|
||||
"Status": "Replied",
|
||||
"row_number": "={{ $('Loop Over Items').item.json.row_number }}"
|
||||
},
|
||||
"schema": [
|
||||
{
|
||||
"id": "UserPhone",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "UserPhone",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "UserName",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "UserName",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "UserMessage",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "UserMessage",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "ReplyText",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "ReplyText",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Status",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "Status",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "row_number",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"readOnly": true,
|
||||
"required": false,
|
||||
"displayName": "row_number",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
}
|
||||
],
|
||||
"mappingMode": "defineBelow",
|
||||
"matchingColumns": [
|
||||
"row_number"
|
||||
]
|
||||
},
|
||||
"options": {},
|
||||
"operation": "update",
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": 1621824221,
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1T-B0yepcrCHxQpn7Sj6QjTa0VqwwVBQhO5ZcIUSxWJE/edit#gid=1621824221",
|
||||
"cachedResultName": "WA-messages"
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "1T-B0yepcrCHxQpn7Sj6QjTa0VqwwVBQhO5ZcIUSxWJE",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1T-B0yepcrCHxQpn7Sj6QjTa0VqwwVBQhO5ZcIUSxWJE/edit?usp=drivesdk",
|
||||
"cachedResultName": "WhatsApp Appointments (Responses)"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsOAuth2Api": {
|
||||
"id": "RtRiRezoxiWkzZQt",
|
||||
"name": "Ted's Tech Talks Google account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.4
|
||||
},
|
||||
{
|
||||
"id": "95486a27-a667-4555-8924-53d46b19de43",
|
||||
"name": "Wait 1 sec",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
1700,
|
||||
1184
|
||||
],
|
||||
"webhookId": "df4df4f8-378c-4228-b1e2-326b9d956e7e",
|
||||
"parameters": {
|
||||
"amount": 1
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "21551e78-428f-4730-a337-48d1a80bf703",
|
||||
"name": "New message from the user",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"position": [
|
||||
1140,
|
||||
800
|
||||
],
|
||||
"parameters": {
|
||||
"columns": {
|
||||
"value": {
|
||||
"Status": "New",
|
||||
"UserName": "={{ $json.contacts[0].profile.name }}",
|
||||
"UserPhone": "={{ $json.messages[0].from }}",
|
||||
"UserMessage": "={{ $json.messages[0].text.body }}"
|
||||
},
|
||||
"schema": [
|
||||
{
|
||||
"id": "UserPhone",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "UserPhone",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "UserName",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "UserName",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "UserMessage",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "UserMessage",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "ReplyText",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "ReplyText",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Status",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "Status",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
}
|
||||
],
|
||||
"mappingMode": "defineBelow",
|
||||
"matchingColumns": []
|
||||
},
|
||||
"options": {},
|
||||
"operation": "append",
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": 1621824221,
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1T-B0yepcrCHxQpn7Sj6QjTa0VqwwVBQhO5ZcIUSxWJE/edit#gid=1621824221",
|
||||
"cachedResultName": "WA-messages"
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "1T-B0yepcrCHxQpn7Sj6QjTa0VqwwVBQhO5ZcIUSxWJE",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1T-B0yepcrCHxQpn7Sj6QjTa0VqwwVBQhO5ZcIUSxWJE/edit?usp=drivesdk",
|
||||
"cachedResultName": "WhatsApp Appointments (Responses)"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsOAuth2Api": {
|
||||
"id": "RtRiRezoxiWkzZQt",
|
||||
"name": "Ted's Tech Talks Google account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.4
|
||||
},
|
||||
{
|
||||
"id": "e1478757-0094-4bcb-998f-7e3e81958319",
|
||||
"name": "Get new entries",
|
||||
"type": "n8n-nodes-base.googleSheetsTrigger",
|
||||
"position": [
|
||||
700,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"event": "rowAdded",
|
||||
"options": {},
|
||||
"pollTimes": {
|
||||
"item": [
|
||||
{
|
||||
"mode": "everyX",
|
||||
"unit": "minutes",
|
||||
"value": 5
|
||||
}
|
||||
]
|
||||
},
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": 470797219,
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1T-B0yepcrCHxQpn7Sj6QjTa0VqwwVBQhO5ZcIUSxWJE/edit#gid=470797219",
|
||||
"cachedResultName": "Form Responses 1"
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "1T-B0yepcrCHxQpn7Sj6QjTa0VqwwVBQhO5ZcIUSxWJE",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1T-B0yepcrCHxQpn7Sj6QjTa0VqwwVBQhO5ZcIUSxWJE/edit?usp=drivesdk",
|
||||
"cachedResultName": "WhatsApp Appointments (Responses)"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsTriggerOAuth2Api": {
|
||||
"id": "m33qCYf9eEvSgo0x",
|
||||
"name": "Ted's Tech Talks Google Sheets Trigger"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "14811434-d716-4999-ab53-761fc355ee09",
|
||||
"name": "User consented for WA messages?",
|
||||
"type": "n8n-nodes-base.filter",
|
||||
"position": [
|
||||
920,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "b9bfdb33-0d9c-4320-b4bc-0bf0a469c8ca",
|
||||
"operator": {
|
||||
"name": "filter.operator.equals",
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json[\"I consent to receive WhatsApp notifications regarding my appointments\"] }}",
|
||||
"rightValue": "Yes"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "20bec538-5d04-4382-ba88-a2c15421c8e7",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
660,
|
||||
83.6407185628741
|
||||
],
|
||||
"parameters": {
|
||||
"width": 744.5356369854154,
|
||||
"height": 404.8383233532937,
|
||||
"content": "## Send a WhatsApp (WA) template message\nOccurs after a user submitted a new Google form. If the user opted-in for WA notifications during the form submission, a template message will be sent via WhatsApp.\n\n**IMPORTANT!**\n1. You will need to create a new WA template message on the [Meta Business portal](https://business.facebook.com/wa/manage/message-templates/)\n2. To send outgoing WA messages you'll need an Access Token and a WhatsApp Business Account ID. These can be obtained via Meta Developers Portal after creating an a new App. Please refer to this [n8n blog article on creating WhatsApp bots](https://blog.n8n.io/whatsapp-bot/#step-1-set-up-a-whatsapp-business-account)"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "ab7bd838-2ed1-4645-b3d9-69617a888090",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
660,
|
||||
526.8263473053893
|
||||
],
|
||||
"parameters": {
|
||||
"width": 752.168692512586,
|
||||
"height": 437.60479041916165,
|
||||
"content": "## Store incoming WhatsApp user messages in a Google Sheet\nTo receive user messages, you need to add a WhatsApp Trigger node. In the credentials section provide an App ID and an App secret. These are obtained from the Meta Developers Portal, Basic App settings screen\n\nAfter the credentials are added, copy the trigger URL and enter it into the 'Callback URL' field in the WhatsApp configuration window in the Meta Developer portal.\n\nOnce the trigger receives a payload from WhatsApp, we check if the incoming data contains a message and add a new row with user data and message text in [Google Sheet](https://docs.google.com/spreadsheets/d/1T-B0yepcrCHxQpn7Sj6QjTa0VqwwVBQhO5ZcIUSxWJE/edit?gid=1621824221#gid=1621824221).\n\nWhatsApp trigger also receives status notifications (i.e. message sent, message read etc.), so we ignore such notifications in this workflow."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "b0c62bd4-d6bc-425b-b506-b6820b3e6dc5",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
660,
|
||||
1000
|
||||
],
|
||||
"parameters": {
|
||||
"width": 1197.9640718562885,
|
||||
"height": 369.34131736526945,
|
||||
"content": "## Reply to the user via WhatsApp\nWhatsApp allows sending automatic messages **with custom text** via bots only within the 24h time frame after the last incoming user message.\n\nAfter the user sends a message to the WhatsApp bot, a row is added to the [Google Sheet](https://docs.google.com/spreadsheets/d/1T-B0yepcrCHxQpn7Sj6QjTa0VqwwVBQhO5ZcIUSxWJE/edit?gid=1621824221#gid=1621824221) with the Status 'New'\n\nType something in the `ReplyText` column and change the Status to 'Ready'.\nIn a few minutes, n8n timer will fetch all 'Ready' replies from the Google Sheet and send them one by one to the recipients"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"active": true,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"callerPolicy": "workflowsFromSameOwner",
|
||||
"executionOrder": "v1",
|
||||
"saveManualExecutions": true,
|
||||
"saveDataSuccessExecution": "all"
|
||||
},
|
||||
"versionId": "66863e99-c756-48d5-b8e0-af0907623e8a",
|
||||
"connections": {
|
||||
"Wait 1 sec": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop Over Items",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Is message?": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "New message from the user",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get new answers": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop Over Items",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get new entries": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "User consented for WA messages?",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Loop Over Items": {
|
||||
"main": [
|
||||
[],
|
||||
[
|
||||
{
|
||||
"node": "Reply to the user",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Schedule Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get new answers",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"WhatsApp Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Is message?",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Reply to the user": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Update message status",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Update message status": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait 1 sec",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"User consented for WA messages?": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Sent notification template",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
528
workflows/Wait/1579_Wait_Manual_Automation_Webhook.json
Normal file
528
workflows/Wait/1579_Wait_Manual_Automation_Webhook.json
Normal file
@@ -0,0 +1,528 @@
|
||||
{
|
||||
"id": "OjwmaLrXhW4pO5ph",
|
||||
"meta": {
|
||||
"instanceId": "885b4fb4a6a9c2cb5621429a7b972df0d05bb724c20ac7dac7171b62f1c7ef40"
|
||||
},
|
||||
"name": "Structured Bulk Data Extract with Bright Data Web Scraper",
|
||||
"tags": [
|
||||
{
|
||||
"id": "Kujft2FOjmOVQAmJ",
|
||||
"name": "Engineering",
|
||||
"createdAt": "2025-04-09T01:31:00.558Z",
|
||||
"updatedAt": "2025-04-09T01:31:00.558Z"
|
||||
},
|
||||
{
|
||||
"id": "ZOwtAMLepQaGW76t",
|
||||
"name": "Building Blocks",
|
||||
"createdAt": "2025-04-13T15:23:40.462Z",
|
||||
"updatedAt": "2025-04-13T15:23:40.462Z"
|
||||
}
|
||||
],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "1bdca5ae-1e56-4cf2-a8dc-e135a6a2dfec",
|
||||
"name": "When clicking ‘Test workflow’",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
-900,
|
||||
-395
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "533968cd-1329-4a86-8875-478600ed82b7",
|
||||
"name": "If",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
200,
|
||||
-470
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "6a7e5360-4cb5-4806-892e-5c85037fa71c",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json.status }}",
|
||||
"rightValue": "ready"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "83991fdf-0402-4de3-bbb5-7050e3e9fb62",
|
||||
"name": "Set Snapshot Id",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
-240,
|
||||
-395
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "2c3369c6-9206-45d7-9349-f577baeaf189",
|
||||
"name": "snapshot_id",
|
||||
"type": "string",
|
||||
"value": "={{ $json.snapshot_id }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "408a36af-decb-49b3-a95e-a2df0b6eea5f",
|
||||
"name": "Download Snapshot",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
640,
|
||||
-520
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://api.brightdata.com/datasets/v3/snapshot/{{ $json.snapshot_id }}",
|
||||
"options": {
|
||||
"timeout": 10000
|
||||
},
|
||||
"sendQuery": true,
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpHeaderAuth",
|
||||
"queryParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "format",
|
||||
"value": "json"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "kdbqXuxIR8qIxF7y",
|
||||
"name": "Header Auth account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "9d6cd882-c287-46ca-bc1e-df6b995fc422",
|
||||
"name": "Wait",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
420,
|
||||
-295
|
||||
],
|
||||
"webhookId": "631cd5de-36b3-4264-88ae-45b30e2c2ccc",
|
||||
"parameters": {
|
||||
"amount": 30
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "c9cf847a-6399-4c93-a901-30f1c0e7408a",
|
||||
"name": "Check on the errors",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
420,
|
||||
-520
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "b267071c-7102-407b-a98d-f613bcb1a106",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json.errors.toString() }}",
|
||||
"rightValue": "0"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "b648614e-c33e-4818-8348-e95df56928c7",
|
||||
"name": "Check Snapshot Status",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
-20,
|
||||
-395
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://api.brightdata.com/datasets/v3/progress/{{ $json.snapshot_id }}",
|
||||
"options": {},
|
||||
"sendHeaders": true,
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpHeaderAuth",
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "kdbqXuxIR8qIxF7y",
|
||||
"name": "Header Auth account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "408a1584-666f-471e-bfcd-c4d857319688",
|
||||
"name": "Initiate a Webhook Notification",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1080,
|
||||
-520
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://webhook.site/daf9d591-a130-4010-b1d3-0c66f8fcf467",
|
||||
"options": {},
|
||||
"sendBody": true,
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "response",
|
||||
"value": "={{ $json.data[0] }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "6548a794-a4fd-4050-b07d-bc7ca4517882",
|
||||
"name": "Aggregate JSON Response",
|
||||
"type": "n8n-nodes-base.aggregate",
|
||||
"position": [
|
||||
860,
|
||||
-520
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"aggregate": "aggregateAllItemData"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "c84e195c-edd2-4f59-8986-516d116b7352",
|
||||
"name": "Set Dataset Id, Request URL",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
-680,
|
||||
-400
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "c16061c8-c829-4bd3-b335-e79c605665f2",
|
||||
"name": "dataset_id",
|
||||
"type": "string",
|
||||
"value": "gd_l7q7dkf244hwjntr0"
|
||||
},
|
||||
{
|
||||
"id": "a4594c55-e39e-4a9e-80d6-d39370001e20",
|
||||
"name": "request",
|
||||
"type": "string",
|
||||
"value": "[{ \"url\": \"https://www.amazon.com/Quencher-FlowState-Stainless-Insulated-Smoothie/dp/B0CRMZHDG8\" }]"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "ceae108e-ed78-40c5-8e58-7013591ccaad",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-900,
|
||||
-700
|
||||
],
|
||||
"parameters": {
|
||||
"width": 520,
|
||||
"height": 280,
|
||||
"content": "## Note\n\nDeals with the Amazon web scraping by utilizing Bright Data Web Scraper Product.\n\n\n**Please make sure to set the Bright Data \n -> Dataset Id, Request URL and update the Webhook Notification URL**\n\nRefer \n- https://brightdata.com/products/web-scraper/ai\n- https://brightdata.com/products/web-scraper"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "1f55cffa-abd9-437b-bc9d-3fe0d8b02454",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-120,
|
||||
-600
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 720,
|
||||
"height": 500,
|
||||
"content": "## Wait until the Snapshot is ready"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "d8ba0f62-80a9-4e66-b70c-086ee5992df6",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-900,
|
||||
-220
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 660,
|
||||
"content": "## Who can benefit?\nData analysts, scientists, engineers, and developers seeking efficient methods to collect and analyze web data for AI, ML, big data applications, and more will find Scraper APIs particularly beneficial."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "7fdffafd-f256-4760-b001-a42b5198dbad",
|
||||
"name": "Create a binary data",
|
||||
"type": "n8n-nodes-base.function",
|
||||
"position": [
|
||||
1100,
|
||||
-720
|
||||
],
|
||||
"parameters": {
|
||||
"functionCode": "items[0].binary = {\n data: {\n data: new Buffer(JSON.stringify(items[0].json, null, 2)).toString('base64')\n }\n};\nreturn items;"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "934ab31a-cfb9-4e97-8d86-92cd95dd219c",
|
||||
"name": "Write the file to disk",
|
||||
"type": "n8n-nodes-base.readWriteFile",
|
||||
"position": [
|
||||
1320,
|
||||
-720
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fileName": "d:\\bulk_data.json",
|
||||
"operation": "write"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "1130523a-b598-425e-acf1-417ae8699f66",
|
||||
"name": "HTTP Request to the specified URL",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
-460,
|
||||
-395
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://api.brightdata.com/datasets/v3/trigger",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"jsonBody": "={{ $json.request }}",
|
||||
"sendBody": true,
|
||||
"sendQuery": true,
|
||||
"sendHeaders": true,
|
||||
"specifyBody": "json",
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpHeaderAuth",
|
||||
"queryParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "dataset_id",
|
||||
"value": "={{ $json.dataset_id }}"
|
||||
},
|
||||
{
|
||||
"name": "format",
|
||||
"value": "json"
|
||||
},
|
||||
{
|
||||
"name": "uncompressed_webhook",
|
||||
"value": "true"
|
||||
}
|
||||
]
|
||||
},
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "kdbqXuxIR8qIxF7y",
|
||||
"name": "Header Auth account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "8fb2eb85-ffd6-4632-9668-00f29bc91c34",
|
||||
"connections": {
|
||||
"If": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Check on the errors",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Wait",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Check Snapshot Status",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Set Snapshot Id": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Check Snapshot Status",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Download Snapshot": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Aggregate JSON Response",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Check on the errors": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Download Snapshot",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Create a binary data": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Write the file to disk",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Check Snapshot Status": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "If",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Aggregate JSON Response": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Initiate a Webhook Notification",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Create a binary data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Set Dataset Id, Request URL": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "HTTP Request to the specified URL",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"HTTP Request to the specified URL": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Set Snapshot Id",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When clicking ‘Test workflow’": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Set Dataset Id, Request URL",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
518
workflows/Wait/1589_Wait_Webhook_Automation_Webhook.json
Normal file
518
workflows/Wait/1589_Wait_Webhook_Automation_Webhook.json
Normal file
File diff suppressed because one or more lines are too long
649
workflows/Wait/1600_Wait_Code_Automation_Scheduled.json
Normal file
649
workflows/Wait/1600_Wait_Code_Automation_Scheduled.json
Normal file
@@ -0,0 +1,649 @@
|
||||
{
|
||||
"id": "8EmNhftXznAGV3dR",
|
||||
"meta": {
|
||||
"instanceId": "03e9d14e9196363fe7191ce21dc0bb17387a6e755dcc9acc4f5904752919dca8"
|
||||
},
|
||||
"name": "Phishing_analysis__URLScan_io_and_Virustotal_",
|
||||
"tags": [
|
||||
{
|
||||
"id": "GCHVocImoXoEVnzP",
|
||||
"name": "🛠️ In progress",
|
||||
"createdAt": "2023-10-31T02:17:21.618Z",
|
||||
"updatedAt": "2023-10-31T02:17:21.618Z"
|
||||
},
|
||||
{
|
||||
"id": "QPJKatvLSxxtrE8U",
|
||||
"name": "Secops",
|
||||
"createdAt": "2023-10-31T02:15:11.396Z",
|
||||
"updatedAt": "2023-10-31T02:15:11.396Z"
|
||||
}
|
||||
],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "f170068a-4540-4fbd-bd17-00a6367989d1",
|
||||
"name": "When clicking \"Execute Workflow\"",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
-1760,
|
||||
560
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "5a1e0490-6971-4490-a806-46da5e226365",
|
||||
"name": "sends slack message",
|
||||
"type": "n8n-nodes-base.slack",
|
||||
"position": [
|
||||
-360,
|
||||
1280
|
||||
],
|
||||
"parameters": {
|
||||
"text": "=*Email Analysis*\n\nSubject: {{ $('Microsoft Outlook').item.json[\"subject\"] }}\nFrom: {{ $('Microsoft Outlook').item.json[\"sender\"][\"emailAddress\"][\"address\"] }}\nDate: {{ $('Microsoft Outlook').item.json[\"sentDateTime\"] }}\n\nReport:\n\n*URLScan Report URL:* {{ $('urlscan.io').item.json.result ? $('urlscan.io').item.json.result : \"N/A\" }}\n*Virustotal report:* https://www.virustotal.com/gui/url/{{ $json[\"data\"][\"id\"].split(\"-\")[1] }}\n*Virustotal Verdict:* {{ $json.data.attributes.stats.malicious + $json.data.attributes.stats.suspicious }} / {{ Object.keys($json.data.attributes.results).length }}",
|
||||
"select": "channel",
|
||||
"channelId": {
|
||||
"__rl": true,
|
||||
"mode": "name",
|
||||
"value": "test-giulio-public"
|
||||
},
|
||||
"otherOptions": {}
|
||||
},
|
||||
"credentials": {
|
||||
"slackApi": {
|
||||
"id": "252",
|
||||
"name": "Slack Bot Token | Giulio [✅ Share ok]"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "65e70f8a-7514-455e-97bf-b11514b4eec2",
|
||||
"name": "Split In Batches",
|
||||
"type": "n8n-nodes-base.splitInBatches",
|
||||
"position": [
|
||||
-1020,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"batchSize": 1
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "35084825-f3b2-4a01-b953-712c099a6451",
|
||||
"name": "Mark as read",
|
||||
"type": "n8n-nodes-base.microsoftOutlook",
|
||||
"position": [
|
||||
-1300,
|
||||
560
|
||||
],
|
||||
"parameters": {
|
||||
"messageId": "={{ $json.id }}",
|
||||
"operation": "update",
|
||||
"updateFields": {
|
||||
"isRead": true
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"microsoftOutlookOAuth2Api": {
|
||||
"id": "Zeu3LbjDbkwiCUik",
|
||||
"name": "Microsoft Outlook | Giulio [✅ Share ok]"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "62098c94-5735-4eed-a712-3f9887e0400f",
|
||||
"name": "VirusTotal: Scan URL",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
-220,
|
||||
700
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://www.virustotal.com/api/v3/urls",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"sendQuery": true,
|
||||
"authentication": "predefinedCredentialType",
|
||||
"queryParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "url",
|
||||
"value": "={{ $json.domain }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"nodeCredentialType": "virusTotalApi"
|
||||
},
|
||||
"credentials": {
|
||||
"virusTotalApi": {
|
||||
"id": "hVTFFXxLV4oWPOb0",
|
||||
"name": "Virus Total | Giulio [✅ Share ok]"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.1
|
||||
},
|
||||
{
|
||||
"id": "55b7ce97-3609-4a16-b998-8bec77cffb59",
|
||||
"name": "VirusTotal: Get report",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
200,
|
||||
700
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://www.virustotal.com/api/v3/analyses/{{ $json.data.id }}",
|
||||
"options": {},
|
||||
"sendQuery": true,
|
||||
"authentication": "predefinedCredentialType",
|
||||
"queryParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "resource",
|
||||
"value": "https://developers.virustotal.com/v2.0/reference/url-report"
|
||||
}
|
||||
]
|
||||
},
|
||||
"nodeCredentialType": "virusTotalApi"
|
||||
},
|
||||
"credentials": {
|
||||
"virusTotalApi": {
|
||||
"id": "hVTFFXxLV4oWPOb0",
|
||||
"name": "Virus Total | Giulio [✅ Share ok]"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.1
|
||||
},
|
||||
{
|
||||
"id": "7bf3c7a0-94f9-410b-b0fe-e0d15d0ba895",
|
||||
"name": "Schedule Trigger",
|
||||
"type": "n8n-nodes-base.scheduleTrigger",
|
||||
"position": [
|
||||
-1760,
|
||||
380
|
||||
],
|
||||
"parameters": {
|
||||
"rule": {
|
||||
"interval": [
|
||||
{}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "741f3221-bb73-4004-801e-e9c3030740f8",
|
||||
"name": "Find indicators of compromise",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
-780,
|
||||
440
|
||||
],
|
||||
"parameters": {
|
||||
"language": "python",
|
||||
"pythonCode": "try:\n from ioc_finder import find_iocs\nexcept ImportError:\n import micropip\n await micropip.install(\"ioc-finder\")\n from ioc_finder import find_iocs\n\ntext = _input.first().json['body']['content']\nprint(text)\n\niocs = find_iocs(text)\n\nreturn [{\"json\": { \"domain\": item }} for item in iocs[\"urls\"]]"
|
||||
},
|
||||
"typeVersion": 2,
|
||||
"alwaysOutputData": true
|
||||
},
|
||||
{
|
||||
"id": "bf8ba285-e824-4104-82e0-fa2dba80f301",
|
||||
"name": "URLScan: Get report",
|
||||
"type": "n8n-nodes-base.urlScanIo",
|
||||
"position": [
|
||||
640,
|
||||
60
|
||||
],
|
||||
"parameters": {
|
||||
"scanId": "={{ $json.scanId }}",
|
||||
"operation": "get"
|
||||
},
|
||||
"credentials": {
|
||||
"urlScanIoApi": {
|
||||
"id": "eva7ViJyyrpmJDe3",
|
||||
"name": "urlscan.io | Giulio [✅ Share ok]"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "eb3b06e8-ffe3-4472-a70c-08fb2555e0fb",
|
||||
"name": "URLScan: Scan URL",
|
||||
"type": "n8n-nodes-base.urlScanIo",
|
||||
"position": [
|
||||
-100,
|
||||
120
|
||||
],
|
||||
"parameters": {
|
||||
"url": "={{ $json.domain }}",
|
||||
"additionalFields": {}
|
||||
},
|
||||
"credentials": {
|
||||
"urlScanIoApi": {
|
||||
"id": "eva7ViJyyrpmJDe3",
|
||||
"name": "urlscan.io | Giulio [✅ Share ok]"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1,
|
||||
"continueOnFail": true
|
||||
},
|
||||
{
|
||||
"id": "34157694-635a-481b-b7d2-dcd4628b26fe",
|
||||
"name": "Has URL?",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
-520,
|
||||
440
|
||||
],
|
||||
"parameters": {
|
||||
"conditions": {
|
||||
"string": [
|
||||
{
|
||||
"value1": "={{ $json.domain }}",
|
||||
"operation": "isNotEmpty"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "33cad369-0598-433e-90f8-0e7333ec5e92",
|
||||
"name": "No error?",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
240,
|
||||
120
|
||||
],
|
||||
"parameters": {
|
||||
"conditions": {
|
||||
"string": [
|
||||
{
|
||||
"value1": "={{ $json.error }}",
|
||||
"operation": "isNotEmpty"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "cba20d52-a56c-4ac0-99f2-d9b54adb342e",
|
||||
"name": "Not empty?",
|
||||
"type": "n8n-nodes-base.filter",
|
||||
"position": [
|
||||
-640,
|
||||
1280
|
||||
],
|
||||
"parameters": {
|
||||
"conditions": {
|
||||
"string": [
|
||||
{
|
||||
"value1": "={{ $json.data }}",
|
||||
"operation": "isNotEmpty"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "449c31e3-e098-43ec-a31b-1e383c6add57",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-2051.228008430503,
|
||||
-251.94391274976795
|
||||
],
|
||||
"parameters": {
|
||||
"width": 474.5187061049208,
|
||||
"height": 1008.8561536646063,
|
||||
"content": "\n## Workflow Overview\n\nThis n8n workflow is engineered to enhance cybersecurity measures by analyzing potential phishing URLs using URLScan.io and VirusTotal. \n\nIt is designed to automatically process and evaluate URLs from incoming messages for malicious content.\n\nThis workflow is tuned specifically for `Outlook`, but you can replace outlook with your mail provider of choice. \n\nThe workflow can be initiated manually or scheduled to run automatically, ensuring consistent checks against phishing threats. By integrating with leading cybersecurity tools, it provides a comprehensive analysis, strengthening your organization's defense against phishing attacks.\n\n## Execution Schedule\n\nIt can be triggered at will by clicking \"Execute Workflow\" or set to run on a schedule. To align with your operational needs, customize the `Schedule Trigger` to your preferred frequency, ensuring continuous monitoring for phishing attempts."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "a8921212-aec4-422d-9f04-f402d7591475",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-1560,
|
||||
107
|
||||
],
|
||||
"parameters": {
|
||||
"width": 397.3953488372091,
|
||||
"height": 647.1076277970203,
|
||||
"content": "\n## Email Processing for Phishing Analysis\nThis segment of the workflow interfaces with Microsoft Outlook to retrieve and process `all messages marked as unread`. This section can be replaced with any mail provider.\n\nOnce an email is fetched, the `Get all unread messages` node captures the details, while the `Mark as read` node updates the message's status. \n\nThis ensures that each email is only processed once, maintaining a clean and organized inbox, and preventing reprocessing of the same messages."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "fbad734e-4502-4d1b-8890-b05c486a1f70",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-1140,
|
||||
15.062288067451163
|
||||
],
|
||||
"parameters": {
|
||||
"width": 859.9418604651164,
|
||||
"height": 836.8098049558043,
|
||||
"content": "\n## Indicator of Compromise Detection Loop\nThis workflow section leverages n8n's `Split In Batches` node, a powerful feature for iterative processing. It is set to dissect the batch of emails one by one, allowing for individual examination of each message's content for potential threats.\n\nWith the `Find indicators of compromise` node, the workflow employs Python code to parse the email content and extract URLs, which are common indicators of compromise (IoCs) in phishing attempts. By utilizing the ioc-finder library, it systematically scans for and isolates these IoCs from the email body.\n\nThe `Has URL?` node then checks if the email contains any urls. If no URLs are found, then the loop moves on to the next email, as there is nothing to scan. If it does find one, it allows the email to flow to the next sections. \n\nThe splitting of batches is key to the workflow's efficiency, enabling the loop to handle vast quantities of emails methodically. This step is crucial in pinpointing and extracting suspicious elements from each email, highlighting the workflow's meticulous approach to security analysis."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "8603fe5b-ad6b-4980-a28b-01531c6629f3",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-260,
|
||||
-313.5039999999999
|
||||
],
|
||||
"parameters": {
|
||||
"width": 1099.116279069767,
|
||||
"height": 618.8295813953489,
|
||||
"content": "\n## URL Scanning and Verification\nThis portion of the workflow engages with URLScan.io, a tool for scanning and analyzing websites for potential security threats.\n\nThe `URLScan: Scan URL` node begins the process by submitting the URL extracted from the email content. It's configured to continue even if an error occurs, which allows us to then do an error check in the `No error?` node instead. \n\nThis is because if the `URLScan: Scan URL` node fails, the whole workflow will grind to a stop. This is not good because in theory, we maybe processing another email after this one, and we need to ensure the workflow moves on to the next email. \n\nFollowing the submission, the `Wait 1 Minute` node pauses the workflow, giving URLScan.io adequate time to perform the scan and generate a report. This wait ensures that the subsequent retrieval of the report reflects the most recent and comprehensive analysis."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "33299274-9f02-4ea0-af60-5dee53db2c34",
|
||||
"name": "Wait 1 Minute",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
480,
|
||||
60
|
||||
],
|
||||
"webhookId": "469a8b5e-8b5a-4360-bc9d-3b253cc0ae24",
|
||||
"parameters": {
|
||||
"unit": "seconds",
|
||||
"amount": 60
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "757ad81d-ae24-4b26-98ba-a571670be2a3",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-260,
|
||||
318.64011851851865
|
||||
],
|
||||
"parameters": {
|
||||
"width": 1435.7278194659766,
|
||||
"height": 540.6919228251508,
|
||||
"content": ""
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "8e2cbf69-6c9e-4a98-ba5e-29b93eb2742f",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-680,
|
||||
880
|
||||
],
|
||||
"parameters": {
|
||||
"width": 1213.8313506082789,
|
||||
"height": 575.5779026440933,
|
||||
"content": "\n## Final Reporting on Phishing Analysis\nIn the concluding phase of the workflow, we consolidate the analysis into actionable intelligence and report through Slack.\n\nThe `Not empty?` node filters the data, ensuring that only URLs with a completed analysis proceed to the reporting stage. This step is crucial to avoid alerting on incomplete data, which could lead to misinformed decisions.\n\nThe `sends slack message` node is the final touchpoint of the workflow, where it compiles a detailed report and posts it on Slack. The message includes the `subject, sender, and date` of the analyzed email, along with the URLScan and VirusTotal reports. It provides a concise verdict by tallying the number of malicious and suspicious flags against the total checks performed, offering a clear indication of the potential threat level.\n\nThis Slack notification serves as a prompt for the cybersecurity team to take appropriate action, completing the workflow's aim of providing streamlined, accurate, and timely phishing threat analysis."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "a2a0dc81-b1f0-4d7b-b818-71bae58512a9",
|
||||
"name": "Get all unread messages",
|
||||
"type": "n8n-nodes-base.microsoftOutlook",
|
||||
"position": [
|
||||
-1520,
|
||||
560
|
||||
],
|
||||
"parameters": {
|
||||
"operation": "getAll",
|
||||
"additionalFields": {
|
||||
"filter": "isRead eq false"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"microsoftOutlookOAuth2Api": {
|
||||
"id": "Zeu3LbjDbkwiCUik",
|
||||
"name": "Microsoft Outlook | Giulio [✅ Share ok]"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "a5793014-9575-4e05-b467-f295a09f0945",
|
||||
"name": "Sticky Note6",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-260,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"width": 615.527819465977,
|
||||
"height": 540.6919228251508,
|
||||
"content": "\n## Phishing URL Analysis with VirusTotal\nThis segment of the workflow deploys VirusTotal's capabilities to scrutinize URLs for signs of phishing.\n\nThe `VirusTotal: Scan URL` node initiates the process by sending the URL to VirusTotal for analysis. Once the scan is triggered, the workflow moves on to the `VirusTotal: Get report` node, which retrieves the detailed analysis report after a certain interval, ensuring that the data received includes all findings from the scan.\n\nFinally, the `Merge Reports` node combines the results from both URLScan.io and VirusTotal, aligning the data side by side for a comprehensive view. This merging by position is vital as it correlates the analysis from different sources, providing a layered security assessment of the URL in question."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "c8d5c248-77ba-4a7f-ab21-19ff8d60ed55",
|
||||
"name": "Merge Reports",
|
||||
"type": "n8n-nodes-base.merge",
|
||||
"position": [
|
||||
1040,
|
||||
680
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "combine",
|
||||
"options": {},
|
||||
"combinationMode": "mergeByPosition"
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "02ba918c-5fee-4d3e-824f-1160881716b6",
|
||||
"connections": {
|
||||
"Has URL?": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "URLScan: Scan URL",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "VirusTotal: Scan URL",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Split In Batches",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"No error?": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge Reports",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Wait 1 Minute",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Not empty?": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "sends slack message",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Mark as read": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Split In Batches",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Merge Reports": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Split In Batches",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait 1 Minute": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "URLScan: Get report",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Schedule Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get all unread messages",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Split In Batches": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Find indicators of compromise",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Not empty?",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"URLScan: Scan URL": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "No error?",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"URLScan: Get report": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge Reports",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"VirusTotal: Scan URL": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "VirusTotal: Get report",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"VirusTotal: Get report": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge Reports",
|
||||
"type": "main",
|
||||
"index": 1
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get all unread messages": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Mark as read",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Find indicators of compromise": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Has URL?",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When clicking \"Execute Workflow\"": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get all unread messages",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
429
workflows/Wait/1609_Wait_Schedule_Automation_Scheduled.json
Normal file
429
workflows/Wait/1609_Wait_Schedule_Automation_Scheduled.json
Normal file
@@ -0,0 +1,429 @@
|
||||
{
|
||||
"id": "QCbb7Bm12gDIH0mI",
|
||||
"meta": {
|
||||
"instanceId": "d189560122cb823898b8eca8996614abf14798d923f2ff7c4d7220fb10f8e6f7",
|
||||
"templateCredsSetupCompleted": true
|
||||
},
|
||||
"name": "Keep discord clean",
|
||||
"tags": [
|
||||
{
|
||||
"id": "CgBu2Sxr4mqipxlK",
|
||||
"name": "template",
|
||||
"createdAt": "2025-01-08T19:56:24.079Z",
|
||||
"updatedAt": "2025-01-08T19:56:24.079Z"
|
||||
}
|
||||
],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "dde530b8-edd5-4f1d-a3c8-326925c97269",
|
||||
"name": "Loop Over Channels",
|
||||
"type": "n8n-nodes-base.splitInBatches",
|
||||
"position": [
|
||||
560,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"retryOnFail": false,
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "3e2684b1-08ad-41bd-930f-cbb229e16617",
|
||||
"name": "Loop Over Messages",
|
||||
"type": "n8n-nodes-base.splitInBatches",
|
||||
"position": [
|
||||
1260,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "430d13be-670f-4e5d-acdf-ffe1a65a49e3",
|
||||
"name": "Every day at 9pm",
|
||||
"type": "n8n-nodes-base.scheduleTrigger",
|
||||
"position": [
|
||||
-160,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"rule": {
|
||||
"interval": [
|
||||
{
|
||||
"triggerAtHour": 21
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "6d40f036-c87a-4b68-9ec6-523a3372447c",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
40,
|
||||
600
|
||||
],
|
||||
"parameters": {
|
||||
"color": 6,
|
||||
"width": 294,
|
||||
"height": 80,
|
||||
"content": "**Note ☝️**\nDon’t forget to setup an error workflow to get notified if something goes wrong"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "93290300-084b-4f91-95bc-f34c1aef93cd",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
420,
|
||||
-60
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 327,
|
||||
"height": 152,
|
||||
"content": "### 👨🎤 Setup\n1. Add your **Discord** credentials\n2. Change the server in each **Discord** node to the correct one\n3. Click the Test Workflow button\n3. Activate the workflow to run on a schedule"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "5fead80a-de3a-4f45-a524-5228def7b4ad",
|
||||
"name": "Cool down Discord API rate limits",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
280,
|
||||
400
|
||||
],
|
||||
"webhookId": "cea120e2-5bb9-45cf-83e6-55fd458d6cf4",
|
||||
"parameters": {
|
||||
"amount": 2
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "5a8d6402-458c-4c24-b379-6a41908a5af3",
|
||||
"name": "Get all Discord channels",
|
||||
"type": "n8n-nodes-base.discord",
|
||||
"position": [
|
||||
40,
|
||||
400
|
||||
],
|
||||
"webhookId": "a77d1495-df40-4afd-ad0a-8f5b851b16da",
|
||||
"parameters": {
|
||||
"guildId": {
|
||||
"__rl": true,
|
||||
"mode": "id",
|
||||
"value": ""
|
||||
},
|
||||
"options": {
|
||||
"filter": [
|
||||
0,
|
||||
2
|
||||
]
|
||||
},
|
||||
"operation": "getAll",
|
||||
"returnAll": true
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "a2b1d905-849d-4392-95db-e545f542ba78",
|
||||
"name": "Cool down Message deletion API rate limits",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
1680,
|
||||
340
|
||||
],
|
||||
"webhookId": "fcd9f62a-f08b-44bc-afa3-87d960fdc380",
|
||||
"parameters": {
|
||||
"amount": 1
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "8c134cfe-dcb1-400d-a518-17ed3f1cbf62",
|
||||
"name": "Cool down Get messages API rate limits",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
1000,
|
||||
480
|
||||
],
|
||||
"webhookId": "5d8de5eb-8445-4a64-8b8b-8577ffa52ef0",
|
||||
"parameters": {
|
||||
"amount": 2
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "18ba10df-dcec-4d27-8ecf-06171939b7eb",
|
||||
"name": "Get messages from Channel",
|
||||
"type": "n8n-nodes-base.discord",
|
||||
"onError": "continueRegularOutput",
|
||||
"position": [
|
||||
800,
|
||||
480
|
||||
],
|
||||
"webhookId": "b36f85bb-1237-415d-81bb-598703d3d4cd",
|
||||
"parameters": {
|
||||
"guildId": {
|
||||
"__rl": true,
|
||||
"mode": "id",
|
||||
"value": ""
|
||||
},
|
||||
"options": {},
|
||||
"resource": "message",
|
||||
"channelId": {
|
||||
"__rl": true,
|
||||
"mode": "id",
|
||||
"value": "={{ $json.id }}"
|
||||
},
|
||||
"operation": "getAll",
|
||||
"returnAll": true
|
||||
},
|
||||
"retryOnFail": false,
|
||||
"typeVersion": 2,
|
||||
"alwaysOutputData": true,
|
||||
"waitBetweenTries": 5000
|
||||
},
|
||||
{
|
||||
"id": "57f2395a-b624-41d3-aada-4107b21a3359",
|
||||
"name": "Delete Message",
|
||||
"type": "n8n-nodes-base.discord",
|
||||
"onError": "continueRegularOutput",
|
||||
"position": [
|
||||
1500,
|
||||
340
|
||||
],
|
||||
"webhookId": "4b43cc2e-59db-46c9-ae4c-9716146c25bf",
|
||||
"parameters": {
|
||||
"guildId": {
|
||||
"__rl": true,
|
||||
"mode": "id",
|
||||
"value": ""
|
||||
},
|
||||
"resource": "message",
|
||||
"channelId": {
|
||||
"__rl": true,
|
||||
"mode": "id",
|
||||
"value": "={{ $json.channel_id }}"
|
||||
},
|
||||
"messageId": "={{ $json.id }}",
|
||||
"operation": "deleteMessage"
|
||||
},
|
||||
"retryOnFail": false,
|
||||
"typeVersion": 2,
|
||||
"alwaysOutputData": true,
|
||||
"waitBetweenTries": 5000
|
||||
},
|
||||
{
|
||||
"id": "c224ef25-57d8-4fe6-b14a-b09131ce8c1c",
|
||||
"name": "Filter Messages older than 7 days",
|
||||
"type": "n8n-nodes-base.filter",
|
||||
"position": [
|
||||
1000,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "2864fc65-1d9d-433f-bd61-766278a7e54c",
|
||||
"operator": {
|
||||
"type": "dateTime",
|
||||
"operation": "exists",
|
||||
"singleValue": true
|
||||
},
|
||||
"leftValue": "={{ $json.timestamp }}",
|
||||
"rightValue": ""
|
||||
},
|
||||
{
|
||||
"id": "a05636ea-8663-4398-8a55-a03ab34f83a5",
|
||||
"operator": {
|
||||
"type": "dateTime",
|
||||
"operation": "before"
|
||||
},
|
||||
"leftValue": "={{ $json.timestamp }}",
|
||||
"rightValue": "={{ $today.minus({days: 7}) }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "c3654c25-6318-4652-9f76-82770cc28324",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
40,
|
||||
300
|
||||
],
|
||||
"parameters": {
|
||||
"color": 6,
|
||||
"width": 194,
|
||||
"height": 80,
|
||||
"content": "**Tip 👇**\nOAuth2 Authentication is very easy to setup"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "f3d8b35e-6b13-4df9-bd33-2d44381e6fc5",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-200,
|
||||
-60
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 600,
|
||||
"height": 280,
|
||||
"content": "# Nightly Discord Channel Cleanup\n### This workflow runs every day at 9:00 p.m. and:\n- Retrieves all Discord channels using your provided credentials.\n- Pauses briefly to respect Discord API rate limits.\n- Loops through each channel and fetches messages.\n- Filters out messages older than seven days.\n- Deletes those older messages, again pausing to stay within deletion rate limits.\n\nBy setting up this workflow on a schedule, you can automatically keep Discord channels tidy and compliant with retention policies."
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"callerPolicy": "workflowsFromSameOwner",
|
||||
"errorWorkflow": "C3NlThVZU7vFr4Um",
|
||||
"executionOrder": "v1",
|
||||
"saveManualExecutions": true
|
||||
},
|
||||
"versionId": "a4b9f5d2-d905-4c86-9fa6-2a274909ecce",
|
||||
"connections": {
|
||||
"Delete Message": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Cool down Message deletion API rate limits",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Every day at 9pm": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get all Discord channels",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Loop Over Channels": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Filter Messages older than 7 days",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Get messages from Channel",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Loop Over Messages": {
|
||||
"main": [
|
||||
[],
|
||||
[
|
||||
{
|
||||
"node": "Delete Message",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get all Discord channels": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Cool down Discord API rate limits",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get messages from Channel": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Cool down Get messages API rate limits",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Cool down Discord API rate limits": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop Over Channels",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Filter Messages older than 7 days": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop Over Messages",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Cool down Get messages API rate limits": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop Over Channels",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Cool down Message deletion API rate limits": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop Over Messages",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
1059
workflows/Wait/1638_Wait_Splitout_Send_Webhook.json
Normal file
1059
workflows/Wait/1638_Wait_Splitout_Send_Webhook.json
Normal file
File diff suppressed because it is too large
Load Diff
2210
workflows/Wait/1639_Wait_Webhook_Automation_Webhook.json
Normal file
2210
workflows/Wait/1639_Wait_Webhook_Automation_Webhook.json
Normal file
File diff suppressed because it is too large
Load Diff
713
workflows/Wait/1696_Wait_Code_Automate_Webhook.json
Normal file
713
workflows/Wait/1696_Wait_Code_Automate_Webhook.json
Normal file
File diff suppressed because one or more lines are too long
415
workflows/Wait/1705_Wait_Manual_Automate_Webhook.json
Normal file
415
workflows/Wait/1705_Wait_Manual_Automate_Webhook.json
Normal file
@@ -0,0 +1,415 @@
|
||||
{
|
||||
"id": "Tygtx1aZi9pLdtUo",
|
||||
"meta": {
|
||||
"instanceId": "8418cffce8d48086ec0a73fd90aca708aa07591f2fefa6034d87fe12a09de26e",
|
||||
"templateCredsSetupCompleted": true
|
||||
},
|
||||
"name": "Fully automated Video Captions generation with json2video",
|
||||
"tags": [],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "38e862a1-dc25-4a41-b0e1-5ebba1032e0a",
|
||||
"name": "When clicking ‘Test workflow’",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
-980,
|
||||
-280
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "834ac32d-4bef-4087-87af-590cd200a858",
|
||||
"name": "json2video - Add Captions",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
-540,
|
||||
-280
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://api.json2video.com/v2/movies",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"jsonBody": "={\n \"id\": \"qbaasr7s\",\n \"resolution\": \"custom\",\n \"quality\": \"high\",\n\"scenes\": [\n {\n \"id\": \"qyjh9lwj\",\n \"comment\": \"Scene 1\",\n \"elements\": []\n }\n ],\n \"elements\": [\n {\n \"id\": \"q6dznzcv\",\n \"type\": \"video\",\n \"src\": \"{{ $json.video_url }}\"\n },\n {\n \"id\": \"q41n9kxp\",\n \"type\": \"subtitles\",\n \"settings\": {\n \"style\": \"classic-progressive\",\n \"font-family\": \"Oswald\",\n \"font-size\": 140,\n \"word-color\": \"#FCF5C9\",\n \"shadow-color\": \"#260B1B\",\n \"line-color\": \"#F1E7F4\",\n \"shadow-offset\": 2,\n \"box-color\": \"#260B1B\"\n },\n \"language\": \"en\"\n }\n ],\n \"width\": {{ $json.width }},\n \"height\": {{ $json.height }}\n}",
|
||||
"sendBody": true,
|
||||
"specifyBody": "json",
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpCustomAuth"
|
||||
},
|
||||
"credentials": {
|
||||
"httpCustomAuth": {
|
||||
"id": "FVrj0WeCT9IosZhh",
|
||||
"name": "json2video"
|
||||
},
|
||||
"httpHeaderAuth": {
|
||||
"id": "TngzgS09J1YvLIXl",
|
||||
"name": "Perplexity"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "93e98e02-a7e5-40d2-93a8-06c1ba3c4fb5",
|
||||
"name": "Config",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
-780,
|
||||
-280
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "408b70d1-30ea-4f88-847d-97c59e467168",
|
||||
"name": "video_url",
|
||||
"type": "string",
|
||||
"value": "https://aiatelier.s3.eu-west-1.amazonaws.com/workflows-material/json2video/captions-sample.mp4"
|
||||
},
|
||||
{
|
||||
"id": "e54d0b14-3261-4d8c-83ac-b63a37981257",
|
||||
"name": "width",
|
||||
"type": "string",
|
||||
"value": "1080"
|
||||
},
|
||||
{
|
||||
"id": "70a87f6b-8cf1-48b0-96bf-b7a8aa5bc6da",
|
||||
"name": "height",
|
||||
"type": "string",
|
||||
"value": "1920"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "d3b6d3f3-d3ca-455d-929c-ffb869bd23d8",
|
||||
"name": "Wait",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
-180,
|
||||
-220
|
||||
],
|
||||
"webhookId": "f50b5765-4a91-415d-ba27-cfda281dc941",
|
||||
"parameters": {
|
||||
"amount": 10
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "07099d4c-6012-4447-8720-af8e75521e24",
|
||||
"name": "Is Error",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
180,
|
||||
-240
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "a9813eb6-0dbf-41ac-837f-8f2760cbc5e3",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json.movie.status }}",
|
||||
"rightValue": "error"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "a94a6b24-4674-42ac-8db4-6e9298b44b7d",
|
||||
"name": "Handle Error",
|
||||
"type": "n8n-nodes-base.noOp",
|
||||
"position": [
|
||||
420,
|
||||
-380
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "cd6bba4e-b329-4476-b983-248bb8e4423a",
|
||||
"name": "Output",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
460,
|
||||
20
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "c7ce3d37-6455-407a-bf57-286d91c16f97",
|
||||
"name": "url",
|
||||
"type": "string",
|
||||
"value": "={{ $json.movie.url }}"
|
||||
},
|
||||
{
|
||||
"id": "e969f3bd-2c36-43f6-9fc3-a66a0424ec20",
|
||||
"name": "duration",
|
||||
"type": "number",
|
||||
"value": "={{ $json.movie.duration }}"
|
||||
},
|
||||
{
|
||||
"id": "a5f9b903-40c0-432e-b030-5a1fdea844db",
|
||||
"name": "size",
|
||||
"type": "number",
|
||||
"value": "={{ $json.movie.size }}"
|
||||
},
|
||||
{
|
||||
"id": "660565f1-8da7-4c2f-a5e0-b62130aef7cb",
|
||||
"name": "width",
|
||||
"type": "number",
|
||||
"value": "={{ $json.movie.width }}"
|
||||
},
|
||||
{
|
||||
"id": "5e2a9144-45e5-40f2-b71e-d74b25890ab6",
|
||||
"name": "height",
|
||||
"type": "number",
|
||||
"value": "={{ $json.movie.height }}"
|
||||
},
|
||||
{
|
||||
"id": "601f8514-61f5-4cea-9b64-373881e3c879",
|
||||
"name": "rendering_time",
|
||||
"type": "number",
|
||||
"value": "={{ $json.movie.rendering_time }}"
|
||||
},
|
||||
{
|
||||
"id": "2b7812f9-1e44-4843-b2ca-051b54153051",
|
||||
"name": "project",
|
||||
"type": "string",
|
||||
"value": "={{ $json.movie.project }}"
|
||||
},
|
||||
{
|
||||
"id": "1b562ac3-e62b-4d67-adab-2af0d15fd11e",
|
||||
"name": "remaining_quota",
|
||||
"type": "number",
|
||||
"value": "={{ $json.remaining_quota.time }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "378e027a-b033-4490-93e6-666d3d7def86",
|
||||
"name": "json2video - Get Status",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
0,
|
||||
-180
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://api.json2video.com/v2/movies?id={{ $('json2video - Add Captions').first().json.project }}",
|
||||
"options": {},
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpCustomAuth"
|
||||
},
|
||||
"credentials": {
|
||||
"httpCustomAuth": {
|
||||
"id": "FVrj0WeCT9IosZhh",
|
||||
"name": "json2video"
|
||||
},
|
||||
"httpHeaderAuth": {
|
||||
"id": "TngzgS09J1YvLIXl",
|
||||
"name": "Perplexity"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "a818a3a6-4cef-4043-ac3e-96fa3f54373d",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-260,
|
||||
-300
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 640,
|
||||
"height": 580,
|
||||
"content": "## Check video status"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "7258a9ec-591f-4b07-840c-3171c36f193e",
|
||||
"name": "is Completed",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
200,
|
||||
40
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "2643b070-cbb2-4562-9269-a61389e0c242",
|
||||
"operator": {
|
||||
"name": "filter.operator.equals",
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json.movie.status }}",
|
||||
"rightValue": "done"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "cbce69e0-730c-46ea-bd0a-b8694bd7780d",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-1700,
|
||||
-480
|
||||
],
|
||||
"parameters": {
|
||||
"width": 640,
|
||||
"height": 820,
|
||||
"content": "# Automatically Generate Captions for Your Videos with json2video\n\nThis workflow automatically adds captions to your videos using [json2video](https://json2video.com/?afco=manu), a powerful service for video automation, that integrates seamlessly with n8n.\n\n# [👉🏻 Try json2video for free 👈🏻](https://json2video.com/?afco=manu)\n\n## Setup\n\n### Step 1: Create a json2video Account & API Key\n1. Sign up for a [json2video account](https://json2video.com/?afco=manu).\n2. Once registered, you will receive your API key via email.\n\n### Step 2: Create n8n Credentials\n1. In n8n, create new credentials and select **\"Custom Auth\"** as the type.\n2. Paste the following JSON code into the credentials configuration, replacing `\"your-json2video-api-key\"` with your actual API key:\n\n ```json\n {\n \"headers\": {\n \"x-api-key\": \"your-json2video-api-key\"\n }\n }\n ```\n\n### Step 3: Connect Your Credentials\n1. In your n8n workflow, locate the two HTTP nodes that interact with json2video.\n2. Select the credentials you created in Step 2 for both nodes.\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "4ce3a85f-3abc-48e9-8840-f37f32490b62",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-760,
|
||||
-120
|
||||
],
|
||||
"parameters": {
|
||||
"width": 440,
|
||||
"height": 200,
|
||||
"content": "# ☝️ Provide Video Details\n\nFor the workflow to add captions, please provide:\n\n- **URL:** The link to your video.\n- **Width & Height:** The dimensions of your video"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "5d8108e2-3f44-4585-9c25-f31f95f06424",
|
||||
"connections": {
|
||||
"Wait": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "json2video - Get Status",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Config": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "json2video - Add Captions",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Is Error": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Handle Error",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "is Completed",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"is Completed": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Output",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Wait",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"json2video - Get Status": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Is Error",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"json2video - Add Captions": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When clicking ‘Test workflow’": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Config",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
822
workflows/Wait/1717_Wait_Code_Automation_Webhook.json
Normal file
822
workflows/Wait/1717_Wait_Code_Automation_Webhook.json
Normal file
@@ -0,0 +1,822 @@
|
||||
{
|
||||
"id": "UsBaGY83vnyZjRoB",
|
||||
"meta": {
|
||||
"instanceId": "d4e74e27d8d0aa53cd4bdff26f47c18bb91437db0b63a6ba8ec9f78df0e0234f",
|
||||
"templateId": "2808",
|
||||
"templateCredsSetupCompleted": true
|
||||
},
|
||||
"name": "TopSourcer - Finds LinkedIn Profiles using natural language",
|
||||
"tags": [],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "16a5f4a2-6e00-40f5-bab7-35526550eacd",
|
||||
"name": "Wait",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
3240,
|
||||
-280
|
||||
],
|
||||
"webhookId": "88c6a5cc-4b33-438c-ba85-2e075a276a78",
|
||||
"parameters": {},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "f9ff2e4f-176b-453d-8743-cab4d9fd408d",
|
||||
"name": "When chat message received",
|
||||
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
|
||||
"position": [
|
||||
1040,
|
||||
-180
|
||||
],
|
||||
"webhookId": "475042df-7c36-4658-ab1c-ff55c237621f",
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "b988c049-2400-4a3a-b615-f4048832bd8d",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
980,
|
||||
-340
|
||||
],
|
||||
"parameters": {
|
||||
"content": "Click \"Open Chat\" after activating the workflow.\n\nHere, paste in a job description or describe your ideal candidate."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "74cec892-07d6-4e7d-9c6f-becfb51241c8",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1300,
|
||||
-300
|
||||
],
|
||||
"parameters": {
|
||||
"width": 300,
|
||||
"content": "Under \"Credential to connect with\" add your openAI API key. Find at: https://platform.openai.com/settings/organization/api-keys\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "940373af-ca88-44f1-b3c3-fb125ab6daf9",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2800,
|
||||
-360
|
||||
],
|
||||
"parameters": {
|
||||
"width": 300,
|
||||
"content": "For the first condition: {{ $json.start }} is less than 50, so change \"50\" to your desired number of results. \n\nEach loop fetches the next page, returning 10 results per iteration."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "c2bc0757-753b-4fee-b42b-65e5a0ff4750",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
3160,
|
||||
-440
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 200,
|
||||
"content": "Waits 5 seconds to avoid rate limiting by Google. While it's unlikely you'll be rate-limited since you're authenticated with your cookie, this is just a precaution."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "9007b42b-1a79-4b98-9d75-71894d660c1d",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
3400,
|
||||
-600
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 380,
|
||||
"height": 280,
|
||||
"content": "Get this Cookie-Editor. https://chromewebstore.google.com/detail/cookie-editor/hlkenndednhfkekhgcdicdfddnkalmdm\n\nDo a google search --> click this extension --> Export --> Header string.\n\nThen, open this node --> under Header Auth --> edit --> and under cookie value paste in your header string. \n\nThis is to perform an authenticated google search.\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "b1d2f9dd-227d-4372-89f8-e6d54e94f2fc",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1680,
|
||||
-320
|
||||
],
|
||||
"parameters": {
|
||||
"content": "Connect your google sheets account and create a document."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "df0fb397-55d0-41ec-a9df-2c39019ad68e",
|
||||
"name": "Create a new sheet",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"position": [
|
||||
1740,
|
||||
-180
|
||||
],
|
||||
"parameters": {
|
||||
"title": "={{ $('Generate a Boolean Search String').item.json.choices[0].message.content.sheet_name + ' ' + $now }}\n",
|
||||
"options": {},
|
||||
"operation": "create",
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "1M9UUgw1wPZIBSoPiGTvNIgA19ERgOo5KmD9wx__Y8ZY",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1M9UUgw1wPZIBSoPiGTvNIgA19ERgOo5KmD9wx__Y8ZY/edit?usp=drivesdk",
|
||||
"cachedResultName": "Candidates"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsOAuth2Api": {
|
||||
"id": "6wBRjmD77d71tAqP",
|
||||
"name": "Google Sheets account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.5
|
||||
},
|
||||
{
|
||||
"id": "678a0b65-de67-41f0-ada6-23cef1226228",
|
||||
"name": "Add columns to new sheet",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"position": [
|
||||
2220,
|
||||
-180
|
||||
],
|
||||
"parameters": {
|
||||
"columns": {
|
||||
"value": {},
|
||||
"schema": [
|
||||
{
|
||||
"id": "linkedin_url",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "linkedin_url",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
}
|
||||
],
|
||||
"mappingMode": "autoMapInputData",
|
||||
"matchingColumns": [],
|
||||
"attemptToConvertTypes": false,
|
||||
"convertFieldsToString": false
|
||||
},
|
||||
"options": {},
|
||||
"operation": "append",
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "id",
|
||||
"value": "={{ $('Create a new sheet').item.json.sheetId }}"
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "1M9UUgw1wPZIBSoPiGTvNIgA19ERgOo5KmD9wx__Y8ZY",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1M9UUgw1wPZIBSoPiGTvNIgA19ERgOo5KmD9wx__Y8ZY/edit?usp=drivesdk",
|
||||
"cachedResultName": "Candidates"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsOAuth2Api": {
|
||||
"id": "6wBRjmD77d71tAqP",
|
||||
"name": "Google Sheets account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.5
|
||||
},
|
||||
{
|
||||
"id": "767491ab-f7dd-4e23-816b-840bc24e5268",
|
||||
"name": "set page number for google search",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
2480,
|
||||
-180
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "return [{ json: { start: 0 } }];\n"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "f76f28a5-8444-4ff9-b62c-0d94a07c6447",
|
||||
"name": "Extracts all linkedin urls from the google http response",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
3740,
|
||||
-280
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "// Extract LinkedIn profile URLs from HTML\nfunction extractLinkedInUrls(html) {\n // First decode any encoded HTML entities\n html = html.replace(/&/g, '&')\n .replace(/\\\\u003d/g, '=')\n .replace(/\\\\x22/g, '\"')\n .replace(/\\\\x26/g, '&')\n .replace(/\\\\x3e/g, '>')\n .replace(/\\\\x3c/g, '<');\n\n const patterns = [\n // Standard LinkedIn URLs in href\n /(?:https?:)?\\/\\/(?:[a-z]{2,}\\.)?linkedin\\.com\\/in\\/[a-zA-Z0-9._-]+(?:\\/[a-z]{2})?/gi,\n // URLs in encoded strings\n /(?:\"url\"|url=)(?:[^\"&]*?)(?:https?:)?\\/\\/(?:[a-z]{2,}\\.)?linkedin\\.com\\/in\\/[a-zA-Z0-9._-]+(?:\\/[a-z]{2})?/gi,\n // URLs in JSON strings\n /\"(?:https?:)?\\/\\/(?:[a-z]{2,}\\.)?linkedin\\.com\\/in\\/[a-zA-Z0-9._-]+(?:\\/[a-z]{2})?\"/gi\n ];\n\n const urls = new Set();\n \n patterns.forEach(pattern => {\n const matches = html.matchAll(pattern);\n for (const match of matches) {\n let url = match[0];\n \n // Clean up the URL\n url = url.replace(/^\"url\"|^url=|\"$/g, '') // Remove url= prefix and quotes\n .replace(/^[\"']|[\"']$/g, '') // Remove surrounding quotes\n .replace(/\\\\+/g, '') // Remove backslashes\n .trim();\n \n // Ensure URL has protocol\n if (!url.startsWith('http')) {\n url = 'https://' + url.replace(/^\\/\\//, '');\n }\n \n // Only include if it's a LinkedIn profile URL\n if (url.includes('linkedin.com/in/')) {\n // Clean the URL: remove tracking parameters and fragments\n url = url.split(/[?#&]/)[0];\n \n // Remove any trailing slashes\n url = url.replace(/\\/$/, '');\n \n // Add to Set to remove duplicates\n urls.add(url);\n }\n }\n });\n\n return Array.from(urls);\n}\n\n// Get the HTML from input\nconst html = $input.first().json.data;\n\n// Extract URLs and create array of objects\nconst linkedInProfiles = extractLinkedInUrls(html)\n .filter(url => !url.includes('google.com')) // Extra safety check to remove any Google URLs\n .map(url => ({\n linkedin_url: url\n }));\n\n// Return the array of objects directly\nreturn linkedInProfiles;"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "5a93c8f2-f55b-4d0e-92f8-0d86147f8d13",
|
||||
"name": "Google Boolean Search",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
3500,
|
||||
-300
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://www.google.com/search",
|
||||
"options": {},
|
||||
"sendQuery": true,
|
||||
"sendHeaders": true,
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpHeaderAuth",
|
||||
"queryParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "q",
|
||||
"value": "={{ $('Generate a Boolean Search String').first().json.choices[0].message.content.search_string }}\n"
|
||||
},
|
||||
{
|
||||
"name": "start",
|
||||
"value": "={{ $json.start }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "User-Agent",
|
||||
"value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "5T6POWjsPfV558Ta",
|
||||
"name": "Header Auth account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "37b4f264-34f0-47bb-9b1b-fa53beafb2a9",
|
||||
"name": "Generate a Boolean Search String",
|
||||
"type": "@n8n/n8n-nodes-langchain.openAi",
|
||||
"position": [
|
||||
1320,
|
||||
-180
|
||||
],
|
||||
"parameters": {
|
||||
"modelId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gpt-4o-mini",
|
||||
"cachedResultName": "GPT-4O-MINI"
|
||||
},
|
||||
"options": {},
|
||||
"messages": {
|
||||
"values": [
|
||||
{
|
||||
"role": "system",
|
||||
"content": "You are an expert in Boolean search techniques for Google. When the user send a job description, generate a search string specifically for finding LinkedIn profiles. Your response must always follow this exact format:\nsite:linkedin.com/in [Boolean search string]\nCreate the Boolean search string using precise operators (AND, OR, \"\", *, -) to match the job requirements. Focus only on generating the search string - provide no additional commentary or explanations unless specifically requested.\n\nAlso return sheet_name (less than 100 char)"
|
||||
},
|
||||
{
|
||||
"content": "={{ $json.chatInput }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"simplify": false,
|
||||
"jsonOutput": true
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "EX7mky4RGLDD6udW",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"retryOnFail": false,
|
||||
"typeVersion": 1.8
|
||||
},
|
||||
{
|
||||
"id": "99041eff-f094-4c2a-a75a-4b01faf33d1b",
|
||||
"name": "If desired results not reached",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
2920,
|
||||
-200
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "da9f8de0-1e75-4ff3-9f81-8e911251416b",
|
||||
"operator": {
|
||||
"type": "number",
|
||||
"operation": "lt"
|
||||
},
|
||||
"leftValue": "={{ $json.start }}",
|
||||
"rightValue": 50
|
||||
},
|
||||
{
|
||||
"id": "a891c085-7f49-4523-8610-40577b3ffd3b",
|
||||
"operator": {
|
||||
"name": "filter.operator.equals",
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "",
|
||||
"rightValue": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "d218a1e8-2959-4b7c-a84d-f8e0df82c5e7",
|
||||
"name": "Appends the results to the sheet",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"position": [
|
||||
4040,
|
||||
-280
|
||||
],
|
||||
"parameters": {
|
||||
"columns": {
|
||||
"value": {
|
||||
"linkedin_url": "={{ $json.linkedin_url }}"
|
||||
},
|
||||
"schema": [
|
||||
{
|
||||
"id": "linkedin_url",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "linkedin_url",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Full Name",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "Full Name",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "First Name",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "First Name",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Headline",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "Headline",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Candidate Summary",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "Candidate Summary",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Experiences Summary",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Experiences Summary",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Education Summary",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Education Summary",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Skills",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "Skills",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "City",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "City",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Country",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Country",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Criteria_Assessment",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Criteria_Assessment",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "overall_fit_score",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "overall_fit_score",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "score_justification",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "score_justification",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Company",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "Company",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Company Industry",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "Company Industry",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Company Size",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "Company Size",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Company LinkedIn URL",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "Company LinkedIn URL",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Company Website",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "Company Website",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Current Company Join Date",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "Current Company Join Date",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Certifications",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "Certifications",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Courses Taken",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "Courses Taken",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Email",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "Email",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Phone",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "Phone",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Connections Count",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "Connections Count",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Followers Count",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "Followers Count",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Languages Spoken",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "Languages Spoken",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Projects",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "Projects",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Date Created",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "Date Created",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
}
|
||||
],
|
||||
"mappingMode": "defineBelow",
|
||||
"matchingColumns": [],
|
||||
"attemptToConvertTypes": false,
|
||||
"convertFieldsToString": false
|
||||
},
|
||||
"options": {},
|
||||
"operation": "append",
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "id",
|
||||
"value": "={{ $('Create a new sheet').first().json.sheetId }}"
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "1M9UUgw1wPZIBSoPiGTvNIgA19ERgOo5KmD9wx__Y8ZY",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1M9UUgw1wPZIBSoPiGTvNIgA19ERgOo5KmD9wx__Y8ZY/edit?usp=drivesdk",
|
||||
"cachedResultName": "Candidates"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsOAuth2Api": {
|
||||
"id": "6wBRjmD77d71tAqP",
|
||||
"name": "Google Sheets account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.5
|
||||
},
|
||||
{
|
||||
"id": "7a56e7d7-31f8-4115-b993-227bd7221c07",
|
||||
"name": "Adds 10 to start - Go to next page",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
4340,
|
||||
-220
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "// Get the start value from 'Edit Fields2' node\nconst startValue =$('If desired results not reached').first().json.start;\n\n// Add 10 to the start value\nconst start = startValue + 10;\n\n// Return the new value\nreturn [{ json: { start } }];\n"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "afe22fc0-c9c1-4aab-a11d-d91740f812bb",
|
||||
"name": "Columns to add",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
1980,
|
||||
-180
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "return [{\n json: {\n \"linkedin_url\": \"\"\n }\n}];\n"
|
||||
},
|
||||
"typeVersion": 2
|
||||
}
|
||||
],
|
||||
"active": true,
|
||||
"pinData": {},
|
||||
"settings": {},
|
||||
"versionId": "ce389fd9-7697-4e36-8346-6be9414aecf2",
|
||||
"connections": {
|
||||
"Wait": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Google Boolean Search",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Columns to add": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Add columns to new sheet",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Create a new sheet": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Columns to add",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Google Boolean Search": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Extracts all linkedin urls from the google http response",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Add columns to new sheet": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "set page number for google search",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When chat message received": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Generate a Boolean Search String",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"If desired results not reached": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[]
|
||||
]
|
||||
},
|
||||
"Appends the results to the sheet": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Adds 10 to start - Go to next page",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Generate a Boolean Search String": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Create a new sheet",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"set page number for google search": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "If desired results not reached",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Adds 10 to start - Go to next page": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "If desired results not reached",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Extracts all linkedin urls from the google http response": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Appends the results to the sheet",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
1081
workflows/Wait/1727_Wait_Splitout_Create_Webhook.json
Normal file
1081
workflows/Wait/1727_Wait_Splitout_Create_Webhook.json
Normal file
File diff suppressed because it is too large
Load Diff
1001
workflows/Wait/1736_Wait_Schedule_Automation_Webhook.json
Normal file
1001
workflows/Wait/1736_Wait_Schedule_Automation_Webhook.json
Normal file
File diff suppressed because it is too large
Load Diff
896
workflows/Wait/1743_Wait_Code_Sync_Scheduled.json
Normal file
896
workflows/Wait/1743_Wait_Code_Sync_Scheduled.json
Normal file
@@ -0,0 +1,896 @@
|
||||
{
|
||||
"id": "WBkJdubQjVzMUhwi",
|
||||
"meta": {
|
||||
"instanceId": "dec9665c2881b1ce168445537106c667ef9ec805212b046e3d537c8cf9badb2b"
|
||||
},
|
||||
"name": "Shopify to Google Sheets Product Sync Automation",
|
||||
"tags": [
|
||||
{
|
||||
"id": "lw2o8Nrkj1WPXBN9",
|
||||
"name": "template",
|
||||
"createdAt": "2023-12-20T00:14:27.348Z",
|
||||
"updatedAt": "2023-12-20T00:14:27.348Z"
|
||||
}
|
||||
],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "b2a5a0ac-4ce8-4d81-8d7f-01c0e5e35fd7",
|
||||
"name": "Wait1",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
1520,
|
||||
380
|
||||
],
|
||||
"webhookId": "93996a89-7e6c-4f08-9e42-eceb160a7d89",
|
||||
"parameters": {
|
||||
"unit": "seconds",
|
||||
"amount": 10
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "681361ff-0648-46bd-bff2-2f4c4c17624a",
|
||||
"name": "No Operation, do nothing",
|
||||
"type": "n8n-nodes-base.noOp",
|
||||
"position": [
|
||||
1620,
|
||||
180
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "1836d799-a821-44c0-b1a7-7d9354afccd4",
|
||||
"name": "Shopify get products",
|
||||
"type": "n8n-nodes-base.graphql",
|
||||
"position": [
|
||||
320,
|
||||
200
|
||||
],
|
||||
"parameters": {
|
||||
"query": "=query getProducts($first: Int = {{ $json.batchsize }}, $after: String = \"{{ $json.endCursor }}\") {\n products(first: $first, after: $after) {\n edges {\n node {\n title\n tags\n description\n variants(first: 1) {\n edges {\n node {\n price\n }\n }\n }\n }\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n}\n",
|
||||
"endpoint": "https://test-store.myshopify.com/admin/api/2024-01/graphql.json",
|
||||
"authentication": "headerAuth"
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "m0Fan0K6zdS2cpQq",
|
||||
"name": "shopify test store"
|
||||
}
|
||||
},
|
||||
"executeOnce": true,
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "32a79711-c802-44c8-b188-250a782633c0",
|
||||
"name": "Split output",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
760,
|
||||
200
|
||||
],
|
||||
"parameters": {
|
||||
"language": "python",
|
||||
"pythonCode": "new_output = []\nfor item in _input.all():\n products = item.json['data']['products']['edges']\n for product in products:\n new_item = {\n \"data\": {\n \"product\": product['node']\n }\n }\n new_output.append(new_item)\nreturn new_output"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "c7457a0b-9381-4e96-a458-33bf43f2dce1",
|
||||
"name": "Check if there is next page",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
1300,
|
||||
200
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "fd562f28-7126-4f06-8250-6b3a4eb4e481",
|
||||
"operator": {
|
||||
"type": "boolean",
|
||||
"operation": "true",
|
||||
"singleValue": true
|
||||
},
|
||||
"leftValue": "={{ $json.data.products.pageInfo.hasNextPage }}",
|
||||
"rightValue": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "cced491b-b8b5-4109-8bd0-3d51fe0f0b5a",
|
||||
"name": "writing first product details",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"position": [
|
||||
-140,
|
||||
380
|
||||
],
|
||||
"parameters": {
|
||||
"columns": {
|
||||
"value": {
|
||||
"tag": "={{ $json.data.products.edges[0].node.tags }}",
|
||||
"price": "={{ $json.data.products.edges[0].node.variants.edges[0].node.price }}",
|
||||
"title": "={{ $json.data.products.edges[0].node.title }}",
|
||||
"descreption": "={{ $json.data.products.edges[0].node.description }}"
|
||||
},
|
||||
"schema": [
|
||||
{
|
||||
"id": "title",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "title",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "descreption",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "descreption",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "tag",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "tag",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "price",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "price",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
}
|
||||
],
|
||||
"mappingMode": "defineBelow",
|
||||
"matchingColumns": [
|
||||
"title"
|
||||
]
|
||||
},
|
||||
"options": {},
|
||||
"operation": "append",
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gid=0",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1I6JnP8ugqmMD5ktJlNB84J1MlSkoCHhAEuCofSa3OSM/edit#gid=0",
|
||||
"cachedResultName": "Sheet1"
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "1YnGJD7AxV1iiQ-LcxOz3MnTLxGNSC6BBh-2Bh3Yitw0",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1I6JnP8ugqmMD5ktJlNB84J1MlSkoCHhAEuCofSa3OSM/edit?usp=drivesdk",
|
||||
"cachedResultName": "template test"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsOAuth2Api": {
|
||||
"id": "pmrAlq3hgPc4cCvQ",
|
||||
"name": "Google Sheets account"
|
||||
}
|
||||
},
|
||||
"executeOnce": true,
|
||||
"typeVersion": 4.2,
|
||||
"alwaysOutputData": false
|
||||
},
|
||||
{
|
||||
"id": "a72b4230-d242-4ffa-a388-fb3580e66300",
|
||||
"name": "Set cursor",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
1420,
|
||||
740
|
||||
],
|
||||
"parameters": {
|
||||
"fields": {
|
||||
"values": [
|
||||
{
|
||||
"name": "endCursor",
|
||||
"stringValue": "={{ $('Shopify get products').item.json.data.products.pageInfo.endCursor }}"
|
||||
},
|
||||
{
|
||||
"name": "=batchsize",
|
||||
"stringValue": "={{ $('Code').item.json.batchsize }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"include": "none",
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 3.2
|
||||
},
|
||||
{
|
||||
"id": "55a6cb5d-96d0-4577-b74f-d718de9d07cb",
|
||||
"name": "writing remaning product info to google sheets",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"position": [
|
||||
1020,
|
||||
200
|
||||
],
|
||||
"parameters": {
|
||||
"columns": {
|
||||
"value": {
|
||||
"tag": "={{ $json.data.product.tags }}",
|
||||
"price": "={{ $json.data.product.variants.edges[0].node.price }}",
|
||||
"title": "={{ $json.data.product.title }}",
|
||||
"descreption": "={{ $json.data.product.description }}"
|
||||
},
|
||||
"schema": [
|
||||
{
|
||||
"id": "title",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "title",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "descreption",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "descreption",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "tag",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "tag",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "price",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "price",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
}
|
||||
],
|
||||
"mappingMode": "defineBelow",
|
||||
"matchingColumns": [
|
||||
"title"
|
||||
]
|
||||
},
|
||||
"options": {},
|
||||
"operation": "append",
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gid=0",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1I6JnP8ugqmMD5ktJlNB84J1MlSkoCHhAEuCofSa3OSM/edit#gid=0",
|
||||
"cachedResultName": "Sheet1"
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "1YnGJD7AxV1iiQ-LcxOz3MnTLxGNSC6BBh-2Bh3Yitw0",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1I6JnP8ugqmMD5ktJlNB84J1MlSkoCHhAEuCofSa3OSM/edit#gid=0",
|
||||
"cachedResultName": "template test"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsOAuth2Api": {
|
||||
"id": "pmrAlq3hgPc4cCvQ",
|
||||
"name": "Google Sheets account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "a24c4e2a-482f-43d4-8c48-927427a430c0",
|
||||
"name": "Schedule Trigger",
|
||||
"type": "n8n-nodes-base.scheduleTrigger",
|
||||
"position": [
|
||||
-1300,
|
||||
520
|
||||
],
|
||||
"parameters": {
|
||||
"rule": {
|
||||
"interval": [
|
||||
{
|
||||
"daysInterval": 0,
|
||||
"triggerAtHour": 7
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "3a9d27fa-0840-4fc1-9b67-aad2f89f479b",
|
||||
"name": "update Curser",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"position": [
|
||||
640,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"columns": {
|
||||
"value": {
|
||||
"tracker": "cursor",
|
||||
"endCursor": "={{ $json.data.products.pageInfo.endCursor }}"
|
||||
},
|
||||
"schema": [
|
||||
{
|
||||
"id": "tracker",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "tracker",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "endCursor",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "endCursor",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "row_number",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"readOnly": true,
|
||||
"required": false,
|
||||
"displayName": "row_number",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
}
|
||||
],
|
||||
"mappingMode": "defineBelow",
|
||||
"matchingColumns": [
|
||||
"tracker"
|
||||
]
|
||||
},
|
||||
"options": {},
|
||||
"operation": "update",
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": 334929034,
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1I6JnP8ugqmMD5ktJlNB84J1MlSkoCHhAEuCofSa3OSM/edit#gid=0",
|
||||
"cachedResultName": "Curser"
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "1YnGJD7AxV1iiQ-LcxOz3MnTLxGNSC6BBh-2Bh3Yitw0",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1I6JnP8ugqmMD5ktJlNB84J1MlSkoCHhAEuCofSa3OSM/edit#gid=0",
|
||||
"cachedResultName": "Shopify Product Sync test"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsOAuth2Api": {
|
||||
"id": "pmrAlq3hgPc4cCvQ",
|
||||
"name": "Google Sheets account"
|
||||
}
|
||||
},
|
||||
"executeOnce": false,
|
||||
"typeVersion": 4.2,
|
||||
"alwaysOutputData": false
|
||||
},
|
||||
{
|
||||
"id": "a7c1f97c-d88f-457d-9213-36300d277f4b",
|
||||
"name": "If",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
-540,
|
||||
520
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "32b5f953-ae6c-4c50-ac47-591880738d0f",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "empty",
|
||||
"singleValue": true
|
||||
},
|
||||
"leftValue": "={{ $json.endCursor }}",
|
||||
"rightValue": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "23f62f9c-ef85-4e25-9d94-83a1d899ecf8",
|
||||
"name": "Code",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
100,
|
||||
540
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "let mergedJson = {};\n\ntry {\n const batch_size = $(\"BatchSize\").all(0, 0);\n if (batch_size.length > 0 && batch_size[0].json) {\n Object.assign(mergedJson, batch_size[0].json);\n }\n} catch (error) {\n console.log(\"BatchSize data not available\");\n}\n\nlet endCursorFound = false;\ntry {\n const last_cursor = $(\"LastCursor\").all(0, 0);\n if (last_cursor.length > 0 && last_cursor[0].json) {\n Object.assign(mergedJson, last_cursor[0].json);\n if (last_cursor[0].json.endCursor) {\n mergedJson.endCursor = last_cursor[0].json.endCursor;\n endCursorFound = true;\n }\n }\n} catch (error) {\n console.log(\"LastCursor data not available\");\n}\n\nif (!endCursorFound) {\n try {\n const shopify_initial = $(\"shopify-initial\").all(0, 0);\n if (shopify_initial.length > 0 && shopify_initial[0].json && shopify_initial[0].json.data && shopify_initial[0].json.data.products && shopify_initial[0].json.data.products.pageInfo) {\n mergedJson.endCursor = shopify_initial[0].json.data.products.pageInfo.endCursor;\n }\n } catch (error) {\n console.log(\"Shopify data not available\");\n }\n}\n\nif (Object.keys(mergedJson).length === 0 || mergedJson.hasOwnProperty('error')) {\n return [{ json: { error: \"No data available. Ensure relevant nodes have been executed.\" } }];\n}\n\nreturn [{ json: mergedJson }];"
|
||||
},
|
||||
"executeOnce": true,
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "f1262f15-757f-4cc2-9453-fed17ad66b56",
|
||||
"name": "BatchSize",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
-1080,
|
||||
520
|
||||
],
|
||||
"parameters": {
|
||||
"fields": {
|
||||
"values": [
|
||||
{
|
||||
"name": "batchsize",
|
||||
"type": "numberValue",
|
||||
"numberValue": "100"
|
||||
}
|
||||
]
|
||||
},
|
||||
"include": "selected",
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 3.2
|
||||
},
|
||||
{
|
||||
"id": "e885b0e7-e435-40ae-be21-77fd992c3114",
|
||||
"name": "LastCursor",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"position": [
|
||||
-720,
|
||||
520
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": 334929034,
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1I6JnP8ugqmMD5ktJlNB84J1MlSkoCHhAEuCofSa3OSM/edit#gid=0",
|
||||
"cachedResultName": "Curser"
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "1YnGJD7AxV1iiQ-LcxOz3MnTLxGNSC6BBh-2Bh3Yitw0",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1I6JnP8ugqmMD5ktJlNB84J1MlSkoCHhAEuCofSa3OSM/edit#gid=0",
|
||||
"cachedResultName": "Shopify Product Sync test"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsOAuth2Api": {
|
||||
"id": "pmrAlq3hgPc4cCvQ",
|
||||
"name": "Google Sheets account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2,
|
||||
"alwaysOutputData": true
|
||||
},
|
||||
{
|
||||
"id": "ae3cf866-8695-4b63-b631-a6b00e29c7cb",
|
||||
"name": "shopify-initial",
|
||||
"type": "n8n-nodes-base.graphql",
|
||||
"position": [
|
||||
-300,
|
||||
380
|
||||
],
|
||||
"parameters": {
|
||||
"query": "=query getProducts($first: Int = 1) {\n products(first: $first) {\n edges {\n node {\n title\n tags\n description\n variants(first: 1) {\n edges {\n node {\n price\n }\n }\n }\n }\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n}\n",
|
||||
"endpoint": "https://test-store-collection.myshopify.com/admin/api/2024-01/graphql.json",
|
||||
"authentication": "headerAuth"
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "m0Fan0K6zdS2cpQq",
|
||||
"name": "shopify test store"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "8aab80ca-1a54-4d02-a8e8-37d037a12132",
|
||||
"name": "Check cursor is not empty",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
420,
|
||||
20
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "329a4250-3fe7-4c73-8918-d41f7b38ff5a",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "notEmpty",
|
||||
"singleValue": true
|
||||
},
|
||||
"leftValue": "={{ $json.data.products.pageInfo.endCursor }}",
|
||||
"rightValue": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "9e7c2e36-71f6-4fdf-a3b9-8aa3bf02d09b",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-1500,
|
||||
-400
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 352.8896103896103,
|
||||
"height": 295.09740259740255,
|
||||
"content": "This workflow automates the synchronization of product data from a Shopify store to a Google Sheets document, ensuring seamless management and tracking. It retrieves product details such as title, tags, description, and price from Shopify via GraphQL queries. The outcome is a comprehensive list of products neatly organized in Google Sheets for easy access and analysis."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "fbf62e09-3598-4f5c-b83a-a8b3e5371afb",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-1420,
|
||||
340
|
||||
],
|
||||
"parameters": {
|
||||
"width": 262.2077922077919,
|
||||
"height": 343.21428571428567,
|
||||
"content": "Schedule Trigger: Sets the timing for the automation to run, ensuring regular updates. Currently set to trigger every day at 7:00 AM"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "47abe6ba-a7de-410e-b634-8ad248ec7155",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-1140,
|
||||
360
|
||||
],
|
||||
"parameters": {
|
||||
"color": 3,
|
||||
"width": 275.1623376623376,
|
||||
"height": 411.6883116883117,
|
||||
"content": "BatchSize: Defines the number of products to fetch from Shopify at a time, optimizing data retrieval. Currently set to 100, but it can be adjusted to a maximum of 250 for a single run"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "6415976b-5fa5-4cd4-aa86-58eb9749a878",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-820,
|
||||
260
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 275.16233766233773,
|
||||
"height": 419.0909090909093,
|
||||
"content": "LastCursor: Checks if the last cursor data is already present in Google Sheets to facilitate incremental data fetching. This ensures that the synchronization process does not start from the beginning each time, optimizing efficiency by picking up where it left off"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "6a15e240-111e-4c7d-a865-2484a7a6ff0c",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-380,
|
||||
-160
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 450.9740259740258,
|
||||
"height": 705.941558441558,
|
||||
"content": "Shopify-initial: Fetches the initial set of products from the Shopify store to start the synchronization process. This node will only run once if there is no cursor found in the previous node, which retrieves the cursor and the first set of products"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "71640487-d3cf-4ede-8677-093108770720",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-160,
|
||||
560
|
||||
],
|
||||
"parameters": {
|
||||
"color": 6,
|
||||
"width": 416.49350649350646,
|
||||
"height": 402.4350649350655,
|
||||
"content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nThis code node merges data from different sources (BatchSize, LastCursor, and Shopify-initial) to ensure the synchronization process starts efficiently and picks up where it left off. It checks for available data and retrieves the last cursor position from Google Sheets to facilitate incremental data fetching."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "a13069b8-36f9-4604-895e-55c51ae3be2c",
|
||||
"name": "Sticky Note6",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
660,
|
||||
200
|
||||
],
|
||||
"parameters": {
|
||||
"width": 304.7727272727272,
|
||||
"height": 330.2597402597403,
|
||||
"content": "\n\n\n\n\n\n\n\n\n\nThe \"Split output\" node acts as a bridge between data retrieval and subsequent processing nodes. Since the Shopify node fetches batches of 100 results at a time, this node splits those batches into individual product entries, ensuring seamless processing and storage of each product's details in subsequent workflow steps"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "8c1401ad-e7be-47a9-b01d-3606b9f20bf0",
|
||||
"name": "Sticky Note7",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1400,
|
||||
620
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 388.0519480519479,
|
||||
"height": 367.27272727272714,
|
||||
"content": "Set cursor: Updates the cursor for the next page of products to fetch from Shopify."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "a5d3c62c-1bf3-4bc7-9e2b-1b5883b385d1",
|
||||
"name": "Sticky Note8",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-32.17532467532425,
|
||||
20
|
||||
],
|
||||
"parameters": {
|
||||
"color": 3,
|
||||
"width": 428.7662337662332,
|
||||
"height": 342.79220779220765,
|
||||
"content": "The GraphQL query within this node is crafted to extract essential product details such as title, description, tags, and price. This query can be customized to fetch additional product information as needed for specific synchronization requirements."
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "c640732c-55b5-4f2e-bb64-106c440b0abc",
|
||||
"connections": {
|
||||
"If": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "shopify-initial",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Code",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Code": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Shopify get products",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait1": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Set cursor",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"BatchSize": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "LastCursor",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"LastCursor": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "If",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Set cursor": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Shopify get products",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Split output": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "writing remaning product info to google sheets",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"shopify-initial": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "writing first product details",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Schedule Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "BatchSize",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Shopify get products": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Split output",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Check cursor is not empty",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Check cursor is not empty": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "update Curser",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Check if there is next page": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "No Operation, do nothing",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Wait1",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"writing first product details": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Code",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"writing remaning product info to google sheets": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Check if there is next page",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
1068
workflows/Wait/1745_Wait_Code_Automation_Webhook.json
Normal file
1068
workflows/Wait/1745_Wait_Code_Automation_Webhook.json
Normal file
File diff suppressed because one or more lines are too long
532
workflows/Wait/1746_Wait_Code_Monitor_Webhook.json
Normal file
532
workflows/Wait/1746_Wait_Code_Monitor_Webhook.json
Normal file
@@ -0,0 +1,532 @@
|
||||
{
|
||||
"id": "WGUpujme8ctIkBF8",
|
||||
"meta": {
|
||||
"instanceId": "431560c610ab26f4776059ff809760704293c90767af32183943d4c54ac57441",
|
||||
"templateCredsSetupCompleted": true
|
||||
},
|
||||
"name": "Live link checker",
|
||||
"tags": [],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "40009961-9c97-49ee-b9ce-440e65b41e47",
|
||||
"name": "Loop Over Items",
|
||||
"type": "n8n-nodes-base.splitInBatches",
|
||||
"position": [
|
||||
-280,
|
||||
200
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "85a73ac8-a8c6-4b5e-a870-3b1a58336037",
|
||||
"name": "When clicking ‘Test workflow’",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
-1060,
|
||||
200
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "a1495fc5-d39d-4cf5-b8d3-a804d82ba1a5",
|
||||
"name": "Reads Google Sheets",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"position": [
|
||||
-780,
|
||||
200
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"dataLocationOnSheet": {
|
||||
"values": {
|
||||
"range": "D1:E",
|
||||
"rangeDefinition": "specifyRangeA1"
|
||||
}
|
||||
}
|
||||
},
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": 1573787772,
|
||||
"cachedResultUrl": "",
|
||||
"cachedResultName": "Lost links"
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "10CYntk8OmYemJBpcfs1dH_7p_PJxiBMpsfATtLYw7jI",
|
||||
"cachedResultUrl": "",
|
||||
"cachedResultName": "Sheet with lost links"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsOAuth2Api": {
|
||||
"id": "shxBIVyk68LlqTnb",
|
||||
"name": "Google Sheets account 3"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.5
|
||||
},
|
||||
{
|
||||
"id": "bd055fee-f66b-4b1d-9ee2-3581021d8b1f",
|
||||
"name": "Cleans backlink url",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
-560,
|
||||
200
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "return items.map(item => {\n let url = item.json['Backlink URL']; // Get the URL from the current item's JSON\n let domain = url.match(/https?:\\/\\/(?:www\\.)?([^/]+)/)[1]; \n return { json: { domain, url } };\n});\n$input.first().json['Backlink URL']"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "030b04e9-da35-4448-b2f4-c1543eafabf5",
|
||||
"name": "Sends HTTP POST Request to DataForSEO",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
-20,
|
||||
220
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://api.dataforseo.com/v3/on_page/task_post",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"jsonBody": "=[{\n\"target\": \"{{ $json.domain }}\",\n\"start_url\": \"{{ $json.url }}\",\n\"max_crawl_pages\": 1\n}]",
|
||||
"sendBody": true,
|
||||
"specifyBody": "json",
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpBasicAuth"
|
||||
},
|
||||
"credentials": {
|
||||
"httpBasicAuth": {
|
||||
"id": "MeuonUXyXYX6lg4R",
|
||||
"name": "Unnamed credential"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "6ac33fbd-2daf-4b5f-a7a2-fe742294765b",
|
||||
"name": "Waits 20 seconds",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
200,
|
||||
220
|
||||
],
|
||||
"webhookId": "f1cc4df1-6443-4ecd-8708-fd40858f3762",
|
||||
"parameters": {
|
||||
"amount": 20
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "2213992d-d782-4357-8f59-87a8afb3f7f1",
|
||||
"name": "Sends HTTP links request to DataforSeo",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"onError": "continueRegularOutput",
|
||||
"position": [
|
||||
440,
|
||||
220
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://api.dataforseo.com/v3/on_page/links",
|
||||
"method": "POST",
|
||||
"options": {
|
||||
"batching": {
|
||||
"batch": {
|
||||
"batchSize": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"jsonBody": "=[\n {\n \"id\": \"{{ $json.tasks[0].id }}\"\n }\n]\n",
|
||||
"sendBody": true,
|
||||
"specifyBody": "json",
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpBasicAuth"
|
||||
},
|
||||
"credentials": {
|
||||
"httpBasicAuth": {
|
||||
"id": "MeuonUXyXYX6lg4R",
|
||||
"name": "Unnamed credential"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2,
|
||||
"alwaysOutputData": false
|
||||
},
|
||||
{
|
||||
"id": "ab3b47d7-381a-48e9-aad3-8555d6c36145",
|
||||
"name": "Checks which backlinks exists on the landing page",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
680,
|
||||
220
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "runOnceForEachItem",
|
||||
"jsCode": "const result = $json.tasks?.[0]?.result?.[0];\nconst links = result?.items || []; // Safe fallback to an empty array\n\nlet backlink = $('Reads Google Sheets').item.json['Landing page']; // Expected backlink\n\n// Find the backlink in the scraped data\nlet foundLink = links.find(link => link.link_to === backlink);\n\n// Check if the backlink exists and if it's dofollow\nlet status = \"Lost\"; // Default to lost\nif (foundLink) {\n status = foundLink.dofollow ? \"Live\" : \"Lost (Nofollow)\";\n}\n\nreturn {\n json: {\n backlink: backlink,\n status: status\n }\n};\n"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "d07a8791-74d9-4f86-b9d8-e0847406a96e",
|
||||
"name": "Sends data to Google sheets",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"position": [
|
||||
900,
|
||||
220
|
||||
],
|
||||
"parameters": {
|
||||
"columns": {
|
||||
"value": {
|
||||
"Status": "={{ $json.status }}",
|
||||
"Backlink URL": "={{ $('Loop Over Items').item.json.url }}"
|
||||
},
|
||||
"schema": [
|
||||
{
|
||||
"id": "Company",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "Company",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Contact A",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "Contact A",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Channel",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "Channel",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Backlink URL",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Backlink URL",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Landing page",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "Landing page",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Anchor",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "Anchor",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Money out",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "Money out",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Money in",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "Money in",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Invoice OUT",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "Invoice OUT",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Invoice IN",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "Invoice IN",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Invoice out status",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "Invoice out status",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Invoice in status",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "Invoice in status",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Status",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "Status",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
}
|
||||
],
|
||||
"mappingMode": "defineBelow",
|
||||
"matchingColumns": [
|
||||
"Backlink URL"
|
||||
],
|
||||
"attemptToConvertTypes": false,
|
||||
"convertFieldsToString": false
|
||||
},
|
||||
"options": {},
|
||||
"operation": "appendOrUpdate",
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": 1573787772,
|
||||
"cachedResultUrl": "",
|
||||
"cachedResultName": "Lost links"
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "10CYntk8OmYemJBpcfs1dH_7p_PJxiBMpsfATtLYw7jI",
|
||||
"cachedResultUrl": "",
|
||||
"cachedResultName": "Sheet with lost links"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsOAuth2Api": {
|
||||
"id": "shxBIVyk68LlqTnb",
|
||||
"name": "Google Sheets account 3"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.5
|
||||
},
|
||||
{
|
||||
"id": "f241c2f2-6a0b-4709-92ff-c6c11f9477f5",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-880,
|
||||
-200
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 300,
|
||||
"height": 340,
|
||||
"content": "Connect your Google Sheets account.\nEnsure your Google Sheet has clearly defined columns:\n\n\"Backlink URL\": URL of the page containing the backlink.\n\n\"Landing page\": The exact URL of your website page you're checking the backlink for.\n\nDefine your data range explicitly (e.g., D1:E) to accurately fetch these columns. The columns must be named exactly as specified to ensure the workflow functions correctly."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "42390706-6877-4f67-92d5-fcc13903bb6c",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-140,
|
||||
-320
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 380,
|
||||
"height": 480,
|
||||
"content": "## Configure your DataForSEO TASK POST NODE\n(Basic Authentication). Insert your API key and password into n8n's Credentials settings. This node sends each URL/domain pair to the DataForSEO On-Page API for analysis.\n\n\nSettings:\n\nMethod:POST\n\nURL:https://api.dataforseo.com/v3/on_page/task_post\n\nJSON body:\n\n[{\n \"target\": \"{{ $json.domain }}\",\n \"start_url\": \"{{ $json.url }}\",\n \"max_crawl_pages\": 1\n}]\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "60d54c3d-a2be-4961-9932-4075d769896e",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
300,
|
||||
-320
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 400,
|
||||
"height": 480,
|
||||
"content": "## Configure your DataForSEO ON-PAGE LINKS NODE\n\nFetches the results from DataForSEO. Ensure your credentials are properly set (same as the previous DataForSEO node). This node retrieves link data, checking if the backlink exists and its status (dofollow/nofollow).\n\nSettings: \nMethod: Post\n\nURL:https://api.dataforseo.com/v3/on_page/links\n\nJSON body example:\n\n[\n {\n \"id\": \"{{ $json.tasks[0].id }}\"\n }\n]\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "1d800e2a-4385-4f98-b891-c40c7706bdee",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
760,
|
||||
-260
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 440,
|
||||
"height": 400,
|
||||
"content": "## Send data to Google Sheets\n\nThis node updates your Google Sheet with backlink check results.\n\nMap each column manually as follows:\n\nMatching Column (used to find the correct row): Backlink URL\n\nBacklink URL: {{ $('Loop Over Items').item.json.url }}\n\nStatus: {{ $json.status }}\n\nMake sure these columns (Backlink URL and Status) already exist in your Google Sheet and have these exact names.\n\nThis will correctly update the backlink status (e.g., Live, Lost, or Lost (Nofollow)) based on each URL processed."
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"pinData": {
|
||||
"When clicking ‘Test workflow’": [
|
||||
{
|
||||
"json": {}
|
||||
}
|
||||
]
|
||||
},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "f74ca31f-8b7c-48d9-9b5f-d8295c642497",
|
||||
"connections": {
|
||||
"Loop Over Items": {
|
||||
"main": [
|
||||
[],
|
||||
[
|
||||
{
|
||||
"node": "Sends HTTP POST Request to DataForSEO",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Waits 20 seconds": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Sends HTTP links request to DataforSeo",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Cleans backlink url": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop Over Items",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Reads Google Sheets": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Cleans backlink url",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Sends data to Google sheets": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop Over Items",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When clicking ‘Test workflow’": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Reads Google Sheets",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Sends HTTP POST Request to DataForSEO": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Waits 20 seconds",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Sends HTTP links request to DataforSeo": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Checks which backlinks exists on the landing page",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Checks which backlinks exists on the landing page": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Sends data to Google sheets",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
578
workflows/Wait/1763_Wait_Schedule_Automation_Webhook.json
Normal file
578
workflows/Wait/1763_Wait_Schedule_Automation_Webhook.json
Normal file
@@ -0,0 +1,578 @@
|
||||
{
|
||||
"id": "XiwLd0JwGmDoY0mr",
|
||||
"meta": {
|
||||
"instanceId": "a4bfc93e975ca233ac45ed7c9227d84cf5a2329310525917adaf3312e10d5462",
|
||||
"templateCredsSetupCompleted": true
|
||||
},
|
||||
"name": "Image-to-3D",
|
||||
"tags": [],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "8cc77575-854f-4359-8faa-fc78b8c23b65",
|
||||
"name": "When clicking ‘Test workflow’",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
-220,
|
||||
400
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "0dc7e6b8-43b8-4b9a-aa7a-4a100598162f",
|
||||
"name": "Get status",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
840,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://queue.fal.run/fal-ai/trellis/requests/{{ $('Create 3D Image').item.json.request_id }}/status ",
|
||||
"options": {},
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpHeaderAuth"
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "daOZafXpRXLtoLUV",
|
||||
"name": "Fal.run API"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "7540df1c-35e2-4ac5-871d-4d8410217979",
|
||||
"name": "Wait 60 sec.",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
660,
|
||||
400
|
||||
],
|
||||
"webhookId": "e10e9912-38e7-4e1f-ad7e-52b1e6a65d79",
|
||||
"parameters": {
|
||||
"amount": 60
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "44c4b506-2a14-40ca-a75f-7af86ef5a9af",
|
||||
"name": "Schedule Trigger",
|
||||
"type": "n8n-nodes-base.scheduleTrigger",
|
||||
"position": [
|
||||
-220,
|
||||
260
|
||||
],
|
||||
"parameters": {
|
||||
"rule": {
|
||||
"interval": [
|
||||
{
|
||||
"field": "minutes"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "ca8b3bcd-3eb6-4723-b2ea-a973582d46af",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-220,
|
||||
-860
|
||||
],
|
||||
"parameters": {
|
||||
"color": 3,
|
||||
"width": 740,
|
||||
"height": 520,
|
||||
"content": "# Image-to-3D\n\n\nThis workflow allows users to convert a 2D image into a 3D model by integrating multiple AI and web services. The process begins with a user uploading or providing an image URL, which is then sent to a generative AI model capable of interpreting the content and generating a 3D representation in .glb format. The model is then stored and a download link is returned to the user.\n\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "2230e7a5-225d-4538-b091-a9fbeedb1323",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-220,
|
||||
-300
|
||||
],
|
||||
"parameters": {
|
||||
"width": 740,
|
||||
"height": 200,
|
||||
"content": "## STEP 1 - GOOGLE SHEET\nCreate a [Google Sheet like this](https://docs.google.com/spreadsheets/d/1C0Et6X3Zwr_6CxeNjhLpDwjAfIGeUvLGFawckKb0utY/edit?usp=sharing).\n\nPlease insert:\n- in the \"IMAGE MODEL\" column the basic image of the model to dress\n\nLeave the \"3D RESULT\" column unfilled. It will be inserted by the system once the image has been created"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "3aad3211-e6fc-4e4b-9c59-7dd82827a43b",
|
||||
"name": "Completed?",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
1020,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "383d112e-2cc6-4dd4-8985-f09ce0bd1781",
|
||||
"operator": {
|
||||
"name": "filter.operator.equals",
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json.status }}",
|
||||
"rightValue": "COMPLETED"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "6ad70838-dbf4-4cb1-9b61-4cf6e1fcdf6a",
|
||||
"name": "Update result",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"position": [
|
||||
440,
|
||||
780
|
||||
],
|
||||
"parameters": {
|
||||
"columns": {
|
||||
"value": {
|
||||
"row_number": "={{ $('Get new image').item.json.row_number }}",
|
||||
"IMAGE RESULT": "={{ $('Get Url 3D image').item.json.model_mesh.url }}"
|
||||
},
|
||||
"schema": [
|
||||
{
|
||||
"id": "IMAGE MODEL",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "IMAGE MODEL",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "IMAGE PRODUCT",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "IMAGE PRODUCT",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "PRODUCT ID",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "PRODUCT ID",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "IMAGE RESULT",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "IMAGE RESULT",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "row_number",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"readOnly": true,
|
||||
"required": false,
|
||||
"displayName": "row_number",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
}
|
||||
],
|
||||
"mappingMode": "defineBelow",
|
||||
"matchingColumns": [
|
||||
"row_number"
|
||||
],
|
||||
"attemptToConvertTypes": false,
|
||||
"convertFieldsToString": false
|
||||
},
|
||||
"options": {},
|
||||
"operation": "update",
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gid=0",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/11ebWJvwwXHgvQld9kxywKQUvIoBw6xMa0g0BuIqHDxE/edit#gid=0",
|
||||
"cachedResultName": "Foglio1"
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "1C0Et6X3Zwr_6CxeNjhLpDwjAfIGeUvLGFawckKb0utY",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1C0Et6X3Zwr_6CxeNjhLpDwjAfIGeUvLGFawckKb0utY/edit?usp=drivesdk",
|
||||
"cachedResultName": "Image to 3D"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsOAuth2Api": {
|
||||
"id": "JYR6a64Qecd6t8Hb",
|
||||
"name": "Google Sheets account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.5
|
||||
},
|
||||
{
|
||||
"id": "239b45b3-94cc-43a9-aa2e-2c85725f4cc0",
|
||||
"name": "Set data",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
220,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "c713d31f-9abd-496a-ac79-e8e2efe60aa0",
|
||||
"name": "image",
|
||||
"type": "string",
|
||||
"value": "={{ $json['IMAGE'] }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "70908a7d-72a5-4131-a82b-ed455a453fd5",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-220,
|
||||
120
|
||||
],
|
||||
"parameters": {
|
||||
"width": 740,
|
||||
"height": 100,
|
||||
"content": "## STEP 3 - MAIN FLOW\nStart the workflow manually or periodically by hooking the \"Schedule Trigger\" node. It is recommended to set it at 5 minute intervals."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "d81f8aa0-3302-4a26-9425-aeb2a87674e7",
|
||||
"name": "Sticky Note6",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-220,
|
||||
-60
|
||||
],
|
||||
"parameters": {
|
||||
"width": 740,
|
||||
"height": 140,
|
||||
"content": "## STEP 2 - GET API KEY (YOURAPIKEY)\nCreate an account [here](https://fal.ai/) and obtain API KEY.\nIn the node \"Create Image\" set \"Header Auth\" and set:\n- Name: \"Authorization\"\n- Value: \"Key YOURAPIKEY\""
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "484d029d-b88f-48bb-b487-e7a50b47eb7d",
|
||||
"name": "Sticky Note7",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
400,
|
||||
340
|
||||
],
|
||||
"parameters": {
|
||||
"width": 180,
|
||||
"height": 200,
|
||||
"content": "Set API Key created in Step 2"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "7061d7c1-7da8-473c-98a3-57dc15def557",
|
||||
"name": "Get new image",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"position": [
|
||||
0,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"filtersUI": {
|
||||
"values": [
|
||||
{
|
||||
"lookupColumn": "3D RESULT"
|
||||
}
|
||||
]
|
||||
},
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gid=0",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1C0Et6X3Zwr_6CxeNjhLpDwjAfIGeUvLGFawckKb0utY/edit#gid=0",
|
||||
"cachedResultName": "Foglio1"
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "1C0Et6X3Zwr_6CxeNjhLpDwjAfIGeUvLGFawckKb0utY",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1C0Et6X3Zwr_6CxeNjhLpDwjAfIGeUvLGFawckKb0utY/edit?usp=drivesdk",
|
||||
"cachedResultName": "Image to 3D"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsOAuth2Api": {
|
||||
"id": "JYR6a64Qecd6t8Hb",
|
||||
"name": "Google Sheets account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.5
|
||||
},
|
||||
{
|
||||
"id": "edcdc4f0-4e7f-4fec-af9c-bbe8bf6bd8e6",
|
||||
"name": "Create 3D Image",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
440,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://queue.fal.run/fal-ai/trellis",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"jsonBody": "={\n \"image_url\": \"{{ $json.image }}\",\n \"ss_guidance_strength\": 7.5,\n \"ss_sampling_steps\": 12,\n \"slat_guidance_strength\": 3,\n \"slat_sampling_steps\": 12,\n \"mesh_simplify\": 0.95,\n \"texture_size\": 1024\n}",
|
||||
"sendBody": true,
|
||||
"sendHeaders": true,
|
||||
"specifyBody": "json",
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpHeaderAuth",
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Content-Type",
|
||||
"value": "application/json"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "daOZafXpRXLtoLUV",
|
||||
"name": "Fal.run API"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "9ac6f843-090f-4c15-88e7-46ee494ed1b9",
|
||||
"name": "Get Url 3D image",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
-220,
|
||||
780
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://queue.fal.run/fal-ai/trellis/requests/{{ $json.request_id }}",
|
||||
"options": {},
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpHeaderAuth"
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "daOZafXpRXLtoLUV",
|
||||
"name": "Fal.run API"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "a02ac260-c88a-4c5a-9fc6-7230b95c462b",
|
||||
"name": "Get File 3D image",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
0,
|
||||
780
|
||||
],
|
||||
"parameters": {
|
||||
"url": "={{ $json.model_mesh.url }}",
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "311be624-4707-4361-a58a-ee90ff42490c",
|
||||
"name": "Upload 3D Image",
|
||||
"type": "n8n-nodes-base.googleDrive",
|
||||
"position": [
|
||||
220,
|
||||
780
|
||||
],
|
||||
"parameters": {
|
||||
"name": "={{ $now.format('yyyyLLddHHmmss') }}-{{ $('Get Url 3D image').item.json.model_mesh.file_name }}",
|
||||
"driveId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "My Drive"
|
||||
},
|
||||
"options": {},
|
||||
"folderId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "1aHRwLWyrqfzoVC8HoB-YMrBvQ4tLC-NZ",
|
||||
"cachedResultUrl": "https://drive.google.com/drive/folders/1aHRwLWyrqfzoVC8HoB-YMrBvQ4tLC-NZ",
|
||||
"cachedResultName": "Fal.run"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleDriveOAuth2Api": {
|
||||
"id": "HEy5EuZkgPZVEa9w",
|
||||
"name": "Google Drive account (n3w.it)"
|
||||
}
|
||||
},
|
||||
"typeVersion": 3
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "2f0d3488-25ac-4332-a8e3-62d7b34b96ae",
|
||||
"connections": {
|
||||
"Set data": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Create 3D Image",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Completed?": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Url 3D image",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Wait 60 sec.",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get status": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Completed?",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait 60 sec.": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get status",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get new image": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Set data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Update result": {
|
||||
"main": [
|
||||
[]
|
||||
]
|
||||
},
|
||||
"Create 3D Image": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait 60 sec.",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Upload 3D Image": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Update result",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Url 3D image": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get File 3D image",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get File 3D image": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Upload 3D Image",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When clicking ‘Test workflow’": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get new image",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
458
workflows/Wait/1771_Wait_Code_Automate_Webhook.json
Normal file
458
workflows/Wait/1771_Wait_Code_Automate_Webhook.json
Normal file
@@ -0,0 +1,458 @@
|
||||
{
|
||||
"id": "YOUR_WORKFLOW_ID",
|
||||
"meta": {
|
||||
"instanceId": "YOUR_INSTANCE_ID",
|
||||
"templateCredsSetupCompleted": true
|
||||
},
|
||||
"name": "Automated Content Generation & Publishing - Wordpress",
|
||||
"tags": [],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "9cd63357-19dc-4420-baa9-1e1389c7120f",
|
||||
"name": "Create posts on Wordpress",
|
||||
"type": "n8n-nodes-base.wordpress",
|
||||
"position": [
|
||||
1180,
|
||||
280
|
||||
],
|
||||
"parameters": {
|
||||
"title": "={{ $('Save to Sheet').item.json['title'] }}",
|
||||
"additionalFields": {
|
||||
"status": "publish",
|
||||
"content": "=<img src=\"{{ $('Automated Image Retrieval from Pexels').item.json.photos[0].src.landscape }}\" alt=\"image text\" style=\"width:100%; height:auto;\"><br><br>\n<br><br>\n{{ $node['Save to Sheet'].json['content'] }}"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"wordpressApi": {
|
||||
"id": "YOUR_WORDPRESS_CREDENTIAL_ID",
|
||||
"name": "Wordpress account 2"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1,
|
||||
"alwaysOutputData": false
|
||||
},
|
||||
{
|
||||
"id": "65f62f19-d10f-4ca1-a853-9cedb3506743",
|
||||
"name": "Processing Delay",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
180,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "const delay = Math.floor(Math.random() * (6 * 60 * 60 * 1000)); // random delay 0-6 hour\nreturn {\n json: {\n delay: delay,\n delay_minutes: Math.round(delay / 60000), // to minutes\n delay_hours: (delay / 3600000).toFixed(2) // to hours\n }\n};\n"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "193d2876-c50e-4b9e-8856-9fd11baa025e",
|
||||
"name": "Random Wait",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
180,
|
||||
760
|
||||
],
|
||||
"webhookId": "61377399-ce9f-497a-80b1-aab29fc9fb69",
|
||||
"parameters": {
|
||||
"amount": "={{$json[\"delay\"] / 1000}}"
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "cf510c21-7c19-4e84-a43a-62d170277cdf",
|
||||
"name": "Save to Sheet",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"position": [
|
||||
780,
|
||||
280
|
||||
],
|
||||
"parameters": {
|
||||
"columns": {
|
||||
"value": {
|
||||
"title": "={{ $json.message.content.title }}",
|
||||
"content": "={{ $json.message.content.content }}",
|
||||
"Image search keyword": "={{ $json.message.content.keywords.join(\"+\") }}"
|
||||
},
|
||||
"schema": [
|
||||
{
|
||||
"id": "title",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "title",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "content",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "content",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Image search keyword",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "Image search keyword",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
}
|
||||
],
|
||||
"mappingMode": "defineBelow",
|
||||
"matchingColumns": []
|
||||
},
|
||||
"options": {},
|
||||
"operation": "append",
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "name",
|
||||
"value": "Sheet1"
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "url",
|
||||
"value": "YOURDOCUMENT_URL"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsOAuth2Api": {
|
||||
"id": "YOUR_GOOGLE_SHEETS_CREDENTIAL_ID",
|
||||
"name": "Google Sheets account_正確"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.5
|
||||
},
|
||||
{
|
||||
"id": "1778f649-c09e-4ef9-b153-4160eed6805c",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-220,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"width": 607.503259452412,
|
||||
"height": 892.7656453715782,
|
||||
"content": "## Automated Article Scheduling\n\n**1. Fast Bulk Article Generation**\nQuickly create multiple AI-generated articles.\nEfficiently streamline content creation.\nReduces manual effort while maintaining quality.\n\n**2. Workflow Testing Before Execution**\nManually test the workflow for debugging.\nEnsure each step runs as expected.\nOptimize before full automation.\n\n**3. Automated & Randomized Publishing**\nSchedule posts at predefined intervals.\nIntroduce random delays for a natural posting pattern.\nPrevents overly predictable publishing behavior."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "6f385e8c-b3e6-4456-9738-e85ea2cbbea1",
|
||||
"name": "1. Auto Start",
|
||||
"type": "n8n-nodes-base.scheduleTrigger",
|
||||
"disabled": true,
|
||||
"position": [
|
||||
180,
|
||||
20
|
||||
],
|
||||
"parameters": {
|
||||
"rule": {
|
||||
"interval": [
|
||||
{
|
||||
"field": "minutes",
|
||||
"minutesInterval": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "6d7712e8-9033-453b-ad52-09f718bcb701",
|
||||
"name": "2. When clicking ‘Test workflow’",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"disabled": true,
|
||||
"position": [
|
||||
180,
|
||||
200
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "0fd8fe8f-a0d5-42d9-b728-53340c6e4233",
|
||||
"name": "3. Schedule Your Posts",
|
||||
"type": "n8n-nodes-base.scheduleTrigger",
|
||||
"position": [
|
||||
180,
|
||||
380
|
||||
],
|
||||
"parameters": {
|
||||
"rule": {
|
||||
"interval": [
|
||||
{
|
||||
"field": "weeks",
|
||||
"triggerAtDay": [
|
||||
2,
|
||||
4,
|
||||
0
|
||||
],
|
||||
"triggerAtHour": "={{ 12 }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "16c26c36-fb8e-4903-a64c-57803fac83b9",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
400,
|
||||
440
|
||||
],
|
||||
"parameters": {
|
||||
"width": 351.77682676671327,
|
||||
"height": 271.4285686334568,
|
||||
"content": "## AI Content Generating\n\n**Automatic Content & Keyword Generation\n\n- Use your own prompt to start\n- ChatGPT generates full-length articles with structured headings.\n- Extracts relevant image search keywords for visual enhancement.\n- To implement this, add the following prompt (green note) below your workflow:\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "921173fb-ae10-4f88-a1ab-15f063cd623f",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
400,
|
||||
740
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 349.47344203333904,
|
||||
"height": 1277.4269457977707,
|
||||
"content": "(YOUR PROMPT)\n\n**Image Search Keywords (For Visual Alignment)**\n\n- Automatically generates 3-5 English keywords for image searches based on the article content.\n- Keywords should be specific objects, locations, or atmospheres rather than abstract concepts.\n\n**Article Formatting Requirements**\n\n1️⃣ Title (H1): Ensure unique and trend-driven headlines.\n2️⃣ H2 / H3 Subheadings: Structure content in an SEO-optimized format.\n3️⃣ Article Structure (Enhanced Readability)\n\n** Introduction **\n- Go straight to the point, avoiding excessive background.\n- Use question hooks or market trend data to engage readers.\n\n** Core Content **\n- Include at least three knowledge points to ensure depth.\n- Balance short and long sentences for better flow.\n\n** Conclusion **\n- Avoid generic AI-style summaries; instead, provide insights or actionable takeaways.\n- Optionally include a CTA (Call to Action).\n\n** HTML Formatting **\nEnsure the article is properly structured in HTML format:\n- Headings: Use <h1>, <h2>, <h3> appropriately.\n- Paragraphs: Enclose text within <p>.\n- Emphasized Words: Use <strong> to highlight key terms.\n- Lists: Use <ul> and <li> for bullet points.\n\nEnsure a clean, well-structured output instead of plain text.\n\n### **Final JSON Format\nEnsure the output follows this structure:\n\n{\n \"title\": \"{Generate an H1 title that aligns with market trends, ensures high click-through rates, and follows keyword strategy}\",\n \"content\": \"{Generate a complete HTML article including H1, H2, H3 headings, paragraphs, lists, etc.}\",\n \"keywords\": [\"{Image search keyword 1}\", \"{Image search keyword 2}\", \"{Image search keyword 3}\", \"{Image search keyword 4}\", \"{Image search keyword 5}\"]\n}"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "364b1ee1-4685-4b10-b988-1704dc65592b",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
760,
|
||||
440
|
||||
],
|
||||
"parameters": {
|
||||
"width": 367.1064142931126,
|
||||
"height": 267.17005729996885,
|
||||
"content": "## Google Sheet Setting\n**You need to set up these in your sheet column** \n- title\n- content\n- image search keyword\n\n**Mapping \"Values to Send\"**\n- {{ $json.message.content.title }}\n- {{ $json.message.content.content }}\n- {{ $json.message.content.keywords.join(\"+\") }}"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "26876b53-aa27-4e16-991e-c3618e751c17",
|
||||
"name": "Automated Image Retrieval from Pexels",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
980,
|
||||
280
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://api.pexels.com/v1/search?per_page=1&orientation=landscape&query={{ $json[\"Image search keyword\"] }}\n",
|
||||
"options": {},
|
||||
"sendQuery": true,
|
||||
"sendHeaders": true,
|
||||
"queryParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "query",
|
||||
"value": "={{ $json['Image search keyword'] }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"value": "YOUR_PEXELS_API_KEY"
|
||||
},
|
||||
{
|
||||
"name": "Content-Type",
|
||||
"value": "application/json"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "769638be-ee38-4e40-a508-f998b09ce1f4",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-220,
|
||||
-240
|
||||
],
|
||||
"parameters": {
|
||||
"color": 3,
|
||||
"width": 608.0701163493336,
|
||||
"height": 211.65896369815192,
|
||||
"content": "## Introduction: WordPress automatically publishes posts and inserts the first image\n\nIt is **highly recommended to install the Featured Image from URL (FIFU) plugin** and enable:\n\n**Auto > Set Featured Media Automatically from Content.** before you generate contents."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "37f3606f-f110-49d2-bcf5-1edc27149fee",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
400,
|
||||
229.99235545929986
|
||||
],
|
||||
"parameters": {
|
||||
"width": 348.08256103956126,
|
||||
"height": 170.00764454070014,
|
||||
"content": "Add your API credential"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "2399a40d-4b79-400c-9e96-df7e683fd666",
|
||||
"name": "Sticky Note6",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
760,
|
||||
228.00611563256007
|
||||
],
|
||||
"parameters": {
|
||||
"width": 150,
|
||||
"height": 170.00764454070008,
|
||||
"content": "Add your API credential"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "45e479a6-2eea-44a1-9096-9895a18904fd",
|
||||
"name": "Sticky Note7",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
920,
|
||||
226.01987580582022
|
||||
],
|
||||
"parameters": {
|
||||
"width": 201.97095074533956,
|
||||
"height": 172.00917344884022,
|
||||
"content": "Add your API credential"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "e0489552-a7b5-4161-9553-95e23605a9d5",
|
||||
"name": "Generate AI Content",
|
||||
"type": "@n8n/n8n-nodes-langchain.openAi",
|
||||
"position": [
|
||||
440,
|
||||
280
|
||||
],
|
||||
"parameters": {
|
||||
"modelId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gpt-4o",
|
||||
"cachedResultName": "GPT-4O"
|
||||
},
|
||||
"options": {},
|
||||
"messages": {
|
||||
"values": [
|
||||
{
|
||||
"content": "(YOUR PROMPT)\n(YOUR PROMPT)\n\n**Image Search Keywords (For Visual Alignment)**\n\n- Automatically generates 3-5 English keywords for image searches based on the article content.\n- Keywords should be specific objects, locations, or atmospheres rather than abstract concepts.\n\n**Article Formatting Requirements**\n\n1️⃣ Title (H1): Ensure unique and trend-driven headlines.\n2️⃣ H2 / H3 Subheadings: Structure content in an SEO-optimized format.\n3️⃣ Article Structure (Enhanced Readability)\n\n** Introduction **\n- Go straight to the point, avoiding excessive background.\n- Use question hooks or market trend data to engage readers.\n\n** Core Content **\n- Include at least three knowledge points to ensure depth.\n- Balance short and long sentences for better flow.\n\n** Conclusion **\n- Avoid generic AI-style summaries; instead, provide insights or actionable takeaways.\n- Optionally include a CTA (Call to Action).\n\n** HTML Formatting **\nEnsure the article is properly structured in HTML format:\n- Headings: Use <h1>, <h2>, <h3> appropriately.\n- Paragraphs: Enclose text within <p>.\n- Emphasized Words: Use <strong> to highlight key terms.\n- Lists: Use <ul> and <li> for bullet points.\n\nEnsure a clean, well-structured output instead of plain text.\n\n### **Final JSON Format\nEnsure the output follows this structure:\n\n{\n \"title\": \"{Generate an H1 title that aligns with market trends, ensures high click-through rates, and follows keyword strategy}\",\n \"content\": \"{Generate a complete HTML article including H1, H2, H3 headings, paragraphs, lists, etc.}\",\n \"keywords\": [\"{Image search keyword 1}\", \"{Image search keyword 2}\", \"{Image search keyword 3}\", \"{Image search keyword 4}\", \"{Image search keyword 5}\"]\n}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"jsonOutput": true
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "YOUR_OPENAI_CREDENTIAL_ID",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.6
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"timezone": "Asia/Taipei",
|
||||
"callerPolicy": "workflowsFromSameOwner",
|
||||
"executionOrder": "v1",
|
||||
"executionTimeout": -1,
|
||||
"saveManualExecutions": true
|
||||
},
|
||||
"versionId": "YOUR_VERSION_ID",
|
||||
"connections": {
|
||||
"Random Wait": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Generate AI Content",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Save to Sheet": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Automated Image Retrieval from Pexels",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Processing Delay": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Random Wait",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Generate AI Content": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Save to Sheet",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"3. Schedule Your Posts": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Processing Delay",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Automated Image Retrieval from Pexels": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Create posts on Wordpress",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
393
workflows/Wait/1801_Wait_Code_Automation_Webhook.json
Normal file
393
workflows/Wait/1801_Wait_Code_Automation_Webhook.json
Normal file
@@ -0,0 +1,393 @@
|
||||
{
|
||||
"id": "aOP0D1cAqzGv7Xa8",
|
||||
"meta": {
|
||||
"instanceId": "0a5638e14e0c728ef975d18d109cfb41edae575e3d911724f4f1eccde06a729f"
|
||||
},
|
||||
"name": "spy tool",
|
||||
"tags": [],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "5690844d-5322-4c62-8c83-eb4d4dc9c481",
|
||||
"name": "OpenAI Chat Model",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
1400,
|
||||
340
|
||||
],
|
||||
"parameters": {
|
||||
"model": "gpt-4o",
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "ZOKbogCxHnP2W0H5",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "3b1c034f-501b-423c-844f-9cb607fa91e6",
|
||||
"name": "Gmail",
|
||||
"type": "n8n-nodes-base.gmailTool",
|
||||
"position": [
|
||||
1580,
|
||||
340
|
||||
],
|
||||
"webhookId": "6a510528-22e0-4140-b987-770bb7a138de",
|
||||
"parameters": {
|
||||
"sendTo": "tom@sleak.chat",
|
||||
"message": "={{ $fromAI(\"change\", \"What relevant part has changed on the website?\") }}",
|
||||
"options": {
|
||||
"appendAttribution": false
|
||||
},
|
||||
"subject": "=Relevant changes on {{ $('parse results').item.json.website_url }}",
|
||||
"emailType": "text",
|
||||
"descriptionType": "manual",
|
||||
"toolDescription": "=Use this tool if you need to send an email, but only if the terms in the instructions mentioned explicitly state so\n"
|
||||
},
|
||||
"credentials": {
|
||||
"gmailOAuth2": {
|
||||
"id": "jtANm6k92Kl6ent1",
|
||||
"name": "Gmail account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "4d448a02-4569-451e-8be5-59bfc48f36d8",
|
||||
"name": "parse results",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
1180,
|
||||
-160
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "const parsedObject = JSON.parse($('convert message to website url & instruction').first().json.choices[0].message.content);\n\nreturn parsedObject"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "238298c4-5bba-4ac1-b3cc-ab5a28888560",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1420,
|
||||
-120
|
||||
],
|
||||
"parameters": {
|
||||
"width": 260,
|
||||
"height": 180,
|
||||
"content": "## Note: almost never works right away\nAdjust the prompts in the 'Tools agent' and 'Gmail' node as desired to steer the agent's behavior in the right direction"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "0d519c06-aa30-4a33-895f-9185936d27cf",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
480,
|
||||
100
|
||||
],
|
||||
"parameters": {
|
||||
"width": 150,
|
||||
"height": 80,
|
||||
"content": "Connect your Firecrawl account"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "9e327bbe-0096-4a4d-aec2-2e4cae7d91bd",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1740,
|
||||
80
|
||||
],
|
||||
"parameters": {
|
||||
"width": 150,
|
||||
"height": 80,
|
||||
"content": "Connect your own OpenAI account\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "30ce0e22-f536-462f-8f94-f3fd92ae036f",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1660,
|
||||
300
|
||||
],
|
||||
"parameters": {
|
||||
"width": 150,
|
||||
"height": 80,
|
||||
"content": "Connect your own Gmail account\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "bc003781-3d91-49b6-b6bb-b2970b39256a",
|
||||
"name": "convert message to website url & instruction",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
940,
|
||||
-160
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://api.openai.com/v1/chat/completions",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"jsonBody": "={\n \"model\": \"gpt-4o-2024-08-06\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"convert the following message to a website url (just the plain text url, NOT formatted or in markdown) and prompt to AI. Make the prompt as verbose as possible. Message: {{ $('New espionage assignment').first().json.assignment_instructions }}\"\n }\n ],\n \"response_format\": {\n \"type\": \"json_schema\",\n \"json_schema\": {\n \"name\": \"variable_extraction\",\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"website_url\": { \"type\": \"string\" },\n \"prompt\": { \"type\": \"string\" }\n },\n \"required\": [\"website_url\", \"prompt\"],\n \"additionalProperties\": false\n },\n \"strict\": true\n }\n }\n}\n",
|
||||
"sendBody": true,
|
||||
"specifyBody": "json",
|
||||
"authentication": "predefinedCredentialType",
|
||||
"nodeCredentialType": "openAiApi"
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "ZOKbogCxHnP2W0H5",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "6a8c172d-ac39-4cb0-b601-39fc770695ed",
|
||||
"name": "New espionage assignment",
|
||||
"type": "n8n-nodes-base.formTrigger",
|
||||
"position": [
|
||||
700,
|
||||
-160
|
||||
],
|
||||
"webhookId": "7470334f-93e1-47af-9521-d3a232c38b13",
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"formTitle": "New espionage assignment",
|
||||
"formFields": {
|
||||
"values": [
|
||||
{
|
||||
"fieldLabel": "assignment_instructions"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"notesInFlow": false,
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "c5c64e5c-88de-45e3-bb9b-4096e74a6e83",
|
||||
"name": "wait 1 day",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
940,
|
||||
80
|
||||
],
|
||||
"webhookId": "22e689e4-b93d-4c59-81e5-43c070833454",
|
||||
"parameters": {
|
||||
"unit": "days",
|
||||
"amount": 1
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "62a278ff-ed00-4e54-a608-001237551113",
|
||||
"name": "scrape page - 1",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
700,
|
||||
80
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://api.firecrawl.dev/v1/scrape",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"jsonBody": "={\n \"url\": \"{{ $('parse results').item.json.website_url }}\",\n \"formats\": [\n \"markdown\"\n ],\n \"onlyMainContent\": true,\n \"waitFor\": 5000\n}",
|
||||
"sendBody": true,
|
||||
"specifyBody": "json",
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpHeaderAuth"
|
||||
},
|
||||
"credentials": {
|
||||
"httpBasicAuth": {
|
||||
"id": "h2XRcXzLcEfvDVKb",
|
||||
"name": "Unnamed credential"
|
||||
},
|
||||
"httpHeaderAuth": {
|
||||
"id": "FoyIka0WgFG4FPxA",
|
||||
"name": "Header Auth account 2"
|
||||
}
|
||||
},
|
||||
"retryOnFail": true,
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "89c15d8f-7f8e-4391-b24a-07579964ca5c",
|
||||
"name": "scrape page - 2",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1180,
|
||||
80
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://api.firecrawl.dev/v1/scrape",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"jsonBody": "={\n \"url\": \"{{ $('parse results').item.json.website_url }}\",\n \"formats\": [\n \"markdown\"\n ],\n \"onlyMainContent\": true,\n \"waitFor\": 5000\n}",
|
||||
"sendBody": true,
|
||||
"specifyBody": "json",
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpHeaderAuth"
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "FoyIka0WgFG4FPxA",
|
||||
"name": "Header Auth account 2"
|
||||
}
|
||||
},
|
||||
"retryOnFail": true,
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "7b148c5b-d4ae-498a-b7ef-2ed4ecc0a665",
|
||||
"name": "send e-mail?",
|
||||
"type": "@n8n/n8n-nodes-langchain.agent",
|
||||
"position": [
|
||||
1420,
|
||||
80
|
||||
],
|
||||
"parameters": {
|
||||
"text": "={{ $('parse results').item.json.prompt }}\n\nNOTE: ONLY send an email if the situation meets the above condition. Otherwise, do NOT use the tool\n\nNOTE: this concerns differences between the \"old version page\" (scrape from yesterday) and \"new version page\" (scrape from now)",
|
||||
"options": {
|
||||
"systemMessage": "=old version page: \\n\\n {{ JSON.stringify($('scrape page - 1').item.json[\"data\"][\"markdown\"]) }} \\n\\n /// \\n\\n new version page: \\n\\n {{ JSON.stringify($('scrape page - 1').item.json[\"data\"][\"markdown\"]) }}"
|
||||
},
|
||||
"promptType": "define",
|
||||
"hasOutputParser": true
|
||||
},
|
||||
"typeVersion": 1.7
|
||||
},
|
||||
{
|
||||
"id": "7897d707-2c27-43bf-9ea0-90ab7996bf4a",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
920,
|
||||
-260
|
||||
],
|
||||
"parameters": {
|
||||
"width": 150,
|
||||
"height": 80,
|
||||
"content": "Connect your own OpenAI account\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"active": true,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "dec23eea-1590-4418-ab2b-1cb4a6ccfdc6",
|
||||
"connections": {
|
||||
"Gmail": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "send e-mail?",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"wait 1 day": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "scrape page - 2",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"send e-mail?": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "scrape page - 1",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"parse results": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "scrape page - 1",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"scrape page - 1": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "wait 1 day",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"scrape page - 2": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "send e-mail?",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "send e-mail?",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"New espionage assignment": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "convert message to website url & instruction",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"convert message to website url & instruction": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "parse results",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
1738
workflows/Wait/1805_Wait_Code_Automate_Webhook.json
Normal file
1738
workflows/Wait/1805_Wait_Code_Automate_Webhook.json
Normal file
File diff suppressed because it is too large
Load Diff
379
workflows/Wait/1879_Wait_Slack_Monitor_Triggered.json
Normal file
379
workflows/Wait/1879_Wait_Slack_Monitor_Triggered.json
Normal file
@@ -0,0 +1,379 @@
|
||||
{
|
||||
"id": "hmgR6wOkuqrn5y4Y",
|
||||
"meta": {
|
||||
"instanceId": "c00cfcf2a18f434f8525f50ae6b6f1f42bee7c1ab4c9447d323c2fc938100ee4",
|
||||
"templateCredsSetupCompleted": true
|
||||
},
|
||||
"name": "N_01_Simple_Lead_Tracker_Automation_v4",
|
||||
"tags": [],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "a69ff573-797d-4a77-a831-940168046448",
|
||||
"name": "Google Sheets Trigger",
|
||||
"type": "n8n-nodes-base.googleSheetsTrigger",
|
||||
"position": [
|
||||
-720,
|
||||
300
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"pollTimes": {
|
||||
"item": [
|
||||
{
|
||||
"mode": "everyMinute"
|
||||
}
|
||||
]
|
||||
},
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": 1001688681,
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/16xNeIG_QLUtOoFulbWemXrUAOKwxaHaGU7DywJLDiRk/edit#gid=1001688681",
|
||||
"cachedResultName": "Form Responses 1"
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "16xNeIG_QLUtOoFulbWemXrUAOKwxaHaGU7DywJLDiRk",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/16xNeIG_QLUtOoFulbWemXrUAOKwxaHaGU7DywJLDiRk/edit?usp=drivesdk",
|
||||
"cachedResultName": "Simple Lead Tracker (Responses)"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsTriggerOAuth2Api": {
|
||||
"id": "JH9HQfSo1Q5lJsws",
|
||||
"name": "Google Sheets Trigger account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "ce9845a5-09da-44f9-b0c4-da380cf828d4",
|
||||
"name": "Slack",
|
||||
"type": "n8n-nodes-base.slack",
|
||||
"position": [
|
||||
20,
|
||||
120
|
||||
],
|
||||
"webhookId": "e376c2f4-7894-48c0-a510-b2869bcff786",
|
||||
"parameters": {
|
||||
"text": "=🎯 *New Lead Alert!*\n\n*Name:* {{ $json['Name Surname'] }}\n*Email:* {{ $json['E-Mail'] }}\n*Phone:* {{$json[\"Phone\"]}}\n*Interest Level:* {{ $json[' Interest Level '] }}\n*Source:* {{ $json[' Lead Source '] }}\n\n📝 Notes:\n{{ $json['Notes '] }}",
|
||||
"select": "channel",
|
||||
"channelId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "C08FJNLQP5G",
|
||||
"cachedResultName": "test-automation-workflow"
|
||||
},
|
||||
"otherOptions": {},
|
||||
"authentication": "oAuth2"
|
||||
},
|
||||
"credentials": {
|
||||
"slackOAuth2Api": {
|
||||
"id": "vZxu6lKOBC6oOxHv",
|
||||
"name": "Slack account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.3
|
||||
},
|
||||
{
|
||||
"id": "1c2b7aa2-6d30-4b88-ae36-f138fd98f02d",
|
||||
"name": "Gmail",
|
||||
"type": "n8n-nodes-base.gmail",
|
||||
"position": [
|
||||
20,
|
||||
320
|
||||
],
|
||||
"webhookId": "8db2d0be-4071-431a-8c8b-28bbe3dd80a2",
|
||||
"parameters": {
|
||||
"sendTo": "dataplusminuss@gmail.com",
|
||||
"message": "=<h3>New Lead Received!</h3> \n<ul> \n<li><strong>Name:</strong> {{ $json['Name Surname'] }}</li> \n<li><strong>Email:</strong> {{ $json['E-Mail'] }}</li> \n<li><strong>Phone:</strong> {{$json[\"Phone\"]}}</li> \n<li><strong>Interest Level:</strong> {{ $json[' Interest Level '] }}</li> \n<li><strong>Source:</strong> {{ $json[' Lead Source '] }}</li> \n</ul> \n<p><strong>Notes:</strong> {{ $json['Notes '] }}</p>",
|
||||
"options": {},
|
||||
"subject": "=📩 New Lead Received: {{ $json['Name Surname'] }}"
|
||||
},
|
||||
"credentials": {
|
||||
"gmailOAuth2": {
|
||||
"id": "1w8ruCKYBRBguMua",
|
||||
"name": "Gmail account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "4fa70ae1-efe9-4da4-8753-aff1540b3420",
|
||||
"name": "HubSpot",
|
||||
"type": "n8n-nodes-base.hubspot",
|
||||
"position": [
|
||||
-340,
|
||||
80
|
||||
],
|
||||
"parameters": {
|
||||
"email": "={{ $json['E-Mail'] }}",
|
||||
"options": {},
|
||||
"authentication": "oAuth2",
|
||||
"additionalFields": {
|
||||
"message": "={{ $json['Notes '] }}",
|
||||
"salutation": "={{ $json[' Lead Source '] }}",
|
||||
"phoneNumber": "={{ $json.Phone }}",
|
||||
"relationshipStatus": "={{ $json[' Interest Level '] }}"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"hubspotOAuth2Api": {
|
||||
"id": "iFc8JUTY3LS8wxFq",
|
||||
"name": "HubSpot account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "0cfe0651-5558-420d-8bc2-4ce49f9d2d9c",
|
||||
"name": "If",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
220,
|
||||
620
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "3d4b99e0-4b1e-4dd1-8775-7e89042c43a8",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "exists",
|
||||
"singleValue": true
|
||||
},
|
||||
"leftValue": "={{ $json['Followed Up?'] }}",
|
||||
"rightValue": ""
|
||||
},
|
||||
{
|
||||
"id": "fe99deab-c331-46a2-8649-233600fcd36f",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "contains"
|
||||
},
|
||||
"leftValue": "={{ $json[' Interest Level '] }}",
|
||||
"rightValue": "Hot"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "df1270cb-63e3-48a1-8334-a66b9d6b815e",
|
||||
"name": "No Operation, do nothing",
|
||||
"type": "n8n-nodes-base.noOp",
|
||||
"position": [
|
||||
440,
|
||||
720
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "1999928c-954a-4a68-b4b3-8cfc649ff575",
|
||||
"name": "Gmail_Reminder",
|
||||
"type": "n8n-nodes-base.gmail",
|
||||
"position": [
|
||||
440,
|
||||
520
|
||||
],
|
||||
"webhookId": "a6650ad1-7597-4b36-98f6-59e770de9166",
|
||||
"parameters": {
|
||||
"sendTo": "dataplusminuss@gmail.com",
|
||||
"message": "=<h3>🔔 The following lead has not been followed up yet! 🔥 Interest level is hot </h3>\n<ul>\n <li><strong>Name:</strong> {{ $json['Name Surname'] }}</li>\n <li><strong>Email:</strong> {{ $json['E-Mail'] }}</li>\n <li><strong>Interest Level:</strong> {{ $json[' Interest Level '] }}</li>\n</ul>\n<p><strong>Please follow up and update the spreadsheet ✅</p>\n\n",
|
||||
"options": {
|
||||
"senderName": "N_01_tester"
|
||||
},
|
||||
"subject": "⏰ *Follow-up Reminder!*"
|
||||
},
|
||||
"credentials": {
|
||||
"gmailOAuth2": {
|
||||
"id": "1w8ruCKYBRBguMua",
|
||||
"name": "Gmail account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "b0700cc4-06c7-4a97-8936-d1ff69b928e3",
|
||||
"name": "Wait",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
0,
|
||||
620
|
||||
],
|
||||
"webhookId": "04b4c335-c2a5-41b0-9f4c-65a98a41d39a",
|
||||
"parameters": {
|
||||
"unit": "minutes",
|
||||
"amount": 3
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "08a15132-2abd-4efb-ae76-bb76903c0ede",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-1040,
|
||||
120
|
||||
],
|
||||
"parameters": {
|
||||
"color": 6,
|
||||
"height": 460,
|
||||
"content": "# Lead Submission\n\n## A user submits a lead form via [Google Forms](https://forms.gle/VLhKeRySSWNKo2aR8).\n\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "c46e9941-82df-4ef5-82ba-d2c83b9342df",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-780,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"height": 320,
|
||||
"content": "# Automation Trigger (n8n)\n\n## n8n detects the new entry in the sheet and initiates the automation workflow."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "7a47c74c-fb92-4752-a5bd-69af3c997cde",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-780,
|
||||
-20
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"height": 280,
|
||||
"content": "# Data Logging\n## Responses are automatically recorded into a connected [Google Sheet](https://docs.google.com/spreadsheets/d/16xNeIG_QLUtOoFulbWemXrUAOKwxaHaGU7DywJLDiRk/edit?usp=sharing)."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "2f679e32-ae49-4572-9f71-d9fc6d6bbf58",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-420,
|
||||
-20
|
||||
],
|
||||
"parameters": {
|
||||
"width": 260,
|
||||
"height": 780,
|
||||
"content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n# CRM Integration\n\n## The lead is automatically added to HubSpot with relevant fields (name, email, phone, interest level, etc.)."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "ad2d923c-01de-4e9b-a8d7-ed1b4fcedf84",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-20,
|
||||
-160
|
||||
],
|
||||
"parameters": {
|
||||
"color": 3,
|
||||
"width": 460,
|
||||
"height": 640,
|
||||
"content": "# Notifications\n\n## Simultaneous alerts are sent via:\n\n## * Slack (to a specific channel)\n\n## * Gmail (to a designated inbox)"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "1750c844-5400-4334-a0f1-cf48b1b6baf6",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
640,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 260,
|
||||
"height": 420,
|
||||
"content": "# Follow-up Tracking\n\n## A “Followed Up?” column in Google Sheets is used to track whether a lead has been contacted.\n\n\n### :warning: If empty after X days (e.g., 3), n8n sends a reminder notification."
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "fe8e49f9-d7dc-47c5-bdfd-814f218e66f9",
|
||||
"connections": {
|
||||
"If": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Gmail_Reminder",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "No Operation, do nothing",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "If",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Google Sheets Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Slack",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Gmail",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "HubSpot",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Wait",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
447
workflows/Wait/1917_Wait_Code_Create_Webhook.json
Normal file
447
workflows/Wait/1917_Wait_Code_Create_Webhook.json
Normal file
@@ -0,0 +1,447 @@
|
||||
{
|
||||
"id": "mN7jDJoWHtJuyKpS",
|
||||
"meta": {
|
||||
"instanceId": "1e003a7ea4715b6b35e9947791386a7d07edf3b5bf8d4c9b7ee4fdcbec0447d7"
|
||||
},
|
||||
"name": "Generate Graphic Wallpaper with Midjourney, GPT-4o-mini and Canvas APIs",
|
||||
"tags": [],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "11cef766-dd10-46ea-98cf-11eb8d95e157",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
280,
|
||||
80
|
||||
],
|
||||
"parameters": {
|
||||
"width": 520,
|
||||
"height": 200,
|
||||
"content": "## Generate Graphic Wallpaper with Midjourney, GPT-4o-mini and Canvas APIs\nWe design this workflow with PiAPI APIs and Canvas API with the purpose to produce a visually compelling image with resonant copy to spark emotional connection. 🙌 \nWish you make a fantastic generation with our workflow! "
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "ba7143d7-442d-4153-9cfd-bb36448d4c91",
|
||||
"name": "Midjourney Generator",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1200,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://api.piapi.ai/api/v1/task",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"jsonBody": "={\n \"model\": \"midjourney\",\n \"task_type\": \"imagine\",\n \"input\": {\n \"prompt\": \"{{ $json.prompt }}\",\n \"aspect_ratio\": \"1:1\",\n \"process_mode\": \"turbo\",\n \"skip_prompt_check\": false\n }\n}",
|
||||
"sendBody": true,
|
||||
"sendHeaders": true,
|
||||
"specifyBody": "json",
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "x-api-key",
|
||||
"value": "={{ $('Basic Params').item.json['x-api-key'] }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "117b5929-e98c-456a-9bfd-fe1deee77abc",
|
||||
"name": "When clicking Test workflow",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
300,
|
||||
320
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "dfcf5c57-536c-4fb4-967b-24fd375db57c",
|
||||
"name": "Get Prompt",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
960,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "const image_prompt=$('Basic Params').first().json.image_prompt;\nconst show_prompt =$input.first().json.choices[0].message.content;\n\nconst prompt = image_prompt.replace(/'xxx'/, `'${show_prompt}'`)\nreturn {show_prompt,prompt};"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "1c641437-de26-4e55-9b34-0cb13d8d1cd3",
|
||||
"name": "Get Midjourney Task",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1140,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://api.piapi.ai/api/v1/task/{{ $json.data.task_id }}",
|
||||
"options": {},
|
||||
"sendHeaders": true,
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "x-api-key",
|
||||
"value": "={{ $('Basic Params').item.json['x-api-key'] }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "38fda20c-fef6-484c-ac75-c8f2fbaaca15",
|
||||
"name": "Wait for Midjourney Generation",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
940,
|
||||
580
|
||||
],
|
||||
"webhookId": "af79053d-1291-4dd2-889e-4593dbbb2512",
|
||||
"parameters": {},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "1d5eaf9a-caf8-4b08-a35c-281b400c9198",
|
||||
"name": "Determine Whether the Image URL was Fetched",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
1340,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "or",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "e97a02cc-8d1d-4500-bce5-0a296c792b76",
|
||||
"operator": {
|
||||
"name": "filter.operator.equals",
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json.data.status }}",
|
||||
"rightValue": "completed"
|
||||
},
|
||||
{
|
||||
"id": "50b63a7a-52b5-4766-a859-96ac1ff949ec",
|
||||
"operator": {
|
||||
"name": "filter.operator.equals",
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json.data.status }}",
|
||||
"rightValue": "failed"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "983acf91-c5ba-4335-b43e-d7a8a1a6b918",
|
||||
"name": "Check Image Generation Status",
|
||||
"type": "n8n-nodes-base.switch",
|
||||
"position": [
|
||||
1520,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"rules": {
|
||||
"values": [
|
||||
{
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "5f61ee56-4ebe-411f-95e6-b47d9741e7a2",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json.data.status }}",
|
||||
"rightValue": "completed"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 3.2
|
||||
},
|
||||
{
|
||||
"id": "50455a13-5914-4f96-b977-d1c6461807bc",
|
||||
"name": "Design in Canvas",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1920,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://api.canvas.switchboard.ai",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"jsonBody": "={\n \"template\": \"social-3-1\",\n \"sizes\": [\n {\n \"width\": 1000,\n \"height\": 1500\n }\n ],\n \"elements\": {\n \"text1\": {\n \"text\": \"{{ $('Get Prompt').item.json.show_prompt.replace(/;/g, \";\\\\n \")}}\"\n },\n \"rectangle1\": {\n \"fillColor\": \"#fff\"\n },\n \"image1\": {\n \"url\": \"{{ $json.data.output.temporary_image_urls[0] }}\"\n }\n }\n}",
|
||||
"sendBody": true,
|
||||
"sendHeaders": true,
|
||||
"specifyBody": "json",
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "X-API-Key",
|
||||
"value": "45ba3916-2f10-497d-815b-7ffc9b69001f"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "0fd5d40c-aebc-4ec3-b9b5-027126b39452",
|
||||
"name": "Get Image Url",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
1720,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "d52d19d1-3a37-47bb-ad23-e809323c0c54",
|
||||
"name": "data.output.temporary_image_urls",
|
||||
"type": "array",
|
||||
"value": "={{ $json.data.output.temporary_image_urls }}"
|
||||
},
|
||||
{
|
||||
"id": "49bed53e-675d-4ea0-947c-ffcbfae0ee97",
|
||||
"name": "data.output.image_url",
|
||||
"type": "string",
|
||||
"value": "={{ $json.data.output.image_url }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "e36d4bd6-2d34-447c-984e-515c48f3632e",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
280,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"width": 580,
|
||||
"height": 280,
|
||||
"content": "## Basic Params\nIn **Basic Params** node, you need to fill in your PiAPI key which you could check in [My Account](https://piapi.ai/workspace/my-account) on [PiAPI](https://piapi.ai). Other information you need to provide is listed as follow📝: \n1. Theme. The theme refers to the topic that you want to talk about when you start your generation.\n2. Scenario. The scenario text usually describe your status about your feeling.\n3. Style. The style of the image.\n4. Example. The text example shown to LLM to describe a style t you want to generate.\n5. Image prompt. Image prompt is usually about the context of the image that you want to generate."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "1e04fe5d-a1f4-4fe9-a3d2-9c6aeaf05d96",
|
||||
"name": "Gpt-4o-mini API",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
740,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://api.piapi.ai/v1/chat/completions",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"jsonBody": "={\n \"model\": \"gpt-4o-mini\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"You are a helpful assistant.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Please {{ $json.style }}, based on the theme of {{ $json.theme }} and the scenario of {{ $json.scenario }}, according to the output case and language context. Examples are {{ $json.example }},Return a sentence directly, nothing else,Don't add a serial number, just a prompt that can be used for input,Do not add any quotation marks.\"}\n ]\n }",
|
||||
"sendBody": true,
|
||||
"sendHeaders": true,
|
||||
"specifyBody": "json",
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"value": "=Bearer {{ $('Basic Params').first().json['x-api-key'] }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "4eaf0f57-9458-42cb-b736-c737f134320b",
|
||||
"name": "Basic Params",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
540,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "raw",
|
||||
"options": {},
|
||||
"jsonOutput": "{\n \"x-api-key\":\"\",\n \"theme\": \"Hope\",\n \"scenario\": \"Don't know about the future, confused and feel lost about AI agent\",\n \"style\":\"Cinematic Grandeur,Sci-Tech Aesthetic, 3D style\",\n \"example\":\"1. March. Because of your faith, it will happen.2. Something in me will save me.3. To everyone carrying a heavy heart in silence. You are going to be okay.4. Tomorrow will be better.\",\n \"image_prompt\":\"A cinematic sci-fi metropolis where Deep Neural Nets control a hyper-connected society. Holographic interfaces glow in the air as robotic agents move among humans, symbolizing Industry 4.0. The scene contrasts organic human emotion with cold machine precision, rendered in a hyper-realistic 3D style with futuristic lighting. Epic wide shots showcase the grandeur of this civilization’s industrial evolution.\"\n}\n"
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "6750b606-4222-4cda-bcaa-5d4f2b4f9ec8",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1680,
|
||||
560
|
||||
],
|
||||
"parameters": {
|
||||
"width": 380,
|
||||
"height": 200,
|
||||
"content": "## Design in Canvas API Node\nWe make a final design with Canvas API. \nYou could check the node code to make a template design more efficiently in Canvas.\nAlso you could make various artworks with template library in Canvas. \nYou could modify node parameters to or add more nodes to make more artworks in one role."
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "09b5a8e6-bdc8-47bb-a9e3-95b090ff3f13",
|
||||
"connections": {
|
||||
"Get Prompt": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Midjourney Generator",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Basic Params": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Gpt-4o-mini API",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Image Url": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Design in Canvas",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Gpt-4o-mini API": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Prompt",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Midjourney Task": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Determine Whether the Image URL was Fetched",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Midjourney Generator": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait for Midjourney Generation",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When clicking Test workflow": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Basic Params",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Check Image Generation Status": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Image Url",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait for Midjourney Generation": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Midjourney Task",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Determine Whether the Image URL was Fetched": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Check Image Generation Status",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Wait for Midjourney Generation",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
380
workflows/Wait/1931_Wait_HTTP_Automation_Webhook.json
Normal file
380
workflows/Wait/1931_Wait_HTTP_Automation_Webhook.json
Normal file
@@ -0,0 +1,380 @@
|
||||
{
|
||||
"id": "nJwkSOrJIFvutw1n",
|
||||
"meta": {
|
||||
"instanceId": "08daa2aa5b6032ff63690600b74f68f5b0f34a3b100102e019b35c4419168977"
|
||||
},
|
||||
"name": "Flux Dev Image Generation Fal.ai",
|
||||
"tags": [],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "00f3a7d9-9931-40a4-8eb5-5b9086d6995c",
|
||||
"name": "Fal Flux",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
420,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://queue.fal.run/fal-ai/flux/dev",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"jsonBody": "={\n \"prompt\": \"{{ $json.Prompt }}\",\n \"image_size\": {\n \"width\": {{ $json.Width }},\n \"height\": {{ $json.Height }}\n},\n \"num_inference_steps\": {{ $json.Steps }},\n \"guidance_scale\": {{ $json.Guidance }},\n \"num_images\": 1,\n \"enable_safety_checker\": true\n}",
|
||||
"sendBody": true,
|
||||
"specifyBody": "json",
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpHeaderAuth"
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "lNxvZHlUafPAHBYN",
|
||||
"name": "Fal Flux Header Auth account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "3032a543-2e21-415e-a5bd-d56ea33e4411",
|
||||
"name": "Get Image Result URL",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1220,
|
||||
-20
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://queue.fal.run/fal-ai/flux/requests/{{ $json.request_id }}",
|
||||
"options": {},
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpHeaderAuth"
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "lNxvZHlUafPAHBYN",
|
||||
"name": "Fal Flux Header Auth account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "56e13e53-1697-4970-9bea-b75e0e849425",
|
||||
"name": "Download Image",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1400,
|
||||
-20
|
||||
],
|
||||
"parameters": {
|
||||
"url": "={{ $json.images[0].url }}",
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "dd2efd2c-8712-4a77-8786-cccebdec876b",
|
||||
"name": "Google Drive",
|
||||
"type": "n8n-nodes-base.googleDrive",
|
||||
"position": [
|
||||
1580,
|
||||
-20
|
||||
],
|
||||
"parameters": {
|
||||
"name": "={{ $binary.data.fileName }}",
|
||||
"driveId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "My Drive"
|
||||
},
|
||||
"options": {},
|
||||
"folderId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "1R3PSyHXWHlY9DRFdOUEAPEop2fZy-_-K",
|
||||
"cachedResultUrl": "https://drive.google.com/drive/folders/1R3PSyHXWHlY9DRFdOUEAPEop2fZy-_-K",
|
||||
"cachedResultName": "Flux Image"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleDriveOAuth2Api": {
|
||||
"id": "CFiX9XTXGg4hGaGV",
|
||||
"name": "Google Drive account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "a598d868-0461-41fc-b6aa-f9998e9d6146",
|
||||
"name": "When clicking ‘Test workflow’",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
-60,
|
||||
0
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "a576d7b6-b2f3-4d53-8e7f-bb6449ff9c64",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
80,
|
||||
-120
|
||||
],
|
||||
"parameters": {
|
||||
"width": 260,
|
||||
"height": 120,
|
||||
"content": "## Set Parameter Here \nset Image Prompt and related settings"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "d39e85a8-3ddd-4f10-ba4c-beb86a850e10",
|
||||
"name": "Wait 3 Sec",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
640,
|
||||
0
|
||||
],
|
||||
"webhookId": "61a8626c-e281-4d4b-abb0-b9d87d1b4e7c",
|
||||
"parameters": {
|
||||
"amount": 3
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "b27ac2f1-3f14-467e-81c4-af8b8fb37138",
|
||||
"name": "Check Status",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
840,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://queue.fal.run/fal-ai/flux/requests/{{ $json.request_id }}/status",
|
||||
"options": {},
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpHeaderAuth"
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "lNxvZHlUafPAHBYN",
|
||||
"name": "Fal Flux Header Auth account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "7ee45dab-8e31-44de-bbb1-e99a565ee19c",
|
||||
"name": "Completed?",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
1020,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "299a7c34-dcff-4991-a73f-5b1a84f188ea",
|
||||
"operator": {
|
||||
"name": "filter.operator.equals",
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json.status }}",
|
||||
"rightValue": "COMPLETED"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "c5036a7d-1879-449f-8ce9-9c1cf2c7426b",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1300,
|
||||
-100
|
||||
],
|
||||
"parameters": {
|
||||
"width": 220,
|
||||
"height": 100,
|
||||
"content": "## Set Drive Folder Here "
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "c8887168-6234-486c-b7cb-cc0752c6341c",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
360,
|
||||
-180
|
||||
],
|
||||
"parameters": {
|
||||
"width": 260,
|
||||
"height": 180,
|
||||
"content": "### Generic Credential Type\n### Header : Authorization\nKey $FAL_KEY\"\n\nfor example:\nKey 6f2960baxxxxxxxxx"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "587043c4-e808-4c3f-910f-60f5eb8aff15",
|
||||
"name": "Edit Fields",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
180,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "f0a033cf-fa2b-4930-93b9-ff9c45fa7c14",
|
||||
"name": "Prompt",
|
||||
"type": "string",
|
||||
"value": "Thai young woman net idol 25 yrs old, walking on the street"
|
||||
},
|
||||
{
|
||||
"id": "2b56185d-5c61-4c17-85f1-53ac4aab2b18",
|
||||
"name": "Width",
|
||||
"type": "number",
|
||||
"value": 1024
|
||||
},
|
||||
{
|
||||
"id": "51eb65c0-ae0a-4ce7-ab00-9d13f05ce1e6",
|
||||
"name": "Height",
|
||||
"type": "number",
|
||||
"value": 768
|
||||
},
|
||||
{
|
||||
"id": "8e89fca7-d380-4876-b973-69caa0394bc5",
|
||||
"name": "Steps",
|
||||
"type": "number",
|
||||
"value": 30
|
||||
},
|
||||
{
|
||||
"id": "875e06b7-352a-4dde-8595-3274e9969c9c",
|
||||
"name": "Guidance",
|
||||
"type": "number",
|
||||
"value": 3.5
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "82877b10-5bbc-4c59-828b-4abc3ad53a5f",
|
||||
"connections": {
|
||||
"Fal Flux": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait 3 Sec",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Completed?": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Image Result URL",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Wait 3 Sec",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait 3 Sec": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Check Status",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Edit Fields": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Fal Flux",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Check Status": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Completed?",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Download Image": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Google Drive",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Image Result URL": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Download Image",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When clicking ‘Test workflow’": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Edit Fields",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
274
workflows/Wait/1954_Wait_Code_Automation_Webhook.json
Normal file
274
workflows/Wait/1954_Wait_Code_Automation_Webhook.json
Normal file
@@ -0,0 +1,274 @@
|
||||
{
|
||||
"id": "phqg5Kk3YowxoMHQ",
|
||||
"meta": {
|
||||
"instanceId": "3b02b4d565b70d8766b64aa225626d46b11a527d9f5fe390a8405f2a09e8b8a4"
|
||||
},
|
||||
"name": "Namesilo Bulk Domain Availability [Template]",
|
||||
"tags": [
|
||||
{
|
||||
"id": "28jVdgW1S4XWqLH4",
|
||||
"name": "Templates",
|
||||
"createdAt": "2025-02-28T12:22:07.921Z",
|
||||
"updatedAt": "2025-02-28T12:22:07.921Z"
|
||||
}
|
||||
],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "b1184b35-0ab4-42d8-a5b2-66ef926d7eed",
|
||||
"name": "Set Data",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
-240,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "05a34cf0-9462-4684-aac8-32b4b17e9ef0",
|
||||
"name": "Domains",
|
||||
"type": "string",
|
||||
"value": "=domain1.com\ndomain2.com\ndomain3.com"
|
||||
},
|
||||
{
|
||||
"id": "438830f9-27fe-4e89-bcb9-766483e2d9b1",
|
||||
"name": "Namesilo API Key",
|
||||
"type": "string",
|
||||
"value": "YOUR_API_KEY"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "7fc40d31-a43b-4273-a6eb-d519fda815d4",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-800,
|
||||
-340
|
||||
],
|
||||
"parameters": {
|
||||
"width": 580,
|
||||
"height": 280,
|
||||
"content": "## How-To\n1. Claim your free Namesilo API key here: https://www.namesilo.com/account/api-manager\n\n2. Set your API key and domains in \"Set Data\" node.\n\nThe workflow send up to 200 domains per loop until all domains are processed. The output is in Excel format.\n\nEnjoy!\n\nNote: Each loop wait 5min. This is required due to Namesilo rate limits."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "a2137f76-9e08-4743-b914-b10bbebc9a13",
|
||||
"name": "Convert & Split Domains",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
-60,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "// Get domains from input JSON\nconst domains = $json.Domains.split(\"\\n\").map(domain => domain.trim()).filter(Boolean);\n\n// Define batch size\nconst batchSize = 200;\n\n// Split into batches of 200\nlet batches = [];\nfor (let i = 0; i < domains.length; i += batchSize) {\n batches.push(domains.slice(i, i + batchSize).join(\",\"));\n}\n\n// Return batches as an array\nreturn batches.map(batch => ({ batchedDomains: batch }));"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "41140017-1f98-4ea9-ac97-9d48e5bdfda1",
|
||||
"name": "Wait",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
680,
|
||||
-200
|
||||
],
|
||||
"webhookId": "3ede79a2-7875-462f-b15a-1c74339e2a8a",
|
||||
"parameters": {
|
||||
"unit": "minutes"
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "9aa9ddb5-9091-4726-917c-bce9d0f207c9",
|
||||
"name": "Merge Results",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
320,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "// This re-maps each input item (if needed)\nconst newItems = items.map(item => ({\n json: {\n Domain: item.json.Domain,\n Availability: item.json.Availability\n }\n}));\n\nreturn newItems;"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "bb2fd210-fd11-4712-94d0-fabb7060705c",
|
||||
"name": "Loop Over Domains",
|
||||
"type": "n8n-nodes-base.splitInBatches",
|
||||
"position": [
|
||||
120,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "5d97cd82-f7d5-4f98-a789-8c0fcf473f0f",
|
||||
"name": "Namesilo Requests",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
320,
|
||||
-200
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://www.namesilo.com/apibatch/checkRegisterAvailability?version=1&type=json&key={{ $('Set Data').item.json['Namesilo API Key'] }}&domains={{ $json.batchedDomains }}",
|
||||
"options": {}
|
||||
},
|
||||
"retryOnFail": true,
|
||||
"typeVersion": 4.2,
|
||||
"waitBetweenTries": 5000
|
||||
},
|
||||
{
|
||||
"id": "c4f38893-636a-4293-9e10-395be30683d0",
|
||||
"name": "Parse Data",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
500,
|
||||
-200
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "// Ensure input data exists\nif (!$json || !$json.data) {\n throw new Error(\"Invalid input data format\");\n}\n\n// Parse the JSON string inside `data`\nlet parsedData;\ntry {\n parsedData = JSON.parse($json.data);\n} catch (error) {\n throw new Error(\"Error parsing JSON data: \" + error.message);\n}\n\n// Extract available and unavailable domains safely\nconst availableDomains = parsedData.reply?.available ? Object.values(parsedData.reply.available) : [];\nconst unavailableDomains = parsedData.reply?.unavailable ? Object.values(parsedData.reply.unavailable) : [];\n\n// Prepare the output array\nconst output = [];\n\n// Process available domains\navailableDomains.forEach(domainObj => {\n if (domainObj && domainObj.domain) {\n output.push({\n Domain: domainObj.domain,\n Availability: \"Available\"\n });\n }\n});\n\n// Process unavailable domains\nunavailableDomains.forEach(domain => {\n if (typeof domain === \"string\") {\n output.push({\n Domain: domain,\n Availability: \"Unavailable\"\n });\n } else if (typeof domain === \"object\" && domain.domain) {\n output.push({\n Domain: domain.domain,\n Availability: \"Unavailable\"\n });\n }\n});\n\n// Return the structured data\nreturn output;"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "ec7b8311-65b7-45b0-85ae-b91d7c82e123",
|
||||
"name": "Convert to Excel",
|
||||
"type": "n8n-nodes-base.convertToFile",
|
||||
"position": [
|
||||
500,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"fileName": "domain_results.xlsx"
|
||||
},
|
||||
"operation": "xlsx",
|
||||
"binaryPropertyName": "={{ $json.MergedDomains }}"
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "7d33c875-ce2d-404c-97a0-f551939d59f4",
|
||||
"name": "Start",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
-420,
|
||||
0
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "1a05d4b0-db0c-4554-8abf-0547130be16c",
|
||||
"connections": {
|
||||
"Wait": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop Over Domains",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Start": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Set Data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Set Data": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Convert & Split Domains",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Parse Data": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wait",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Merge Results": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Convert to Excel",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Loop Over Domains": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge Results",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Namesilo Requests",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Namesilo Requests": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Parse Data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Convert & Split Domains": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop Over Domains",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
5530
workflows/Wait/1955_Wait_Splitout_Automation_Scheduled.json
Normal file
5530
workflows/Wait/1955_Wait_Splitout_Automation_Scheduled.json
Normal file
File diff suppressed because one or more lines are too long
1445
workflows/Wait/1977_Wait_Splitout_Automation_Webhook.json
Normal file
1445
workflows/Wait/1977_Wait_Splitout_Automation_Webhook.json
Normal file
File diff suppressed because it is too large
Load Diff
1184
workflows/Wait/1990_Wait_Code_Automation_Webhook.json
Normal file
1184
workflows/Wait/1990_Wait_Code_Automation_Webhook.json
Normal file
File diff suppressed because it is too large
Load Diff
516
workflows/Wait/1992_Wait_Code_Automation_Webhook.json
Normal file
516
workflows/Wait/1992_Wait_Code_Automation_Webhook.json
Normal file
@@ -0,0 +1,516 @@
|
||||
{
|
||||
"id": "vpZ1wpsniCvKYjCF",
|
||||
"meta": {
|
||||
"instanceId": "1e003a7ea4715b6b35e9947791386a7d07edf3b5bf8d4c9b7ee4fdcbec0447d7"
|
||||
},
|
||||
"name": "General 3D Presentation",
|
||||
"tags": [],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "629ef84e-ffb7-4143-b0af-764bcb86a7fa",
|
||||
"name": "When clicking ‘Test workflow’",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
360,
|
||||
40
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "d2751dcb-fd03-4a87-a501-43f701d2704a",
|
||||
"name": "Prompt",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
580,
|
||||
40
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://api.piapi.ai/api/v1/task",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"jsonBody": "{\n \"model\": \"midjourney\",\n \"task_type\": \"imagine\",\n \"input\": {\n \"prompt\": \"A blind box character design, in the chibi style, a super cute little girl wearing a white long-sleeved dress and pearl earrings with her head bowed in a prayer pose, facing upwards, wearing an oversized off-white dress with large round pearls on the shoulders, minimalist simple dress with Ruffles, against a beige background, a full-body shot in a three-quarter profile view, with a black, blue, and gray color scheme, soft lighting, 3D rendering, clay material, high detail, in the Pixar style. Clean white skin, brown renaissance braided bun. --ar 1:1 --niji 6\",\n \"aspect_ratio\": \"2:3\",\n \"process_mode\": \"turbo\",\n \"skip_prompt_check\": false\n }\n}",
|
||||
"sendBody": true,
|
||||
"sendHeaders": true,
|
||||
"specifyBody": "json",
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "x-api-key"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "f3f4b801-4b2b-49bf-a9be-1f38e62720ac",
|
||||
"name": "Midjourney Generator",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
400,
|
||||
280
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://api.piapi.ai/api/v1/task/{{ $json.data.task_id }}",
|
||||
"options": {},
|
||||
"sendHeaders": true,
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "x-api-key"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "a7ecf5f5-73fd-4d5b-b851-568dde2e797a",
|
||||
"name": "GPT-4o Image Generator",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1060,
|
||||
80
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://api.piapi.ai/v1/chat/completions",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"jsonBody": "={\n \"model\": \"gpt-4o-image-preview\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": [\n {\n \"type\": \"image_url\",\n \"image_url\": {\n \"url\": \"{{ $json.random_temp_url }}\"\n }\n },\n {\n \"type\": \"text\",\n \"text\": \"Convert this image into a 3D figurine image, with front view, with full details, profile. \"\n }\n ]\n }\n ],\n \"stream\": true\n}",
|
||||
"sendBody": true,
|
||||
"sendHeaders": true,
|
||||
"specifyBody": "json",
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpHeaderAuth",
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Authorization"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "fsJeCNd9BkJ1CIrt",
|
||||
"name": "Header Auth account 2"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "25de6846-9a45-4cb8-8328-b5cb4e36889d",
|
||||
"name": "Generate Kling Video",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1600,
|
||||
200
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://api.piapi.ai/api/v1/task",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"jsonBody": "={\n \"model\": \"kling\",\n \"task_type\": \"video_generation\",\n \"input\": {\n \"version\": \"1.6\",\n \"aspect_ratio\": \"9:16\",\n \"image_url\":\"{{ $json.image_url }}\",\n\n \"prompt\": \"An anime character anchored mid-frame, gradually rotating to showcase 3D details\"\n \n }\n} ",
|
||||
"sendBody": true,
|
||||
"sendHeaders": true,
|
||||
"specifyBody": "json",
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "x-api-key"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "410c252e-4901-4159-b8c2-d9a2fe04371d",
|
||||
"name": "Get Video URL",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1820,
|
||||
200
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://api.piapi.ai/api/v1/task/{{ $json.data.task_id }}",
|
||||
"options": {},
|
||||
"sendHeaders": true,
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "x-api-key",
|
||||
"value": "72858adea87ad16865d5b0a24c3d9b9f58a6e7b1a8a8a8a0d6b81a9f3a9812f3"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "9a2188d8-8520-485e-99e4-0ff07e4b86e7",
|
||||
"name": "Wait for Image Generation",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
620,
|
||||
520
|
||||
],
|
||||
"webhookId": "f3bcf634-8c4b-4bf9-a7f2-d4ee369f5349",
|
||||
"parameters": {},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "7f64087a-1567-4c62-a36d-d3b69d933d48",
|
||||
"name": "Check Generation Status",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
600,
|
||||
280
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "a0f8758e-d6fd-44f8-bd79-bc3c4dceddcf",
|
||||
"operator": {
|
||||
"name": "filter.operator.equals",
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json.data.status }}",
|
||||
"rightValue": "completed"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "838999b7-99f5-4f14-bfe2-4886bd565464",
|
||||
"name": "Get Image URL of Midjourney",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
840,
|
||||
80
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "// JavaScript Code for Function Node\nreturn {\n random_temp_url: $input.all()[0].json.data.output.temporary_image_urls[\n Math.floor(Math.random() * $input.all()[0].json.data.output.temporary_image_urls.length)\n ]\n};"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "09824819-7a6c-4416-ba40-811e9d785678",
|
||||
"name": "Get Image URL of GPT-4o-image",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
1280,
|
||||
80
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "const chunks = $input.first().json.data.split('\\n\\n');\n\nlet imageUrl = null;\n\nfor (let i = chunks.length - 1; i >= 0; i--) {\n const chunk = chunks[i];\n \n if (!chunk.startsWith('data: ')) continue;\n \n try {\n const jsonStr = chunk.substring(6); \n if (jsonStr.trim() === '[DONE]') continue;\n \n const data = JSON.parse(jsonStr);\n \n \n if (data.choices && data.choices[0].delta.content) {\n const content = data.choices[0].delta.content;\n const urlMatch = content.match(/!\\[.*?\\]\\((https?:\\/\\/[^\\s]+)\\)/);\n \n if (urlMatch && urlMatch[1]) {\n imageUrl = urlMatch[1];\n break;\n }\n }\n } catch (e) {\n continue;\n }\n}\n\nreturn {\n image_url: imageUrl,\n finish_reason: imageUrl ? \"success\" : \"not_found\"\n};"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "22c8f566-6a27-4773-b4ab-45be2fbad8de",
|
||||
"name": "Check Generation Status of GPT-4o",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
1260,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "08a2ebe6-dc95-4b8a-ada1-1173645cc3f4",
|
||||
"operator": {
|
||||
"name": "filter.operator.equals",
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json.finish_reason }}",
|
||||
"rightValue": "not_found"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "00ce5488-e96c-4ff1-8727-ed2d787ae0f5",
|
||||
"name": "Check Video Generation Status",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
2000,
|
||||
200
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "f36fa981-22e0-46db-af8c-c2ac55242c27",
|
||||
"operator": {
|
||||
"name": "filter.operator.equals",
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json.data.status }}",
|
||||
"rightValue": "completed"
|
||||
},
|
||||
{
|
||||
"id": "637ea756-1ad9-434c-b6b2-b100ee4c3cad",
|
||||
"operator": {
|
||||
"name": "filter.operator.equals",
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "",
|
||||
"rightValue": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "6d53cac4-b35b-41b1-b60a-6faba78b4439",
|
||||
"name": "Wait for Video Generation",
|
||||
"type": "n8n-nodes-base.wait",
|
||||
"position": [
|
||||
1960,
|
||||
420
|
||||
],
|
||||
"webhookId": "c7b2590d-96a3-4c7c-8821-3023fead254b",
|
||||
"parameters": {
|
||||
"amount": 20
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "4cd00e7b-bfbd-45bc-b775-401055921b45",
|
||||
"name": "Fetch Final Video URL",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
2300,
|
||||
300
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "// Process the entire response\nreturn {\n video_url: $input.all()[0].json.data.output.video_url,\n watermark_free_url: $input.all()[0].json.data.output.works[0].video.resource_without_watermark\n};"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "617d6647-4c49-4e7f-91f3-5fd6d5e95fe7",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
340,
|
||||
-220
|
||||
],
|
||||
"parameters": {
|
||||
"width": 460,
|
||||
"height": 220,
|
||||
"content": "## General 3D Presentation\nThis workflow creates 360° or 180° spinning videos of high-quality 3D models with [PiAPI](https://piapi.ai) API. 🙋\n### Required Instruction: \n1. Fill in params of Prompt node.\n2. Fill in x-api-key in Mijdourney Generator node and Generate Kling Video node, fill in Header Parameters of GPT-4o Image Generator (e.g., Bearer + your X-API-Key)"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "c6a9b53c-8d6c-4ffa-b95c-e7cf88734cc9",
|
||||
"connections": {
|
||||
"Prompt": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Midjourney Generator",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Video URL": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Check Video Generation Status",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Generate Kling Video": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Video URL",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Midjourney Generator": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Check Generation Status",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"GPT-4o Image Generator": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Image URL of GPT-4o-image",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Check Generation Status": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Image URL of Midjourney",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Wait for Image Generation",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait for Image Generation": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Midjourney Generator",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wait for Video Generation": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Video URL",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Image URL of Midjourney": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "GPT-4o Image Generator",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Check Video Generation Status": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Fetch Final Video URL",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Wait for Video Generation",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Image URL of GPT-4o-image": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Check Generation Status of GPT-4o",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Check Generation Status of GPT-4o": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "GPT-4o Image Generator",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Generate Kling Video",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When clicking ‘Test workflow’": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Prompt",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user