{ "nodes": [ { "name": "Set", "type": "n8n-nodes-base.set", "position": [ 500, 510 ], "parameters": { "values": { "string": [ { "name": "id", "value": "={{$node[\"GetVideosYT\"].json[\"id\"][\"videoId\"]}}" }, { "name": "url", "value": "=https://youtu.be/{{$node[\"GetVideosYT\"].json[\"id\"][\"videoId\"]}}" }, { "name": "title", "value": "={{$node[\"GetVideosYT\"].json[\"snippet\"][\"title\"]}}" } ], "boolean": [] }, "options": {}, "keepOnlySet": true }, "typeVersion": 1 }, { "name": "Function", "type": "n8n-nodes-base.function", "position": [ 640, 510 ], "parameters": { "functionCode": "const new_items = [];\nconst data = this.getWorkflowStaticData('node');\n\ndata.ids = data.ids || [];\n\nfor (var i=0; i item.json.id)\nreturn new_items;\n" }, "typeVersion": 1 }, { "name": "CheckTime", "type": "n8n-nodes-base.interval", "position": [ 210, 510 ], "parameters": { "unit": "minutes", "interval": 30 }, "typeVersion": 1 }, { "name": "GetVideosYT", "type": "n8n-nodes-base.youTube", "position": [ 370, 510 ], "parameters": { "limit": 4, "filters": { "channelId": "UCTe5YtigJdZZ3i-za6IkbGQ" }, "options": { "order": "date" }, "resource": "video" }, "credentials": { "youTubeOAuth2Api": "tubo" }, "typeVersion": 1 }, { "name": "SendVideo", "type": "n8n-nodes-base.telegram", "position": [ 790, 510 ], "parameters": { "text": "=Nuovo video di almi su YouTube!\n{{$node[\"Function\"].json[\"title\"]}}\n\n{{$node[\"Function\"].json[\"url\"]}}", "chatId": "-1001178002763", "additionalFields": { "parse_mode": "HTML" } }, "credentials": { "telegramApi": "bot raspino" }, "typeVersion": 1 } ], "connections": { "Set": { "main": [ [ { "node": "Function", "type": "main", "index": 0 } ] ] }, "Function": { "main": [ [ { "node": "SendVideo", "type": "main", "index": 0 } ] ] }, "CheckTime": { "main": [ [ { "node": "GetVideosYT", "type": "main", "index": 0 } ] ] }, "GetVideosYT": { "main": [ [ { "node": "Set", "type": "main", "index": 0 } ] ] } } }