Thank you so much for the sample code… I implemented the function but I ended up getting an error.
ERROR: Cannot read property ‘map’ of undefined
Details
Stack
TypeError: Cannot read property 'map' of undefined
at /usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes:1:130
at Object.<anonymous> (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes:9:2)
at NodeVM.run (/usr/local/lib/node_modules/n8n/node_modules/vm2/lib/main.js:1167:29)
at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Function.node.js:66:31)
at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/src/Workflow.js:492:37)
at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/src/WorkflowExecute.js:424:62
at processTicksAndRejections (node:internal/process/task_queues:96:5)
Need help? Open Function documentation
Execute Workflow
Here is the JSON output…(I realize this is not an N8N issue but just my lack of understanding of Javascript. (I’m a Python guy
).
[
{
"inte_data": [
{
"network": "twitter",
"posted": "2021-05-28 04:41:37 +00000",
"postid": "1398137358655045632",
"text": "RT @BrianNoronha5: "The future of crypto mining is renewable": Argo Blockchain's CEO Peter Wall on 'green' bitcoin & sustainability #HODL #Bitcoin #BTC $BTC #ARB $ARBKF #ARBKF #ZCASH #ZEC $ZEC #cryptocurrency #Crypto https://t.co/5tXu663W9H via @bdaily",
"lang": "en",
"type": "link",
"sentiment": "neutral",
"url": "https://twitter.com/invbluesky_/status/1398137358655045632",
"user": {
"userid": "1219286260772212736",
"name": "Blue Sky Capital",
"url": "https://twitter.com/invbluesky_",
"image": "https://pbs.twimg.com/profile_images/1289708519479017472/7XSGDBnF_normal.jpg",
"description": "Rule No.1: Never lose money, Rule No.2: Never forget rule No.1",
"location": "",
"influence": {
"name": "followers",
"count": 540
}
},
"urls": [
{
"short_url": "https://t.co/5tXu663W9H",
"url": "https://bdaily.co.uk/articles/2021/05/27/the-future-of-crypto-mining-is-renewable-argo-blockchains-ceo-peter-wall-on-green-bitcoin-and-sustainability",
"text": "bdaily.co.uk/articles/2021/…"
}
],
"tags": [
{
"text": "HODL",
"url": "http://twitter.com/search/%23HODL"
},
{
"text": "Bitcoin",
"url": "http://twitter.com/search/%23Bitcoin"
},
{
"text": "BTC",
"url": "http://twitter.com/search/%23BTC"
},
{
"text": "ARB",
"url": "http://twitter.com/search/%23ARB"
},
{
"text": "ARBKF",
"url": "http://twitter.com/search/%23ARBKF"
},
{
"text": "ZCASH",
"url": "http://twitter.com/search/%23ZCASH"
},
{
"text": "ZEC",
"url": "http://twitter.com/search/%23ZEC"
},
{
"text": "cryptocurrency",
"url": "http://twitter.com/search/%23cryptocurrency"
},
{
"text": "Crypto",
"url": "http://twitter.com/search/%23Crypto"
}
],
"user_mentions": [
{
"text": "Bdaily",
"url": "https://twitter.com/Bdaily"
},
{
"text": "BrianNoronha5",
"url": "https://twitter.com/BrianNoronha5"
}
]
},
{...
}, // 12 keys
{...
}, // 12 keys
{...
}, // 12 keys
{...
}, // 12 keys
{...
}, // 13 keys
{...
}, // 12 keys
{...
}, // 12 keys
{...
}, // 13 keys
{...
}, // 12 keys
{...
}, // 12 keys
{...
}, // 12 keys
{...
}, // 12 keys
{...
}, // 12 keys
{...
}, // 12 keys
{...
}, // 12 keys
{...
}, // 13 keys
{...
}, // 12 keys
{...
}, // 12 keys
{...
} // 12 keys
]
}
]