-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathworkflow-recT0JnSrTTe5UT4M.json
More file actions
1 lines (1 loc) · 5.36 KB
/
workflow-recT0JnSrTTe5UT4M.json
File metadata and controls
1 lines (1 loc) · 5.36 KB
1
{"name":"[n8n] Email Notifications to Telegram using Temporary HTML URL Hosting via GitHub Gist","nodes":[{"parameters":{"format":"resolved","options":{"customEmailConfig":"[\"UNSEEN\"]","forceReconnect":60}},"name":"Email Trigger (IMAP)","type":"n8n-nodes-base.emailReadImap","position":[860,580],"typeVersion":2},{"parameters":{"chatId":"<Your Chat ID Here>","text":"=📧 <b>You've got mail!</b>\n\nA new email has arrived from this address: <code>{{ $node[\"Email Trigger (IMAP)\"].json[\"from\"][\"value\"][\"0\"][\"address\"] }}</code>\n\n🌐 A secert HTML page has been created for it, where you can preview the message by following the link below 👇","replyMarkup":"inlineKeyboard","inlineKeyboard":{"rows":[{"row":{"buttons":[{"text":"={{ $('Github Gist').item.json.files[\"email.html\"].filename }}","additionalFields":{"url":"={{'http://emails.nskha.com/?iloven8n=nskha&id='+ $('Github Gist').item.json.id}}"}}]}}]},"additionalFields":{"appendAttribution":true,"disable_web_page_preview":true,"parse_mode":"HTML"}},"name":"Telegram","type":"n8n-nodes-base.telegram","position":[1460,580],"typeVersion":1.1},{"parameters":{"method":"POST","url":"https://api.github.com/gists","authentication":"predefinedCredentialType","nodeCredentialType":"githubApi","sendHeaders":true,"headerParameters":{"parameters":[{"name":"Accept","value":"application/vnd.github+json"}]},"sendBody":true,"specifyBody":"json","jsonBody":"={\n \"description\": \"{{ $json.date }} - from {{ JSON.stringify($json.from.value[0].address).slice(1, -1) }} - to {{ JSON.stringify($json.to.value[0].address).slice(1, -1) }}\",\n \"public\": false,\n \"files\": {\n \"email.html\": {\n \"content\": \"{{ JSON.stringify($json.html).slice(1, -1) }}\"\n }\n }\n}","options":{"redirect":{"redirect":{}}}},"name":"Github Gist","type":"n8n-nodes-base.httpRequest","position":[1160,580],"notesInFlow":true,"typeVersion":4.1,"notes":"Save HTML content"},{"parameters":{"content":"## Simple Conversion of Emails into HTML Webpages\nTo-do:\n* Configure your GitHub credentials through `Predefined Credential Type` => `GitHub API`.\n* Add your Telegram credentials by providing your `Chat ID`.\n* [**Optional**] You can host this [small project](https://github.com/Automations-Project/Emails/tree/main) on your own domain using GitHub Pages.\n\n \n\n\n\n\n\n\n\n ","height":626.9128738621571,"width":872,"color":7},"name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[780,360],"typeVersion":1},{"parameters":{"amount":3},"name":"Wait","type":"n8n-nodes-base.wait","position":[860,820],"webhookId":"c5202512-f84e-44b4-b357-9ee2124bd507","notesInFlow":true,"typeVersion":1,"notes":"Delete within 3h"},{"parameters":{"operation":"deleteMessage","chatId":"<Your Chat ID Here>","messageId":"={{ $('Telegram').item.json.result.message_id }}"},"name":"Telegram ","type":"n8n-nodes-base.telegram","position":[1460,820],"typeVersion":1.1},{"parameters":{"method":"DELETE","url":"=https://api.github.com/gists/{{ $item(\"0\").$node[\"Github Gist\"].json[\"id\"] }}","authentication":"predefinedCredentialType","nodeCredentialType":"githubApi","sendHeaders":true,"headerParameters":{"parameters":[{"name":"Accept","value":"application/vnd.github+json"}]},"options":{"redirect":{"redirect":{}}}},"name":"Github Gist ","type":"n8n-nodes-base.httpRequest","position":[1160,820],"notesInFlow":true,"typeVersion":4.1,"notes":"Remove HTML content"}],"connections":{"Wait":{"main":[[{"node":"Github Gist ","type":"main","index":0}]]},"Telegram":{"main":[[{"node":"Wait","type":"main","index":0}]]},"Github Gist":{"main":[[{"node":"Telegram","type":"main","index":0}]]},"Github Gist ":{"main":[[{"node":"Telegram ","type":"main","index":0}]]},"Email Trigger (IMAP)":{"main":[[{"node":"Github Gist","type":"main","index":0}]]}},"active":"false","settings":{"executionOrder":"v1","timezone":"Europe/Berlin","saveExecutionProgress":true,"saveManualExecutions":true,"callerPolicy":"workflowsFromSameOwner","executionTimeout":600,"errorWorkflow":""},"staticData":"","pinData":{},"meta":{"templateCredsSetupCompleted":false},"tags":[{"createdAt":"2024-04-09T15:05:25.911Z","updatedAt":"2024-04-09T15:05:25.911Z","id":"R2l0aHVi","name":"Github"},{"createdAt":"2024-04-09T15:05:25.911Z","updatedAt":"2024-04-09T15:05:25.911Z","id":"RW1haWxSZWFkSW1hcA","name":"EmailReadImap"},{"createdAt":"2024-04-09T15:05:25.911Z","updatedAt":"2024-04-09T15:05:25.911Z","id":"SW1hcA","name":"Imap"},{"createdAt":"2024-04-09T15:05:25.911Z","updatedAt":"2024-04-09T15:05:25.911Z","id":"VGVsZWdyYW0","name":"Telegram"},{"createdAt":"2024-04-09T15:05:25.911Z","updatedAt":"2024-04-09T15:05:25.911Z","id":"VGVsZWdyYW1BcGk","name":"TelegramApi"},{"createdAt":"2024-04-09T15:05:25.911Z","updatedAt":"2024-04-09T15:05:25.911Z","id":"SHR0cFJlcXVlc3Q","name":"HttpRequest"},{"createdAt":"2024-04-09T15:05:25.911Z","updatedAt":"2024-04-09T15:05:25.911Z","id":"R2l0aHViQXBp","name":"GithubApi"}]}