📚 add an awesome collection of n8n workflows
This commit is contained in:
97
docs/workflows/for-loop.json
Normal file
97
docs/workflows/for-loop.json
Normal file
@@ -0,0 +1,97 @@
|
||||
{
|
||||
"nodes": [
|
||||
{
|
||||
"parameters": {},
|
||||
"name": "Start",
|
||||
"type": "n8n-nodes-base.start",
|
||||
"typeVersion": 1,
|
||||
"position": [
|
||||
250,
|
||||
300
|
||||
]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"url": "https://jsonplaceholder.typicode.com/posts?userId=1",
|
||||
"headerParametersUi": {
|
||||
"parameter": []
|
||||
}
|
||||
},
|
||||
"name": "Http Request",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"typeVersion": 1,
|
||||
"position": [
|
||||
400,
|
||||
300
|
||||
]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"functionCode": "const newItems = [];\nfor (const item of items[0].json) {\n newItems.push({json: item});\n}\nreturn newItems;"
|
||||
},
|
||||
"name": "Function",
|
||||
"type": "n8n-nodes-base.function",
|
||||
"typeVersion": 1,
|
||||
"position": [
|
||||
550,
|
||||
300
|
||||
]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"url": "https://postman-echo.com/get",
|
||||
"responseFormat": "string",
|
||||
"queryParametersUi": {
|
||||
"parameter": [
|
||||
{
|
||||
"name": "title",
|
||||
"value": "={{$node[\"Function\"].data[\"title\"]}}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"name": "Http Request1",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"typeVersion": 1,
|
||||
"position": [
|
||||
700,
|
||||
300
|
||||
]
|
||||
}
|
||||
],
|
||||
"connections": {
|
||||
"Start": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Http Request",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Http Request": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Function",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Function": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Http Request1",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user