Undefined output of the mapped field

Hi community!

I have a strange issue - I use Google Spreadsheets node to insert some data there.

Even though a previous node outputs data, S/S node mapped fields return undefined output.

The interesting thing is that data still gets transferred to S/S.

Also, when I’ve build this workflow a few days ago, everything worked properly.

I’m using n8n trial period.

Thank you in advance for your help!

I can’t confirm. Perhaps if you could provide the entire workflow json and paste into the field that appears when clicking the ‘</>’ button on the forums.

But at a glance it looks like to me that potentially you are just viewing the latest item from the last node, which contains only “_source” and no other fields, which would show in the visualizer undefined, as no other values you are references exist for that item. This is most likely true as you said it still works either way.

Sure! And I think you’re right! I haven’t noticed this _source item. It appeared in the output from the Merge node. Not sure how should I avoid it. Because further in the workflow I have HTTP request node which fails because of this undefined output.

Here you go with the json:

{
  "name": "InstaScraper",
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        0,
        0
      ],
      "id": "6d2f4983-bd73-4c5f-9311-0065a3109a63",
      "name": "When clicking ‘Test workflow’"
    },
    {
      "parameters": {
        "url": "https://api.apify.com/v2/acts/xMc5Ga1oCONPmWJIa/run-sync-get-dataset-items",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Accept",
              "value": "application/json"
            },
            {
              "name": "Authorization",
              "value": "Bearer  apify_api_28Jy0xPAMCoEvT1Xc8sb3zQKaes5iX0c1sqy"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "{\n    \"resultsLimit\": 4,\n    \"username\": [\n        \"ai.vadym\"\n    ]\n}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        220,
        0
      ],
      "id": "81342438-4159-473b-b3f5-91c90d3e32e0",
      "name": "HTTP Request"
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "1Tr5kEVI-fNaVS_22_c5N7NdFofc51MaHM369AkjTi7Q",
          "mode": "list",
          "cachedResultName": "InstaScraper",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Tr5kEVI-fNaVS_22_c5N7NdFofc51MaHM369AkjTi7Q/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Аркуш1",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Tr5kEVI-fNaVS_22_c5N7NdFofc51MaHM369AkjTi7Q/edit#gid=0"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "id": "={{ $json.id }}",
            "caption": "={{ $json.caption }}",
            "shortCode": "={{ $json.shortCode }}",
            "url": "={{ $json.url }}",
            "firstComment": "={{ $json.firstComment }}",
            "commentsCount": "={{ $json.commentsCount }}",
            "hashtags": "={{ $json.hashtags.join(\", \") }}",
            "videoUrl": "={{ $json.videoUrl }}",
            "displayUrl": "={{ $json.displayUrl }}",
            "likesCount": "={{ $json.likesCount }}",
            "videoPlayCount": "={{ $json.videoPlayCount }}",
            "videoDuration": "={{ $json.videoDuration }}",
            "videoViewCount": "={{ $json.videoViewCount }}",
            "ownerUsername": "={{ $json.ownerUsername }}",
            "timestamp": "={{ $json.timestamp }}",
            "scrapedTranscript": "={{ $json._source }}"
          },
          "matchingColumns": [
            "id"
          ],
          "schema": [
            {
              "id": "timestamp",
              "displayName": "timestamp",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "id",
              "displayName": "id",
              "required": false,
              "defaultMatch": true,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "shortCode",
              "displayName": "shortCode",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "ownerUsername",
              "displayName": "ownerUsername",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "caption",
              "displayName": "caption",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "hashtags",
              "displayName": "hashtags",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "url",
              "displayName": "url",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "commentsCount",
              "displayName": "commentsCount",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "firstComment",
              "displayName": "firstComment",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "displayUrl",
              "displayName": "displayUrl",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "videoUrl",
              "displayName": "videoUrl",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "likesCount",
              "displayName": "likesCount",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "videoViewCount",
              "displayName": "videoViewCount",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "videoPlayCount",
              "displayName": "videoPlayCount",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "videoDuration",
              "displayName": "videoDuration",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "scrapedTranscript",
              "displayName": "scrapedTranscript",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "newTranscript",
              "displayName": "newTranscript",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        1120,
        -20
      ],
      "id": "d290fefc-da2a-430a-8e5d-052858ae20c6",
      "name": "Google Sheets",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "ACzuY1rKNgRNdbEi",
          "name": "Google Sheets account"
        }
      }
    },
    {
      "parameters": {
        "maxItems": 3
      },
      "type": "n8n-nodes-base.limit",
      "typeVersion": 1,
      "position": [
        440,
        0
      ],
      "id": "c11f8f70-4f8b-4b34-848f-7424e67248d2",
      "name": "Limit"
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1Tr5kEVI-fNaVS_22_c5N7NdFofc51MaHM369AkjTi7Q",
          "mode": "list",
          "cachedResultName": "InstaScraper",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Tr5kEVI-fNaVS_22_c5N7NdFofc51MaHM369AkjTi7Q/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Аркуш1",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Tr5kEVI-fNaVS_22_c5N7NdFofc51MaHM369AkjTi7Q/edit#gid=0"
        },
        "filtersUI": {
          "values": [
            {
              "lookupColumn": "id",
              "lookupValue": "={{ $json.id }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        660,
        -160
      ],
      "id": "1fb86e0a-4767-43ab-ba53-ae1883566213",
      "name": "Google Sheets1",
      "alwaysOutputData": true,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "ACzuY1rKNgRNdbEi",
          "name": "Google Sheets account"
        }
      }
    },
    {
      "parameters": {
        "mode": "combine",
        "fieldsToMatchString": "id",
        "joinMode": "keepNonMatches",
        "options": {}
      },
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3,
      "position": [
        880,
        -20
      ],
      "id": "01a8b527-f042-4d55-9f2a-7ff6949188b1",
      "name": "Merge"
    },
    {
      "parameters": {
        "resource": "audio",
        "operation": "transcribe",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.8,
      "position": [
        1560,
        -20
      ],
      "id": "1fa58077-9407-4aed-8456-7268cadf6e17",
      "name": "OpenAI",
      "credentials": {
        "openAiApi": {
          "id": "2McMXgyBweXW9Z85",
          "name": "OpenAi account"
        }
      }
    },
    {
      "parameters": {
        "url": "={{ $json.videoUrl }}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1340,
        -20
      ],
      "id": "ff5f0076-e034-40c5-9eae-422ceca75508",
      "name": "HTTP Request1"
    }
  ],
  "pinData": {
    "OpenAI": [
      {
        "json": {
          "text": "А як почати його використовувати в своєму бізнесі? Ми вирішили... Та х**у, бл**ь, не подобається! Сука! Недовзька тема, бл**ь! Хто сука, то куди звук придумав? Все це легко і без навичок програмування До зустрічі! Ха-ха-ха-ха-ха-ха-ха! Я це знаю! Чувак, я завис! Добре! Зайдісь! Супергуд!"
        }
      }
    ],
    "Limit": [
      {
        "json": {
          "inputUrl": "https://www.instagram.com/ai.vadym",
          "id": "3563352020306524835",
          "type": "Video",
          "shortCode": "DFzkch0Cnqj",
          "caption": "ШІ вже тут – ти з нами? \n\n19-23 березня ми беремо ноутбуки, валізи і вирушаємо у подорож, яка змінить гру. 5 днів в Іспанії – і ти вже не той, що був учора!\n\nЩо на нас чекає?\n\n• Про штучний інтелект без води – тільки практичні інструменти, які реально працюють.\n\n• Валенсія без туристичних кліше – атмосферні місця, гольф, локальні секрети і море.\n\n• Найкраща компанія – разом розвиватись і кайфувати завжди веселіше.\n\nА головне – наш мега-спікер @ai.vadym , який розкладе все по поличках і покаже, як використати ШІ на максимум!\n\n🚀 Готовий(-а) підключити ШІ до свого життя? Пиши “ШІ” у коментарі, і ми тобі все розкажемо!\n\n19-23 березня\nВаленсія\nКількість місць:10",
          "hashtags": [],
          "mentions": [
            "ai.vadym"
          ],
          "url": "https://www.instagram.com/p/DFzkch0Cnqj/",
          "commentsCount": 74,
          "firstComment": "ШІ",
          "latestComments": [
            {
              "id": "17915776839082061",
              "text": "ШІ",
              "ownerUsername": "raevskaya.yulya",
              "ownerProfilePicUrl": "https://instagram.frao1-1.fna.fbcdn.net/v/t51.2885-19/97195959_3559578730735665_5940596848824680448_n.jpg?stp=dst-jpg_s150x150_tt6&_nc_ht=instagram.frao1-1.fna.fbcdn.net&_nc_cat=109&_nc_oc=Q6cZ2AELlch4_jVw1l6JE_WhyCysXwShoCGvDdD6uuFHUQOusyHqJw0ZbjAf6ryz-LGOo88&_nc_ohc=5ZbX5sTcYUAQ7kNvgHXa6kg&_nc_gid=eADOMRc__2JUQNQQqSdxGg&edm=APs17CUBAAAA&ccb=7-5&oh=00_AYGPhPKk_fmKefqxMEvtfQLZ5-cJh0wx05t7qwfjgl8uXw&oe=67DCA304&_nc_sid=10d13b",
              "timestamp": "2025-03-10T00:54:31.000Z",
              "repliesCount": 0,
              "replies": [],
              "likesCount": 0,
              "owner": {
                "id": "5802948865",
                "is_verified": false,
                "profile_pic_url": "https://instagram.frao1-1.fna.fbcdn.net/v/t51.2885-19/97195959_3559578730735665_5940596848824680448_n.jpg?stp=dst-jpg_s150x150_tt6&_nc_ht=instagram.frao1-1.fna.fbcdn.net&_nc_cat=109&_nc_oc=Q6cZ2AELlch4_jVw1l6JE_WhyCysXwShoCGvDdD6uuFHUQOusyHqJw0ZbjAf6ryz-LGOo88&_nc_ohc=5ZbX5sTcYUAQ7kNvgHXa6kg&_nc_gid=eADOMRc__2JUQNQQqSdxGg&edm=APs17CUBAAAA&ccb=7-5&oh=00_AYGPhPKk_fmKefqxMEvtfQLZ5-cJh0wx05t7qwfjgl8uXw&oe=67DCA304&_nc_sid=10d13b",
                "username": "raevskaya.yulya"
              }
            },
            {
              "id": "17902512162036357",
              "text": "ШІ",
              " "...
      }
    }
  ]
}

You can use a filter node to drop all items that don’t contain certain values, that should help solve that.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.