Task: Send new tweets to Discord

n8n workflow JSON:
{"nodes":[{"name":"On clicking 'execute'","type":"n8n-nodes-base.manualTrigger","position":[260,280],"parameters":{},"typeVersion":1},{"name":"Twitter","type":"n8n-nodes-base.twitter","position":[420,100],"parameters":{"operation":"search","searchText":"from:n8n_io","additionalFields":{"resultType":"recent"}},"credentials":{"twitterOAuth1Api":{"id":"4","name":"Twitter OAuth account"}},"typeVersion":1},{"name":"Cron","type":"n8n-nodes-base.cron","position":[260,100],"parameters":{"triggerTimes":{"item":[{"mode":"everyMinute"}]}},"typeVersion":1},{"name":"Function","type":"n8n-nodes-base.function","position":[740,100],"parameters":{"functionCode":"const new_items = [];\nconst data = this.getWorkflowStaticData('node');\n\ndata.ids = data.ids || [];\n\nfor (var i=0; i<items.length; i++) {\n  if (data.ids.includes(items[i].json.id)) {\n    break;\n  } else {\n    new_items.push({json: items[i].json});\n  }\n}\n\ndata.ids = items.map(item => item.json.id)\nreturn new_items;\n"},"typeVersion":1},{"name":"Set","type":"n8n-nodes-base.set","position":[580,100],"parameters":{"values":{"number":[{"name":"id","value":"={{$json[\"id\"]}}"}],"string":[{"name":"url","value":"=https://twitter.com/{{$json[\"user\"][\"screen_name\"]}}/status/{{$json[\"id_str\"]}}"},{"name":"tweet","value":"={{$json[\"text\"]}}"},{"name":"username","value":"={{$node[\"Twitter\"].json[\"user\"][\"screen_name\"]}}"},{"name":"photo","value":"={{$json[\"user\"][\"profile_image_url_https\"]}}"},{"name":"name","value":"={{$json[\"user\"][\"name\"]}}"},{"name":"color","value":"={{$json[\"user\"][\"profile_link_color\"]}}"},{"name":"retweetedUrl","value":"=https://twitter.com/{{$json[\"retweeted_status\"][\"user\"][\"screen_name\"]}}/status/{{$json[\"retweeted_status\"][\"id_str\"]}}"}],"boolean":[{"name":"retweeted","value":"={{ $json[\"retweeted_status\"] ? true : false }}"}]},"options":{"dotNotation":true},"keepOnlySet":true},"typeVersion":1},{"name":"Discord","type":"n8n-nodes-base.discord","position":[900,100],"parameters":{"text":"={{ $json[\"retweeted\"] ? 'RT: ' + $json[\"retweetedUrl\"] : $json[\"url\"] }}","webhookUri":"WEBHOOK_URI_HERE"},"typeVersion":1}],"connections":{"Set":{"main":[[{"node":"Function","type":"main","index":0}]]},"Cron":{"main":[[{"node":"Twitter","type":"main","index":0}]]},"Twitter":{"main":[[{"node":"Set","type":"main","index":0}]]},"Function":{"main":[[{"node":"Discord","type":"main","index":0}]]},"On clicking 'execute'":{"main":[[{"node":"Twitter","type":"main","index":0}]]}}}