feat: add folder support for workflows (fixes #70)
This commit is contained in:
@@ -0,0 +1,84 @@
|
||||
{
|
||||
"id": 85,
|
||||
"name": "New WooCommerce Product to Twitter and Telegram",
|
||||
"nodes": [
|
||||
{
|
||||
"name": "Twitter",
|
||||
"type": "n8n-nodes-base.twitter",
|
||||
"position": [
|
||||
720,
|
||||
300
|
||||
],
|
||||
"parameters": {
|
||||
"text": "=✨ New Product Announcement ✨\nWe have just added {{$json[\"name\"]}}, Head to {{$json[\"permalink\"]}} to find out more.",
|
||||
"additionalFields": {}
|
||||
},
|
||||
"credentials": {
|
||||
"twitterOAuth1Api": {
|
||||
"id": "37",
|
||||
"name": "joffcom"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Telegram",
|
||||
"type": "n8n-nodes-base.telegram",
|
||||
"position": [
|
||||
720,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"text": "=✨ New Product Announcement ✨\nWe have just added {{$json[\"name\"]}}, Head to {{$json[\"permalink\"]}} to find out more.",
|
||||
"chatId": "123456",
|
||||
"additionalFields": {}
|
||||
},
|
||||
"credentials": {
|
||||
"telegramApi": {
|
||||
"id": "56",
|
||||
"name": "Telegram account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "WooCommerce Trigger",
|
||||
"type": "n8n-nodes-base.wooCommerceTrigger",
|
||||
"position": [
|
||||
540,
|
||||
400
|
||||
],
|
||||
"webhookId": "ab7b134b-9b2d-4e0d-b496-1aee30db0808",
|
||||
"parameters": {
|
||||
"event": "product.created"
|
||||
},
|
||||
"credentials": {
|
||||
"wooCommerceApi": {
|
||||
"id": "48",
|
||||
"name": "WooCommerce account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"settings": {},
|
||||
"connections": {
|
||||
"WooCommerce Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Twitter",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Telegram",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
55
workflows/Twitter/1211_Twitter_Strava_Create_Triggered.json
Normal file
55
workflows/Twitter/1211_Twitter_Strava_Create_Triggered.json
Normal file
@@ -0,0 +1,55 @@
|
||||
{
|
||||
"id": "95",
|
||||
"name": "Receive updates when a new activity gets created and tweet about it",
|
||||
"nodes": [
|
||||
{
|
||||
"name": "Strava Trigger",
|
||||
"type": "n8n-nodes-base.stravaTrigger",
|
||||
"position": [
|
||||
710,
|
||||
220
|
||||
],
|
||||
"webhookId": "5ad7a644-4005-4118-a27e-7112bd0035a5",
|
||||
"parameters": {
|
||||
"event": "create",
|
||||
"object": "activity",
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"stravaOAuth2Api": "strava"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Twitter",
|
||||
"type": "n8n-nodes-base.twitter",
|
||||
"position": [
|
||||
910,
|
||||
220
|
||||
],
|
||||
"parameters": {
|
||||
"text": "=I ran {{$node[\"Strava Trigger\"].json[\"object_data\"][\"distance\"]}} meters and completed my {{$node[\"Strava Trigger\"].json[\"object_data\"][\"name\"]}}!",
|
||||
"additionalFields": {}
|
||||
},
|
||||
"credentials": {
|
||||
"twitterOAuth1Api": "twitter-Harshil"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"settings": {},
|
||||
"connections": {
|
||||
"Strava Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Twitter",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
222
workflows/Twitter/1212_Twitter_Slack_Automation_Scheduled.json
Normal file
222
workflows/Twitter/1212_Twitter_Slack_Automation_Scheduled.json
Normal file
@@ -0,0 +1,222 @@
|
||||
{
|
||||
"id": 95,
|
||||
"name": "Scrape Twitter for mentions of company",
|
||||
"nodes": [
|
||||
{
|
||||
"name": "Filter Tweet Data",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
1260,
|
||||
300
|
||||
],
|
||||
"parameters": {
|
||||
"values": {
|
||||
"string": [
|
||||
{
|
||||
"name": "Tweet",
|
||||
"value": "={{$node[\"Get last 50 mentions\"].json[\"text\"]}}"
|
||||
},
|
||||
{
|
||||
"name": "Tweet URL",
|
||||
"value": "=https://twitter.com/{{$node[\"Get last 50 mentions\"].json[\"user\"][\"screen_name\"]}}/status/{{$node[\"Get last 50 mentions\"].json[\"id_str\"]}}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {},
|
||||
"keepOnlySet": true
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Run Every 10 Minutes",
|
||||
"type": "n8n-nodes-base.cron",
|
||||
"position": [
|
||||
260,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"triggerTimes": {
|
||||
"item": [
|
||||
{
|
||||
"mode": "everyX",
|
||||
"unit": "minutes",
|
||||
"value": 10
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Now - 10 minutes",
|
||||
"type": "n8n-nodes-base.dateTime",
|
||||
"position": [
|
||||
620,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"value": "={{Date()}}",
|
||||
"action": "calculate",
|
||||
"options": {},
|
||||
"duration": "={{$node[\"Run Every 10 Minutes\"].parameter[\"triggerTimes\"][\"item\"][0][\"value\"]}}",
|
||||
"timeUnit": "={{$node[\"Run Every 10 Minutes\"].parameter[\"triggerTimes\"][\"item\"][0][\"unit\"]}}",
|
||||
"operation": "subtract"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Get last 50 mentions",
|
||||
"type": "n8n-nodes-base.twitter",
|
||||
"position": [
|
||||
820,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"operation": "search",
|
||||
"searchText": "={{$node[\"Setup\"].parameter[\"values\"][\"string\"][1][\"value\"]}}",
|
||||
"additionalFields": {}
|
||||
},
|
||||
"credentials": {
|
||||
"twitterOAuth1Api": {
|
||||
"id": "27",
|
||||
"name": "86-88 Twitter"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Created since last run?",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
1020,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"conditions": {
|
||||
"dateTime": [
|
||||
{
|
||||
"value1": "={{$json[\"created_at\"]}}",
|
||||
"value2": "={{$items(\"Now - 10 minutes\", 0, 0)[0].json.data}}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Setup",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
440,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"values": {
|
||||
"string": [
|
||||
{
|
||||
"name": "slackChannel",
|
||||
"value": "#recent-tweets"
|
||||
},
|
||||
{
|
||||
"name": "twitterSearchValue",
|
||||
"value": "@n8n_io"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Post to Slack",
|
||||
"type": "n8n-nodes-base.slack",
|
||||
"position": [
|
||||
1440,
|
||||
300
|
||||
],
|
||||
"parameters": {
|
||||
"text": "=New Mention!: {{$node[\"Filter Tweet Data\"].json[\"Tweet\"]}}.\nSee it here: {{$node[\"Filter Tweet Data\"].json[\"Tweet URL\"]}}",
|
||||
"channel": "={{$node[\"Setup\"].parameter[\"values\"][\"string\"][0][\"value\"]}}",
|
||||
"attachments": [],
|
||||
"otherOptions": {}
|
||||
},
|
||||
"credentials": {
|
||||
"slackApi": {
|
||||
"id": "53",
|
||||
"name": "Slack Access Token"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"active": true,
|
||||
"settings": {},
|
||||
"connections": {
|
||||
"Setup": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Now - 10 minutes",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Now - 10 minutes": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get last 50 mentions",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Filter Tweet Data": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Post to Slack",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get last 50 mentions": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Created since last run?",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Run Every 10 Minutes": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Setup",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Created since last run?": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Filter Tweet Data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user