feat: add folder support for workflows (fixes #70)
This commit is contained in:
149
workflows/Graphql/0116_Graphql_Discord_Automate_Scheduled.json
Normal file
149
workflows/Graphql/0116_Graphql_Discord_Automate_Scheduled.json
Normal file
@@ -0,0 +1,149 @@
|
||||
{
|
||||
"nodes": [
|
||||
{
|
||||
"name": "Cron",
|
||||
"type": "n8n-nodes-base.cron",
|
||||
"position": [
|
||||
459,
|
||||
371
|
||||
],
|
||||
"parameters": {
|
||||
"triggerTimes": {
|
||||
"item": [
|
||||
{
|
||||
"mode": "everyHour"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Set",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
1109,
|
||||
371
|
||||
],
|
||||
"parameters": {
|
||||
"values": {
|
||||
"number": [
|
||||
{
|
||||
"name": "Votes",
|
||||
"value": "={{$json[\"posts\"][\"node\"][\"votesCount\"]}}"
|
||||
}
|
||||
],
|
||||
"string": [
|
||||
{
|
||||
"name": "Name",
|
||||
"value": "={{$json[\"posts\"][\"node\"][\"name\"]}}"
|
||||
},
|
||||
{
|
||||
"name": "Description",
|
||||
"value": "={{$json[\"posts\"][\"node\"][\"description\"]}}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {},
|
||||
"keepOnlySet": true
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "GraphQL",
|
||||
"type": "n8n-nodes-base.graphql",
|
||||
"position": [
|
||||
700,
|
||||
370
|
||||
],
|
||||
"parameters": {
|
||||
"query": "=query PostRanking{\n posts(postedAfter:\"{{new Date(new Date(Date.now()).getTime() - (1000*60*60*1*24)).toUTCString()}}\", order:RANKING, first:5, postedBefore:\"{{new Date(Date.now()).toUTCString()}}\"){\n edges {\n node {\n name\n tagline\n description\n votesCount\n reviewsRating\n }\n }\n }\n}",
|
||||
"endpoint": "https://api.producthunt.com/v2/api/graphql",
|
||||
"requestFormat": "json",
|
||||
"headerParametersUi": {
|
||||
"parameter": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"value": "Bearer YOUR-TOKEN"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Item Lists",
|
||||
"type": "n8n-nodes-base.itemLists",
|
||||
"position": [
|
||||
900,
|
||||
370
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"destinationFieldName": "posts"
|
||||
},
|
||||
"fieldToSplitOut": "data.posts.edges"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Discord",
|
||||
"type": "n8n-nodes-base.discord",
|
||||
"position": [
|
||||
1310,
|
||||
370
|
||||
],
|
||||
"parameters": {
|
||||
"text": "=Here are the top 5 PH projects:\n**Name:** {{$json[\"Name\"]}}\n**Description:** {{$json[\"Description\"]}}\n**Vote:** {{$json[\"Votes\"]}}\n-------",
|
||||
"webhookUri": "DISCORD WEBHOOK URL"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"connections": {
|
||||
"Set": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Discord",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Cron": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "GraphQL",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"GraphQL": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Item Lists",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Item Lists": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Set",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
101
workflows/Graphql/0461_Graphql_Webhook_Automate_Webhook.json
Normal file
101
workflows/Graphql/0461_Graphql_Webhook_Automate_Webhook.json
Normal file
@@ -0,0 +1,101 @@
|
||||
{
|
||||
"nodes": [
|
||||
{
|
||||
"name": "GraphQL",
|
||||
"type": "n8n-nodes-base.graphql",
|
||||
"position": [
|
||||
800,
|
||||
300
|
||||
],
|
||||
"parameters": {
|
||||
"query": "=query {\n country(code: \"{{$node[\"Webhook\"].data[\"query\"][\"code\"].toUpperCase()}}\") {\n name\n phone\n emoji\n } \n}",
|
||||
"endpoint": "https://countries.trevorblades.com/",
|
||||
"requestMethod": "GET",
|
||||
"responseFormat": "string"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Function",
|
||||
"type": "n8n-nodes-base.function",
|
||||
"position": [
|
||||
1000,
|
||||
300
|
||||
],
|
||||
"parameters": {
|
||||
"functionCode": "items[0].json = JSON.parse(items[0].json.data).data.country;\nreturn items;"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Set",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
1200,
|
||||
300
|
||||
],
|
||||
"parameters": {
|
||||
"values": {
|
||||
"string": [
|
||||
{
|
||||
"name": "data",
|
||||
"value": "=The country code of {{$node[\"Function\"].data[\"name\"]}} {{$node[\"Function\"].data[\"emoji\"]}} is {{$node[\"Function\"].data[\"phone\"]}}"
|
||||
}
|
||||
],
|
||||
"boolean": []
|
||||
},
|
||||
"keepOnlySet": true
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Webhook",
|
||||
"type": "n8n-nodes-base.webhook",
|
||||
"position": [
|
||||
600,
|
||||
300
|
||||
],
|
||||
"parameters": {
|
||||
"path": "webhook",
|
||||
"options": {},
|
||||
"responseMode": "lastNode"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"connections": {
|
||||
"GraphQL": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Function",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Webhook": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "GraphQL",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Function": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Set",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user