Workflow:

Workflow Details

Download Workflow
{
    "nodes": [
        {
            "name": "Data 1",
            "type": "n8n-nodes-base.function",
            "position": [
                602,
                350
            ],
            "parameters": {
                "functionCode": "items[0].json = {\n\"data\": [\n{\n\"pointer\": \"12345\",\n\"panel\": \"234234\",\n\"subject\": \"Blah Blah\",\n\"note\": \"\",\n\"interviewers\": [\n{\n\"id\": \"111222333\",\n\"name\": \"Bobby Johnson\",\n\"email\": \"bobbyj@example.com\"\n}\n],\n\"timezone\": \"America\/Los_Angeles\",\n},\n{\n\"pointer\": \"98754\",\n\"panel\": \"3243234\",\n\"subject\": \"Yadda Yadda\",\n\"note\": \"\",\n\"interviewers\": [\n{\n\"id\": \"444555666\",\n\"name\": \"Billy Johnson\",\n\"email\": \"billyj@example.com\"\n}\n],\n\"timezone\": \"America\/Los_Angeles\",\n},\n],\n\"hasNext\": false\n};\nreturn items;\n"
            },
            "typeVersion": 1
        },
        {
            "name": "Data 2",
            "type": "n8n-nodes-base.function",
            "position": [
                602,
                550
            ],
            "parameters": {
                "functionCode": "items[0].json = [\n{\n\"name\": \"test\",\n\"fields\": {\n\"FirstName\": \"Bobby\",\n\"LastName\": \"Johnson\",\n\"JobTitleDescription\": \"Recruiter\",\n\"HomeDepartmentDescription\": \"Recruiting Team\",\n\"Photo\": [\n{\n\"x\": \"attPuc6gAIHUOHjsY\",\n\"url\": \"http:\/\/urlto.com\/BobbyPhoto.jpg\",\n\"filename\": \"photo.jpg\",\n\"size\": 28956,\n\"type\": \"image\/jpeg\"\n}\n],\n\"eid\": \"111222333\"\n},\n\"createdTime\": \"2019-09-23T04:06:48.000Z\"\n},\n{\n\"name\": \"test2\",\n\"fields\": {\n\"FirstName\": \"Billy\",\n\"LastName\": \"Johnson\",\n\"JobTitleDescription\": \"CEO\",\n\"HomeDepartmentDescription\": \"Boss Team\",\n\"Photo\": [\n{\n\"x\": \"attPuc6gAIHUOHjsY\",\n\"url\": \"http:\/\/urlto.com\/BillyPhoto.jpg\",\n\"filename\": \"photo.jpg\",\n\"size\": 28956,\n\"type\": \"image\/jpeg\"\n}\n],\n\"eid\": \"444555666\"\n},\n\"createdTime\": \"2019-09-23T04:06:48.000Z\"\n}\n,\n{\n\"name\": \"test3\",\n\"fields\": {\n\"FirstName\": \"Susan\",\n\"LastName\": \"Smith\",\n\"JobTitleDescription\": \"CFO\",\n\"HomeDepartmentDescription\": \"Boss Team\",\n\"Photo\": [\n{\n\"x\": \"attPuc6gAIHUOHjsY\",\n\"url\": \"http:\/\/urlto.com\/SusanPhoto.jpg\",\n\"filename\": \"photo.jpg\",\n\"size\": 28956,\n\"type\": \"image\/jpeg\"\n}\n],\n\"eid\": \"777888999\"\n},\n\"createdTime\": \"2019-09-23T04:06:48.000Z\"\n}\n];\nreturn items;"
            },
            "typeVersion": 1
        },
        {
            "name": "Convert Data 1",
            "type": "n8n-nodes-base.function",
            "position": [
                752,
                350
            ],
            "parameters": {
                "functionCode": "const newItems = [];\n\nfor (const item of items[0].json.data) {\n  newItems.push({ json: item });\n}\n\nreturn newItems;"
            },
            "typeVersion": 1
        },
        {
            "name": "Convert Data 2",
            "type": "n8n-nodes-base.function",
            "position": [
                752,
                550
            ],
            "parameters": {
                "functionCode": "const newItems = [];\n\nfor (const item of items[0].json) {\n  newItems.push({ json: item });\n}\n\nreturn newItems;"
            },
            "typeVersion": 1
        },
        {
            "name": "Merge",
            "type": "n8n-nodes-base.merge",
            "position": [
                990,
                430
            ],
            "parameters": {
                "mode": "mergeByKey",
                "propertyName1": "interviewers[0].id",
                "propertyName2": "fields.eid"
            },
            "typeVersion": 1
        }
    ],
    "connections": {
        "Data 1": {
            "main": [
                [
                    {
                        "node": "Convert Data 1",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Data 2": {
            "main": [
                [
                    {
                        "node": "Convert Data 2",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Convert Data 1": {
            "main": [
                [
                    {
                        "node": "Merge",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Convert Data 2": {
            "main": [
                [
                    {
                        "node": "Merge",
                        "type": "main",
                        "index": 1
                    }
                ]
            ]
        }
    }
}
Back to Workflows

Related Workflows

Gmail Googlecalendartool Send Triggered
View
Manual Securityscorecard Automate Triggered
View
Filter Slack Send Scheduled
View
InstaTest
View
Example - Backup n8n to Nextcloud
View
Unique QRcode coupon assignment and validation for Lead Generation system
View
Telegram Wait Send Webhook
View
n8n Error Report to Line
View
Typeform Spreadsheetfile Automate Triggered
View
Automatically Update YouTube Video Descriptions with Inserted Text
View