I tried pasting that into a Function node and it didn’t work. Here’s some background. The date itself will be different for each row so that needs to be an Input Name. Basically, I’m downloading my Gmail messages that are confirmations for my dog’s daycare appointments
–I want them to automatically create Google Calendar events for me. I just need to be able to extract the date and format it as a Google Calendar date (i.e. 2022-05-31T19:30:00Z) I’ve gotten this far:
{ "nodes": [ { "parameters": {}, "name": "Start", "type": "n8n-nodes-base.start", "typeVersion": 1, "position": [ 240, 300 ] }, { "parameters": { "resource": "message", "operation": "getAll", "additionalFields": { "format": "resolved" } }, "name": "Gmail", "type": "n8n-nodes-base.gmail", "typeVersion": 1, "position": [ 400, 300 ], "credentials": { "gmailOAuth2": { "id": "3", "name": "Gmail account" } } }, { "parameters": { "conditions": { "string": [ { "value1": "={{$json[\"Text\"]}}", "operation": "=contains", "value2": "Your registration for Dave at Muttassori has been approved" } ] } }, "name": "IF", "type": "n8n-nodes-base.if", "typeVersion": 1, "position": [ 720, 300 ] }, { "parameters": { "keepOnlySet": true, "values": { "string": [ { "name": "Text", "value": "={{$json[\"text\"]}}" }, { "name": "MessageID", "value": "={{$json[\"messageId\"]}}" }, { "name": "HTML", "value": "={{$json[\"textAsHtml\"]}}" } ] }, "options": {} }, "name": "Set", "type": "n8n-nodes-base.set", "typeVersion": 1, "position": [ 560, 300 ] }, { "parameters": { "dataPropertyName": "=HTML", "extractionValues": { "values": [ { "key": "Dates", "cssSelector": "p:nth-child(3)", "returnArray": true } ] }, "options": { "trimValues": true } }, "name": "HTML Extract", "type": "n8n-nodes-base.htmlExtract", "typeVersion": 1, "position": [ 900, 280 ] } ], "connections": { "Start": { "main": [ [ { "node": "Gmail", "type": "main", "index": 0 } ] ] }, "Gmail": { "main": [ [ { "node": "Set", "type": "main", "index": 0 } ] ] }, "IF": { "main": [ [ { "node": "HTML Extract", "type": "main", "index": 0 } ] ] }, "Set": { "main": [ [ { "node": "IF", "type": "main", "index": 0 } ] ] } } }