n8n
Workflow
Create An Array Of Objects
This n8n workflow creates tasks and integrates with various services. Create An Array Of Objects - ready to import and run in your n8n instance.
n8n
workflow.json
About This Script
This n8n workflow creates tasks and integrates with various services. Create An Array Of Objects - ready to import and run in your n8n instance.
Features:
- Custom JavaScript function processing
Source Code
{
"nodes": [
{
"name": "Mock Data",
"type": "n8n-nodes-base.function",
"position": [
802,
307
],
"parameters": {
"functionCode": "return [\n {\n json: {\n id: 1,\n name: \"Jim\"\n }\n },\n {\n json: {\n id: 2,\n name: \"Stefan\"\n }\n },\n {\n json: {\n id: 3,\n name: \"Hans\"\n }\n }\n];"
},
"typeVersion": 1,
"id": "2462b423-3234-4b72-a64a-ad150f725265"
},
{
"name": "Create an array of objects",
"type": "n8n-nodes-base.function",
"position": [
1052,
307
],
"parameters": {
"functionCode": "return [\n {\n json: {\n data_object: items.map(item => item.json),\n },\n }\n];\n"
},
"typeVersion": 1,
"id": "e46f5560-4d5e-46ec-9515-36cf7366b552"
}
],
"connections": {
"Mock Data": {
"main": [
[
{
"node": "Create an array of objects",
"type": "main",
"index": 0
}
]
]
}
},
"n8n_version": "1.5.0"
}
Requirements
n8n instance, API credentials for connected services
Tags
#n8n
#automation
#workflow