Hey Guys, ive been trying to migrate to different host and i deployed latest n8n docker.
I realized function was replaced with code, i was using this in my function node :
const staticData = getWorkflowStaticData('global');
const newTweetIds = items.map(item => item.json["Tweet ID"]);
const oldTweetIds = staticData.oldTweetIds;
if (!oldTweetIds) {
staticData.oldTweetIds = newTweetIds;
return items;
}
const actualNewTweetIds = newTweetIds.filter((id) => !oldTweetIds.includes(id));
const actualNewTweets = items.filter((data) => actualNewTweetIds.includes(data.json['Tweet ID']));
staticData.oldTweetIds = [...actualNewTweetIds, ...oldTweetIds];
return actualNewTweets;
its giving me null output, i moved the code to code but its not working giving me item error.
could someone help me updating this? its supposed to fetch only latest tweets after trigger
thanks!