n8n Workflow

Create Multiple Json Items From An Array

This n8n workflow creates tasks and integrates with various services. Create Multiple Json Items From An Array - 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 Multiple Json Items From An Array - 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": [
                670,
                371
            ],
            "parameters": {
                "functionCode": "return [\n  {\n    json:[\n      {\n        id: 1,\n        name: \"Jim\"\n      }, \n      {\n        id: 2,\n        name: \"Stefan\"\n      },\n      {\n        id: 3,\n        name: \"Hans\"\n      }\n    ]\n  }\n];"
            },
            "typeVersion": 1,
            "id": "73b9d460-7b64-4f33-8bf2-7985c60fcfa7"
        },
        {
            "name": "Create JSON-items",
            "type": "n8n-nodes-base.function",
            "position": [
                910,
                371
            ],
            "parameters": {
                "functionCode": "return items[0].json.map(item => { \n  return {\n    json: item,\n  }\n})\n"
            },
            "typeVersion": 1,
            "id": "1c8d8a42-05a5-4417-98cb-83c5584807e0"
        }
    ],
    "connections": {
        "Mock Data": {
            "main": [
                [
                    {
                        "node": "Create JSON-items",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        }
    },
    "n8n_version": "1.5.0"
}
Requirements
n8n instance, API credentials for connected services
Tags
#n8n #automation #workflow
Quick Actions
More in n8n Workflows