├── ALL_unique_nodes.txt ├── .github └── FUNDING.yml ├── Update Twitter banner using HTTP request.txt ├── Create, update, and get a profile in Humantic AI.txt ├── Analyze feedback using AWS Comprehend and send it to a Mattermost channel.txt ├── Chat with OpenAIs GPT via a simple Telegram Bot.txt ├── AI agent chat.txt ├── Analyze feedback and send a message on Mattermost.txt ├── Detect toxic language in Telegram messages.txt ├── OpenAI-powered tweet generator.txt ├── Using External Workflows as Tools in n8n.txt ├── Chat with local LLMs using n8n and Ollama.txt ├── Generate audio from text using OpenAI and Webhook _ Text to Speech Workflow.txt ├── Analyze tradingview.com charts with Chrome extension, N8N and OpenAI.txt ├── Configure your own Image Creation API Using OpenAI DALLE-3.txt ├── Add positive feedback messages to a table in Notion.txt ├── AI_ Ask questions about any data source (using the n8n workflow retriever).txt ├── AI chatbot that can search the web.txt ├── Extract license plate number from image uploaded via an n8n form.txt ├── Post New YouTube Videos to X.txt ├── Transform Image to Lego Style Using Line and Dall-E.txt ├── ETL pipeline for text processing.txt ├── Query Perplexity AI from your n8n workflows.txt ├── Generate Text-to-Speech Using Elevenlabs via API.txt ├── Use OpenRouter in n8n versions _1.78.txt ├── Convert text to speech with OpenAI.txt ├── Get Airtable data via AI and Obsidian Notes.txt ├── Summarize YouTube Videos from Transcript.txt ├── AI Agent with Ollama for current weather and wiki.txt ├── Automate Screenshots with URLbox & Analyze them with AI.txt ├── Siri AI Agent_ Apple Shortcuts powered voice template.txt ├── Force AI to use a specific output format.txt ├── Auto-Categorize blog posts in wordpress using A.I..txt ├── Summarize your emails with A.I. (via Openrouter) and send to Line messenger.txt ├── Summarize your emails with A.I. (via Openrouter) and send to Line messenger (1).txt ├── Custom LangChain agent written in JavaScript.txt ├── Creating a AI Slack Bot with Google Gemini.txt ├── AI chat with any data source (using the n8n workflow tool).txt ├── Agentic Telegram AI bot with with LangChain nodes and new tools.txt ├── Daily meetings summarization with Gemini AI.txt ├── MongoDB AI Agent - Intelligent Movie Recommendations.txt ├── Share YouTube Videos with AI Summaries on Discord.txt ├── Discord AI-powered bot.txt ├── KB Tool - Confluence Knowledge Base.txt ├── AI Powered Web Scraping with Jina, Google Sheets and OpenAI _ the EASY way.txt ├── Create dynamic Twitter profile banner.txt ├── Send daily translated Calvin and Hobbes Comics to Discord.txt ├── Automated End-to-End Fine-Tuning of OpenAI Models with Google Drive Integration.txt └── Notion to Pinecone Vector Store Integration.txt /ALL_unique_nodes.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 12 | polar: # Replace with a single Polar username 13 | buy_me_a_coffee: enescingoz 14 | thanks_dev: # Replace with a single thanks.dev username 15 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 16 | -------------------------------------------------------------------------------- /Update Twitter banner using HTTP request.txt: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": [ 3 | { 4 | "name": "On clicking 'execute'", 5 | "type": "n8n-nodes-base.manualTrigger", 6 | "position": [ 7 | 250, 8 | 300 9 | ], 10 | "parameters": {}, 11 | "typeVersion": 1 12 | }, 13 | { 14 | "name": "Start", 15 | "type": "n8n-nodes-base.start", 16 | "position": [ 17 | 250, 18 | 300 19 | ], 20 | "parameters": {}, 21 | "typeVersion": 1 22 | }, 23 | { 24 | "name": "HTTP Request", 25 | "type": "n8n-nodes-base.httpRequest", 26 | "position": [ 27 | 450, 28 | 300 29 | ], 30 | "parameters": { 31 | "url": "https://unsplash.com/photos/lUDMZUWFUXE/download?ixid=MnwxMjA3fDB8MXxhbGx8Mnx8fHx8fDJ8fDE2MzczMjY4Mjc&force=true", 32 | "options": {}, 33 | "responseFormat": "file", 34 | "headerParametersUi": { 35 | "parameter": [] 36 | } 37 | }, 38 | "typeVersion": 1 39 | }, 40 | { 41 | "name": "HTTP Request1", 42 | "type": "n8n-nodes-base.httpRequest", 43 | "position": [ 44 | 650, 45 | 300 46 | ], 47 | "parameters": { 48 | "url": "https://api.twitter.com/1.1/account/update_profile_banner.json", 49 | "options": {}, 50 | "requestMethod": "POST", 51 | "authentication": "oAuth1", 52 | "jsonParameters": true, 53 | "sendBinaryData": true, 54 | "binaryPropertyName": "banner:data" 55 | }, 56 | "credentials": { 57 | "oAuth1Api": { 58 | "id": "300", 59 | "name": "Unnamed credential" 60 | } 61 | }, 62 | "typeVersion": 1 63 | } 64 | ], 65 | "connections": { 66 | "HTTP Request": { 67 | "main": [ 68 | [ 69 | { 70 | "node": "HTTP Request1", 71 | "type": "main", 72 | "index": 0 73 | } 74 | ] 75 | ] 76 | }, 77 | "On clicking 'execute'": { 78 | "main": [ 79 | [ 80 | { 81 | "node": "HTTP Request", 82 | "type": "main", 83 | "index": 0 84 | } 85 | ] 86 | ] 87 | } 88 | } 89 | } -------------------------------------------------------------------------------- /Create, update, and get a profile in Humantic AI.txt: -------------------------------------------------------------------------------- 1 | { 2 | "id": "127", 3 | "name": "Create, update, and get a profile in Humantic AI", 4 | "nodes": [ 5 | { 6 | "name": "On clicking 'execute'", 7 | "type": "n8n-nodes-base.manualTrigger", 8 | "position": [ 9 | 290, 10 | 300 11 | ], 12 | "parameters": {}, 13 | "typeVersion": 1 14 | }, 15 | { 16 | "name": "Humantic AI", 17 | "type": "n8n-nodes-base.humanticAi", 18 | "position": [ 19 | 490, 20 | 300 21 | ], 22 | "parameters": { 23 | "userId": "https://www.linkedin.com/in/harshil1712/" 24 | }, 25 | "credentials": { 26 | "humanticAiApi": "humantic" 27 | }, 28 | "typeVersion": 1 29 | }, 30 | { 31 | "name": "HTTP Request", 32 | "type": "n8n-nodes-base.httpRequest", 33 | "position": [ 34 | 690, 35 | 300 36 | ], 37 | "parameters": { 38 | "url": "", 39 | "options": {}, 40 | "responseFormat": "file" 41 | }, 42 | "typeVersion": 1 43 | }, 44 | { 45 | "name": "Humantic AI1", 46 | "type": "n8n-nodes-base.humanticAi", 47 | "position": [ 48 | 890, 49 | 300 50 | ], 51 | "parameters": { 52 | "userId": "={{$node[\"Humantic AI\"].json[\"results\"][\"userid\"]}}", 53 | "operation": "update", 54 | "sendResume": true 55 | }, 56 | "credentials": { 57 | "humanticAiApi": "humantic" 58 | }, 59 | "typeVersion": 1 60 | }, 61 | { 62 | "name": "Humantic AI2", 63 | "type": "n8n-nodes-base.humanticAi", 64 | "position": [ 65 | 1090, 66 | 300 67 | ], 68 | "parameters": { 69 | "userId": "={{$node[\"Humantic AI\"].json[\"results\"][\"userid\"]}}", 70 | "options": { 71 | "persona": [ 72 | "hiring" 73 | ] 74 | }, 75 | "operation": "get" 76 | }, 77 | "credentials": { 78 | "humanticAiApi": "humantic" 79 | }, 80 | "typeVersion": 1 81 | } 82 | ], 83 | "active": false, 84 | "settings": {}, 85 | "connections": { 86 | "Humantic AI": { 87 | "main": [ 88 | [ 89 | { 90 | "node": "HTTP Request", 91 | "type": "main", 92 | "index": 0 93 | } 94 | ] 95 | ] 96 | }, 97 | "HTTP Request": { 98 | "main": [ 99 | [ 100 | { 101 | "node": "Humantic AI1", 102 | "type": "main", 103 | "index": 0 104 | } 105 | ] 106 | ] 107 | }, 108 | "Humantic AI1": { 109 | "main": [ 110 | [ 111 | { 112 | "node": "Humantic AI2", 113 | "type": "main", 114 | "index": 0 115 | } 116 | ] 117 | ] 118 | }, 119 | "On clicking 'execute'": { 120 | "main": [ 121 | [ 122 | { 123 | "node": "Humantic AI", 124 | "type": "main", 125 | "index": 0 126 | } 127 | ] 128 | ] 129 | } 130 | } 131 | } -------------------------------------------------------------------------------- /Analyze feedback using AWS Comprehend and send it to a Mattermost channel.txt: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": [ 3 | { 4 | "name": "Mattermost", 5 | "type": "n8n-nodes-base.mattermost", 6 | "position": [ 7 | 810, 8 | 300 9 | ], 10 | "parameters": { 11 | "message": "=You got new feedback with a score of {{$json[\"SentimentScore\"][\"Negative\"]}}. Here is what it says:{{$node[\"Typeform Trigger\"].json[\"What did you think about the event?\"]}}", 12 | "channelId": "h7cxrd1cefr13x689enzyw7xhc", 13 | "attachments": [], 14 | "otherOptions": {} 15 | }, 16 | "credentials": { 17 | "mattermostApi": "Mattermost Credentials" 18 | }, 19 | "typeVersion": 1 20 | }, 21 | { 22 | "name": "NoOp", 23 | "type": "n8n-nodes-base.noOp", 24 | "position": [ 25 | 800, 26 | 500 27 | ], 28 | "parameters": {}, 29 | "typeVersion": 1 30 | }, 31 | { 32 | "name": "IF", 33 | "type": "n8n-nodes-base.if", 34 | "position": [ 35 | 600, 36 | 400 37 | ], 38 | "parameters": { 39 | "conditions": { 40 | "number": [], 41 | "string": [ 42 | { 43 | "value1": "={{$json[\"Sentiment\"]}}", 44 | "value2": "NEGATIVE" 45 | } 46 | ] 47 | } 48 | }, 49 | "typeVersion": 1 50 | }, 51 | { 52 | "name": "AWS Comprehend", 53 | "type": "n8n-nodes-base.awsComprehend", 54 | "position": [ 55 | 400, 56 | 400 57 | ], 58 | "parameters": { 59 | "text": "={{$json[\"What did you think about the event?\"]}}", 60 | "operation": "detectSentiment" 61 | }, 62 | "credentials": { 63 | "aws": "AWS Comprehend Credentials" 64 | }, 65 | "typeVersion": 1 66 | }, 67 | { 68 | "name": "Typeform Trigger", 69 | "type": "n8n-nodes-base.typeformTrigger", 70 | "position": [ 71 | 200, 72 | 400 73 | ], 74 | "webhookId": "ad8a87ef-d293-4e48-8d36-838d69ebce0f", 75 | "parameters": { 76 | "formId": "DuJHEGW5" 77 | }, 78 | "credentials": { 79 | "typeformApi": "typeform" 80 | }, 81 | "typeVersion": 1 82 | } 83 | ], 84 | "connections": { 85 | "IF": { 86 | "main": [ 87 | [ 88 | { 89 | "node": "Mattermost", 90 | "type": "main", 91 | "index": 0 92 | } 93 | ], 94 | [ 95 | { 96 | "node": "NoOp", 97 | "type": "main", 98 | "index": 0 99 | } 100 | ] 101 | ] 102 | }, 103 | "AWS Comprehend": { 104 | "main": [ 105 | [ 106 | { 107 | "node": "IF", 108 | "type": "main", 109 | "index": 0 110 | } 111 | ] 112 | ] 113 | }, 114 | "Typeform Trigger": { 115 | "main": [ 116 | [ 117 | { 118 | "node": "AWS Comprehend", 119 | "type": "main", 120 | "index": 0 121 | } 122 | ] 123 | ] 124 | } 125 | } 126 | } -------------------------------------------------------------------------------- /Chat with OpenAIs GPT via a simple Telegram Bot.txt: -------------------------------------------------------------------------------- 1 | { 2 | "meta": { 3 | "instanceId": "014363851c6b81282e1489df62d7f66bb7c99af5dcb6c1032b3a83a1d72baee4" 4 | }, 5 | "nodes": [ 6 | { 7 | "id": "0b4eb8e4-e98b-4f67-b134-914a5aa46b4d", 8 | "name": "Telegram Trigger", 9 | "type": "n8n-nodes-base.telegramTrigger", 10 | "position": [ 11 | 960, 12 | 400 13 | ], 14 | "webhookId": "9c8b833c-7aa7-430d-8fc0-47936f695ddf", 15 | "parameters": { 16 | "updates": [ 17 | "message" 18 | ], 19 | "additionalFields": {} 20 | }, 21 | "credentials": { 22 | "telegramApi": { 23 | "id": "4lzd2F9cNrnR7j0j", 24 | "name": "Telegram account" 25 | } 26 | }, 27 | "typeVersion": 1.1 28 | }, 29 | { 30 | "id": "339246f2-76cb-44c4-8828-da0cb5d3ad5e", 31 | "name": "OpenAI Chat Model", 32 | "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", 33 | "position": [ 34 | 1100, 35 | 600 36 | ], 37 | "parameters": { 38 | "options": {} 39 | }, 40 | "credentials": { 41 | "openAiApi": { 42 | "id": "m3YyjGXFLLWwcnk7", 43 | "name": "OpenAi account" 44 | } 45 | }, 46 | "typeVersion": 1 47 | }, 48 | { 49 | "id": "70a981e2-7833-473b-a27a-fedf860901cb", 50 | "name": "AI Agent", 51 | "type": "@n8n/n8n-nodes-langchain.agent", 52 | "position": [ 53 | 1200, 54 | 400 55 | ], 56 | "parameters": { 57 | "text": "=Respond to this as a helpful assistant with emojis: {{ $json.message.text }}", 58 | "options": {} 59 | }, 60 | "typeVersion": 1.2 61 | }, 62 | { 63 | "id": "fb6ff65b-56b4-44c4-978a-b9a5c3d535d6", 64 | "name": "Telegram", 65 | "type": "n8n-nodes-base.telegram", 66 | "position": [ 67 | 1560, 68 | 400 69 | ], 70 | "parameters": { 71 | "text": "={{ $json.output }}", 72 | "chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}", 73 | "additionalFields": { 74 | "appendAttribution": false 75 | } 76 | }, 77 | "credentials": { 78 | "telegramApi": { 79 | "id": "4lzd2F9cNrnR7j0j", 80 | "name": "Telegram account" 81 | } 82 | }, 83 | "typeVersion": 1.1 84 | } 85 | ], 86 | "pinData": {}, 87 | "connections": { 88 | "AI Agent": { 89 | "main": [ 90 | [ 91 | { 92 | "node": "Telegram", 93 | "type": "main", 94 | "index": 0 95 | } 96 | ] 97 | ] 98 | }, 99 | "Telegram Trigger": { 100 | "main": [ 101 | [ 102 | { 103 | "node": "AI Agent", 104 | "type": "main", 105 | "index": 0 106 | } 107 | ] 108 | ] 109 | }, 110 | "OpenAI Chat Model": { 111 | "ai_languageModel": [ 112 | [ 113 | { 114 | "node": "AI Agent", 115 | "type": "ai_languageModel", 116 | "index": 0 117 | } 118 | ] 119 | ] 120 | } 121 | } 122 | } -------------------------------------------------------------------------------- /AI agent chat.txt: -------------------------------------------------------------------------------- 1 | { 2 | "meta": { 3 | "instanceId": "408f9fb9940c3cb18ffdef0e0150fe342d6e655c3a9fac21f0f644e8bedabcd9" 4 | }, 5 | "nodes": [ 6 | { 7 | "id": "939bb301-5e12-4d5b-9a56-61a61cca5f0d", 8 | "name": "OpenAI Chat Model", 9 | "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", 10 | "position": [ 11 | 640, 12 | 460 13 | ], 14 | "parameters": { 15 | "model": "gpt-4o-mini", 16 | "options": {} 17 | }, 18 | "credentials": { 19 | "openAiApi": { 20 | "id": "8gccIjcuf3gvaoEr", 21 | "name": "OpenAi account" 22 | } 23 | }, 24 | "typeVersion": 1 25 | }, 26 | { 27 | "id": "372777e8-ce90-4dea-befc-ac1b2eb4729f", 28 | "name": "Window Buffer Memory", 29 | "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow", 30 | "position": [ 31 | 780, 32 | 460 33 | ], 34 | "parameters": {}, 35 | "typeVersion": 1.2 36 | }, 37 | { 38 | "id": "7a8f0ad1-1c00-4043-b3e5-c88521140a1a", 39 | "name": "SerpAPI", 40 | "type": "@n8n/n8n-nodes-langchain.toolSerpApi", 41 | "position": [ 42 | 920, 43 | 460 44 | ], 45 | "parameters": { 46 | "options": {} 47 | }, 48 | "credentials": { 49 | "serpApi": { 50 | "id": "aJCKjxx6U3K7ydDe", 51 | "name": "SerpAPI account" 52 | } 53 | }, 54 | "typeVersion": 1 55 | }, 56 | { 57 | "id": "a7624108-e3da-4193-a625-887314216b8b", 58 | "name": "When chat message received", 59 | "type": "@n8n/n8n-nodes-langchain.chatTrigger", 60 | "position": [ 61 | 360, 62 | 240 63 | ], 64 | "webhookId": "53c136fe-3e77-4709-a143-fe82746dd8b6", 65 | "parameters": { 66 | "options": {} 67 | }, 68 | "typeVersion": 1.1 69 | }, 70 | { 71 | "id": "6b8b7de8-fe3f-43b5-97ce-a52a9e44eb5e", 72 | "name": "AI Agent", 73 | "type": "@n8n/n8n-nodes-langchain.agent", 74 | "position": [ 75 | 680, 76 | 240 77 | ], 78 | "parameters": { 79 | "options": {} 80 | }, 81 | "typeVersion": 1.6 82 | } 83 | ], 84 | "pinData": {}, 85 | "connections": { 86 | "SerpAPI": { 87 | "ai_tool": [ 88 | [ 89 | { 90 | "node": "AI Agent", 91 | "type": "ai_tool", 92 | "index": 0 93 | } 94 | ] 95 | ] 96 | }, 97 | "OpenAI Chat Model": { 98 | "ai_languageModel": [ 99 | [ 100 | { 101 | "node": "AI Agent", 102 | "type": "ai_languageModel", 103 | "index": 0 104 | } 105 | ] 106 | ] 107 | }, 108 | "Window Buffer Memory": { 109 | "ai_memory": [ 110 | [ 111 | { 112 | "node": "AI Agent", 113 | "type": "ai_memory", 114 | "index": 0 115 | } 116 | ] 117 | ] 118 | }, 119 | "When chat message received": { 120 | "main": [ 121 | [ 122 | { 123 | "node": "AI Agent", 124 | "type": "main", 125 | "index": 0 126 | } 127 | ] 128 | ] 129 | } 130 | } 131 | } -------------------------------------------------------------------------------- /Analyze feedback and send a message on Mattermost.txt: -------------------------------------------------------------------------------- 1 | { 2 | "id": "133", 3 | "name": "Analyze the sentiment of feedback and send a message on Mattermost", 4 | "nodes": [ 5 | { 6 | "name": "Typeform Trigger", 7 | "type": "n8n-nodes-base.typeformTrigger", 8 | "position": [ 9 | 510, 10 | 260 11 | ], 12 | "webhookId": "ad8a87ef-d293-4e48-8d36-838d69ebce0f", 13 | "parameters": { 14 | "formId": "" 15 | }, 16 | "credentials": { 17 | "typeformApi": "typeform" 18 | }, 19 | "typeVersion": 1 20 | }, 21 | { 22 | "name": "Google Cloud Natural Language", 23 | "type": "n8n-nodes-base.googleCloudNaturalLanguage", 24 | "position": [ 25 | 710, 26 | 260 27 | ], 28 | "parameters": { 29 | "content": "={{$node[\"Typeform Trigger\"].json[\"What did you think about the event?\"]}}", 30 | "options": {} 31 | }, 32 | "credentials": { 33 | "googleCloudNaturalLanguageOAuth2Api": "cloud" 34 | }, 35 | "typeVersion": 1 36 | }, 37 | { 38 | "name": "IF", 39 | "type": "n8n-nodes-base.if", 40 | "position": [ 41 | 910, 42 | 260 43 | ], 44 | "parameters": { 45 | "conditions": { 46 | "number": [ 47 | { 48 | "value1": "={{$node[\"Google Cloud Natural Language\"].json[\"documentSentiment\"][\"score\"]}}" 49 | } 50 | ] 51 | } 52 | }, 53 | "typeVersion": 1 54 | }, 55 | { 56 | "name": "Mattermost", 57 | "type": "n8n-nodes-base.mattermost", 58 | "position": [ 59 | 1110, 60 | 160 61 | ], 62 | "parameters": { 63 | "message": "=You got a new feedback with a score of {{$node[\"Google Cloud Natural Language\"].json[\"documentSentiment\"][\"score\"]}}. Here is what it says:{{$node[\"Typeform Trigger\"].json[\"What did you think about the event?\"]}}", 64 | "channelId": "4h1bz64cyifwxnzojkzh8hxh4a", 65 | "attachments": [], 66 | "otherOptions": {} 67 | }, 68 | "credentials": { 69 | "mattermostApi": "mattermost" 70 | }, 71 | "typeVersion": 1 72 | }, 73 | { 74 | "name": "NoOp", 75 | "type": "n8n-nodes-base.noOp", 76 | "position": [ 77 | 1110, 78 | 360 79 | ], 80 | "parameters": {}, 81 | "typeVersion": 1 82 | } 83 | ], 84 | "active": false, 85 | "settings": {}, 86 | "connections": { 87 | "IF": { 88 | "main": [ 89 | [ 90 | { 91 | "node": "Mattermost", 92 | "type": "main", 93 | "index": 0 94 | } 95 | ], 96 | [ 97 | { 98 | "node": "NoOp", 99 | "type": "main", 100 | "index": 0 101 | } 102 | ] 103 | ] 104 | }, 105 | "Typeform Trigger": { 106 | "main": [ 107 | [ 108 | { 109 | "node": "Google Cloud Natural Language", 110 | "type": "main", 111 | "index": 0 112 | } 113 | ] 114 | ] 115 | }, 116 | "Google Cloud Natural Language": { 117 | "main": [ 118 | [ 119 | { 120 | "node": "IF", 121 | "type": "main", 122 | "index": 0 123 | } 124 | ] 125 | ] 126 | } 127 | } 128 | } -------------------------------------------------------------------------------- /Detect toxic language in Telegram messages.txt: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": [ 3 | { 4 | "name": "Telegram Trigger", 5 | "type": "n8n-nodes-base.telegramTrigger", 6 | "position": [ 7 | 600, 8 | 300 9 | ], 10 | "webhookId": "2d0805da-143e-40c9-b327-242b1f052c31", 11 | "parameters": { 12 | "updates": [ 13 | "message", 14 | "edited_message", 15 | "channel_post", 16 | "edited_channel_post" 17 | ], 18 | "additionalFields": {} 19 | }, 20 | "credentials": { 21 | "telegramApi": "telegram_habot" 22 | }, 23 | "typeVersion": 1 24 | }, 25 | { 26 | "name": "Google Perspective", 27 | "type": "n8n-nodes-base.googlePerspective", 28 | "position": [ 29 | 800, 30 | 300 31 | ], 32 | "parameters": { 33 | "text": "={{$json[\"message\"][\"text\"]}}", 34 | "options": { 35 | "languages": "en" 36 | }, 37 | "requestedAttributesUi": { 38 | "requestedAttributesValues": [ 39 | { 40 | "attributeName": "identity_attack" 41 | }, 42 | { 43 | "attributeName": "threat" 44 | }, 45 | { 46 | "attributeName": "profanity" 47 | } 48 | ] 49 | } 50 | }, 51 | "credentials": { 52 | "googlePerspectiveOAuth2Api": "perspective_api" 53 | }, 54 | "typeVersion": 1 55 | }, 56 | { 57 | "name": "IF", 58 | "type": "n8n-nodes-base.if", 59 | "position": [ 60 | 1000, 61 | 300 62 | ], 63 | "parameters": { 64 | "conditions": { 65 | "number": [ 66 | { 67 | "value1": "={{$json[\"attributeScores\"][\"PROFANITY\"][\"summaryScore\"][\"value\"]}}", 68 | "value2": 0.7, 69 | "operation": "larger" 70 | } 71 | ] 72 | } 73 | }, 74 | "typeVersion": 1 75 | }, 76 | { 77 | "name": "Telegram", 78 | "type": "n8n-nodes-base.telegram", 79 | "position": [ 80 | 1200, 81 | 150 82 | ], 83 | "parameters": { 84 | "text": "I don't tolerate toxic language!", 85 | "chatId": "={{$node[\"Telegram Trigger\"].json[\"message\"][\"chat\"][\"id\"]}}", 86 | "additionalFields": { 87 | "reply_to_message_id": "={{$node[\"Telegram Trigger\"].json[\"message\"][\"message_id\"]}}" 88 | } 89 | }, 90 | "credentials": { 91 | "telegramApi": "telegram_habot" 92 | }, 93 | "typeVersion": 1 94 | }, 95 | { 96 | "name": "NoOp", 97 | "type": "n8n-nodes-base.noOp", 98 | "position": [ 99 | 1200, 100 | 400 101 | ], 102 | "parameters": {}, 103 | "typeVersion": 1 104 | } 105 | ], 106 | "connections": { 107 | "IF": { 108 | "main": [ 109 | [ 110 | { 111 | "node": "Telegram", 112 | "type": "main", 113 | "index": 0 114 | } 115 | ], 116 | [ 117 | { 118 | "node": "NoOp", 119 | "type": "main", 120 | "index": 0 121 | } 122 | ] 123 | ] 124 | }, 125 | "Telegram Trigger": { 126 | "main": [ 127 | [ 128 | { 129 | "node": "Google Perspective", 130 | "type": "main", 131 | "index": 0 132 | } 133 | ] 134 | ] 135 | }, 136 | "Google Perspective": { 137 | "main": [ 138 | [ 139 | { 140 | "node": "IF", 141 | "type": "main", 142 | "index": 0 143 | } 144 | ] 145 | ] 146 | } 147 | } 148 | }sDetect toxic language in Telegram messages -------------------------------------------------------------------------------- /OpenAI-powered tweet generator.txt: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": [ 3 | { 4 | "name": "On clicking 'execute'", 5 | "type": "n8n-nodes-base.manualTrigger", 6 | "position": [ 7 | 250, 8 | 300 9 | ], 10 | "parameters": {}, 11 | "typeVersion": 1 12 | }, 13 | { 14 | "name": "FunctionItem", 15 | "type": "n8n-nodes-base.functionItem", 16 | "position": [ 17 | 450, 18 | 300 19 | ], 20 | "parameters": { 21 | "functionCode": "// hashtag list\nconst Hashtags = [\n \"#techtwitter\",\n \"#n8n\"\n];\n\n// random output function\nconst randomHashtag = Hashtags[Math.floor(Math.random() * Hashtags.length)];\nitem.hashtag = randomHashtag;\nreturn item;" 22 | }, 23 | "typeVersion": 1 24 | }, 25 | { 26 | "name": "HTTP Request", 27 | "type": "n8n-nodes-base.httpRequest", 28 | "position": [ 29 | 650, 30 | 300 31 | ], 32 | "parameters": { 33 | "url": "https://api.openai.com/v1/engines/text-davinci-001/completions", 34 | "options": {}, 35 | "requestMethod": "POST", 36 | "authentication": "headerAuth", 37 | "jsonParameters": true, 38 | "bodyParametersJson": "={\n \"prompt\": \"Generate a tweet, with under 100 characters, about and including the hashtag {{$node[\"FunctionItem\"].json[\"hashtag\"]}}:\",\n \"temperature\": 0.7,\n \"max_tokens\": 64,\n \"top_p\": 1,\n \"frequency_penalty\": 0,\n \"presence_penalty\": 0\n}" 39 | }, 40 | "credentials": { 41 | "httpHeaderAuth": "" 42 | }, 43 | "typeVersion": 1 44 | }, 45 | { 46 | "name": "Airtable", 47 | "type": "n8n-nodes-base.airtable", 48 | "position": [ 49 | 1050, 50 | 300 51 | ], 52 | "parameters": { 53 | "table": "main", 54 | "options": {}, 55 | "operation": "append", 56 | "application": "appOaG8kEA8FAABOr" 57 | }, 58 | "credentials": { 59 | "airtableApi": "" 60 | }, 61 | "typeVersion": 1 62 | }, 63 | { 64 | "name": "Set", 65 | "type": "n8n-nodes-base.set", 66 | "position": [ 67 | 850, 68 | 300 69 | ], 70 | "parameters": { 71 | "values": { 72 | "string": [ 73 | { 74 | "name": "Hashtag", 75 | "value": "={{$node[\"FunctionItem\"].json[\"hashtag\"]}}" 76 | }, 77 | { 78 | "name": "Content", 79 | "value": "={{$node[\"HTTP Request\"].json[\"choices\"][0][\"text\"]}}" 80 | } 81 | ] 82 | }, 83 | "options": {}, 84 | "keepOnlySet": true 85 | }, 86 | "typeVersion": 1 87 | } 88 | ], 89 | "connections": { 90 | "Set": { 91 | "main": [ 92 | [ 93 | { 94 | "node": "Airtable", 95 | "type": "main", 96 | "index": 0 97 | } 98 | ] 99 | ] 100 | }, 101 | "FunctionItem": { 102 | "main": [ 103 | [ 104 | { 105 | "node": "HTTP Request", 106 | "type": "main", 107 | "index": 0 108 | } 109 | ] 110 | ] 111 | }, 112 | "HTTP Request": { 113 | "main": [ 114 | [ 115 | { 116 | "node": "Set", 117 | "type": "main", 118 | "index": 0 119 | } 120 | ] 121 | ] 122 | }, 123 | "On clicking 'execute'": { 124 | "main": [ 125 | [ 126 | { 127 | "node": "FunctionItem", 128 | "type": "main", 129 | "index": 0 130 | } 131 | ] 132 | ] 133 | } 134 | } 135 | } -------------------------------------------------------------------------------- /Using External Workflows as Tools in n8n.txt: -------------------------------------------------------------------------------- 1 | { 2 | "id": "7DPLpEkww5Uctcml", 3 | "meta": { 4 | "instanceId": "75d76ac1fb686d403c2294ca007b62282f34c3e15dc3528cc1dbe36a827c0c6e" 5 | }, 6 | "name": "get_a_web_page", 7 | "tags": [ 8 | { 9 | "id": "7v5QbLiQYkQ7zGTK", 10 | "name": "tools", 11 | "createdAt": "2025-01-08T16:33:21.887Z", 12 | "updatedAt": "2025-01-08T16:33:21.887Z" 13 | } 14 | ], 15 | "nodes": [ 16 | { 17 | "id": "290cc9b8-e4b1-4124-ab0e-afbb02a9072b", 18 | "name": "Execute Workflow Trigger", 19 | "type": "n8n-nodes-base.executeWorkflowTrigger", 20 | "position": [ 21 | -460, 22 | -100 23 | ], 24 | "parameters": {}, 25 | "typeVersion": 1 26 | }, 27 | { 28 | "id": "f256ed59-ba61-4912-9a75-4e7703547de5", 29 | "name": "FireCrawl", 30 | "type": "n8n-nodes-base.httpRequest", 31 | "position": [ 32 | -220, 33 | -100 34 | ], 35 | "parameters": { 36 | "url": "https://api.firecrawl.dev/v1/scrape", 37 | "method": "POST", 38 | "options": {}, 39 | "jsonBody": "={\n \"url\": \"{{ $json.query.url }}\",\n \"formats\": [\n \"markdown\"\n ]\n} ", 40 | "sendBody": true, 41 | "sendHeaders": true, 42 | "specifyBody": "json", 43 | "authentication": "genericCredentialType", 44 | "genericAuthType": "httpHeaderAuth", 45 | "headerParameters": { 46 | "parameters": [ 47 | {} 48 | ] 49 | } 50 | }, 51 | "credentials": { 52 | "httpHeaderAuth": { 53 | "id": "RoJ6k6pWBzSVp9JK", 54 | "name": "Firecrawl" 55 | } 56 | }, 57 | "typeVersion": 4.2 58 | }, 59 | { 60 | "id": "a28bdbe6-fa59-4bf1-b0ab-c34ebb10cf0f", 61 | "name": "Edit Fields", 62 | "type": "n8n-nodes-base.set", 63 | "position": [ 64 | -20, 65 | -100 66 | ], 67 | "parameters": { 68 | "options": {}, 69 | "assignments": { 70 | "assignments": [ 71 | { 72 | "id": "1af62ef9-7385-411a-8aba-e4087f09c3a9", 73 | "name": "response", 74 | "type": "string", 75 | "value": "={{ $json.data.markdown }}" 76 | } 77 | ] 78 | } 79 | }, 80 | "typeVersion": 3.4 81 | }, 82 | { 83 | "id": "fcd26213-038a-453f-80e5-a3936e4c2d06", 84 | "name": "Sticky Note", 85 | "type": "n8n-nodes-base.stickyNote", 86 | "position": [ 87 | -480, 88 | -340 89 | ], 90 | "parameters": { 91 | "width": 620, 92 | "height": 200, 93 | "content": "## Send URL got Crawl\nThis can be reused by Ai Agents and any Workspace to crawl a site. All that Workspace has to do is send a request:\n\n```json\n {\n \"url\": \"Some URL to Get\"\n }\n```" 94 | }, 95 | "typeVersion": 1 96 | } 97 | ], 98 | "active": false, 99 | "pinData": { 100 | "Execute Workflow Trigger": [ 101 | { 102 | "json": { 103 | "query": { 104 | "url": "https://en.wikipedia.org/wiki/Linux" 105 | } 106 | } 107 | } 108 | ] 109 | }, 110 | "settings": { 111 | "executionOrder": "v1" 112 | }, 113 | "versionId": "396f46a7-3120-42f9-b3d5-2021e6e995b8", 114 | "connections": { 115 | "FireCrawl": { 116 | "main": [ 117 | [ 118 | { 119 | "node": "Edit Fields", 120 | "type": "main", 121 | "index": 0 122 | } 123 | ] 124 | ] 125 | }, 126 | "Execute Workflow Trigger": { 127 | "main": [ 128 | [ 129 | { 130 | "node": "FireCrawl", 131 | "type": "main", 132 | "index": 0 133 | } 134 | ] 135 | ] 136 | } 137 | } 138 | } -------------------------------------------------------------------------------- /Chat with local LLMs using n8n and Ollama.txt: -------------------------------------------------------------------------------- 1 | { 2 | "id": "af8RV5b2TWB2LclA", 3 | "meta": { 4 | "instanceId": "95f2ab28b3dabb8da5d47aa5145b95fe3845f47b20d6343dd5256b6a28ba8fab", 5 | "templateCredsSetupCompleted": true 6 | }, 7 | "name": "Chat with local LLMs using n8n and Ollama", 8 | "tags": [], 9 | "nodes": [ 10 | { 11 | "id": "475385fa-28f3-45c4-bd1a-10dde79f74f2", 12 | "name": "When chat message received", 13 | "type": "@n8n/n8n-nodes-langchain.chatTrigger", 14 | "position": [ 15 | 700, 16 | 460 17 | ], 18 | "webhookId": "ebdeba3f-6b4f-49f3-ba0a-8253dd226161", 19 | "parameters": { 20 | "options": {} 21 | }, 22 | "typeVersion": 1.1 23 | }, 24 | { 25 | "id": "61133dc6-dcd9-44ff-85f2-5d8cc2ce813e", 26 | "name": "Ollama Chat Model", 27 | "type": "@n8n/n8n-nodes-langchain.lmChatOllama", 28 | "position": [ 29 | 900, 30 | 680 31 | ], 32 | "parameters": { 33 | "options": {} 34 | }, 35 | "credentials": { 36 | "ollamaApi": { 37 | "id": "MyYvr1tcNQ4e7M6l", 38 | "name": "Local Ollama" 39 | } 40 | }, 41 | "typeVersion": 1 42 | }, 43 | { 44 | "id": "3e89571f-7c87-44c6-8cfd-4903d5e1cdc5", 45 | "name": "Sticky Note", 46 | "type": "n8n-nodes-base.stickyNote", 47 | "position": [ 48 | 160, 49 | 80 50 | ], 51 | "parameters": { 52 | "width": 485, 53 | "height": 473, 54 | "content": "## Chat with local LLMs using n8n and Ollama\nThis n8n workflow allows you to seamlessly interact with your self-hosted Large Language Models (LLMs) through a user-friendly chat interface. By connecting to Ollama, a powerful tool for managing local LLMs, you can send prompts and receive AI-generated responses directly within n8n.\n\n### How it works\n1. When chat message received: Captures the user's input from the chat interface.\n2. Chat LLM Chain: Sends the input to the Ollama server and receives the AI-generated response.\n3. Delivers the LLM's response back to the chat interface.\n\n### Set up steps\n* Make sure Ollama is installed and running on your machine before executing this workflow.\n* Edit the Ollama address if different from the default.\n" 55 | }, 56 | "typeVersion": 1 57 | }, 58 | { 59 | "id": "9345cadf-a72e-4d3d-b9f0-d670744065fe", 60 | "name": "Sticky Note1", 61 | "type": "n8n-nodes-base.stickyNote", 62 | "position": [ 63 | 1040, 64 | 660 65 | ], 66 | "parameters": { 67 | "color": 6, 68 | "width": 368, 69 | "height": 258, 70 | "content": "## Ollama setup\n* Connect to your local Ollama, usually on http://localhost:11434\n* If running in Docker, make sure that the n8n container has access to the host's network in order to connect to Ollama. You can do this by passing `--net=host` option when starting the n8n Docker container" 71 | }, 72 | "typeVersion": 1 73 | }, 74 | { 75 | "id": "eeffdd4e-6795-4ebc-84f7-87b5ac4167d9", 76 | "name": "Chat LLM Chain", 77 | "type": "@n8n/n8n-nodes-langchain.chainLlm", 78 | "position": [ 79 | 920, 80 | 460 81 | ], 82 | "parameters": {}, 83 | "typeVersion": 1.4 84 | } 85 | ], 86 | "active": false, 87 | "pinData": {}, 88 | "settings": { 89 | "executionOrder": "v1" 90 | }, 91 | "versionId": "3af03daa-e085-4774-8676-41578a4cba2d", 92 | "connections": { 93 | "Ollama Chat Model": { 94 | "ai_languageModel": [ 95 | [ 96 | { 97 | "node": "Chat LLM Chain", 98 | "type": "ai_languageModel", 99 | "index": 0 100 | } 101 | ] 102 | ] 103 | }, 104 | "When chat message received": { 105 | "main": [ 106 | [ 107 | { 108 | "node": "Chat LLM Chain", 109 | "type": "main", 110 | "index": 0 111 | } 112 | ] 113 | ] 114 | } 115 | } 116 | } -------------------------------------------------------------------------------- /Generate audio from text using OpenAI and Webhook _ Text to Speech Workflow.txt: -------------------------------------------------------------------------------- 1 | { 2 | "id": "OVSyGmI6YFviPu8Q", 3 | "meta": { 4 | "instanceId": "fb261afc5089eae952e09babdadd9983000b3d863639802f6ded8c5be2e40067", 5 | "templateCredsSetupCompleted": true 6 | }, 7 | "name": "Generate audio from text using OpenAI - text-to-speech Workflow", 8 | "tags": [], 9 | "nodes": [ 10 | { 11 | "id": "c40966a4-1709-4998-ae95-b067ce3496c9", 12 | "name": "Respond to Webhook", 13 | "type": "n8n-nodes-base.respondToWebhook", 14 | "position": [ 15 | 1320, 16 | 200 17 | ], 18 | "parameters": { 19 | "options": {}, 20 | "respondWith": "binary" 21 | }, 22 | "typeVersion": 1.1 23 | }, 24 | { 25 | "id": "c4e57bb6-79a4-4b26-a179-73e30d681521", 26 | "name": "Sticky Note", 27 | "type": "n8n-nodes-base.stickyNote", 28 | "position": [ 29 | 280, 30 | -140 31 | ], 32 | "parameters": { 33 | "width": 501.55, 34 | "height": 493.060000000001, 35 | "content": "This `Webhook` node triggers the workflow when it receives a POST request.\n\n### 1. Test Mode:\n* Use the test webhook URL\n* Click the `Test workflow` button on the canvas. (In test mode, the webhook only works for one call after you click this button)\n\n### 1. Production Mode:\n* The workflow must be active for a **Production URL** to run successfully.\n* You can activate the workflow using the toggle in the top-right of the editor.\n* Note that unlike test URL calls, production URL calls aren't shown on the canvas (only in the executions list)." 36 | }, 37 | "typeVersion": 1 38 | }, 39 | { 40 | "id": "1364a4b6-2651-4b38-b335-c36783a25f12", 41 | "name": "Sticky Note1", 42 | "type": "n8n-nodes-base.stickyNote", 43 | "position": [ 44 | 825, 45 | 60 46 | ], 47 | "parameters": { 48 | "color": 4, 49 | "width": 388.35000000000025, 50 | "height": 292.71000000000043, 51 | "content": "### Configure the OpenAI node with your API key:\nIf you haven't connected your OpenAI credentials in n8n yet, log in to your OpenAI account to get your API Key. Then, open the OpenAI node, click `Create New Credentials` and connect with the **OpenAI API**.\n" 52 | }, 53 | "typeVersion": 1 54 | }, 55 | { 56 | "id": "ba755814-75e6-4e16-b3a6-50cf4fc06350", 57 | "name": "Webhook", 58 | "type": "n8n-nodes-base.webhook", 59 | "position": [ 60 | 480, 61 | 200 62 | ], 63 | "webhookId": "28feeb38-ef2d-4a2e-bd7c-25a524068e25", 64 | "parameters": { 65 | "path": "generate_audio", 66 | "options": {}, 67 | "httpMethod": "POST", 68 | "responseMode": "responseNode" 69 | }, 70 | "typeVersion": 2 71 | }, 72 | { 73 | "id": "ac46df50-cb1f-484c-8edf-8131192ba464", 74 | "name": "OpenAI", 75 | "type": "@n8n/n8n-nodes-langchain.openAi", 76 | "position": [ 77 | 960, 78 | 200 79 | ], 80 | "parameters": { 81 | "input": "={{ $json.body.text_to_convert }}", 82 | "voice": "fable", 83 | "options": {}, 84 | "resource": "audio" 85 | }, 86 | "credentials": { 87 | "openAiApi": { 88 | "id": "2Cije3KX7OIVwn9B", 89 | "name": "n8n OpenAI" 90 | } 91 | }, 92 | "typeVersion": 1.3 93 | } 94 | ], 95 | "active": false, 96 | "pinData": {}, 97 | "settings": { 98 | "executionOrder": "v1" 99 | }, 100 | "versionId": "84f1b893-e1a3-40c3-83b0-7cd637b353c4", 101 | "connections": { 102 | "OpenAI": { 103 | "main": [ 104 | [ 105 | { 106 | "node": "Respond to Webhook", 107 | "type": "main", 108 | "index": 0 109 | } 110 | ] 111 | ] 112 | }, 113 | "Webhook": { 114 | "main": [ 115 | [ 116 | { 117 | "node": "OpenAI", 118 | "type": "main", 119 | "index": 0 120 | } 121 | ] 122 | ] 123 | } 124 | } 125 | } -------------------------------------------------------------------------------- /Analyze tradingview.com charts with Chrome extension, N8N and OpenAI.txt: -------------------------------------------------------------------------------- 1 | { 2 | "id": "Q8On8rR6BkmPzDUd", 3 | "meta": { 4 | "instanceId": "f57770b08f6a574802832e927ed1b0063c627ffc5b95965abf0d4a7396150138" 5 | }, 6 | "name": "chrome extension backend with AI", 7 | "tags": [], 8 | "nodes": [ 9 | { 10 | "id": "0f38fe62-36d9-43da-a992-a3981377e89e", 11 | "name": "Webhook", 12 | "type": "n8n-nodes-base.webhook", 13 | "position": [ 14 | -220, 15 | -20 16 | ], 17 | "webhookId": "e9a97dd5-f1e7-4d5b-a6f1-be5f0c9eb96c", 18 | "parameters": { 19 | "path": "e9a97dd5-f1e7-4d5b-a6f1-be5f0c9eb96c", 20 | "options": {}, 21 | "httpMethod": "POST", 22 | "responseMode": "responseNode" 23 | }, 24 | "typeVersion": 2 25 | }, 26 | { 27 | "id": "83959562-edf5-4d37-bd11-47186c6a31c7", 28 | "name": "OpenAI", 29 | "type": "@n8n/n8n-nodes-langchain.openAi", 30 | "position": [ 31 | -40, 32 | -20 33 | ], 34 | "parameters": { 35 | "text": "You are an expert financial analyst tasked with providing an advanced technical analyses of a stock or crypto currency chart provided. Your analysis will be based on various technical indicators and will provide simple insights for novice traders. Just explain to traders were you expect the market is moving. Also warn them this is not a binding advice. Make sure to explain everything in infant language.", 36 | "modelId": { 37 | "__rl": true, 38 | "mode": "list", 39 | "value": "gpt-4o-mini", 40 | "cachedResultName": "GPT-4O-MINI" 41 | }, 42 | "options": {}, 43 | "resource": "image", 44 | "inputType": "base64", 45 | "operation": "analyze" 46 | }, 47 | "credentials": { 48 | "openAiApi": { 49 | "id": "8MS1muoK4z86fxUs", 50 | "name": "OpenAi account" 51 | } 52 | }, 53 | "typeVersion": 1.7 54 | }, 55 | { 56 | "id": "c6f1f833-7ba3-49c5-86df-f586e6bb5975", 57 | "name": "Respond to Webhook", 58 | "type": "n8n-nodes-base.respondToWebhook", 59 | "position": [ 60 | 140, 61 | -20 62 | ], 63 | "parameters": { 64 | "options": {}, 65 | "respondWith": "text", 66 | "responseBody": "={{ $json.content }}" 67 | }, 68 | "typeVersion": 1.1 69 | }, 70 | { 71 | "id": "e3a38a76-283b-4567-a8da-315ef1e2bc4f", 72 | "name": "Sticky Note", 73 | "type": "n8n-nodes-base.stickyNote", 74 | "position": [ 75 | -260, 76 | -140 77 | ], 78 | "parameters": { 79 | "width": 620, 80 | "height": 300, 81 | "content": "## N8N en OpenAI image analyser" 82 | }, 83 | "typeVersion": 1 84 | }, 85 | { 86 | "id": "8e7e26db-8767-4727-ab0c-900b50a73411", 87 | "name": "Sticky Note1", 88 | "type": "n8n-nodes-base.stickyNote", 89 | "position": [ 90 | -80, 91 | 180 92 | ], 93 | "parameters": { 94 | "color": 5, 95 | "height": 340, 96 | "content": "## AI prompt\nYou are an expert financial analyst tasked with providing an advanced technical analyses of a stock or crypto currency chart provided. Your analysis will be based on various technical indicators and will provide simple insights for novice traders. Just explain to traders were you expect the market is moving. Also warn them this is not a binding advice. Make sure to explain everything in infant language." 97 | }, 98 | "typeVersion": 1 99 | } 100 | ], 101 | "active": true, 102 | "pinData": {}, 103 | "settings": { 104 | "executionOrder": "v1" 105 | }, 106 | "versionId": "caf32442-e9c5-466a-8888-9abd2c1b3449", 107 | "connections": { 108 | "OpenAI": { 109 | "main": [ 110 | [ 111 | { 112 | "node": "Respond to Webhook", 113 | "type": "main", 114 | "index": 0 115 | } 116 | ] 117 | ] 118 | }, 119 | "Webhook": { 120 | "main": [ 121 | [ 122 | { 123 | "node": "OpenAI", 124 | "type": "main", 125 | "index": 0 126 | } 127 | ] 128 | ] 129 | } 130 | } 131 | } -------------------------------------------------------------------------------- /Configure your own Image Creation API Using OpenAI DALLE-3.txt: -------------------------------------------------------------------------------- 1 | { 2 | "id": "wDD4XugmHIvx3KMT", 3 | "meta": { 4 | "instanceId": "149cdf730f0c143663259ddc6124c9c26e824d8d2d059973b871074cf4bda531" 5 | }, 6 | "name": "Image Generation API", 7 | "tags": [], 8 | "nodes": [ 9 | { 10 | "id": "d743f947-ad45-4e59-97d4-79b98eaddedb", 11 | "name": "Webhook", 12 | "type": "n8n-nodes-base.webhook", 13 | "position": [ 14 | 260, 15 | -20 16 | ], 17 | "webhookId": "970dd3c6-de83-46fd-9038-33c470571390", 18 | "parameters": { 19 | "path": "970dd3c6-de83-46fd-9038-33c470571390", 20 | "options": {}, 21 | "responseMode": "responseNode" 22 | }, 23 | "typeVersion": 1.1 24 | }, 25 | { 26 | "id": "832e993e-69e9-475b-8322-776d88da0440", 27 | "name": "Respond to Webhook", 28 | "type": "n8n-nodes-base.respondToWebhook", 29 | "position": [ 30 | 1400, 31 | -20 32 | ], 33 | "parameters": { 34 | "options": {}, 35 | "respondWith": "binary" 36 | }, 37 | "typeVersion": 1 38 | }, 39 | { 40 | "id": "53044a93-375f-48f2-971d-bf765bcdb7a0", 41 | "name": "Sticky Note", 42 | "type": "n8n-nodes-base.stickyNote", 43 | "position": [ 44 | 180, 45 | -120 46 | ], 47 | "parameters": { 48 | "width": 301.7420425026802, 49 | "height": 260.80333469825376, 50 | "content": "## Webhook Trigger \n**This Node starts listening to requests to the Webhook URL**\n\n" 51 | }, 52 | "typeVersion": 1 53 | }, 54 | { 55 | "id": "c7b3b04e-903b-4d7c-bbf1-2bc2f1b1a426", 56 | "name": "Sticky Note1", 57 | "type": "n8n-nodes-base.stickyNote", 58 | "position": [ 59 | 180, 60 | -460 61 | ], 62 | "parameters": { 63 | "width": 469.32758643852594, 64 | "height": 297.34454352637044, 65 | "content": "## Creating your Prompt-URL \n**To use this Workflow you need to append your prompt to your Webhook URL in the following way**\n\n1. Take your Webhook URL\n2. Ideate a Prompt and Replace every Space (\" \") by %20 (Url Encoding)\n3. Append \"?input=\" and right after that your encoded prompt to your url\n4. Copy paste this into a webbrowser as soon as you run the Webhook" 66 | }, 67 | "typeVersion": 1 68 | }, 69 | { 70 | "id": "473ff6e5-441a-4706-86a4-190936cc6ac1", 71 | "name": "Sticky Note2", 72 | "type": "n8n-nodes-base.stickyNote", 73 | "position": [ 74 | 540, 75 | -54.959833265087354 76 | ], 77 | "parameters": { 78 | "width": 522.2493371551094, 79 | "height": 109.59833265087394, 80 | "content": "## Starting the Workflow\n**To start the workflow paste the encoded URL into your webbrowser**\n\n" 81 | }, 82 | "typeVersion": 1 83 | }, 84 | { 85 | "id": "e8874f52-ef7e-4aea-be5b-81e3276da3d2", 86 | "name": "OpenAI", 87 | "type": "@n8n/n8n-nodes-langchain.openAi", 88 | "position": [ 89 | 1120, 90 | -20 91 | ], 92 | "parameters": { 93 | "prompt": "={{ $json.query.input }}", 94 | "options": {}, 95 | "resource": "image" 96 | }, 97 | "typeVersion": 1.1 98 | }, 99 | { 100 | "id": "08c073a6-e01e-4b04-8051-502c918998c4", 101 | "name": "Sticky Note3", 102 | "type": "n8n-nodes-base.stickyNote", 103 | "position": [ 104 | 1280, 105 | -120 106 | ], 107 | "parameters": { 108 | "width": 329.4629595446998, 109 | "height": 278.4439182704484, 110 | "content": "## Response\n**Watch the image being rendered in your webbrowser**\n\n" 111 | }, 112 | "typeVersion": 1 113 | } 114 | ], 115 | "active": false, 116 | "pinData": {}, 117 | "settings": { 118 | "executionOrder": "v1" 119 | }, 120 | "versionId": "19f7e652-5417-4b02-a1f5-8796bbac25c3", 121 | "connections": { 122 | "OpenAI": { 123 | "main": [ 124 | [ 125 | { 126 | "node": "Respond to Webhook", 127 | "type": "main", 128 | "index": 0 129 | } 130 | ] 131 | ] 132 | }, 133 | "Webhook": { 134 | "main": [ 135 | [ 136 | { 137 | "node": "OpenAI", 138 | "type": "main", 139 | "index": 0 140 | } 141 | ] 142 | ] 143 | } 144 | } 145 | } -------------------------------------------------------------------------------- /Add positive feedback messages to a table in Notion.txt: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": [ 3 | { 4 | "name": "Typeform Trigger", 5 | "type": "n8n-nodes-base.typeformTrigger", 6 | "position": [ 7 | 0, 8 | 400 9 | ], 10 | "webhookId": "ad8a87ef-d293-4e48-8d36-838d69ebce0f", 11 | "parameters": { 12 | "formId": "fBYjtY5e" 13 | }, 14 | "credentials": { 15 | "typeformApi": "" 16 | }, 17 | "typeVersion": 1 18 | }, 19 | { 20 | "name": "Google Cloud Natural Language", 21 | "type": "n8n-nodes-base.googleCloudNaturalLanguage", 22 | "position": [ 23 | 200, 24 | 400 25 | ], 26 | "parameters": { 27 | "content": "={{$json[\"Any suggestions for us? \"]}}", 28 | "options": {} 29 | }, 30 | "credentials": { 31 | "googleCloudNaturalLanguageOAuth2Api": "" 32 | }, 33 | "typeVersion": 1 34 | }, 35 | { 36 | "name": "IF", 37 | "type": "n8n-nodes-base.if", 38 | "position": [ 39 | 400, 40 | 400 41 | ], 42 | "parameters": { 43 | "conditions": { 44 | "number": [ 45 | { 46 | "value1": "={{$node[\"Google Cloud Natural Language\"].json[\"documentSentiment\"][\"score\"]}}", 47 | "operation": "larger" 48 | } 49 | ] 50 | } 51 | }, 52 | "typeVersion": 1 53 | }, 54 | { 55 | "name": "Notion", 56 | "type": "n8n-nodes-base.notion", 57 | "position": [ 58 | 600, 59 | 300 60 | ], 61 | "parameters": { 62 | "resource": "databasePage", 63 | "databaseId": "b7d1130a-3756-4bb3-aa56-0c77bf416437", 64 | "propertiesUi": { 65 | "propertyValues": [ 66 | { 67 | "key": "Name|title", 68 | "title": "={{$node[\"Typeform Trigger\"].json[\"Name\"]}}" 69 | }, 70 | { 71 | "key": "Feedback|rich_text", 72 | "textContent": "={{$node[\"Typeform Trigger\"].json[\"Any suggestions for us? \"]}}" 73 | } 74 | ] 75 | } 76 | }, 77 | "credentials": { 78 | "notionApi": "" 79 | }, 80 | "typeVersion": 1 81 | }, 82 | { 83 | "name": "Slack", 84 | "type": "n8n-nodes-base.slack", 85 | "position": [ 86 | 800, 87 | 300 88 | ], 89 | "parameters": { 90 | "channel": "general", 91 | "blocksUi": { 92 | "blocksValues": [] 93 | }, 94 | "attachments": [ 95 | { 96 | "text": "={{$node[\"Typeform Trigger\"].json[\"Any suggestions for us? \"]}}", 97 | "title": "={{$node[\"Typeform Trigger\"].json[\"Name\"]}} {{$node[\"Google Cloud Natural Language\"].json[\"documentSentiment\"][\"score\"]}}" 98 | } 99 | ], 100 | "otherOptions": {} 101 | }, 102 | "credentials": { 103 | "slackApi": "" 104 | }, 105 | "typeVersion": 1 106 | }, 107 | { 108 | "name": "Trello", 109 | "type": "n8n-nodes-base.trello", 110 | "position": [ 111 | 600, 112 | 500 113 | ], 114 | "parameters": { 115 | "name": "=Score: {{$json[\"documentSentiment\"][\"score\"]}}", 116 | "listId": "5fbb9e2eb1d5cc0a8a7ab8ac", 117 | "description": "=Score: {{$json[\"documentSentiment\"][\"score\"]}}\nFeedback: {{$node[\"Typeform Trigger\"].json[\"Any suggestions for us? \"]}}\nUser: {{$node[\"Typeform Trigger\"].json[\"Name\"]}}", 118 | "additionalFields": {} 119 | }, 120 | "credentials": { 121 | "trelloApi": "" 122 | }, 123 | "typeVersion": 1 124 | } 125 | ], 126 | "connections": { 127 | "IF": { 128 | "main": [ 129 | [ 130 | { 131 | "node": "Notion", 132 | "type": "main", 133 | "index": 0 134 | } 135 | ], 136 | [ 137 | { 138 | "node": "Trello", 139 | "type": "main", 140 | "index": 0 141 | } 142 | ] 143 | ] 144 | }, 145 | "Notion": { 146 | "main": [ 147 | [ 148 | { 149 | "node": "Slack", 150 | "type": "main", 151 | "index": 0 152 | } 153 | ] 154 | ] 155 | }, 156 | "Typeform Trigger": { 157 | "main": [ 158 | [ 159 | { 160 | "node": "Google Cloud Natural Language", 161 | "type": "main", 162 | "index": 0 163 | } 164 | ] 165 | ] 166 | }, 167 | "Google Cloud Natural Language": { 168 | "main": [ 169 | [ 170 | { 171 | "node": "IF", 172 | "type": "main", 173 | "index": 0 174 | } 175 | ] 176 | ] 177 | } 178 | } 179 | } -------------------------------------------------------------------------------- /AI_ Ask questions about any data source (using the n8n workflow retriever).txt: -------------------------------------------------------------------------------- 1 | { 2 | "id": "mjCQV12PbF6fw8hR", 3 | "meta": { 4 | "instanceId": "021d3c82ba2d3bc090cbf4fc81c9312668bcc34297e022bb3438c5c88a43a5ff" 5 | }, 6 | "name": "LangChain - Example - Workflow Retriever", 7 | "tags": [ 8 | { 9 | "id": "snf16n0p2UrGP838", 10 | "name": "LangChain - Example", 11 | "createdAt": "2023-09-25T16:21:55.962Z", 12 | "updatedAt": "2023-09-25T16:21:55.962Z" 13 | } 14 | ], 15 | "nodes": [ 16 | { 17 | "id": "efdc3050-6c68-4419-9f12-f37d6fefb276", 18 | "name": "When clicking \"Execute Workflow\"", 19 | "type": "n8n-nodes-base.manualTrigger", 20 | "position": [ 21 | 460, 22 | 200 23 | ], 24 | "parameters": {}, 25 | "typeVersion": 1 26 | }, 27 | { 28 | "id": "e0edb9ab-c59f-4d34-983d-861bb2df4f01", 29 | "name": "Workflow Retriever", 30 | "type": "@n8n/n8n-nodes-langchain.retrieverWorkflow", 31 | "position": [ 32 | 1120, 33 | 440 34 | ], 35 | "parameters": { 36 | "workflowId": "QacfBRBnf1xOyckC" 37 | }, 38 | "typeVersion": 1 39 | }, 40 | { 41 | "id": "ba47dd13-67d0-499a-b9a2-16928099efce", 42 | "name": "Retrieval QA Chain2", 43 | "type": "@n8n/n8n-nodes-langchain.chainRetrievalQa", 44 | "position": [ 45 | 900, 46 | 200 47 | ], 48 | "parameters": {}, 49 | "typeVersion": 1 50 | }, 51 | { 52 | "id": "f6d16571-0573-4860-aed9-611f93b050ad", 53 | "name": "OpenAI Chat Model", 54 | "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", 55 | "position": [ 56 | 800, 57 | 480 58 | ], 59 | "parameters": { 60 | "options": {} 61 | }, 62 | "credentials": { 63 | "openAiApi": { 64 | "id": "4jRB4A20cPycBqP5", 65 | "name": "OpenAI account - n8n" 66 | } 67 | }, 68 | "typeVersion": 1 69 | }, 70 | { 71 | "id": "4fd00751-3db0-489b-8c7f-4ee0fb32fb51", 72 | "name": "Example Prompt", 73 | "type": "n8n-nodes-base.set", 74 | "position": [ 75 | 680, 76 | 200 77 | ], 78 | "parameters": { 79 | "fields": { 80 | "values": [ 81 | { 82 | "name": "input", 83 | "stringValue": "What notes can you find for Jay Gatsby and what is his email address?" 84 | } 85 | ] 86 | }, 87 | "options": {} 88 | }, 89 | "typeVersion": 3 90 | }, 91 | { 92 | "id": "732b6277-cb4d-4586-ab95-778ac9473fe5", 93 | "name": "Sticky Note", 94 | "type": "n8n-nodes-base.stickyNote", 95 | "position": [ 96 | 860, 97 | 140 98 | ], 99 | "parameters": { 100 | "width": 363, 101 | "height": 211.90203341144422, 102 | "content": "### Q&A on data returned from a workflow" 103 | }, 104 | "typeVersion": 1 105 | }, 106 | { 107 | "id": "f09583a3-78e3-4888-8251-2148ffb7ab18", 108 | "name": "Sticky Note1", 109 | "type": "n8n-nodes-base.stickyNote", 110 | "position": [ 111 | 1040, 112 | 400 113 | ], 114 | "parameters": { 115 | "width": 262.67019427016413, 116 | "height": 255.8330939602389, 117 | "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nReplace \"Workflow ID\" with the ID the Subworkflow got saved as" 118 | }, 119 | "typeVersion": 1 120 | } 121 | ], 122 | "active": false, 123 | "pinData": {}, 124 | "settings": { 125 | "executionOrder": "v1" 126 | }, 127 | "versionId": "48d3bdae-4cec-4b18-b92a-89215def0c68", 128 | "connections": { 129 | "Example Prompt": { 130 | "main": [ 131 | [ 132 | { 133 | "node": "Retrieval QA Chain2", 134 | "type": "main", 135 | "index": 0 136 | } 137 | ] 138 | ] 139 | }, 140 | "OpenAI Chat Model": { 141 | "ai_languageModel": [ 142 | [ 143 | { 144 | "node": "Retrieval QA Chain2", 145 | "type": "ai_languageModel", 146 | "index": 0 147 | } 148 | ] 149 | ] 150 | }, 151 | "Workflow Retriever": { 152 | "ai_retriever": [ 153 | [ 154 | { 155 | "node": "Retrieval QA Chain2", 156 | "type": "ai_retriever", 157 | "index": 0 158 | } 159 | ] 160 | ] 161 | }, 162 | "When clicking \"Execute Workflow\"": { 163 | "main": [ 164 | [ 165 | { 166 | "node": "Example Prompt", 167 | "type": "main", 168 | "index": 0 169 | } 170 | ] 171 | ] 172 | } 173 | } 174 | } -------------------------------------------------------------------------------- /AI chatbot that can search the web.txt: -------------------------------------------------------------------------------- 1 | { 2 | "meta": { 3 | "instanceId": "408f9fb9940c3cb18ffdef0e0150fe342d6e655c3a9fac21f0f644e8bedabcd9" 4 | }, 5 | "nodes": [ 6 | { 7 | "id": "3a3bcb2d-cb94-40d8-8b9e-322ea9d27f6e", 8 | "name": "Sticky Note4", 9 | "type": "n8n-nodes-base.stickyNote", 10 | "position": [ 11 | 1000, 12 | 640 13 | ], 14 | "parameters": { 15 | "width": 300, 16 | "height": 185, 17 | "content": "### The conversation history(last 20 messages) is stored in a buffer memory" 18 | }, 19 | "typeVersion": 1 20 | }, 21 | { 22 | "id": "e279af43-b003-4499-b221-58716e735379", 23 | "name": "On new manual Chat Message", 24 | "type": "@n8n/n8n-nodes-langchain.manualChatTrigger", 25 | "position": [ 26 | 740, 27 | 340 28 | ], 29 | "parameters": {}, 30 | "typeVersion": 1 31 | }, 32 | { 33 | "id": "f4f8bf03-a43e-4a1f-a592-cd0f8408f552", 34 | "name": "Chat OpenAI", 35 | "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", 36 | "position": [ 37 | 840, 38 | 653 39 | ], 40 | "parameters": { 41 | "model": "gpt-4o-mini", 42 | "options": { 43 | "temperature": 0.3 44 | } 45 | }, 46 | "credentials": { 47 | "openAiApi": { 48 | "id": "8gccIjcuf3gvaoEr", 49 | "name": "OpenAi account" 50 | } 51 | }, 52 | "typeVersion": 1 53 | }, 54 | { 55 | "id": "66b60f68-bae8-4958-ac81-03883f563ab3", 56 | "name": "Wikipedia", 57 | "type": "@n8n/n8n-nodes-langchain.toolWikipedia", 58 | "position": [ 59 | 1480, 60 | 693 61 | ], 62 | "parameters": {}, 63 | "typeVersion": 1 64 | }, 65 | { 66 | "id": "70f6b43b-9290-4fbc-992f-0895d4578c9f", 67 | "name": "Sticky Note3", 68 | "type": "n8n-nodes-base.stickyNote", 69 | "position": [ 70 | 1340, 71 | 633 72 | ], 73 | "parameters": { 74 | "width": 300, 75 | "height": 185, 76 | "content": "### Tools which agent can use to accomplish the task" 77 | }, 78 | "typeVersion": 1 79 | }, 80 | { 81 | "id": "8696269f-6556-41f1-bbe4-5597e4e46e02", 82 | "name": "Sticky Note6", 83 | "type": "n8n-nodes-base.stickyNote", 84 | "position": [ 85 | 960, 86 | 260 87 | ], 88 | "parameters": { 89 | "width": 422, 90 | "height": 211, 91 | "content": "### Conversational agent will utilise available tools to answer the prompt. " 92 | }, 93 | "typeVersion": 1 94 | }, 95 | { 96 | "id": "6814967b-4567-4cdd-bf09-6b1b5ed0c68e", 97 | "name": "Window Buffer Memory", 98 | "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow", 99 | "position": [ 100 | 1100, 101 | 700 102 | ], 103 | "parameters": { 104 | "contextWindowLength": 20 105 | }, 106 | "typeVersion": 1 107 | }, 108 | { 109 | "id": "ce4358ac-c2cc-45ba-b950-247f8360b36c", 110 | "name": "SerpAPI", 111 | "type": "@n8n/n8n-nodes-langchain.toolSerpApi", 112 | "position": [ 113 | 1380, 114 | 693 115 | ], 116 | "parameters": { 117 | "options": {} 118 | }, 119 | "typeVersion": 1 120 | }, 121 | { 122 | "id": "de80add8-c37d-4d46-80ec-b43234e21150", 123 | "name": "AI Agent", 124 | "type": "@n8n/n8n-nodes-langchain.agent", 125 | "position": [ 126 | 1040, 127 | 340 128 | ], 129 | "parameters": { 130 | "text": "={{ $json.input }}", 131 | "options": {}, 132 | "promptType": "define" 133 | }, 134 | "typeVersion": 1.6 135 | } 136 | ], 137 | "pinData": {}, 138 | "connections": { 139 | "SerpAPI": { 140 | "ai_tool": [ 141 | [ 142 | { 143 | "node": "AI Agent", 144 | "type": "ai_tool", 145 | "index": 0 146 | } 147 | ] 148 | ] 149 | }, 150 | "Wikipedia": { 151 | "ai_tool": [ 152 | [ 153 | { 154 | "node": "AI Agent", 155 | "type": "ai_tool", 156 | "index": 0 157 | } 158 | ] 159 | ] 160 | }, 161 | "Chat OpenAI": { 162 | "ai_languageModel": [ 163 | [ 164 | { 165 | "node": "AI Agent", 166 | "type": "ai_languageModel", 167 | "index": 0 168 | } 169 | ] 170 | ] 171 | }, 172 | "Window Buffer Memory": { 173 | "ai_memory": [ 174 | [ 175 | { 176 | "node": "AI Agent", 177 | "type": "ai_memory", 178 | "index": 0 179 | } 180 | ] 181 | ] 182 | }, 183 | "On new manual Chat Message": { 184 | "main": [ 185 | [ 186 | { 187 | "node": "AI Agent", 188 | "type": "main", 189 | "index": 0 190 | } 191 | ] 192 | ] 193 | } 194 | } 195 | } -------------------------------------------------------------------------------- /Extract license plate number from image uploaded via an n8n form.txt: -------------------------------------------------------------------------------- 1 | { 2 | "id": "B37wvB0tdKgjuabw", 3 | "meta": { 4 | "instanceId": "98bf0d6aef1dd8b7a752798121440fb171bf7686b95727fd617f43452393daa3", 5 | "templateCredsSetupCompleted": true 6 | }, 7 | "name": "Image to license plate number", 8 | "tags": [], 9 | "nodes": [ 10 | { 11 | "id": "a656334a-0135-4d93-a6df-ca97222c9753", 12 | "name": "Basic LLM Chain", 13 | "type": "@n8n/n8n-nodes-langchain.chainLlm", 14 | "position": [ 15 | -140, 16 | -380 17 | ], 18 | "parameters": { 19 | "text": "={{ $json.prompt }}", 20 | "messages": { 21 | "messageValues": [ 22 | { 23 | "type": "HumanMessagePromptTemplate", 24 | "messageType": "imageBinary", 25 | "binaryImageDataKey": "Image" 26 | } 27 | ] 28 | }, 29 | "promptType": "define" 30 | }, 31 | "typeVersion": 1.5 32 | }, 33 | { 34 | "id": "41a90592-2a91-40ff-abf4-3a795733d521", 35 | "name": "FormResultPage", 36 | "type": "n8n-nodes-base.form", 37 | "position": [ 38 | 220, 39 | -380 40 | ], 41 | "webhookId": "218822fe-5eb9-4451-ae8a-14b8f484fdde", 42 | "parameters": { 43 | "options": { 44 | "formTitle": "" 45 | }, 46 | "operation": "completion", 47 | "completionTitle": "Extracted information:", 48 | "completionMessage": "={{ $json.text }}" 49 | }, 50 | "typeVersion": 1 51 | }, 52 | { 53 | "id": "c23b95d9-b7a2-4e9e-a019-5724a9662abd", 54 | "name": "OpenRouter LLM", 55 | "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter", 56 | "position": [ 57 | -60, 58 | -180 59 | ], 60 | "parameters": { 61 | "model": "={{ $json.model }}", 62 | "options": {} 63 | }, 64 | "credentials": { 65 | "openRouterApi": { 66 | "id": "bs7tPtvgDTJNGAFJ", 67 | "name": "OpenRouter account" 68 | } 69 | }, 70 | "typeVersion": 1 71 | }, 72 | { 73 | "id": "8298cd51-8c47-4bc4-af78-2c216207ef76", 74 | "name": "Settings", 75 | "type": "n8n-nodes-base.set", 76 | "position": [ 77 | -340, 78 | -380 79 | ], 80 | "parameters": { 81 | "options": {}, 82 | "assignments": { 83 | "assignments": [ 84 | { 85 | "id": "1b8381dc-5b9a-42a2-8a67-cc706b433180", 86 | "name": "model", 87 | "type": "string", 88 | "value": "openai/gpt-4o" 89 | }, 90 | { 91 | "id": "72aec130-ab56-4e61-b60b-9a31dd8d02e6", 92 | "name": "prompt", 93 | "type": "string", 94 | "value": "Extract the number of the license plate on the front-most car depicted in the attached image and return only the extracted characters without any other text or structure." 95 | } 96 | ] 97 | }, 98 | "includeOtherFields": true 99 | }, 100 | "typeVersion": 3.4 101 | }, 102 | { 103 | "id": "fae79fc9-b510-44a4-beec-4dc26dc2a13a", 104 | "name": "FromTrigger", 105 | "type": "n8n-nodes-base.formTrigger", 106 | "position": [ 107 | -560, 108 | -380 109 | ], 110 | "webhookId": "41e3f34b-7abe-4c64-95cd-2942503d5e98", 111 | "parameters": { 112 | "options": {}, 113 | "formTitle": "Analyse image", 114 | "formFields": { 115 | "values": [ 116 | { 117 | "fieldType": "file", 118 | "fieldLabel": "Image", 119 | "requiredField": true, 120 | "acceptFileTypes": ".jpg, .png" 121 | } 122 | ] 123 | }, 124 | "responseMode": "lastNode", 125 | "formDescription": "To analyse an image, upload it here." 126 | }, 127 | "typeVersion": 2.2 128 | } 129 | ], 130 | "active": true, 131 | "pinData": {}, 132 | "settings": { 133 | "executionOrder": "v1" 134 | }, 135 | "versionId": "5b9c53b9-3998-4676-999d-1ba117bf6695", 136 | "connections": { 137 | "Settings": { 138 | "main": [ 139 | [ 140 | { 141 | "node": "Basic LLM Chain", 142 | "type": "main", 143 | "index": 0 144 | } 145 | ] 146 | ] 147 | }, 148 | "FromTrigger": { 149 | "main": [ 150 | [ 151 | { 152 | "node": "Settings", 153 | "type": "main", 154 | "index": 0 155 | } 156 | ] 157 | ] 158 | }, 159 | "OpenRouter LLM": { 160 | "ai_languageModel": [ 161 | [ 162 | { 163 | "node": "Basic LLM Chain", 164 | "type": "ai_languageModel", 165 | "index": 0 166 | } 167 | ] 168 | ] 169 | }, 170 | "Basic LLM Chain": { 171 | "main": [ 172 | [ 173 | { 174 | "node": "FormResultPage", 175 | "type": "main", 176 | "index": 0 177 | } 178 | ] 179 | ] 180 | } 181 | } 182 | } -------------------------------------------------------------------------------- /Post New YouTube Videos to X.txt: -------------------------------------------------------------------------------- 1 | { 2 | "id": "O9FXr8iXzhSgYKaL", 3 | "meta": { 4 | "instanceId": "d8bbc8c5a59875a8be9f3c7142d858bc46c4b8e36a11781a25e945fcf9a5767a" 5 | }, 6 | "name": "Post New YouTube Videos to X", 7 | "tags": [], 8 | "nodes": [ 9 | { 10 | "id": "576be5c4-1ed0-4d01-a980-cb2fc31e2223", 11 | "name": "Post to X", 12 | "type": "n8n-nodes-base.twitter", 13 | "position": [ 14 | 1280, 15 | 380 16 | ], 17 | "parameters": { 18 | "text": "={{ $json.message.content }}", 19 | "additionalFields": {} 20 | }, 21 | "credentials": { 22 | "twitterOAuth2Api": { 23 | "id": "FjHOuF0APzoMqIjG", 24 | "name": "X account" 25 | } 26 | }, 27 | "typeVersion": 2 28 | }, 29 | { 30 | "id": "3b87cf2a-51d5-4589-9729-bb1fe3cfceca", 31 | "name": "Sticky Note", 32 | "type": "n8n-nodes-base.stickyNote", 33 | "position": [ 34 | 620, 35 | 254.76543209876536 36 | ], 37 | "parameters": { 38 | "color": 3, 39 | "width": 221.82716049382665, 40 | "height": 308.7901234567902, 41 | "content": "🆔 Ensure you enter your YouTube Channel ID in the \"Channel ID\" field of this node. You can find your [Channel ID here](https://youtube.com/account_advanced)." 42 | }, 43 | "typeVersion": 1 44 | }, 45 | { 46 | "id": "912e631c-aa43-4e02-9816-b35fe6e62dd8", 47 | "name": "Generate Post for X with ChatGPT", 48 | "type": "@n8n/n8n-nodes-langchain.openAi", 49 | "position": [ 50 | 900, 51 | 380 52 | ], 53 | "parameters": { 54 | "modelId": { 55 | "__rl": true, 56 | "mode": "list", 57 | "value": "gpt-3.5-turbo", 58 | "cachedResultName": "GPT-3.5-TURBO" 59 | }, 60 | "options": {}, 61 | "messages": { 62 | "values": [ 63 | { 64 | "content": "=Write an engaging post about my latest YouTube video for X (Twitter) of no more than 140 characters in length. Link to the video at https://youtu.be/{{ $json.id.videoId }} use this title and description: {{ $json.snippet.title }} {{ $json.snippet.description }}" 65 | } 66 | ] 67 | } 68 | }, 69 | "credentials": { 70 | "openAiApi": { 71 | "id": "UpdYKqoR9wsGBnaA", 72 | "name": "OpenAi account" 73 | } 74 | }, 75 | "typeVersion": 1.3 76 | }, 77 | { 78 | "id": "841ee140-7e37-4e9c-8ab2-2a3ee941d255", 79 | "name": "Sticky Note1", 80 | "type": "n8n-nodes-base.stickyNote", 81 | "position": [ 82 | 360, 83 | 254.5679012345679 84 | ], 85 | "parameters": { 86 | "width": 244.34567901234558, 87 | "height": 102.81481481481477, 88 | "content": "**Use AI to Promote Your New YouTube Videos on X**\n\n🎬 Watch the [Setup Video Here](https://mrc.fm/ai2x)" 89 | }, 90 | "typeVersion": 1 91 | }, 92 | { 93 | "id": "583b7d5d-e5dc-4183-92ee-8135ce6095a8", 94 | "name": "Fetch Latest Videos", 95 | "type": "n8n-nodes-base.youTube", 96 | "position": [ 97 | 680, 98 | 380 99 | ], 100 | "parameters": { 101 | "limit": 1, 102 | "filters": { 103 | "channelId": "UC08Fah8EIryeOZRkjBRohcQ", 104 | "publishedAfter": "={{ new Date(new Date().getTime() - 30 * 60000).toISOString() }}" 105 | }, 106 | "options": {}, 107 | "resource": "video" 108 | }, 109 | "credentials": { 110 | "youTubeOAuth2Api": { 111 | "id": "cVI5wEqeFEeJ81nk", 112 | "name": "YouTube account" 113 | } 114 | }, 115 | "typeVersion": 1 116 | }, 117 | { 118 | "id": "6e391007-10e2-4e67-9db6-e13d5d2bef11", 119 | "name": "Check Every 30 Min", 120 | "type": "n8n-nodes-base.scheduleTrigger", 121 | "position": [ 122 | 460, 123 | 380 124 | ], 125 | "parameters": { 126 | "rule": { 127 | "interval": [ 128 | { 129 | "field": "minutes", 130 | "minutesInterval": 30 131 | } 132 | ] 133 | } 134 | }, 135 | "typeVersion": 1.2 136 | } 137 | ], 138 | "active": false, 139 | "pinData": {}, 140 | "settings": { 141 | "executionOrder": "v1" 142 | }, 143 | "versionId": "a321d863-1a58-4100-bf8f-d2af08f11382", 144 | "connections": { 145 | "Check Every 30 Min": { 146 | "main": [ 147 | [ 148 | { 149 | "node": "Fetch Latest Videos", 150 | "type": "main", 151 | "index": 0 152 | } 153 | ] 154 | ] 155 | }, 156 | "Fetch Latest Videos": { 157 | "main": [ 158 | [ 159 | { 160 | "node": "Generate Post for X with ChatGPT", 161 | "type": "main", 162 | "index": 0 163 | } 164 | ] 165 | ] 166 | }, 167 | "Generate Post for X with ChatGPT": { 168 | "main": [ 169 | [ 170 | { 171 | "node": "Post to X", 172 | "type": "main", 173 | "index": 0 174 | } 175 | ] 176 | ] 177 | } 178 | } 179 | } -------------------------------------------------------------------------------- /Transform Image to Lego Style Using Line and Dall-E.txt: -------------------------------------------------------------------------------- 1 | { 2 | "meta": { 3 | "instanceId": "c59c4acfed171bdc864e7c432be610946898c3ee271693e0303565c953d88c1d", 4 | "templateCredsSetupCompleted": true 5 | }, 6 | "name": "Transform Image to Lego Style Using Line and Dall-E", 7 | "tags": [], 8 | "nodes": [ 9 | { 10 | "id": "82b62d4e-a263-4232-9bae-4c581db2269c", 11 | "name": "Receive a Line Webhook", 12 | "type": "n8n-nodes-base.webhook", 13 | "position": [ 14 | 0, 15 | 0 16 | ], 17 | "webhookId": "2a27c148-3977-485f-b197-567c96671023", 18 | "parameters": { 19 | "path": "lineimage", 20 | "options": {}, 21 | "httpMethod": "POST" 22 | }, 23 | "typeVersion": 2 24 | }, 25 | { 26 | "id": "f861c4eb-3d4f-4253-810f-8032602f079b", 27 | "name": "Receive Line Messages", 28 | "type": "n8n-nodes-base.httpRequest", 29 | "position": [ 30 | 220, 31 | 0 32 | ], 33 | "parameters": { 34 | "url": "=https://api-data.line.me/v2/bot/message/{{ $json.body.events[0].message.id }}/content", 35 | "options": {}, 36 | "jsonHeaders": "={\n\"Authorization\": \"Bearer YOUR_LINE_BOT_TOKEN\",\n\"Content-Type\": \"application/json\"\n}", 37 | "sendHeaders": true, 38 | "specifyHeaders": "json" 39 | }, 40 | "typeVersion": 4.2 41 | }, 42 | { 43 | "id": "da3a9188-028d-4c75-b23f-5f1f4e50784c", 44 | "name": "Creating an Image using Dall-E", 45 | "type": "@n8n/n8n-nodes-langchain.openAi", 46 | "position": [ 47 | 860, 48 | 0 49 | ], 50 | "parameters": { 51 | "prompt": "={{ $json.content }}", 52 | "options": { 53 | "returnImageUrls": true 54 | }, 55 | "resource": "image" 56 | }, 57 | "credentials": { 58 | "openAiApi": { 59 | "id": "YOUR_OPENAI_CREDENTIAL_ID", 60 | "name": "OpenAi account" 61 | } 62 | }, 63 | "typeVersion": 1.7 64 | }, 65 | { 66 | "id": "36c826e5-eacd-43ad-b663-4d788005e61a", 67 | "name": "Creating a Prompt for Dall-E (Lego Style)", 68 | "type": "@n8n/n8n-nodes-langchain.openAi", 69 | "position": [ 70 | 540, 71 | 0 72 | ], 73 | "parameters": { 74 | "text": "Creating the DALL·E 3 prompt to transform this kind of image into a isometric LEGO image (Only provide me with a prompt).", 75 | "modelId": { 76 | "__rl": true, 77 | "mode": "list", 78 | "value": "gpt-4o-mini", 79 | "cachedResultName": "GPT-4O-MINI" 80 | }, 81 | "options": {}, 82 | "resource": "image", 83 | "inputType": "base64", 84 | "operation": "analyze", 85 | "binaryPropertyName": "=data" 86 | }, 87 | "credentials": { 88 | "openAiApi": { 89 | "id": "YOUR_OPENAI_CREDENTIAL_ID", 90 | "name": "OpenAi account" 91 | } 92 | }, 93 | "typeVersion": 1.7 94 | }, 95 | { 96 | "id": "3c19f931-9ca0-4bd7-b4eb-1628d89bbba1", 97 | "name": "Send Back an Image through Line", 98 | "type": "n8n-nodes-base.httpRequest", 99 | "position": [ 100 | 1160, 101 | 0 102 | ], 103 | "parameters": { 104 | "url": "https://api.line.me/v2/bot/message/reply", 105 | "method": "POST", 106 | "options": {}, 107 | "jsonBody": "={\n \"replyToken\": \"{{ $('Receive a Line Webhook').item.json.body.events[0].replyToken }}\",\n \"messages\": [\n {\n \"type\": \"image\",\n \"originalContentUrl\": \"{{ $json.url }}\",\n \"previewImageUrl\": \"{{ $json.url }}\"\n }\n ]\n}", 108 | "sendBody": true, 109 | "jsonHeaders": "{\n\"Authorization\": \"Bearer YOUR_LINE_BOT_TOKEN\",\n\"Content-Type\": \"application/json\"\n}", 110 | "sendHeaders": true, 111 | "specifyBody": "json", 112 | "specifyHeaders": "json" 113 | }, 114 | "typeVersion": 4.2 115 | } 116 | ], 117 | "active": false, 118 | "pinData": {}, 119 | "settings": { 120 | "executionOrder": "v1" 121 | }, 122 | "versionId": "", 123 | "connections": { 124 | "Receive Line Messages": { 125 | "main": [ 126 | [ 127 | { 128 | "node": "Creating a Prompt for Dall-E (Lego Style)", 129 | "type": "main", 130 | "index": 0 131 | } 132 | ] 133 | ] 134 | }, 135 | "Receive a Line Webhook": { 136 | "main": [ 137 | [ 138 | { 139 | "node": "Receive Line Messages", 140 | "type": "main", 141 | "index": 0 142 | } 143 | ] 144 | ] 145 | }, 146 | "Creating an Image using Dall-E": { 147 | "main": [ 148 | [ 149 | { 150 | "node": "Send Back an Image through Line", 151 | "type": "main", 152 | "index": 0 153 | } 154 | ] 155 | ] 156 | }, 157 | "Creating a Prompt for Dall-E (Lego Style)": { 158 | "main": [ 159 | [ 160 | { 161 | "node": "Creating an Image using Dall-E", 162 | "type": "main", 163 | "index": 0 164 | } 165 | ] 166 | ] 167 | } 168 | } 169 | } -------------------------------------------------------------------------------- /ETL pipeline for text processing.txt: -------------------------------------------------------------------------------- 1 | { 2 | "id": "6", 3 | "name": "ETL pipeline", 4 | "nodes": [ 5 | { 6 | "name": "Twitter", 7 | "type": "n8n-nodes-base.twitter", 8 | "position": [ 9 | 300, 10 | 300 11 | ], 12 | "parameters": { 13 | "limit": 3, 14 | "operation": "search", 15 | "searchText": "=#OnThisDay", 16 | "additionalFields": {} 17 | }, 18 | "credentials": { 19 | "twitterOAuth1Api": "twitter_api" 20 | }, 21 | "typeVersion": 1 22 | }, 23 | { 24 | "name": "Postgres", 25 | "type": "n8n-nodes-base.postgres", 26 | "position": [ 27 | 1100, 28 | 300 29 | ], 30 | "parameters": { 31 | "table": "tweets", 32 | "columns": "text, score, magnitude", 33 | "returnFields": "=*" 34 | }, 35 | "credentials": { 36 | "postgres": "postgres" 37 | }, 38 | "typeVersion": 1 39 | }, 40 | { 41 | "name": "MongoDB", 42 | "type": "n8n-nodes-base.mongoDb", 43 | "position": [ 44 | 500, 45 | 300 46 | ], 47 | "parameters": { 48 | "fields": "text", 49 | "options": {}, 50 | "operation": "insert", 51 | "collection": "tweets" 52 | }, 53 | "credentials": { 54 | "mongoDb": "mongodb" 55 | }, 56 | "typeVersion": 1 57 | }, 58 | { 59 | "name": "Slack", 60 | "type": "n8n-nodes-base.slack", 61 | "position": [ 62 | 1500, 63 | 200 64 | ], 65 | "parameters": { 66 | "text": "=🐦 NEW TWEET with sentiment score {{$json[\"score\"]}} and magnitude {{$json[\"magnitude\"]}} ⬇️\n{{$json[\"text\"]}}", 67 | "channel": "tweets", 68 | "attachments": [], 69 | "otherOptions": {} 70 | }, 71 | "credentials": { 72 | "slackApi": "slack" 73 | }, 74 | "typeVersion": 1 75 | }, 76 | { 77 | "name": "IF", 78 | "type": "n8n-nodes-base.if", 79 | "position": [ 80 | 1300, 81 | 300 82 | ], 83 | "parameters": { 84 | "conditions": { 85 | "number": [ 86 | { 87 | "value1": "={{$json[\"score\"]}}", 88 | "operation": "larger" 89 | } 90 | ] 91 | } 92 | }, 93 | "typeVersion": 1 94 | }, 95 | { 96 | "name": "NoOp", 97 | "type": "n8n-nodes-base.noOp", 98 | "position": [ 99 | 1500, 100 | 400 101 | ], 102 | "parameters": {}, 103 | "typeVersion": 1 104 | }, 105 | { 106 | "name": "Google Cloud Natural Language", 107 | "type": "n8n-nodes-base.googleCloudNaturalLanguage", 108 | "position": [ 109 | 700, 110 | 300 111 | ], 112 | "parameters": { 113 | "content": "={{$node[\"MongoDB\"].json[\"text\"]}}", 114 | "options": {} 115 | }, 116 | "credentials": { 117 | "googleCloudNaturalLanguageOAuth2Api": "google_nlp" 118 | }, 119 | "typeVersion": 1 120 | }, 121 | { 122 | "name": "Set", 123 | "type": "n8n-nodes-base.set", 124 | "position": [ 125 | 900, 126 | 300 127 | ], 128 | "parameters": { 129 | "values": { 130 | "number": [ 131 | { 132 | "name": "score", 133 | "value": "={{$json[\"documentSentiment\"][\"score\"]}}" 134 | }, 135 | { 136 | "name": "magnitude", 137 | "value": "={{$json[\"documentSentiment\"][\"magnitude\"]}}" 138 | } 139 | ], 140 | "string": [ 141 | { 142 | "name": "text", 143 | "value": "={{$node[\"Twitter\"].json[\"text\"]}}" 144 | } 145 | ] 146 | }, 147 | "options": {} 148 | }, 149 | "typeVersion": 1 150 | }, 151 | { 152 | "name": "Cron", 153 | "type": "n8n-nodes-base.cron", 154 | "position": [ 155 | 100, 156 | 300 157 | ], 158 | "parameters": { 159 | "triggerTimes": { 160 | "item": [ 161 | { 162 | "hour": 6 163 | } 164 | ] 165 | } 166 | }, 167 | "typeVersion": 1 168 | } 169 | ], 170 | "active": false, 171 | "settings": {}, 172 | "connections": { 173 | "IF": { 174 | "main": [ 175 | [ 176 | { 177 | "node": "Slack", 178 | "type": "main", 179 | "index": 0 180 | } 181 | ], 182 | [ 183 | { 184 | "node": "NoOp", 185 | "type": "main", 186 | "index": 0 187 | } 188 | ] 189 | ] 190 | }, 191 | "Set": { 192 | "main": [ 193 | [ 194 | { 195 | "node": "Postgres", 196 | "type": "main", 197 | "index": 0 198 | } 199 | ] 200 | ] 201 | }, 202 | "Cron": { 203 | "main": [ 204 | [ 205 | { 206 | "node": "Twitter", 207 | "type": "main", 208 | "index": 0 209 | } 210 | ] 211 | ] 212 | }, 213 | "MongoDB": { 214 | "main": [ 215 | [ 216 | { 217 | "node": "Google Cloud Natural Language", 218 | "type": "main", 219 | "index": 0 220 | } 221 | ] 222 | ] 223 | }, 224 | "Twitter": { 225 | "main": [ 226 | [ 227 | { 228 | "node": "MongoDB", 229 | "type": "main", 230 | "index": 0 231 | } 232 | ] 233 | ] 234 | }, 235 | "Postgres": { 236 | "main": [ 237 | [ 238 | { 239 | "node": "IF", 240 | "type": "main", 241 | "index": 0 242 | } 243 | ] 244 | ] 245 | }, 246 | "Google Cloud Natural Language": { 247 | "main": [ 248 | [ 249 | { 250 | "node": "Set", 251 | "type": "main", 252 | "index": 0 253 | } 254 | ] 255 | ] 256 | } 257 | } 258 | } -------------------------------------------------------------------------------- /Query Perplexity AI from your n8n workflows.txt: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": [ 3 | { 4 | "id": "293b70f0-06e8-4db5-befd-bfaed1f3575a", 5 | "name": "When clicking ‘Test workflow’", 6 | "type": "n8n-nodes-base.manualTrigger", 7 | "position": [ 8 | -460, 9 | 80 10 | ], 11 | "parameters": {}, 12 | "typeVersion": 1 13 | }, 14 | { 15 | "id": "1c473546-6280-412d-9f8e-b43962365d78", 16 | "name": "Set Params", 17 | "type": "n8n-nodes-base.set", 18 | "position": [ 19 | -160, 20 | -60 21 | ], 22 | "parameters": { 23 | "options": {}, 24 | "assignments": { 25 | "assignments": [ 26 | { 27 | "id": "8b5c6ca0-5ca8-4f67-abc1-44341cf419bc", 28 | "name": "system_prompt", 29 | "type": "string", 30 | "value": "You are an n8n fanboy." 31 | }, 32 | { 33 | "id": "7c36c362-6269-4564-b6fe-f82126bc8f5e", 34 | "name": "user_prompt", 35 | "type": "string", 36 | "value": "What are the differences between n8n and Make?" 37 | }, 38 | { 39 | "id": "4366d2b5-ad22-445a-8589-fddab1caa1ab", 40 | "name": "domains", 41 | "type": "string", 42 | "value": "n8n.io, make.com" 43 | } 44 | ] 45 | } 46 | }, 47 | "typeVersion": 3.4 48 | }, 49 | { 50 | "id": "894bd6a4-5db7-45fb-a8e0-1a81af068bbf", 51 | "name": "Clean Output", 52 | "type": "n8n-nodes-base.set", 53 | "position": [ 54 | 580, 55 | -100 56 | ], 57 | "parameters": { 58 | "options": {}, 59 | "assignments": { 60 | "assignments": [ 61 | { 62 | "id": "5859093c-6b22-41db-ac6c-9a9f6f18b7e3", 63 | "name": "output", 64 | "type": "string", 65 | "value": "={{ $json.choices[0].message.content }}" 66 | }, 67 | { 68 | "id": "13208fff-5153-45a7-a1cb-fe49e32d9a03", 69 | "name": "citations", 70 | "type": "array", 71 | "value": "={{ $json.citations }}" 72 | } 73 | ] 74 | } 75 | }, 76 | "typeVersion": 3.4 77 | }, 78 | { 79 | "id": "52d3a832-8c9b-4356-ad2a-377340678a58", 80 | "name": "Perplexity Request", 81 | "type": "n8n-nodes-base.httpRequest", 82 | "position": [ 83 | 240, 84 | 40 85 | ], 86 | "parameters": { 87 | "url": "https://api.perplexity.ai/chat/completions", 88 | "method": "POST", 89 | "options": {}, 90 | "jsonBody": "={\n \"model\": \"sonar\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"{{ $json.system_prompt }}\"\n },\n {\n \"role\": \"user\",\n \"content\": \"{{ $json.user_prompt }}\"\n }\n ],\n \"temperature\": 0.2,\n \"top_p\": 0.9,\n \"search_domain_filter\": {{ (JSON.stringify($json.domains.split(','))) }},\n \"return_images\": false,\n \"return_related_questions\": false,\n \"search_recency_filter\": \"month\",\n \"top_k\": 0,\n \"stream\": false,\n \"presence_penalty\": 0,\n \"frequency_penalty\": 1,\n \"response_format\": null\n}", 91 | "sendBody": true, 92 | "specifyBody": "json", 93 | "authentication": "genericCredentialType", 94 | "genericAuthType": "httpHeaderAuth" 95 | }, 96 | "credentials": { 97 | "httpBasicAuth": { 98 | "id": "yEocL0NSpUWzMsHG", 99 | "name": "Perplexity" 100 | }, 101 | "httpHeaderAuth": { 102 | "id": "TngzgS09J1YvLIXl", 103 | "name": "Perplexity" 104 | } 105 | }, 106 | "typeVersion": 4.2 107 | }, 108 | { 109 | "id": "48657f2c-d1dd-4d7e-8014-c27748e63e58", 110 | "name": "Sticky Note", 111 | "type": "n8n-nodes-base.stickyNote", 112 | "position": [ 113 | -140, 114 | -440 115 | ], 116 | "parameters": { 117 | "width": 480, 118 | "height": 300, 119 | "content": "## Credentials Setup\n\n1/ Go to the perplexity dashboard, purchase some credits and create an API Key\n\nhttps://www.perplexity.ai/settings/api\n\n2/ In the perplexity Request node, use Generic Credentials, Header Auth. \n\nFor the name, use the value \"Authorization\"\nAnd for the value \"Bearer pplx-e4...59ea\" (Your Perplexity Api Key)\n\n" 120 | }, 121 | "typeVersion": 1 122 | }, 123 | { 124 | "id": "e0daabee-c145-469e-93c2-c759c303dc2a", 125 | "name": "Sticky Note1", 126 | "type": "n8n-nodes-base.stickyNote", 127 | "position": [ 128 | 100, 129 | 260 130 | ], 131 | "parameters": { 132 | "color": 5, 133 | "width": 480, 134 | "height": 120, 135 | "content": "**Sonar Pro** is the current top model used by perplexity. \nIf you want to use a different one, check this page: \n\nhttps://docs.perplexity.ai/guides/model-cards" 136 | }, 137 | "typeVersion": 1 138 | } 139 | ], 140 | "pinData": {}, 141 | "connections": { 142 | "Set Params": { 143 | "main": [ 144 | [ 145 | { 146 | "node": "Perplexity Request", 147 | "type": "main", 148 | "index": 0 149 | } 150 | ] 151 | ] 152 | }, 153 | "Perplexity Request": { 154 | "main": [ 155 | [ 156 | { 157 | "node": "Clean Output", 158 | "type": "main", 159 | "index": 0 160 | } 161 | ] 162 | ] 163 | }, 164 | "When clicking ‘Test workflow’": { 165 | "main": [ 166 | [ 167 | { 168 | "node": "Set Params", 169 | "type": "main", 170 | "index": 0 171 | } 172 | ] 173 | ] 174 | } 175 | } 176 | } -------------------------------------------------------------------------------- /Generate Text-to-Speech Using Elevenlabs via API.txt: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": [ 3 | { 4 | "id": "73b64763-5e18-4ff1-bb52-ba25a08d3c3a", 5 | "name": "If params correct", 6 | "type": "n8n-nodes-base.if", 7 | "position": [ 8 | 500, 9 | 200 10 | ], 11 | "parameters": { 12 | "options": {}, 13 | "conditions": { 14 | "options": { 15 | "leftValue": "", 16 | "caseSensitive": true, 17 | "typeValidation": "strict" 18 | }, 19 | "combinator": "and", 20 | "conditions": [ 21 | { 22 | "id": "2e968b41-88f7-4b28-9837-af50ae130979", 23 | "operator": { 24 | "type": "string", 25 | "operation": "exists", 26 | "singleValue": true 27 | }, 28 | "leftValue": "voice_id", 29 | "rightValue": "" 30 | }, 31 | { 32 | "id": "ad961bc9-6db8-4cac-8c63-30930e8beca7", 33 | "operator": { 34 | "type": "string", 35 | "operation": "exists", 36 | "singleValue": true 37 | }, 38 | "leftValue": "text", 39 | "rightValue": "" 40 | } 41 | ] 42 | } 43 | }, 44 | "typeVersion": 2 45 | }, 46 | { 47 | "id": "39079dec-54c5-458e-afa1-56ee5723f3a3", 48 | "name": "Respond to Webhook", 49 | "type": "n8n-nodes-base.respondToWebhook", 50 | "position": [ 51 | 960, 52 | 180 53 | ], 54 | "parameters": { 55 | "options": {}, 56 | "respondWith": "binary" 57 | }, 58 | "typeVersion": 1.1 59 | }, 60 | { 61 | "id": "b6a344f4-28ac-41a7-8e6a-a2782a5d1c68", 62 | "name": "Webhook", 63 | "type": "n8n-nodes-base.webhook", 64 | "position": [ 65 | 300, 66 | 200 67 | ], 68 | "webhookId": "5acc6769-6c0f-42a8-a69c-b05e437e18a9", 69 | "parameters": { 70 | "path": "generate-voice", 71 | "options": {}, 72 | "httpMethod": "POST", 73 | "responseMode": "responseNode" 74 | }, 75 | "typeVersion": 2 76 | }, 77 | { 78 | "id": "a25dec72-152b-4457-a18f-9cbbd31840ec", 79 | "name": "Generate voice", 80 | "type": "n8n-nodes-base.httpRequest", 81 | "position": [ 82 | 740, 83 | 180 84 | ], 85 | "parameters": { 86 | "url": "=https://api.elevenlabs.io/v1/text-to-speech/{{ $json.body.voice_id }}", 87 | "method": "POST", 88 | "options": {}, 89 | "jsonBody": "={\n \"text\": \"{{ $json.body.text }}\"\n} ", 90 | "sendBody": true, 91 | "sendHeaders": true, 92 | "specifyBody": "json", 93 | "authentication": "genericCredentialType", 94 | "genericAuthType": "httpCustomAuth", 95 | "headerParameters": { 96 | "parameters": [ 97 | { 98 | "name": "Content-Type", 99 | "value": "application/json" 100 | } 101 | ] 102 | } 103 | }, 104 | "credentials": { 105 | "httpCustomAuth": { 106 | "id": "nhkU37chaiBU6X3j", 107 | "name": "Custom Auth account" 108 | } 109 | }, 110 | "typeVersion": 4.2 111 | }, 112 | { 113 | "id": "e862955e-76d9-4a24-9501-0d5eb8fbe778", 114 | "name": "Sticky Note", 115 | "type": "n8n-nodes-base.stickyNote", 116 | "position": [ 117 | 280, 118 | -360 119 | ], 120 | "parameters": { 121 | "width": 806.0818150700699, 122 | "height": 495.17470523089514, 123 | "content": "## Generate Text-to-Speech Using Elevenlabs via API\nThis workflow provides an API endpoint to generate speech from text using [Elevenlabs.io](https://elevenlabs.io/), a popular text-to-speech service.\n\n### Step 1: Configure Custom Credentials in n8n\nTo set up your credentials in n8n, create a new custom authentication entry with the following JSON structure:\n```json\n{\n \"headers\": {\n \"xi-api-key\": \"your-elevenlabs-api-key\"\n }\n}\n```\nReplace `\"your-elevenlabs-api-key\"` with your actual Elevenlabs API key.\n\n### Step 2: Send a POST Request to the Webhook\nSend a POST request to the workflow's webhook endpoint with these two parameters:\n- `voice_id`: The ID of the voice from Elevenlabs that you want to use.\n- `text`: The text you want to convert to speech.\n\nThis workflow has been a significant time-saver in my video production tasks. I hope it proves just as useful to you!\n\nHappy automating! \nThe n8Ninja" 124 | }, 125 | "typeVersion": 1 126 | }, 127 | { 128 | "id": "275ca523-8b43-4723-9dc4-f5dc1832fcd1", 129 | "name": "Error", 130 | "type": "n8n-nodes-base.respondToWebhook", 131 | "position": [ 132 | 740, 133 | 360 134 | ], 135 | "parameters": { 136 | "options": {}, 137 | "respondWith": "json", 138 | "responseBody": "{\n \"error\": \"Invalid inputs.\"\n}" 139 | }, 140 | "typeVersion": 1.1 141 | } 142 | ], 143 | "pinData": {}, 144 | "connections": { 145 | "Webhook": { 146 | "main": [ 147 | [ 148 | { 149 | "node": "If params correct", 150 | "type": "main", 151 | "index": 0 152 | } 153 | ] 154 | ] 155 | }, 156 | "Generate voice": { 157 | "main": [ 158 | [ 159 | { 160 | "node": "Respond to Webhook", 161 | "type": "main", 162 | "index": 0 163 | } 164 | ] 165 | ] 166 | }, 167 | "If params correct": { 168 | "main": [ 169 | [ 170 | { 171 | "node": "Generate voice", 172 | "type": "main", 173 | "index": 0 174 | } 175 | ], 176 | [ 177 | { 178 | "node": "Error", 179 | "type": "main", 180 | "index": 0 181 | } 182 | ] 183 | ] 184 | } 185 | } 186 | } -------------------------------------------------------------------------------- /Use OpenRouter in n8n versions _1.78.txt: -------------------------------------------------------------------------------- 1 | { 2 | "id": "VhN3CX6QPBkX77pZ", 3 | "meta": { 4 | "instanceId": "98bf0d6aef1dd8b7a752798121440fb171bf7686b95727fd617f43452393daa3", 5 | "templateCredsSetupCompleted": true 6 | }, 7 | "name": "Use any LLM-Model via OpenRouter", 8 | "tags": [ 9 | { 10 | "id": "uumvgGHY5e6zEL7V", 11 | "name": "Published Template", 12 | "createdAt": "2025-02-10T11:18:10.923Z", 13 | "updatedAt": "2025-02-10T11:18:10.923Z" 14 | } 15 | ], 16 | "nodes": [ 17 | { 18 | "id": "b72721d2-bce7-458d-8ff1-cc9f6d099aaf", 19 | "name": "Settings", 20 | "type": "n8n-nodes-base.set", 21 | "position": [ 22 | -420, 23 | -640 24 | ], 25 | "parameters": { 26 | "options": {}, 27 | "assignments": { 28 | "assignments": [ 29 | { 30 | "id": "3d7f9677-c753-4126-b33a-d78ef701771f", 31 | "name": "model", 32 | "type": "string", 33 | "value": "deepseek/deepseek-r1-distill-llama-8b" 34 | }, 35 | { 36 | "id": "301f86ec-260f-4d69-abd9-bde982e3e0aa", 37 | "name": "prompt", 38 | "type": "string", 39 | "value": "={{ $json.chatInput }}" 40 | }, 41 | { 42 | "id": "a9f65181-902d-48f5-95ce-1352d391a056", 43 | "name": "sessionId", 44 | "type": "string", 45 | "value": "={{ $json.sessionId }}" 46 | } 47 | ] 48 | } 49 | }, 50 | "typeVersion": 3.4 51 | }, 52 | { 53 | "id": "a4593d64-e67a-490e-9cb4-936cc46273a0", 54 | "name": "Sticky Note", 55 | "type": "n8n-nodes-base.stickyNote", 56 | "position": [ 57 | -460, 58 | -740 59 | ], 60 | "parameters": { 61 | "width": 180, 62 | "height": 400, 63 | "content": "## Settings\nSpecify the model" 64 | }, 65 | "typeVersion": 1 66 | }, 67 | { 68 | "id": "3ea3b09a-0ab7-4e0f-bb4f-3d807d072d4e", 69 | "name": "Sticky Note1", 70 | "type": "n8n-nodes-base.stickyNote", 71 | "position": [ 72 | -240, 73 | -740 74 | ], 75 | "parameters": { 76 | "color": 3, 77 | "width": 380, 78 | "height": 400, 79 | "content": "## Run LLM\nUsing OpenRouter to make model fully configurable" 80 | }, 81 | "typeVersion": 1 82 | }, 83 | { 84 | "id": "19d47fcb-af37-4daa-84fd-3f43ffcb90ff", 85 | "name": "When chat message received", 86 | "type": "@n8n/n8n-nodes-langchain.chatTrigger", 87 | "position": [ 88 | -660, 89 | -640 90 | ], 91 | "webhookId": "71f56e44-401f-44ba-b54d-c947e283d034", 92 | "parameters": { 93 | "options": {} 94 | }, 95 | "typeVersion": 1.1 96 | }, 97 | { 98 | "id": "f5a793f2-1e2f-4349-a075-9b9171297277", 99 | "name": "AI Agent", 100 | "type": "@n8n/n8n-nodes-langchain.agent", 101 | "position": [ 102 | -180, 103 | -640 104 | ], 105 | "parameters": { 106 | "text": "={{ $json.prompt }}", 107 | "options": {}, 108 | "promptType": "define" 109 | }, 110 | "typeVersion": 1.7 111 | }, 112 | { 113 | "id": "dbbd9746-ca25-4163-91c5-a9e33bff62a4", 114 | "name": "Chat Memory", 115 | "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow", 116 | "position": [ 117 | -80, 118 | -460 119 | ], 120 | "parameters": { 121 | "sessionKey": "={{ $json.sessionId }}", 122 | "sessionIdType": "customKey" 123 | }, 124 | "typeVersion": 1.3 125 | }, 126 | { 127 | "id": "ef368cea-1b38-455b-b46a-5d0ef7a3ceb3", 128 | "name": "LLM Model", 129 | "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", 130 | "position": [ 131 | -200, 132 | -460 133 | ], 134 | "parameters": { 135 | "model": "={{ $json.model }}", 136 | "options": {} 137 | }, 138 | "credentials": { 139 | "openAiApi": { 140 | "id": "66JEQJ5kJel1P9t3", 141 | "name": "OpenRouter" 142 | } 143 | }, 144 | "typeVersion": 1.1 145 | }, 146 | { 147 | "id": "32601e76-0979-4690-8dcf-149ddbf61983", 148 | "name": "Sticky Note2", 149 | "type": "n8n-nodes-base.stickyNote", 150 | "position": [ 151 | -460, 152 | -320 153 | ], 154 | "parameters": { 155 | "width": 600, 156 | "height": 240, 157 | "content": "## Model examples\n\n* openai/o3-mini\n* google/gemini-2.0-flash-001\n* deepseek/deepseek-r1-distill-llama-8b\n* mistralai/mistral-small-24b-instruct-2501:free\n* qwen/qwen-turbo\n\nFor more see https://openrouter.ai/models" 158 | }, 159 | "typeVersion": 1 160 | } 161 | ], 162 | "active": false, 163 | "pinData": {}, 164 | "settings": { 165 | "executionOrder": "v1" 166 | }, 167 | "versionId": "6d0caf5d-d6e6-4059-9211-744b0f4bc204", 168 | "connections": { 169 | "Settings": { 170 | "main": [ 171 | [ 172 | { 173 | "node": "AI Agent", 174 | "type": "main", 175 | "index": 0 176 | } 177 | ] 178 | ] 179 | }, 180 | "LLM Model": { 181 | "ai_languageModel": [ 182 | [ 183 | { 184 | "node": "AI Agent", 185 | "type": "ai_languageModel", 186 | "index": 0 187 | } 188 | ] 189 | ] 190 | }, 191 | "Chat Memory": { 192 | "ai_memory": [ 193 | [ 194 | { 195 | "node": "AI Agent", 196 | "type": "ai_memory", 197 | "index": 0 198 | } 199 | ] 200 | ] 201 | }, 202 | "When chat message received": { 203 | "main": [ 204 | [ 205 | { 206 | "node": "Settings", 207 | "type": "main", 208 | "index": 0 209 | } 210 | ] 211 | ] 212 | } 213 | } 214 | } -------------------------------------------------------------------------------- /Convert text to speech with OpenAI.txt: -------------------------------------------------------------------------------- 1 | { 2 | "id": "6Yzmlp5xF6oHo1VW", 3 | "meta": { 4 | "instanceId": "173f55e6572798fa42ea9c5c92623a3c3308080d3fcd2bd784d26d855b1ce820" 5 | }, 6 | "name": "Text to Speech (OpenAI)", 7 | "tags": [], 8 | "nodes": [ 9 | { 10 | "id": "938fedbd-e34c-40af-af2f-b9c669e1a6e9", 11 | "name": "When clicking \"Test workflow\"", 12 | "type": "n8n-nodes-base.manualTrigger", 13 | "position": [ 14 | 380, 15 | 380 16 | ], 17 | "parameters": {}, 18 | "typeVersion": 1 19 | }, 20 | { 21 | "id": "1d59db5d-8fe6-4292-a221-a0d0194c6e0c", 22 | "name": "Set input text and TTS voice", 23 | "type": "n8n-nodes-base.set", 24 | "position": [ 25 | 760, 26 | 380 27 | ], 28 | "parameters": { 29 | "mode": "raw", 30 | "options": {}, 31 | "jsonOutput": "{\n \"input_text\": \"The quick brown fox jumped over the lazy dog.\",\n \"voice\": \"alloy\"\n}\n" 32 | }, 33 | "typeVersion": 3.2 34 | }, 35 | { 36 | "id": "9d54de1d-59b7-4c1f-9e88-13572da5292c", 37 | "name": "Send HTTP Request to OpenAI's TTS Endpoint", 38 | "type": "n8n-nodes-base.httpRequest", 39 | "position": [ 40 | 1120, 41 | 380 42 | ], 43 | "parameters": { 44 | "url": "https://api.openai.com/v1/audio/speech", 45 | "method": "POST", 46 | "options": {}, 47 | "sendBody": true, 48 | "sendHeaders": true, 49 | "authentication": "predefinedCredentialType", 50 | "bodyParameters": { 51 | "parameters": [ 52 | { 53 | "name": "model", 54 | "value": "tts-1" 55 | }, 56 | { 57 | "name": "input", 58 | "value": "={{ $json.input_text }}" 59 | }, 60 | { 61 | "name": "voice", 62 | "value": "={{ $json.voice }}" 63 | } 64 | ] 65 | }, 66 | "headerParameters": { 67 | "parameters": [ 68 | { 69 | "name": "Authorization", 70 | "value": "Bearer $OPENAI_API_KEY" 71 | } 72 | ] 73 | }, 74 | "nodeCredentialType": "openAiApi" 75 | }, 76 | "credentials": { 77 | "openAiApi": { 78 | "id": "VokTSv2Eg5m5aDg7", 79 | "name": "OpenAi account" 80 | } 81 | }, 82 | "typeVersion": 4.1 83 | }, 84 | { 85 | "id": "1ce72c9c-aa6f-4a18-9d5a-3971686a51ec", 86 | "name": "Sticky Note", 87 | "type": "n8n-nodes-base.stickyNote", 88 | "position": [ 89 | 280, 90 | 256 91 | ], 92 | "parameters": { 93 | "width": 273, 94 | "height": 339, 95 | "content": "## Workflow Trigger\nYou can replace this manual trigger with another trigger type as required by your use case." 96 | }, 97 | "typeVersion": 1 98 | }, 99 | { 100 | "id": "eb487535-5f36-465e-aeee-e9ff62373e53", 101 | "name": "Sticky Note1", 102 | "type": "n8n-nodes-base.stickyNote", 103 | "position": [ 104 | 660, 105 | 257 106 | ], 107 | "parameters": { 108 | "width": 273, 109 | "height": 335, 110 | "content": "## Manually Set OpenAI TTS Configuration\n" 111 | }, 112 | "typeVersion": 1 113 | }, 114 | { 115 | "id": "36b380bd-0703-4b60-83cb-c4ad9265864d", 116 | "name": "Sticky Note2", 117 | "type": "n8n-nodes-base.stickyNote", 118 | "position": [ 119 | 1020, 120 | 260 121 | ], 122 | "parameters": { 123 | "width": 302, 124 | "height": 335, 125 | "content": "## Send Request to OpenAI TTS API\n" 126 | }, 127 | "typeVersion": 1 128 | }, 129 | { 130 | "id": "ff35ff28-62b5-49c8-a657-795aa916b524", 131 | "name": "Sticky Note3", 132 | "type": "n8n-nodes-base.stickyNote", 133 | "position": [ 134 | 660, 135 | 620 136 | ], 137 | "parameters": { 138 | "color": 4, 139 | "width": 273, 140 | "height": 278, 141 | "content": "### Configuration Options\n- \"input_text\" is the text you would like to be turned into speech, and can be replaced with a programmatic value for your use case. Bear in mind that the maximum number of tokens per API call is 4,000.\n\n- \"voice\" is the voice used by the TTS model. The default is alloy, other options can be found here: [OpenAI TTS Docs](https://platform.openai.com/docs/guides/text-to-speech)" 142 | }, 143 | "typeVersion": 1 144 | }, 145 | { 146 | "id": "5f7ef80e-b5c8-41df-9411-525fafc2d910", 147 | "name": "Sticky Note4", 148 | "type": "n8n-nodes-base.stickyNote", 149 | "position": [ 150 | 1020, 151 | 620 152 | ], 153 | "parameters": { 154 | "color": 4, 155 | "width": 299, 156 | "height": 278, 157 | "content": "### Output\nThe output returned by OpenAI's TTS endpoint is a .mp3 audio file (binary).\n\n\n### Credentials\nTo use this workflow, you'll have to configure and provide a valid OpenAI credential.\n" 158 | }, 159 | "typeVersion": 1 160 | } 161 | ], 162 | "active": false, 163 | "pinData": {}, 164 | "settings": { 165 | "executionOrder": "v1" 166 | }, 167 | "versionId": "19d67805-e208-4f0e-af44-c304e66e8ce8", 168 | "connections": { 169 | "Set input text and TTS voice": { 170 | "main": [ 171 | [ 172 | { 173 | "node": "Send HTTP Request to OpenAI's TTS Endpoint", 174 | "type": "main", 175 | "index": 0 176 | } 177 | ] 178 | ] 179 | }, 180 | "When clicking \"Test workflow\"": { 181 | "main": [ 182 | [ 183 | { 184 | "node": "Set input text and TTS voice", 185 | "type": "main", 186 | "index": 0 187 | } 188 | ] 189 | ] 190 | } 191 | } 192 | } -------------------------------------------------------------------------------- /Get Airtable data via AI and Obsidian Notes.txt: -------------------------------------------------------------------------------- 1 | { 2 | "id": "aZSJ2BZQhNduZZ8w", 3 | "meta": { 4 | "instanceId": "d47f3738b860eed937a1b18d7345fa2c65cf4b4957554e29477cb064a7039870", 5 | "templateCredsSetupCompleted": true 6 | }, 7 | "name": "Get Airtable data in Obsidian Notes", 8 | "tags": [ 9 | { 10 | "id": "zalLN3OHeRqcq4di", 11 | "name": "Obsidian", 12 | "createdAt": "2024-12-01T19:07:59.925Z", 13 | "updatedAt": "2024-12-01T19:07:59.925Z" 14 | } 15 | ], 16 | "nodes": [ 17 | { 18 | "id": "584cfe61-7f1b-4deb-ab4b-45a5ffd20daf", 19 | "name": "Airtable", 20 | "type": "n8n-nodes-base.airtableTool", 21 | "position": [ 22 | 540, 23 | 340 24 | ], 25 | "parameters": { 26 | "base": { 27 | "__rl": true, 28 | "mode": "list", 29 | "value": "appP3ocJy1rXIo6ko", 30 | "cachedResultUrl": "https://airtable.com/appP3ocJy1rXIo6ko", 31 | "cachedResultName": "table" 32 | }, 33 | "table": { 34 | "__rl": true, 35 | "mode": "list", 36 | "value": "tblywtlpPtGQMTJRm", 37 | "cachedResultUrl": "https://airtable.com/appP3ocJy1rXIo6ko/tblywtlpPtGQMTJRm", 38 | "cachedResultName": "Dummy" 39 | }, 40 | "options": {}, 41 | "operation": "search" 42 | }, 43 | "credentials": { 44 | "airtableTokenApi": { 45 | "id": "yiZ7ZC1md4geZovu", 46 | "name": "Airtable Personal Access Token account" 47 | } 48 | }, 49 | "typeVersion": 2.1 50 | }, 51 | { 52 | "id": "8a100c92-7971-464b-b3c0-18272f0a0bef", 53 | "name": "OpenAI Chat Model", 54 | "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", 55 | "position": [ 56 | 220, 57 | 340 58 | ], 59 | "parameters": { 60 | "model": "gpt-4o-mini", 61 | "options": {} 62 | }, 63 | "credentials": { 64 | "openAiApi": { 65 | "id": "q8L9oWVM7QyzYEE5", 66 | "name": "OpenAi account" 67 | } 68 | }, 69 | "typeVersion": 1 70 | }, 71 | { 72 | "id": "98887b9b-2eae-4a2e-af2b-d40c1786c5a2", 73 | "name": "AI Agent", 74 | "type": "@n8n/n8n-nodes-langchain.agent", 75 | "position": [ 76 | 280, 77 | 200 78 | ], 79 | "parameters": { 80 | "text": "={{ $json.body.content }}", 81 | "options": {}, 82 | "promptType": "define" 83 | }, 84 | "typeVersion": 1.6 85 | }, 86 | { 87 | "id": "91296976-3d78-4a9e-9f4c-a4136abcca4e", 88 | "name": "Sticky Note", 89 | "type": "n8n-nodes-base.stickyNote", 90 | "position": [ 91 | -160, 92 | -260 93 | ], 94 | "parameters": { 95 | "color": 7, 96 | "width": 497.9113826976365, 97 | "height": 389.9939760040372, 98 | "content": "[](https://www.youtube.com/watch?v=2PIdeTgsENo)" 99 | }, 100 | "typeVersion": 1 101 | }, 102 | { 103 | "id": "7adae874-d388-4265-aff8-28a1970bd0fb", 104 | "name": "Sticky Note1", 105 | "type": "n8n-nodes-base.stickyNote", 106 | "position": [ 107 | 360, 108 | -240 109 | ], 110 | "parameters": { 111 | "width": 563.3824678865192, 112 | "height": 368.0048034646952, 113 | "content": "## Get Airtable Data in Obsidian with AI Agent\n<-- Watch the video to see it in action!\n\n**How to Set Up:**\n- Install the [Post Webhook Plugin](https://github.com/Masterb1234/obsidian-post-webhook/) in Obsidian.\n- Insert the n8n Webhook URL into the Post Webhook plugin settings.\n- Configure Your Airtable Node to match your workflow needs.\n\n\n**How to Use:**\n- Highlight text containing a question about your Airtable data.\n- Open the Obsidian Command Palette (Ctrl+P) and choose 'Send Selection to [Your Webhook]'.\n- Click, wait for the AI Agent to process your request, and see the result appear below your selected text." 114 | }, 115 | "typeVersion": 1 116 | }, 117 | { 118 | "id": "52c40581-656d-45b5-b366-d67cf2474312", 119 | "name": "Respond to Obsidian", 120 | "type": "n8n-nodes-base.respondToWebhook", 121 | "position": [ 122 | 700, 123 | 200 124 | ], 125 | "parameters": { 126 | "options": {}, 127 | "respondWith": "text", 128 | "responseBody": "={{ $json.output }}" 129 | }, 130 | "typeVersion": 1.1 131 | }, 132 | { 133 | "id": "f2bf502e-5e6f-4e71-8c4f-27ec2dc5ab67", 134 | "name": "Webhook Set Up in Obsidian", 135 | "type": "n8n-nodes-base.webhook", 136 | "position": [ 137 | -40, 138 | 200 139 | ], 140 | "webhookId": "59fc8248-d3f7-4dbc-bdf3-39d59e427160", 141 | "parameters": { 142 | "path": "59fc8248-d3f7-4dbc-bdf3-39d59e427160", 143 | "options": {}, 144 | "httpMethod": "POST", 145 | "responseMode": "responseNode" 146 | }, 147 | "typeVersion": 2 148 | } 149 | ], 150 | "active": true, 151 | "pinData": {}, 152 | "settings": { 153 | "executionOrder": "v1" 154 | }, 155 | "versionId": "dab99881-2d04-4113-9a4e-2f942fdf1c24", 156 | "connections": { 157 | "AI Agent": { 158 | "main": [ 159 | [ 160 | { 161 | "node": "Respond to Obsidian", 162 | "type": "main", 163 | "index": 0 164 | } 165 | ] 166 | ] 167 | }, 168 | "Airtable": { 169 | "ai_tool": [ 170 | [ 171 | { 172 | "node": "AI Agent", 173 | "type": "ai_tool", 174 | "index": 0 175 | } 176 | ] 177 | ] 178 | }, 179 | "OpenAI Chat Model": { 180 | "ai_languageModel": [ 181 | [ 182 | { 183 | "node": "AI Agent", 184 | "type": "ai_languageModel", 185 | "index": 0 186 | } 187 | ] 188 | ] 189 | }, 190 | "Webhook Set Up in Obsidian": { 191 | "main": [ 192 | [ 193 | { 194 | "node": "AI Agent", 195 | "type": "main", 196 | "index": 0 197 | } 198 | ] 199 | ] 200 | } 201 | } 202 | } -------------------------------------------------------------------------------- /Summarize YouTube Videos from Transcript.txt: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": [ 3 | { 4 | "id": "6d908a58-8893-48da-8311-8c28ebd8ec62", 5 | "name": "Sticky Note", 6 | "type": "n8n-nodes-base.stickyNote", 7 | "position": [ 8 | -520, 9 | -280 10 | ], 11 | "parameters": { 12 | "color": 7, 13 | "width": 1160, 14 | "height": 120, 15 | "content": "**Summarize YouTube videos**\n\nThis project automates the summarization of YouTube videos, transforming lengthy content into concise, actionable insights. By leveraging AI and workflow automation, it extracts video transcripts, analyzes key points, and generates summaries, saving time for content creators, researchers, and professionals. Perfect for staying informed, conducting research, or repurposing video content efficiently." 16 | }, 17 | "typeVersion": 1 18 | }, 19 | { 20 | "id": "98de613a-1b1e-4b46-915f-7bebcfd6a931", 21 | "name": "Sticky Note1", 22 | "type": "n8n-nodes-base.stickyNote", 23 | "position": [ 24 | -540, 25 | 120 26 | ], 27 | "parameters": { 28 | "width": 230, 29 | "height": 80, 30 | "content": "Add the full YouTube URL. ☝️\nYou can change this input to a webhook or anything else." 31 | }, 32 | "typeVersion": 1 33 | }, 34 | { 35 | "id": "064208d4-52c3-46a9-9f9f-d37258189d06", 36 | "name": "Request YouTube Transcript", 37 | "type": "n8n-nodes-base.httpRequest", 38 | "position": [ 39 | -200, 40 | -20 41 | ], 42 | "parameters": { 43 | "url": "Apify API_KEY Here ???", 44 | "method": "POST", 45 | "options": {}, 46 | "jsonBody": "={\n \"startUrls\": [\n \"{{ $json['Full URL'] }}\"\n ]\n}", 47 | "sendBody": true, 48 | "specifyBody": "json" 49 | }, 50 | "typeVersion": 4.2 51 | }, 52 | { 53 | "id": "ba5e52fd-18b1-4232-961c-b53b01e21202", 54 | "name": "Sticky Note2", 55 | "type": "n8n-nodes-base.stickyNote", 56 | "position": [ 57 | -280, 58 | -140 59 | ], 60 | "parameters": { 61 | "color": 3, 62 | "width": 280, 63 | "height": 340, 64 | "content": "Once you follow the Setup Instructions (mentioned in the template page description), you can insert the full URL endpoint, which includes both the POST Endpoint and API Key. 👇" 65 | }, 66 | "typeVersion": 1 67 | }, 68 | { 69 | "id": "f3caad55-0c7d-4e8e-8649-79cc25b4e6aa", 70 | "name": "No Operation, do nothing", 71 | "type": "n8n-nodes-base.noOp", 72 | "position": [ 73 | 380, 74 | -20 75 | ], 76 | "parameters": {}, 77 | "typeVersion": 1 78 | }, 79 | { 80 | "id": "8d72e533-a053-4317-9437-9d80d3ed098f", 81 | "name": "Summarization of a YouTube script", 82 | "type": "@n8n/n8n-nodes-langchain.chainSummarization", 83 | "position": [ 84 | 40, 85 | -20 86 | ], 87 | "parameters": { 88 | "options": {} 89 | }, 90 | "typeVersion": 2 91 | }, 92 | { 93 | "id": "8f4e1c7c-286b-48aa-8f50-404e8f1d430b", 94 | "name": "YouTube video URL", 95 | "type": "n8n-nodes-base.formTrigger", 96 | "position": [ 97 | -420, 98 | -20 99 | ], 100 | "webhookId": "3dc17600-3020-40b1-be8f-e65ef45269b6", 101 | "parameters": { 102 | "options": { 103 | "path": "ddd" 104 | }, 105 | "formTitle": "Summarize YouTube video's", 106 | "formFields": { 107 | "values": [ 108 | { 109 | "fieldLabel": "Full URL" 110 | } 111 | ] 112 | } 113 | }, 114 | "typeVersion": 2.2 115 | }, 116 | { 117 | "id": "fb861e09-d415-4f32-a4de-a6ff84ac7f7b", 118 | "name": "Sticky Note3", 119 | "type": "n8n-nodes-base.stickyNote", 120 | "position": [ 121 | 380, 122 | 120 123 | ], 124 | "parameters": { 125 | "color": 4, 126 | "height": 100, 127 | "content": "☝️ Optional\nIf the workflow ends here, Consider checking with another enrichment service." 128 | }, 129 | "typeVersion": 1 130 | }, 131 | { 132 | "id": "17c0dc77-bee4-4271-b957-e0c793537a03", 133 | "name": "Summarization Engine", 134 | "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", 135 | "position": [ 136 | 40, 137 | 160 138 | ], 139 | "parameters": { 140 | "options": {} 141 | }, 142 | "credentials": { 143 | "openAiApi": { 144 | "id": "g0eql8rqZWICDd5g", 145 | "name": "OpenAi" 146 | } 147 | }, 148 | "typeVersion": 1.1 149 | }, 150 | { 151 | "id": "a8d5362e-459e-4a76-8ee2-b1eb977215a2", 152 | "name": "Sticky Note4", 153 | "type": "n8n-nodes-base.stickyNote", 154 | "position": [ 155 | 40, 156 | -140 157 | ], 158 | "parameters": { 159 | "color": 5, 160 | "width": 280, 161 | "content": "The summarization node works automatically and professionally, recognizing the input text and processing it directly without requiring any enhancements from your side👇" 162 | }, 163 | "typeVersion": 1 164 | } 165 | ], 166 | "pinData": {}, 167 | "connections": { 168 | "YouTube video URL": { 169 | "main": [ 170 | [ 171 | { 172 | "node": "Request YouTube Transcript", 173 | "type": "main", 174 | "index": 0 175 | } 176 | ] 177 | ] 178 | }, 179 | "Summarization Engine": { 180 | "ai_languageModel": [ 181 | [ 182 | { 183 | "node": "Summarization of a YouTube script", 184 | "type": "ai_languageModel", 185 | "index": 0 186 | } 187 | ] 188 | ] 189 | }, 190 | "Request YouTube Transcript": { 191 | "main": [ 192 | [ 193 | { 194 | "node": "Summarization of a YouTube script", 195 | "type": "main", 196 | "index": 0 197 | } 198 | ] 199 | ] 200 | }, 201 | "Summarization of a YouTube script": { 202 | "main": [ 203 | [ 204 | { 205 | "node": "No Operation, do nothing", 206 | "type": "main", 207 | "index": 0 208 | } 209 | ] 210 | ] 211 | } 212 | } 213 | } -------------------------------------------------------------------------------- /AI Agent with Ollama for current weather and wiki.txt: -------------------------------------------------------------------------------- 1 | { 2 | "meta": { 3 | "instanceId": "558d88703fb65b2d0e44613bc35916258b0f0bf983c5d4730c00c424b77ca36a", 4 | "templateId": "2931", 5 | "templateCredsSetupCompleted": true 6 | }, 7 | "nodes": [ 8 | { 9 | "id": "100f23d3-cbe9-458a-9ef1-7cc5fcba8f3c", 10 | "name": "Sticky Note4", 11 | "type": "n8n-nodes-base.stickyNote", 12 | "position": [ 13 | 640, 14 | 540 15 | ], 16 | "parameters": { 17 | "width": 300, 18 | "height": 205, 19 | "content": "### The conversation history(last 20 messages) is stored in a buffer memory" 20 | }, 21 | "typeVersion": 1 22 | }, 23 | { 24 | "id": "b48f989f-deb9-479c-b163-03f098d00c9c", 25 | "name": "On new manual Chat Message", 26 | "type": "@n8n/n8n-nodes-langchain.manualChatTrigger", 27 | "position": [ 28 | 380, 29 | 240 30 | ], 31 | "parameters": {}, 32 | "typeVersion": 1 33 | }, 34 | { 35 | "id": "add8e8df-6b2a-4cbd-84e7-3b006733ef7d", 36 | "name": "Wikipedia", 37 | "type": "@n8n/n8n-nodes-langchain.toolWikipedia", 38 | "position": [ 39 | 1180, 40 | 640 41 | ], 42 | "parameters": {}, 43 | "typeVersion": 1 44 | }, 45 | { 46 | "id": "a97454a8-001d-4986-9cb5-83176229ea70", 47 | "name": "Sticky Note3", 48 | "type": "n8n-nodes-base.stickyNote", 49 | "position": [ 50 | 980, 51 | 540 52 | ], 53 | "parameters": { 54 | "width": 300, 55 | "height": 205, 56 | "content": "### Tools which agent can use to accomplish the task" 57 | }, 58 | "typeVersion": 1 59 | }, 60 | { 61 | "id": "52b57e72-8cc9-4865-9a00-d03b2e7f1b92", 62 | "name": "Sticky Note6", 63 | "type": "n8n-nodes-base.stickyNote", 64 | "position": [ 65 | 600, 66 | 160 67 | ], 68 | "parameters": { 69 | "width": 422, 70 | "height": 211, 71 | "content": "### Conversational agent will utilise available tools to answer the prompt. " 72 | }, 73 | "typeVersion": 1 74 | }, 75 | { 76 | "id": "8f0653ab-376b-40b9-b876-e608defdeb89", 77 | "name": "Window Buffer Memory", 78 | "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow", 79 | "position": [ 80 | 740, 81 | 600 82 | ], 83 | "parameters": { 84 | "contextWindowLength": 20 85 | }, 86 | "typeVersion": 1 87 | }, 88 | { 89 | "id": "13237945-e143-4f65-b034-785f5ebde5bb", 90 | "name": "AI Agent", 91 | "type": "@n8n/n8n-nodes-langchain.agent", 92 | "position": [ 93 | 680, 94 | 240 95 | ], 96 | "parameters": { 97 | "text": "={{ $json.input }}", 98 | "options": { 99 | "systemMessage": "=You are a helpful assistant, with weather tool and wiki tool. find out the latitude and longitude information of a location then use the weather tool for current weather and weather forecast. For general info, use the wiki tool." 100 | }, 101 | "promptType": "define" 102 | }, 103 | "typeVersion": 1.6 104 | }, 105 | { 106 | "id": "ee06c0f4-b2de-4257-9735-3ec228f2b794", 107 | "name": "Weather HTTP Request", 108 | "type": "@n8n/n8n-nodes-langchain.toolHttpRequest", 109 | "position": [ 110 | 1020, 111 | 620 112 | ], 113 | "parameters": { 114 | "url": "https://api.open-meteo.com/v1/forecast", 115 | "sendQuery": true, 116 | "parametersQuery": { 117 | "values": [ 118 | { 119 | "name": "latitude" 120 | }, 121 | { 122 | "name": "longitude" 123 | }, 124 | { 125 | "name": "forecast_days", 126 | "value": "1", 127 | "valueProvider": "fieldValue" 128 | }, 129 | { 130 | "name": "hourly", 131 | "value": "temperature_2m", 132 | "valueProvider": "fieldValue" 133 | } 134 | ] 135 | }, 136 | "toolDescription": "Fetch current temperature for given coordinates." 137 | }, 138 | "notesInFlow": true, 139 | "typeVersion": 1.1 140 | }, 141 | { 142 | "id": "3e5608c8-281d-47e0-af9d-77707530fd6b", 143 | "name": "Ollama Chat Model", 144 | "type": "@n8n/n8n-nodes-langchain.lmChatOllama", 145 | "position": [ 146 | 520, 147 | 620 148 | ], 149 | "parameters": { 150 | "model": "llama3.2:latest", 151 | "options": {} 152 | }, 153 | "credentials": { 154 | "ollamaApi": { 155 | "id": "xHuYe0MDGOs9IpBW", 156 | "name": "Local Ollama service" 157 | } 158 | }, 159 | "typeVersion": 1 160 | }, 161 | { 162 | "id": "b3d794f4-37b5-46c8-9d7d-ad1087006ce5", 163 | "name": "Sticky Note", 164 | "type": "n8n-nodes-base.stickyNote", 165 | "position": [ 166 | 1040, 167 | 140 168 | ], 169 | "parameters": { 170 | "color": 4, 171 | "height": 240, 172 | "content": "### In System Message, add the following.\n\n\"You are a helpful assistant, with weather tool and wiki tool. find out the latitude and longitude information of a location then use the weather tool for current weather and weather forecast. For general info, use the wiki tool.\"" 173 | }, 174 | "typeVersion": 1 175 | } 176 | ], 177 | "pinData": {}, 178 | "connections": { 179 | "Wikipedia": { 180 | "ai_tool": [ 181 | [ 182 | { 183 | "node": "AI Agent", 184 | "type": "ai_tool", 185 | "index": 0 186 | } 187 | ] 188 | ] 189 | }, 190 | "Ollama Chat Model": { 191 | "ai_languageModel": [ 192 | [ 193 | { 194 | "node": "AI Agent", 195 | "type": "ai_languageModel", 196 | "index": 0 197 | } 198 | ] 199 | ] 200 | }, 201 | "Weather HTTP Request": { 202 | "ai_tool": [ 203 | [ 204 | { 205 | "node": "AI Agent", 206 | "type": "ai_tool", 207 | "index": 0 208 | } 209 | ] 210 | ] 211 | }, 212 | "Window Buffer Memory": { 213 | "ai_memory": [ 214 | [ 215 | { 216 | "node": "AI Agent", 217 | "type": "ai_memory", 218 | "index": 0 219 | } 220 | ] 221 | ] 222 | }, 223 | "On new manual Chat Message": { 224 | "main": [ 225 | [ 226 | { 227 | "node": "AI Agent", 228 | "type": "main", 229 | "index": 0 230 | } 231 | ] 232 | ] 233 | } 234 | } 235 | } -------------------------------------------------------------------------------- /Automate Screenshots with URLbox & Analyze them with AI.txt: -------------------------------------------------------------------------------- 1 | { 2 | "id": "wDD4XugmHIvx3KMT", 3 | "meta": { 4 | "instanceId": "149cdf730f0c143663259ddc6124c9c26e824d8d2d059973b871074cf4bda531" 5 | }, 6 | "name": "Analyze Screenshots with AI", 7 | "tags": [], 8 | "nodes": [ 9 | { 10 | "id": "6d7f34b8-6203-4512-a428-7b5a18c63db6", 11 | "name": "Sticky Note", 12 | "type": "n8n-nodes-base.stickyNote", 13 | "position": [ 14 | 240, 15 | 1100 16 | ], 17 | "parameters": { 18 | "width": 373.2796418305297, 19 | "height": 381.1230421279239, 20 | "content": "## Setup \n**For Testing use the Setup node to put in test name & url.**\n\nIf you want to use this workflow in production, you can expand it to load data from other sources like a DB or Google Sheet" 21 | }, 22 | "typeVersion": 1 23 | }, 24 | { 25 | "id": "ae568c65-e8f6-45bb-9c96-a870da1fc7d6", 26 | "name": "Setup", 27 | "type": "n8n-nodes-base.set", 28 | "position": [ 29 | 360, 30 | 1320 31 | ], 32 | "parameters": { 33 | "values": { 34 | "string": [ 35 | { 36 | "name": "website_name", 37 | "value": "=n8n" 38 | }, 39 | { 40 | "name": "url", 41 | "value": "https://n8n.io/" 42 | } 43 | ] 44 | }, 45 | "options": {} 46 | }, 47 | "typeVersion": 2 48 | }, 49 | { 50 | "id": "ca9f0357-a596-4453-b351-fdd8d47c81ad", 51 | "name": "URLbox API Request", 52 | "type": "n8n-nodes-base.httpRequest", 53 | "position": [ 54 | 780, 55 | 1120 56 | ], 57 | "parameters": { 58 | "url": "https://api.urlbox.io/v1/render/sync", 59 | "method": "POST", 60 | "options": {}, 61 | "sendBody": true, 62 | "sendHeaders": true, 63 | "bodyParameters": { 64 | "parameters": [ 65 | { 66 | "name": "url", 67 | "value": "={{ $json.url }}" 68 | }, 69 | { 70 | "name": "full_page", 71 | "value": true 72 | } 73 | ] 74 | }, 75 | "headerParameters": { 76 | "parameters": [ 77 | { 78 | "name": "Authorization", 79 | "value": "YOUR_API_KEY" 80 | } 81 | ] 82 | } 83 | }, 84 | "retryOnFail": true, 85 | "typeVersion": 4.1 86 | }, 87 | { 88 | "id": "3caffa3c-657a-4f74-a3cb-daf7beb67890", 89 | "name": "Sticky Note1", 90 | "type": "n8n-nodes-base.stickyNote", 91 | "position": [ 92 | 640, 93 | 920 94 | ], 95 | "parameters": { 96 | "width": 373.2796418305297, 97 | "height": 381.1230421279239, 98 | "content": "## URLbox API call \n[URLbox](https://urlbox.com/) is a Screenshot API. With this API you can automate making screenshots based on website url's.\n\nYou have to replace the Placeholder with your API Key" 99 | }, 100 | "typeVersion": 1 101 | }, 102 | { 103 | "id": "d2b81b41-1497-4733-8130-67f8de0acff4", 104 | "name": "Analyze the Screenshot", 105 | "type": "@n8n/n8n-nodes-langchain.openAi", 106 | "position": [ 107 | 1220, 108 | 1120 109 | ], 110 | "parameters": { 111 | "text": "=Your Input is a Screenshot of a Website.\nDescribe the content of the Website in one sentence.", 112 | "options": {}, 113 | "resource": "image", 114 | "imageUrls": "renderURL", 115 | "operation": "analyze" 116 | }, 117 | "typeVersion": 1.1 118 | }, 119 | { 120 | "id": "68d86931-69bb-4b78-a7fe-44969172672f", 121 | "name": "Sticky Note2", 122 | "type": "n8n-nodes-base.stickyNote", 123 | "position": [ 124 | 1080, 125 | 920 126 | ], 127 | "parameters": { 128 | "width": 373.2796418305297, 129 | "height": 381.1230421279239, 130 | "content": "## Analyze the Screenshot \nAnalyze the screenshot using OpenAI.\n\nAdd your OpenAI Credentials on the top of the node.\n\nThe prompt is an example. Change it based on what you want to extract from the screenshot." 131 | }, 132 | "typeVersion": 1 133 | }, 134 | { 135 | "id": "8a22fca5-7f06-45fb-a03f-585a7eb35b40", 136 | "name": "Merge Name & Description", 137 | "type": "n8n-nodes-base.merge", 138 | "position": [ 139 | 1620, 140 | 1300 141 | ], 142 | "parameters": { 143 | "mode": "combine", 144 | "options": {}, 145 | "combinationMode": "mergeByPosition" 146 | }, 147 | "typeVersion": 2.1 148 | }, 149 | { 150 | "id": "4f902a0a-ee93-4190-9b1e-ab3fa15eb4aa", 151 | "name": "Sticky Note3", 152 | "type": "n8n-nodes-base.stickyNote", 153 | "position": [ 154 | 1480, 155 | 1200 156 | ], 157 | "parameters": { 158 | "width": 371.85912137154685, 159 | "height": 300.15337596590155, 160 | "content": "## Merge\nMerge the description with the name of the website & the url." 161 | }, 162 | "typeVersion": 1 163 | }, 164 | { 165 | "id": "8b3eb3f4-b31a-48f0-94bb-35379d07a81f", 166 | "name": "Manual Execution", 167 | "type": "n8n-nodes-base.manualTrigger", 168 | "position": [ 169 | 20, 170 | 1320 171 | ], 172 | "parameters": {}, 173 | "typeVersion": 1 174 | } 175 | ], 176 | "active": false, 177 | "pinData": {}, 178 | "settings": { 179 | "executionOrder": "v1" 180 | }, 181 | "versionId": "ff37faa1-c61c-44be-89f0-62f8e1b8317c", 182 | "connections": { 183 | "Setup": { 184 | "main": [ 185 | [ 186 | { 187 | "node": "URLbox API Request", 188 | "type": "main", 189 | "index": 0 190 | }, 191 | { 192 | "node": "Merge Name & Description", 193 | "type": "main", 194 | "index": 1 195 | } 196 | ] 197 | ] 198 | }, 199 | "Manual Execution": { 200 | "main": [ 201 | [ 202 | { 203 | "node": "Setup", 204 | "type": "main", 205 | "index": 0 206 | } 207 | ] 208 | ] 209 | }, 210 | "URLbox API Request": { 211 | "main": [ 212 | [ 213 | { 214 | "node": "Analyze the Screenshot", 215 | "type": "main", 216 | "index": 0 217 | } 218 | ] 219 | ] 220 | }, 221 | "Analyze the Screenshot": { 222 | "main": [ 223 | [ 224 | { 225 | "node": "Merge Name & Description", 226 | "type": "main", 227 | "index": 0 228 | } 229 | ] 230 | ] 231 | } 232 | } 233 | } -------------------------------------------------------------------------------- /Siri AI Agent_ Apple Shortcuts powered voice template.txt: -------------------------------------------------------------------------------- 1 | { 2 | "meta": { 3 | "instanceId": "205b3bc06c96f2dc835b4f00e1cbf9a937a74eeb3b47c99d0c30b0586dbf85aa", 4 | "templateId": "2436" 5 | }, 6 | "nodes": [ 7 | { 8 | "id": "b24c6e28-3c9e-4069-9e87-49b2efd47257", 9 | "name": "OpenAI Chat Model", 10 | "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", 11 | "position": [ 12 | 1200, 13 | 660 14 | ], 15 | "parameters": { 16 | "model": "gpt-4o-mini", 17 | "options": {} 18 | }, 19 | "credentials": { 20 | "openAiApi": { 21 | "id": "AzPPV759YPBxJj3o", 22 | "name": "Max's DevRel OpenAI account" 23 | } 24 | }, 25 | "typeVersion": 1 26 | }, 27 | { 28 | "id": "c71a3e22-f0fd-4377-9be2-32438b282430", 29 | "name": "Sticky Note", 30 | "type": "n8n-nodes-base.stickyNote", 31 | "position": [ 32 | 200, 33 | 240 34 | ], 35 | "parameters": { 36 | "color": 7, 37 | "width": 636.2128494576581, 38 | "height": 494.9629292914819, 39 | "content": "\n## \"Hey Siri, Ask Agent\" workflow\n**Made by [Max Tkacz](https://www.linkedin.com/in/maxtkacz) during the [30 Day AI Sprint](https://30dayaisprint.notion.site/)**\n\nThis template integrates with Apple Shortcuts to trigger an n8n AI Agent via a \"Hey Siri\" command. The shortcut prompts for spoken input, transcribes it, and sends it to the workflow's `When Called by Apple Shortcut` Webhook trigger. The AI Agent processes the input and Siri dictates the response back to you.\n\nThe workflow also passes the current date and time to the `AI Agent`, which you can extend with additional context, like data from an App node, for more customized responses.\n\n" 40 | }, 41 | "typeVersion": 1 42 | }, 43 | { 44 | "id": "a4ec93c3-eefa-4006-b02c-f995fb7bc410", 45 | "name": "Respond to Apple Shortcut", 46 | "type": "n8n-nodes-base.respondToWebhook", 47 | "position": [ 48 | 1640, 49 | 460 50 | ], 51 | "parameters": { 52 | "options": {}, 53 | "respondWith": "text", 54 | "responseBody": "={{ $json.output }}" 55 | }, 56 | "typeVersion": 1.1 57 | }, 58 | { 59 | "id": "942b284e-e26a-4534-8f33-eb92b0a88fdb", 60 | "name": "Sticky Note1", 61 | "type": "n8n-nodes-base.stickyNote", 62 | "position": [ 63 | 200, 64 | 760 65 | ], 66 | "parameters": { 67 | "color": 7, 68 | "width": 280.2462120317618, 69 | "height": 438.5821431288714, 70 | "content": "### Set up steps\n1. Add an OpenAI API credential in `OpenAI Chat Model` node, or replace it with another model. Try `Groq` if you want a free alternative (can be used with free Groq account, no CC).\n2. Copy the \"Production URL\" from `When called by Apple Shortcut` node, you'll need this when setting up the shortcut.\n3. Save and activate this n8n workflow.\n4. Download the [Apple Shortcut here](https://uploads.n8n.io/devrel/ask-agent.shortcut), open it on macOS or iOS. This adds the shortcut to your device.\n5. Open the shortcut and swap URL in `Get contents of\" step to the \"Production URL\" you copied from `When called by Apple Shortcut`.\n6. Test it by saying \"Hey Siri, AI Agent\", then ask a question." 71 | }, 72 | "typeVersion": 1 73 | }, 74 | { 75 | "id": "ebb9e886-546a-429c-b4b5-35c0a7b6370e", 76 | "name": "Sticky Note2", 77 | "type": "n8n-nodes-base.stickyNote", 78 | "position": [ 79 | 503.6292958565226, 80 | 760 81 | ], 82 | "parameters": { 83 | "color": 7, 84 | "width": 330.5152611046425, 85 | "height": 240.6839895136402, 86 | "content": "### ... or watch set up video [5 min]\n[](https://youtu.be/dewsB-4iGA8)\n" 87 | }, 88 | "typeVersion": 1 89 | }, 90 | { 91 | "id": "5a842fa9-be8c-4ba8-996b-a26a53273b3f", 92 | "name": "AI Agent", 93 | "type": "@n8n/n8n-nodes-langchain.agent", 94 | "position": [ 95 | 1240, 96 | 460 97 | ], 98 | "parameters": { 99 | "text": "=Here is my request: {{ $json.body.input }}\n", 100 | "agent": "conversationalAgent", 101 | "options": { 102 | "systemMessage": "=## Task\nYou are a helpful assistant. Provide concise replies as the user receives them via voice on their mobile phone. Avoid using symbols like \"\\n\" to prevent them from being narrated.\n\n## Context\n- Today is {{ $now.format('dd LLL yy') }}.\n- Current time: {{ $now.format('h:mm a') }} in Berlin, Germany.\n- When asked, you are an AI Agent running as an n8n workflow.\n\n## Output\nKeep responses short and clear, optimized for voice delivery. Don't hallucinate, if you don't know the answer, say you don't know. " 103 | }, 104 | "promptType": "define", 105 | "hasOutputParser": true 106 | }, 107 | "typeVersion": 1.6 108 | }, 109 | { 110 | "id": "598d22d5-7472-44c5-ab2e-69c8bbb23ddd", 111 | "name": "When called by Apple Shortcut", 112 | "type": "n8n-nodes-base.webhook", 113 | "position": [ 114 | 980, 115 | 460 116 | ], 117 | "webhookId": "f0224b4b-1644-4d3d-9f12-01a9c04879e4", 118 | "parameters": { 119 | "path": "assistant", 120 | "options": {}, 121 | "httpMethod": "POST", 122 | "responseMode": "responseNode" 123 | }, 124 | "typeVersion": 2 125 | } 126 | ], 127 | "pinData": {}, 128 | "connections": { 129 | "AI Agent": { 130 | "main": [ 131 | [ 132 | { 133 | "node": "Respond to Apple Shortcut", 134 | "type": "main", 135 | "index": 0 136 | } 137 | ] 138 | ] 139 | }, 140 | "OpenAI Chat Model": { 141 | "ai_languageModel": [ 142 | [ 143 | { 144 | "node": "AI Agent", 145 | "type": "ai_languageModel", 146 | "index": 0 147 | } 148 | ] 149 | ] 150 | }, 151 | "When called by Apple Shortcut": { 152 | "main": [ 153 | [ 154 | { 155 | "node": "AI Agent", 156 | "type": "main", 157 | "index": 0 158 | } 159 | ] 160 | ] 161 | } 162 | } 163 | } -------------------------------------------------------------------------------- /Force AI to use a specific output format.txt: -------------------------------------------------------------------------------- 1 | { 2 | "id": "cKRViOHDPsosO7UX", 3 | "meta": { 4 | "instanceId": "ec7a5f4ffdb34436e59d23eaccb5015b5238de2a877e205b28572bf1ffecfe04" 5 | }, 6 | "name": "[AI/LangChain] Output Parser 4", 7 | "tags": [], 8 | "nodes": [ 9 | { 10 | "id": "3d669ba2-65b7-4502-92d9-645c4e51b26d", 11 | "name": "When clicking \"Execute Workflow\"", 12 | "type": "n8n-nodes-base.manualTrigger", 13 | "position": [ 14 | 380, 15 | 240 16 | ], 17 | "parameters": {}, 18 | "typeVersion": 1 19 | }, 20 | { 21 | "id": "9a509299-746d-4a3f-b379-8a4a9a92c75a", 22 | "name": "Prompt", 23 | "type": "n8n-nodes-base.set", 24 | "position": [ 25 | 600, 26 | 240 27 | ], 28 | "parameters": { 29 | "values": { 30 | "string": [ 31 | { 32 | "name": "input", 33 | "value": "Return the 5 largest states by area in the USA with their 3 largest cities and their population." 34 | } 35 | ] 36 | }, 37 | "options": {} 38 | }, 39 | "typeVersion": 2 40 | }, 41 | { 42 | "id": "e2092fe6-d803-43e9-b2df-b0fc7aa83b02", 43 | "name": "LLM Chain", 44 | "type": "@n8n/n8n-nodes-langchain.chainLlm", 45 | "position": [ 46 | 1060, 47 | 240 48 | ], 49 | "parameters": {}, 50 | "typeVersion": 1 51 | }, 52 | { 53 | "id": "711734d0-1003-4639-bdee-c160f6f976b3", 54 | "name": "Structured Output Parser", 55 | "type": "@n8n/n8n-nodes-langchain.outputParserStructured", 56 | "position": [ 57 | 1560, 58 | 900 59 | ], 60 | "parameters": { 61 | "jsonSchema": "{\n \"type\": \"object\",\n \"properties\": {\n \"state\": {\n \"type\": \"string\"\n },\n \"cities\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": \"string\",\n \"population\": \"number\"\n }\n }\n }\n }\n}" 62 | }, 63 | "typeVersion": 1 64 | }, 65 | { 66 | "id": "f9b782f8-bb7b-4d65-be0d-d65c11de03d2", 67 | "name": "Auto-fixing Output Parser", 68 | "type": "@n8n/n8n-nodes-langchain.outputParserAutofixing", 69 | "position": [ 70 | 1260, 71 | 540 72 | ], 73 | "parameters": {}, 74 | "typeVersion": 1 75 | }, 76 | { 77 | "id": "a26f034e-ea19-47ba-8fef-4f0a0d447c01", 78 | "name": "Sticky Note", 79 | "type": "n8n-nodes-base.stickyNote", 80 | "position": [ 81 | 1480, 82 | 795 83 | ], 84 | "parameters": { 85 | "height": 264.69900963477494, 86 | "content": "### Parser which defines the output format and which gets used to validate the output" 87 | }, 88 | "typeVersion": 1 89 | }, 90 | { 91 | "id": "d902971a-e304-449c-a933-900c9c49ce55", 92 | "name": "Sticky Note1", 93 | "type": "n8n-nodes-base.stickyNote", 94 | "position": [ 95 | 1080, 96 | 792 97 | ], 98 | "parameters": { 99 | "height": 266.9506012398238, 100 | "content": "### The LLM which gets used to try to autofix the output in case it was not valid" 101 | }, 102 | "typeVersion": 1 103 | }, 104 | { 105 | "id": "b4c3b935-61b1-4243-b7df-ba4b7fd6e3ce", 106 | "name": "Sticky Note2", 107 | "type": "n8n-nodes-base.stickyNote", 108 | "position": [ 109 | 920, 110 | 440 111 | ], 112 | "parameters": { 113 | "height": 245.56048099185898, 114 | "content": "### The LLM to process the original prompt" 115 | }, 116 | "typeVersion": 1 117 | }, 118 | { 119 | "id": "916d2998-cf0e-40f9-a373-149c609ed229", 120 | "name": "Sticky Note3", 121 | "type": "n8n-nodes-base.stickyNote", 122 | "position": [ 123 | 1200, 124 | 449 125 | ], 126 | "parameters": { 127 | "width": 348.0763970423483, 128 | "height": 233.17672716408998, 129 | "content": "### Autofixing parser which tries to fix invalid outputs with the help of an LLM" 130 | }, 131 | "typeVersion": 1 132 | }, 133 | { 134 | "id": "5cabf993-6bdd-4401-bb6d-fa20ff703127", 135 | "name": "OpenAI Chat Model", 136 | "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", 137 | "position": [ 138 | 980, 139 | 540 140 | ], 141 | "parameters": { 142 | "options": { 143 | "temperature": 0 144 | } 145 | }, 146 | "credentials": { 147 | "openAiApi": { 148 | "id": "wJtZwsVKW5v6R2Iy", 149 | "name": "OpenAi account 2" 150 | } 151 | }, 152 | "typeVersion": 1 153 | }, 154 | { 155 | "id": "7f666edb-ecb7-4a6d-9dc7-ba67ef41d71f", 156 | "name": "OpenAI Chat Model1", 157 | "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", 158 | "position": [ 159 | 1140, 160 | 900 161 | ], 162 | "parameters": { 163 | "options": { 164 | "temperature": 0 165 | } 166 | }, 167 | "credentials": { 168 | "openAiApi": { 169 | "id": "wJtZwsVKW5v6R2Iy", 170 | "name": "OpenAi account 2" 171 | } 172 | }, 173 | "typeVersion": 1 174 | } 175 | ], 176 | "active": false, 177 | "pinData": {}, 178 | "settings": { 179 | "executionOrder": "v1" 180 | }, 181 | "versionId": "976446d0-eb9d-478e-8178-69017329d736", 182 | "connections": { 183 | "Prompt": { 184 | "main": [ 185 | [ 186 | { 187 | "node": "LLM Chain", 188 | "type": "main", 189 | "index": 0 190 | } 191 | ] 192 | ] 193 | }, 194 | "OpenAI Chat Model": { 195 | "ai_languageModel": [ 196 | [ 197 | { 198 | "node": "LLM Chain", 199 | "type": "ai_languageModel", 200 | "index": 0 201 | } 202 | ] 203 | ] 204 | }, 205 | "OpenAI Chat Model1": { 206 | "ai_languageModel": [ 207 | [ 208 | { 209 | "node": "Auto-fixing Output Parser", 210 | "type": "ai_languageModel", 211 | "index": 0 212 | } 213 | ] 214 | ] 215 | }, 216 | "Structured Output Parser": { 217 | "ai_outputParser": [ 218 | [ 219 | { 220 | "node": "Auto-fixing Output Parser", 221 | "type": "ai_outputParser", 222 | "index": 0 223 | } 224 | ] 225 | ] 226 | }, 227 | "Auto-fixing Output Parser": { 228 | "ai_outputParser": [ 229 | [ 230 | { 231 | "node": "LLM Chain", 232 | "type": "ai_outputParser", 233 | "index": 0 234 | } 235 | ] 236 | ] 237 | }, 238 | "When clicking \"Execute Workflow\"": { 239 | "main": [ 240 | [ 241 | { 242 | "node": "Prompt", 243 | "type": "main", 244 | "index": 0 245 | } 246 | ] 247 | ] 248 | } 249 | } 250 | } -------------------------------------------------------------------------------- /Auto-Categorize blog posts in wordpress using A.I..txt: -------------------------------------------------------------------------------- 1 | { 2 | "id": "caaf1WFANPKAikiH", 3 | "meta": { 4 | "instanceId": "558d88703fb65b2d0e44613bc35916258b0f0bf983c5d4730c00c424b77ca36a", 5 | "templateCredsSetupCompleted": true 6 | }, 7 | "name": "Auto categorize wordpress template", 8 | "tags": [], 9 | "nodes": [ 10 | { 11 | "id": "2017403c-7496-48f8-a487-8a017c7adfe3", 12 | "name": "When clicking ‘Test workflow’", 13 | "type": "n8n-nodes-base.manualTrigger", 14 | "position": [ 15 | 680, 16 | 320 17 | ], 18 | "parameters": {}, 19 | "typeVersion": 1 20 | }, 21 | { 22 | "id": "82ff288f-4234-4192-9046-33e5ffee5264", 23 | "name": "Wordpress", 24 | "type": "n8n-nodes-base.wordpress", 25 | "position": [ 26 | 1500, 27 | 320 28 | ], 29 | "parameters": { 30 | "postId": "={{ $('Get All Wordpress Posts').item.json.id }}", 31 | "operation": "update", 32 | "updateFields": { 33 | "categories": "={{ $json.output }}" 34 | } 35 | }, 36 | "credentials": { 37 | "wordpressApi": { 38 | "id": "lGWPwxTdfPDDbFjj", 39 | "name": "Rumjahn.com wordpress" 40 | } 41 | }, 42 | "typeVersion": 1 43 | }, 44 | { 45 | "id": "521deb22-62dd-4b5f-8b9a-aab9777821da", 46 | "name": "Sticky Note1", 47 | "type": "n8n-nodes-base.stickyNote", 48 | "position": [ 49 | 620, 50 | -100 51 | ], 52 | "parameters": { 53 | "width": 504.88636363636317, 54 | "content": "## How to Auto-Categorize 82 Blog Posts in 2 Minutes using A.I. (No Coding Required)\n\n💡 Read the [case study here](https://rumjahn.com/how-to-use-a-i-to-categorize-wordpress-posts-and-streamline-your-content-organization-process/).\n\n📺 Watch the [youtube tutorial here](https://www.youtube.com/watch?v=IvQioioVqhw)\n\n" 55 | }, 56 | "typeVersion": 1 57 | }, 58 | { 59 | "id": "4090d827-f8cd-47ef-ad4f-654ee58216f6", 60 | "name": "Sticky Note", 61 | "type": "n8n-nodes-base.stickyNote", 62 | "position": [ 63 | 860, 64 | 180 65 | ], 66 | "parameters": { 67 | "color": 3, 68 | "width": 188.14814814814804, 69 | "height": 327.3400673400663, 70 | "content": "### Get wordpress posts\n\nTurn off return all if you're running into issues.\n" 71 | }, 72 | "typeVersion": 1 73 | }, 74 | { 75 | "id": "71585d54-fdcc-42a5-8a0e-0fac3adc1809", 76 | "name": "Sticky Note2", 77 | "type": "n8n-nodes-base.stickyNote", 78 | "position": [ 79 | 1080, 80 | 80 81 | ], 82 | "parameters": { 83 | "color": 4, 84 | "width": 315.1464152082392, 85 | "height": 416.90235690235625, 86 | "content": "### A.I. Categorization\n\n1. you need to set up the categories first in wordpress\n\n2. Edit the message prompt and change the categories and category numbers" 87 | }, 88 | "typeVersion": 1 89 | }, 90 | { 91 | "id": "29354054-8600-4e45-99d0-6f30f779a505", 92 | "name": "Sticky Note3", 93 | "type": "n8n-nodes-base.stickyNote", 94 | "position": [ 95 | 1480, 96 | 240 97 | ], 98 | "parameters": { 99 | "color": 5, 100 | "width": 171.64983164983155, 101 | "height": 269.59595959595947, 102 | "content": "### Update category" 103 | }, 104 | "typeVersion": 1 105 | }, 106 | { 107 | "id": "d9fe6289-6b97-4830-80aa-754ac4d4b3e0", 108 | "name": "Get All Wordpress Posts", 109 | "type": "n8n-nodes-base.wordpress", 110 | "position": [ 111 | 900, 112 | 320 113 | ], 114 | "parameters": { 115 | "options": {}, 116 | "operation": "getAll", 117 | "returnAll": true 118 | }, 119 | "credentials": { 120 | "wordpressApi": { 121 | "id": "lGWPwxTdfPDDbFjj", 122 | "name": "Rumjahn.com wordpress" 123 | } 124 | }, 125 | "typeVersion": 1 126 | }, 127 | { 128 | "id": "ed40bf13-8294-4b4e-a8b6-5749989d3420", 129 | "name": "OpenAI Chat Model", 130 | "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", 131 | "position": [ 132 | 1080, 133 | 540 134 | ], 135 | "parameters": { 136 | "options": {} 137 | }, 138 | "credentials": { 139 | "openAiApi": { 140 | "id": "XO3iT1iYT5Vod56X", 141 | "name": "OpenAi account" 142 | } 143 | }, 144 | "typeVersion": 1 145 | }, 146 | { 147 | "id": "dafeb935-532e-4067-9dfb-7e9a6bbc4e5a", 148 | "name": "AI Agent", 149 | "type": "@n8n/n8n-nodes-langchain.agent", 150 | "position": [ 151 | 1100, 152 | 320 153 | ], 154 | "parameters": { 155 | "text": "=You are an expert content strategist and taxonomy specialist with extensive experience in blog categorization and content organization.\n\nI will provide you with a blog post's title. Your task is to assign ONE primary category ID from this fixed list:\n\n13 = Content Creation\n14 = Digital Marketing\n15 = AI Tools\n17 = Automation & Integration\n18 = Productivity Tools\n19 = Analytics & Strategy\n\nAnalyze the title and return only the single most relevant category ID number that best represents the main focus of the post. While a post might touch on multiple topics, select the dominant theme that would be most useful for navigation purposes.\n\n{{ $json.title.rendered }}\n\nOutput only the category number", 156 | "options": {}, 157 | "promptType": "define" 158 | }, 159 | "typeVersion": 1.7 160 | } 161 | ], 162 | "active": false, 163 | "pinData": {}, 164 | "settings": { 165 | "executionOrder": "v1" 166 | }, 167 | "versionId": "2a753171-425f-4b5a-bd1b-8591ad2d142c", 168 | "connections": { 169 | "AI Agent": { 170 | "main": [ 171 | [ 172 | { 173 | "node": "Wordpress", 174 | "type": "main", 175 | "index": 0 176 | } 177 | ] 178 | ] 179 | }, 180 | "OpenAI Chat Model": { 181 | "ai_languageModel": [ 182 | [ 183 | { 184 | "node": "AI Agent", 185 | "type": "ai_languageModel", 186 | "index": 0 187 | } 188 | ] 189 | ] 190 | }, 191 | "Get All Wordpress Posts": { 192 | "main": [ 193 | [ 194 | { 195 | "node": "AI Agent", 196 | "type": "main", 197 | "index": 0 198 | } 199 | ] 200 | ] 201 | }, 202 | "When clicking ‘Test workflow’": { 203 | "main": [ 204 | [ 205 | { 206 | "node": "Get All Wordpress Posts", 207 | "type": "main", 208 | "index": 0 209 | } 210 | ] 211 | ] 212 | } 213 | } 214 | } -------------------------------------------------------------------------------- /Summarize your emails with A.I. (via Openrouter) and send to Line messenger.txt: -------------------------------------------------------------------------------- 1 | { 2 | "id": "QnVdtKiTf3nbrNkh", 3 | "meta": { 4 | "instanceId": "558d88703fb65b2d0e44613bc35916258b0f0bf983c5d4730c00c424b77ca36a", 5 | "templateCredsSetupCompleted": true 6 | }, 7 | "name": "Summarize emails with A.I. then send to messenger", 8 | "tags": [], 9 | "nodes": [ 10 | { 11 | "id": "50e12e63-df28-45ac-9208-48cbf5116d09", 12 | "name": "Read emails (IMAP)", 13 | "type": "n8n-nodes-base.emailReadImap", 14 | "position": [ 15 | 340, 16 | 260 17 | ], 18 | "parameters": { 19 | "options": {}, 20 | "postProcessAction": "nothing" 21 | }, 22 | "credentials": { 23 | "imap": { 24 | "id": "gXtdakU9M02LBQc3", 25 | "name": "IMAP account" 26 | } 27 | }, 28 | "typeVersion": 2 29 | }, 30 | { 31 | "id": "6565350b-2269-44e3-8f36-8797f32d3e09", 32 | "name": "Send email to A.I. to summarize", 33 | "type": "n8n-nodes-base.httpRequest", 34 | "position": [ 35 | 700, 36 | 260 37 | ], 38 | "parameters": { 39 | "url": "https://openrouter.ai/api/v1/chat/completions", 40 | "method": "POST", 41 | "options": {}, 42 | "jsonBody": "={\n \"model\": \"meta-llama/llama-3.1-70b-instruct:free\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"I want you to read and summarize all the emails. If it's not rimportant, just give me a short summary with less than 10 words.\\n\\nHighlight as important if it is, add an emoji to indicate it is urgent:\\nFor the relevant content, find any action items and deadlines. Sometimes I need to sign up before a certain date or pay before a certain date, please highlight that in the summary for me.\\n\\nPut the deadline in BOLD at the top. If the email is not important, keep the summary short to 1 sentence only.\\n\\nHere's the email content for you to read:\\nSender email address: {{ encodeURIComponent($json.from) }}\\nSubject: {{ encodeURIComponent($json.subject) }}\\n{{ encodeURIComponent($json.textHtml) }}\"\n }\n ]\n}", 43 | "sendBody": true, 44 | "specifyBody": "json", 45 | "authentication": "genericCredentialType", 46 | "genericAuthType": "httpHeaderAuth" 47 | }, 48 | "credentials": { 49 | "httpHeaderAuth": { 50 | "id": "WY7UkF14ksPKq3S8", 51 | "name": "Header Auth account 2" 52 | } 53 | }, 54 | "typeVersion": 4.2, 55 | "alwaysOutputData": false 56 | }, 57 | { 58 | "id": "d04c422a-c000-4e48-82d0-0bf44bcd9fff", 59 | "name": "Send summarized content to messenger", 60 | "type": "n8n-nodes-base.httpRequest", 61 | "position": [ 62 | 1100, 63 | 260 64 | ], 65 | "parameters": { 66 | "url": "https://api.line.me/v2/bot/message/push", 67 | "method": "POST", 68 | "options": {}, 69 | "jsonBody": "={\n \"to\": \"U3ec262c49811f30cdc2d2f2b0a0df99a\",\n \"messages\": [\n {\n \"type\": \"text\",\n \"text\": \"{{ $json.choices[0].message.content.replace(/\\n/g, \"\\\\n\") }}\"\n }\n ]\n}\n\n\n ", 70 | "sendBody": true, 71 | "specifyBody": "json", 72 | "authentication": "genericCredentialType", 73 | "genericAuthType": "httpHeaderAuth" 74 | }, 75 | "credentials": { 76 | "httpHeaderAuth": { 77 | "id": "SzcKjO9Nn9vZPL2H", 78 | "name": "Header Auth account 5" 79 | } 80 | }, 81 | "typeVersion": 4.2 82 | }, 83 | { 84 | "id": "57a1219c-4f40-407c-855b-86c4c7c468bb", 85 | "name": "Sticky Note", 86 | "type": "n8n-nodes-base.stickyNote", 87 | "position": [ 88 | 180, 89 | 0 90 | ], 91 | "parameters": { 92 | "width": 361, 93 | "height": 90, 94 | "content": "## Summarize emails with A.I.\nYou can find out more about the [use case](https://rumjahn.com/how-a-i-saved-my-kids-school-life-and-my-marriage/)" 95 | }, 96 | "typeVersion": 1 97 | }, 98 | { 99 | "id": "17686264-56ac-419e-a32b-dc5c75f15f1f", 100 | "name": "Sticky Note1", 101 | "type": "n8n-nodes-base.stickyNote", 102 | "position": [ 103 | 283, 104 | 141 105 | ], 106 | "parameters": { 107 | "color": 5, 108 | "width": 229, 109 | "height": 280, 110 | "content": "Find your email server's IMAP Settings. \n- Link for [gmail](https://www.getmailspring.com/setup/access-gmail-via-imap-smtp)" 111 | }, 112 | "typeVersion": 1 113 | }, 114 | { 115 | "id": "1862abd6-7dca-4c66-90d6-110d4fcf4d99", 116 | "name": "Sticky Note2", 117 | "type": "n8n-nodes-base.stickyNote", 118 | "position": [ 119 | 580, 120 | 0 121 | ], 122 | "parameters": { 123 | "color": 6, 124 | "width": 365, 125 | "height": 442, 126 | "content": "For the A.I. you can use Openrouter.ai. \n- Set up a free account\n- The A.I. model selected is FREE to use.\n## Credentials\n- Use header auth\n- Username: Authorization\n- Password: Bearer {insert your API key}.\n- The password is \"Bearer\" space plus your API key." 127 | }, 128 | "typeVersion": 1 129 | }, 130 | { 131 | "id": "c4a3a76f-539d-4bbf-8f95-d7aaebf39a55", 132 | "name": "Sticky Note3", 133 | "type": "n8n-nodes-base.stickyNote", 134 | "position": [ 135 | 1000, 136 | 0 137 | ], 138 | "parameters": { 139 | "color": 4, 140 | "width": 307, 141 | "height": 439, 142 | "content": "Don't use the official Line node. It's outdated.\n## Credentials\n- Use header auth\n- Username: Authorization\n- Password: Bearer {channel access token}\n\nYou can find your channel access token at the [Line API console](https://developers.line.biz/console/). Go to Messaging API and scroll to the bottom." 143 | }, 144 | "typeVersion": 1 145 | } 146 | ], 147 | "active": false, 148 | "pinData": {}, 149 | "settings": { 150 | "executionOrder": "v1" 151 | }, 152 | "versionId": "81216e6a-2bd8-4215-8a96-376ee520469d", 153 | "connections": { 154 | "Read emails (IMAP)": { 155 | "main": [ 156 | [ 157 | { 158 | "node": "Send email to A.I. to summarize", 159 | "type": "main", 160 | "index": 0 161 | } 162 | ] 163 | ] 164 | }, 165 | "Send email to A.I. to summarize": { 166 | "main": [ 167 | [ 168 | { 169 | "node": "Send summarized content to messenger", 170 | "type": "main", 171 | "index": 0 172 | } 173 | ] 174 | ] 175 | } 176 | } 177 | } -------------------------------------------------------------------------------- /Summarize your emails with A.I. (via Openrouter) and send to Line messenger (1).txt: -------------------------------------------------------------------------------- 1 | { 2 | "id": "QnVdtKiTf3nbrNkh", 3 | "meta": { 4 | "instanceId": "558d88703fb65b2d0e44613bc35916258b0f0bf983c5d4730c00c424b77ca36a", 5 | "templateCredsSetupCompleted": true 6 | }, 7 | "name": "Summarize emails with A.I. then send to messenger", 8 | "tags": [], 9 | "nodes": [ 10 | { 11 | "id": "50e12e63-df28-45ac-9208-48cbf5116d09", 12 | "name": "Read emails (IMAP)", 13 | "type": "n8n-nodes-base.emailReadImap", 14 | "position": [ 15 | 340, 16 | 260 17 | ], 18 | "parameters": { 19 | "options": {}, 20 | "postProcessAction": "nothing" 21 | }, 22 | "credentials": { 23 | "imap": { 24 | "id": "gXtdakU9M02LBQc3", 25 | "name": "IMAP account" 26 | } 27 | }, 28 | "typeVersion": 2 29 | }, 30 | { 31 | "id": "6565350b-2269-44e3-8f36-8797f32d3e09", 32 | "name": "Send email to A.I. to summarize", 33 | "type": "n8n-nodes-base.httpRequest", 34 | "position": [ 35 | 700, 36 | 260 37 | ], 38 | "parameters": { 39 | "url": "https://openrouter.ai/api/v1/chat/completions", 40 | "method": "POST", 41 | "options": {}, 42 | "jsonBody": "={\n \"model\": \"meta-llama/llama-3.1-70b-instruct:free\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"I want you to read and summarize all the emails. If it's not rimportant, just give me a short summary with less than 10 words.\\n\\nHighlight as important if it is, add an emoji to indicate it is urgent:\\nFor the relevant content, find any action items and deadlines. Sometimes I need to sign up before a certain date or pay before a certain date, please highlight that in the summary for me.\\n\\nPut the deadline in BOLD at the top. If the email is not important, keep the summary short to 1 sentence only.\\n\\nHere's the email content for you to read:\\nSender email address: {{ encodeURIComponent($json.from) }}\\nSubject: {{ encodeURIComponent($json.subject) }}\\n{{ encodeURIComponent($json.textHtml) }}\"\n }\n ]\n}", 43 | "sendBody": true, 44 | "specifyBody": "json", 45 | "authentication": "genericCredentialType", 46 | "genericAuthType": "httpHeaderAuth" 47 | }, 48 | "credentials": { 49 | "httpHeaderAuth": { 50 | "id": "WY7UkF14ksPKq3S8", 51 | "name": "Header Auth account 2" 52 | } 53 | }, 54 | "typeVersion": 4.2, 55 | "alwaysOutputData": false 56 | }, 57 | { 58 | "id": "d04c422a-c000-4e48-82d0-0bf44bcd9fff", 59 | "name": "Send summarized content to messenger", 60 | "type": "n8n-nodes-base.httpRequest", 61 | "position": [ 62 | 1100, 63 | 260 64 | ], 65 | "parameters": { 66 | "url": "https://api.line.me/v2/bot/message/push", 67 | "method": "POST", 68 | "options": {}, 69 | "jsonBody": "={\n \"to\": \"U3ec262c49811f30cdc2d2f2b0a0df99a\",\n \"messages\": [\n {\n \"type\": \"text\",\n \"text\": \"{{ $json.choices[0].message.content.replace(/\\n/g, \"\\\\n\") }}\"\n }\n ]\n}\n\n\n ", 70 | "sendBody": true, 71 | "specifyBody": "json", 72 | "authentication": "genericCredentialType", 73 | "genericAuthType": "httpHeaderAuth" 74 | }, 75 | "credentials": { 76 | "httpHeaderAuth": { 77 | "id": "SzcKjO9Nn9vZPL2H", 78 | "name": "Header Auth account 5" 79 | } 80 | }, 81 | "typeVersion": 4.2 82 | }, 83 | { 84 | "id": "57a1219c-4f40-407c-855b-86c4c7c468bb", 85 | "name": "Sticky Note", 86 | "type": "n8n-nodes-base.stickyNote", 87 | "position": [ 88 | 180, 89 | 0 90 | ], 91 | "parameters": { 92 | "width": 361, 93 | "height": 90, 94 | "content": "## Summarize emails with A.I.\nYou can find out more about the [use case](https://rumjahn.com/how-a-i-saved-my-kids-school-life-and-my-marriage/)" 95 | }, 96 | "typeVersion": 1 97 | }, 98 | { 99 | "id": "17686264-56ac-419e-a32b-dc5c75f15f1f", 100 | "name": "Sticky Note1", 101 | "type": "n8n-nodes-base.stickyNote", 102 | "position": [ 103 | 283, 104 | 141 105 | ], 106 | "parameters": { 107 | "color": 5, 108 | "width": 229, 109 | "height": 280, 110 | "content": "Find your email server's IMAP Settings. \n- Link for [gmail](https://www.getmailspring.com/setup/access-gmail-via-imap-smtp)" 111 | }, 112 | "typeVersion": 1 113 | }, 114 | { 115 | "id": "1862abd6-7dca-4c66-90d6-110d4fcf4d99", 116 | "name": "Sticky Note2", 117 | "type": "n8n-nodes-base.stickyNote", 118 | "position": [ 119 | 580, 120 | 0 121 | ], 122 | "parameters": { 123 | "color": 6, 124 | "width": 365, 125 | "height": 442, 126 | "content": "For the A.I. you can use Openrouter.ai. \n- Set up a free account\n- The A.I. model selected is FREE to use.\n## Credentials\n- Use header auth\n- Username: Authorization\n- Password: Bearer {insert your API key}.\n- The password is \"Bearer\" space plus your API key." 127 | }, 128 | "typeVersion": 1 129 | }, 130 | { 131 | "id": "c4a3a76f-539d-4bbf-8f95-d7aaebf39a55", 132 | "name": "Sticky Note3", 133 | "type": "n8n-nodes-base.stickyNote", 134 | "position": [ 135 | 1000, 136 | 0 137 | ], 138 | "parameters": { 139 | "color": 4, 140 | "width": 307, 141 | "height": 439, 142 | "content": "Don't use the official Line node. It's outdated.\n## Credentials\n- Use header auth\n- Username: Authorization\n- Password: Bearer {channel access token}\n\nYou can find your channel access token at the [Line API console](https://developers.line.biz/console/). Go to Messaging API and scroll to the bottom." 143 | }, 144 | "typeVersion": 1 145 | } 146 | ], 147 | "active": false, 148 | "pinData": {}, 149 | "settings": { 150 | "executionOrder": "v1" 151 | }, 152 | "versionId": "81216e6a-2bd8-4215-8a96-376ee520469d", 153 | "connections": { 154 | "Read emails (IMAP)": { 155 | "main": [ 156 | [ 157 | { 158 | "node": "Send email to A.I. to summarize", 159 | "type": "main", 160 | "index": 0 161 | } 162 | ] 163 | ] 164 | }, 165 | "Send email to A.I. to summarize": { 166 | "main": [ 167 | [ 168 | { 169 | "node": "Send summarized content to messenger", 170 | "type": "main", 171 | "index": 0 172 | } 173 | ] 174 | ] 175 | } 176 | } 177 | } -------------------------------------------------------------------------------- /Custom LangChain agent written in JavaScript.txt: -------------------------------------------------------------------------------- 1 | { 2 | "id": "q2MJWAqpKF2BCJkq", 3 | "meta": { 4 | "instanceId": "021d3c82ba2d3bc090cbf4fc81c9312668bcc34297e022bb3438c5c88a43a5ff" 5 | }, 6 | "name": "LangChain - Example - Code Node Example", 7 | "tags": [ 8 | { 9 | "id": "snf16n0p2UrGP838", 10 | "name": "LangChain - Example", 11 | "createdAt": "2023-09-25T16:21:55.962Z", 12 | "updatedAt": "2023-09-25T16:21:55.962Z" 13 | } 14 | ], 15 | "nodes": [ 16 | { 17 | "id": "ad1a920e-1048-4b58-9c4a-a0469a1f189d", 18 | "name": "OpenAI", 19 | "type": "@n8n/n8n-nodes-langchain.lmOpenAi", 20 | "position": [ 21 | 900, 22 | 628 23 | ], 24 | "parameters": { 25 | "options": {} 26 | }, 27 | "credentials": { 28 | "openAiApi": { 29 | "id": "4jRB4A20cPycBqP5", 30 | "name": "OpenAI account - n8n" 31 | } 32 | }, 33 | "typeVersion": 1 34 | }, 35 | { 36 | "id": "7dd04ecd-f169-455c-9c90-140140e37542", 37 | "name": "Sticky Note", 38 | "type": "n8n-nodes-base.stickyNote", 39 | "position": [ 40 | 800, 41 | 340 42 | ], 43 | "parameters": { 44 | "width": 432, 45 | "height": 237, 46 | "content": "## Self-coded LLM Chain Node" 47 | }, 48 | "typeVersion": 1 49 | }, 50 | { 51 | "id": "05ad7d68-5dc8-42f2-8274-fcb5bdeb68cb", 52 | "name": "When clicking \"Execute Workflow\"", 53 | "type": "n8n-nodes-base.manualTrigger", 54 | "position": [ 55 | 280, 56 | 428 57 | ], 58 | "parameters": {}, 59 | "typeVersion": 1 60 | }, 61 | { 62 | "id": "39e2fd34-3261-44a1-aa55-96f169d55aad", 63 | "name": "Set", 64 | "type": "n8n-nodes-base.set", 65 | "position": [ 66 | 620, 67 | 428 68 | ], 69 | "parameters": { 70 | "values": { 71 | "string": [ 72 | { 73 | "name": "input", 74 | "value": "Tell me a joke" 75 | } 76 | ] 77 | }, 78 | "options": {} 79 | }, 80 | "typeVersion": 2 81 | }, 82 | { 83 | "id": "42a3184c-0c62-4e79-9220-7a93e313317e", 84 | "name": "Set1", 85 | "type": "n8n-nodes-base.set", 86 | "position": [ 87 | 620, 88 | 820 89 | ], 90 | "parameters": { 91 | "values": { 92 | "string": [ 93 | { 94 | "name": "input", 95 | "value": "What year was Einstein born?" 96 | } 97 | ] 98 | }, 99 | "options": {} 100 | }, 101 | "typeVersion": 2 102 | }, 103 | { 104 | "id": "4e2af29d-7fc4-484b-8028-1b9a84d60172", 105 | "name": "Chat OpenAI", 106 | "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", 107 | "position": [ 108 | 731, 109 | 1108 110 | ], 111 | "parameters": { 112 | "options": {} 113 | }, 114 | "credentials": { 115 | "openAiApi": { 116 | "id": "4jRB4A20cPycBqP5", 117 | "name": "OpenAI account - n8n" 118 | } 119 | }, 120 | "typeVersion": 1 121 | }, 122 | { 123 | "id": "334e9176-3a18-4838-84cb-70e8154f1a30", 124 | "name": "Sticky Note1", 125 | "type": "n8n-nodes-base.stickyNote", 126 | "position": [ 127 | 880, 128 | 1028 129 | ], 130 | "parameters": { 131 | "width": 320.2172923777021, 132 | "height": 231, 133 | "content": "## Self-coded Tool Node" 134 | }, 135 | "typeVersion": 1 136 | }, 137 | { 138 | "id": "05e0d5c6-df18-42ba-99b6-a2b65633a14d", 139 | "name": "Custom - Wikipedia", 140 | "type": "@n8n/n8n-nodes-langchain.code", 141 | "position": [ 142 | 971, 143 | 1108 144 | ], 145 | "parameters": { 146 | "code": { 147 | "supplyData": { 148 | "code": "console.log('Custom Wikipedia Node runs');\nconst { WikipediaQueryRun } = require('langchain/tools');\nreturn new WikipediaQueryRun();" 149 | } 150 | }, 151 | "outputs": { 152 | "output": [ 153 | { 154 | "type": "ai_tool" 155 | } 156 | ] 157 | } 158 | }, 159 | "typeVersion": 1 160 | }, 161 | { 162 | "id": "9c729e9a-f173-430c-8bcd-74101b614891", 163 | "name": "Custom - LLM Chain Node", 164 | "type": "@n8n/n8n-nodes-langchain.code", 165 | "position": [ 166 | 880, 167 | 428 168 | ], 169 | "parameters": { 170 | "code": { 171 | "execute": { 172 | "code": "const { PromptTemplate } = require('langchain/prompts');\n\nconst query = $input.item.json.input;\nconst prompt = PromptTemplate.fromTemplate(query);\nconst llm = await this.getInputConnectionData('ai_languageModel', 0);\nlet chain = prompt.pipe(llm);\nconst output = await chain.invoke();\nreturn [ {json: { output } } ];" 173 | } 174 | }, 175 | "inputs": { 176 | "input": [ 177 | { 178 | "type": "main" 179 | }, 180 | { 181 | "type": "ai_languageModel", 182 | "required": true, 183 | "maxConnections": 1 184 | } 185 | ] 186 | }, 187 | "outputs": { 188 | "output": [ 189 | { 190 | "type": "main" 191 | } 192 | ] 193 | } 194 | }, 195 | "typeVersion": 1 196 | }, 197 | { 198 | "id": "6427bbf0-49a6-4810-9744-87d88151e914", 199 | "name": "Agent", 200 | "type": "@n8n/n8n-nodes-langchain.agent", 201 | "position": [ 202 | 880, 203 | 820 204 | ], 205 | "parameters": { 206 | "options": {} 207 | }, 208 | "typeVersion": 1 209 | } 210 | ], 211 | "active": false, 212 | "pinData": {}, 213 | "settings": { 214 | "executionOrder": "v1" 215 | }, 216 | "versionId": "e14a709d-08fe-4ed7-903a-fb2bae80b28a", 217 | "connections": { 218 | "Set": { 219 | "main": [ 220 | [ 221 | { 222 | "node": "Custom - LLM Chain Node", 223 | "type": "main", 224 | "index": 0 225 | } 226 | ] 227 | ] 228 | }, 229 | "Set1": { 230 | "main": [ 231 | [ 232 | { 233 | "node": "Agent", 234 | "type": "main", 235 | "index": 0 236 | } 237 | ] 238 | ] 239 | }, 240 | "OpenAI": { 241 | "ai_languageModel": [ 242 | [ 243 | { 244 | "node": "Custom - LLM Chain Node", 245 | "type": "ai_languageModel", 246 | "index": 0 247 | } 248 | ] 249 | ] 250 | }, 251 | "Chat OpenAI": { 252 | "ai_languageModel": [ 253 | [ 254 | { 255 | "node": "Agent", 256 | "type": "ai_languageModel", 257 | "index": 0 258 | } 259 | ] 260 | ] 261 | }, 262 | "Custom - Wikipedia": { 263 | "ai_tool": [ 264 | [ 265 | { 266 | "node": "Agent", 267 | "type": "ai_tool", 268 | "index": 0 269 | } 270 | ] 271 | ] 272 | }, 273 | "When clicking \"Execute Workflow\"": { 274 | "main": [ 275 | [ 276 | { 277 | "node": "Set", 278 | "type": "main", 279 | "index": 0 280 | }, 281 | { 282 | "node": "Set1", 283 | "type": "main", 284 | "index": 0 285 | } 286 | ] 287 | ] 288 | } 289 | } 290 | } -------------------------------------------------------------------------------- /Creating a AI Slack Bot with Google Gemini.txt: -------------------------------------------------------------------------------- 1 | { 2 | "meta": { 3 | "instanceId": "84ba6d895254e080ac2b4916d987aa66b000f88d4d919a6b9c76848f9b8a7616", 4 | "templateId": "2370" 5 | }, 6 | "nodes": [ 7 | { 8 | "id": "2ce91ec6-0a8c-438a-8a18-216001c9ee07", 9 | "name": "Sticky Note", 10 | "type": "n8n-nodes-base.stickyNote", 11 | "position": [ 12 | 380, 13 | 240 14 | ], 15 | "parameters": { 16 | "width": 407.6388140161723, 17 | "height": 490.24769122000794, 18 | "content": "## This is a POST Webhook endpoint\n\nMake sure to configure this webhook using a https:// wraper and dont use the default http://localhost:5678 as that will not be recognized by your slack webhook\n\n\nOnce the data has been sent to your webhook, the next step will be passing it via an AI Agent to process data based on the queries we pass to our agent.\n\nTo have some sort of a memory, be sure to set the slack token to the memory node. This way you can refer to other chats from the history.\n\nThe final message is relayed back to slack as a new message. Since we can not wait longer than 3000 ms for slack response, we will create anew message with reference to the input we passed.\n\nWe can advance this using the tools or data sources for it to be more custom tailored for your company.\n" 19 | }, 20 | "typeVersion": 1 21 | }, 22 | { 23 | "id": "7a0c84a8-90ef-4de8-b120-700c94c35a51", 24 | "name": "Sticky Note2", 25 | "type": "n8n-nodes-base.stickyNote", 26 | "position": [ 27 | 1180, 28 | 560 29 | ], 30 | "parameters": { 31 | "color": 4, 32 | "width": 221.73584905660368, 33 | "height": 233, 34 | "content": "### Conversation history is stored in memory using the body token as the chatsession id" 35 | }, 36 | "typeVersion": 1 37 | }, 38 | { 39 | "id": "9b843e0e-42a6-4125-8c59-a7d5620a15f7", 40 | "name": "Sticky Note3", 41 | "type": "n8n-nodes-base.stickyNote", 42 | "position": [ 43 | 942.5229110512129, 44 | 560 45 | ], 46 | "parameters": { 47 | "color": 4, 48 | "width": 217.47708894878716, 49 | "height": 233, 50 | "content": "### The chat LLM to process the prompt. Use any AI model here" 51 | }, 52 | "typeVersion": 1 53 | }, 54 | { 55 | "id": "4efa968f-ebf5-42ec-80d3-907ef2622c61", 56 | "name": "Google Gemini Chat Model", 57 | "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini", 58 | "position": [ 59 | 1020, 60 | 640 61 | ], 62 | "parameters": { 63 | "options": {}, 64 | "modelName": "models/gemini-1.5-flash-latest" 65 | }, 66 | "typeVersion": 1 67 | }, 68 | { 69 | "id": "fd1efd7c-7cd0-4edf-960e-19bd4567293e", 70 | "name": "Window Buffer Memory", 71 | "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow", 72 | "position": [ 73 | 1260, 74 | 660 75 | ], 76 | "parameters": { 77 | "sessionKey": "={{ $('Webhook to receive message').item.json.body.token }}", 78 | "sessionIdType": "customKey", 79 | "contextWindowLength": 10 80 | }, 81 | "typeVersion": 1.2 82 | }, 83 | { 84 | "id": "60d1eb77-492d-4a18-8cec-fa3f6ef8d707", 85 | "name": "Sticky Note4", 86 | "type": "n8n-nodes-base.stickyNote", 87 | "position": [ 88 | 1467.5148247978436, 89 | 260 90 | ], 91 | "parameters": { 92 | "color": 4, 93 | "width": 223.7196765498655, 94 | "height": 236.66152029520293, 95 | "content": "### Send the response from AI back to slack channel\n" 96 | }, 97 | "typeVersion": 1 98 | }, 99 | { 100 | "id": "186069c0-5c79-4738-9924-de33998658bc", 101 | "name": "Sticky Note1", 102 | "type": "n8n-nodes-base.stickyNote", 103 | "position": [ 104 | 840, 105 | 180 106 | ], 107 | "parameters": { 108 | "color": 4, 109 | "width": 561.423180592992, 110 | "height": 340.09703504043114, 111 | "content": "## Receive a POST webhook, process data and return response" 112 | }, 113 | "typeVersion": 1 114 | }, 115 | { 116 | "id": "2bfce117-a769-46e1-a028-ed0c7ba62653", 117 | "name": "Send response back to slack channel", 118 | "type": "n8n-nodes-base.slack", 119 | "position": [ 120 | 1540, 121 | 320 122 | ], 123 | "parameters": { 124 | "text": "={{ $('Webhook to receive message').item.json.body.user_name }}: {{ $('Webhook to receive message').item.json.body.text }}\n\nEffibotics Bot: {{ $json.output.removeMarkdown() }} ", 125 | "select": "channel", 126 | "channelId": { 127 | "__rl": true, 128 | "mode": "id", 129 | "value": "={{ $('Webhook to receive message').item.json.body.channel_id }}" 130 | }, 131 | "otherOptions": { 132 | "mrkdwn": true, 133 | "sendAsUser": "Effibotics Bot", 134 | "includeLinkToWorkflow": false 135 | } 136 | }, 137 | "typeVersion": 2.1 138 | }, 139 | { 140 | "id": "cfcf2bbc-8ed5-4a9f-8f35-cf2715686ebe", 141 | "name": "Webhook to receive message", 142 | "type": "n8n-nodes-base.webhook", 143 | "position": [ 144 | 880, 145 | 320 146 | ], 147 | "webhookId": "28b84545-96aa-42f5-990b-aa8783a320ca", 148 | "parameters": { 149 | "path": "slack-bot", 150 | "options": { 151 | "responseData": "" 152 | }, 153 | "httpMethod": "POST" 154 | }, 155 | "typeVersion": 1 156 | }, 157 | { 158 | "id": "dc93e588-fc0b-4561-88a5-e1cccd48323f", 159 | "name": "Agent", 160 | "type": "@n8n/n8n-nodes-langchain.agent", 161 | "position": [ 162 | 1100, 163 | 320 164 | ], 165 | "parameters": { 166 | "text": "={{ $json.body.text }}", 167 | "options": { 168 | "systemMessage": "You are Effibotics AI personal assistant. Your task will be to provide helpful assistance and advice related to automation and such tasks. " 169 | } 170 | }, 171 | "typeVersion": 1 172 | } 173 | ], 174 | "pinData": {}, 175 | "connections": { 176 | "Agent": { 177 | "main": [ 178 | [ 179 | { 180 | "node": "Send response back to slack channel", 181 | "type": "main", 182 | "index": 0 183 | } 184 | ] 185 | ] 186 | }, 187 | "Window Buffer Memory": { 188 | "ai_memory": [ 189 | [ 190 | { 191 | "node": "Agent", 192 | "type": "ai_memory", 193 | "index": 0 194 | } 195 | ] 196 | ] 197 | }, 198 | "Google Gemini Chat Model": { 199 | "ai_languageModel": [ 200 | [ 201 | { 202 | "node": "Agent", 203 | "type": "ai_languageModel", 204 | "index": 0 205 | } 206 | ] 207 | ] 208 | }, 209 | "Webhook to receive message": { 210 | "main": [ 211 | [ 212 | { 213 | "node": "Agent", 214 | "type": "main", 215 | "index": 0 216 | } 217 | ] 218 | ] 219 | } 220 | } 221 | } -------------------------------------------------------------------------------- /AI chat with any data source (using the n8n workflow tool).txt: -------------------------------------------------------------------------------- 1 | { 2 | "meta": { 3 | "instanceId": "cb484ba7b742928a2048bf8829668bed5b5ad9787579adea888f05980292a4a7" 4 | }, 5 | "nodes": [ 6 | { 7 | "id": "4c52efcf-039b-4550-8a63-3d3d4dde488b", 8 | "name": "On new manual Chat Message", 9 | "type": "@n8n/n8n-nodes-langchain.manualChatTrigger", 10 | "position": [ 11 | 740, 12 | 300 13 | ], 14 | "parameters": {}, 15 | "typeVersion": 1.1 16 | }, 17 | { 18 | "id": "adb528f1-b87b-4bb2-99e1-776fd839522e", 19 | "name": "Execute Workflow Trigger", 20 | "type": "n8n-nodes-base.executeWorkflowTrigger", 21 | "position": [ 22 | 680, 23 | 940 24 | ], 25 | "parameters": {}, 26 | "typeVersion": 1 27 | }, 28 | { 29 | "id": "092cf737-5b53-4fc8-82f5-c775b77ea0bd", 30 | "name": "Hacker News", 31 | "type": "n8n-nodes-base.hackerNews", 32 | "position": [ 33 | 900, 34 | 940 35 | ], 36 | "parameters": { 37 | "limit": 50, 38 | "resource": "all", 39 | "additionalFields": {} 40 | }, 41 | "typeVersion": 1 42 | }, 43 | { 44 | "id": "a0805137-630c-4065-826e-88afa000660f", 45 | "name": "Clean up data", 46 | "type": "n8n-nodes-base.set", 47 | "position": [ 48 | 1120, 49 | 940 50 | ], 51 | "parameters": { 52 | "fields": { 53 | "values": [ 54 | { 55 | "name": "title", 56 | "stringValue": "={{ $json._highlightResult.title.value }}" 57 | }, 58 | { 59 | "name": "points", 60 | "type": "numberValue", 61 | "numberValue": "={{ $json.points }}" 62 | }, 63 | { 64 | "name": "url", 65 | "stringValue": "={{ $json.url }}" 66 | }, 67 | { 68 | "name": "created_at", 69 | "stringValue": "={{ $json.created_at }}" 70 | }, 71 | { 72 | "name": "author", 73 | "stringValue": "={{ $json.author }}" 74 | } 75 | ] 76 | }, 77 | "include": "none", 78 | "options": {} 79 | }, 80 | "typeVersion": 3.2 81 | }, 82 | { 83 | "id": "e1b255f4-e970-42d6-9870-4e302bf2da83", 84 | "name": "AI Agent", 85 | "type": "@n8n/n8n-nodes-langchain.agent", 86 | "position": [ 87 | 960, 88 | 300 89 | ], 90 | "parameters": { 91 | "options": { 92 | "maxIterations": 10 93 | } 94 | }, 95 | "typeVersion": 1.1 96 | }, 97 | { 98 | "id": "91e3391e-909e-4d63-9649-ff62781dbba9", 99 | "name": "OpenAI Chat Model", 100 | "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", 101 | "position": [ 102 | 960, 103 | 520 104 | ], 105 | "parameters": { 106 | "options": {} 107 | }, 108 | "credentials": { 109 | "openAiApi": { 110 | "id": "VQtv7frm7eLiEDnd", 111 | "name": "OpenAi account 7" 112 | } 113 | }, 114 | "typeVersion": 1 115 | }, 116 | { 117 | "id": "cd1f0028-635e-48eb-ac38-4c6fb25ed63e", 118 | "name": "Stringify", 119 | "type": "n8n-nodes-base.code", 120 | "position": [ 121 | 1340, 122 | 940 123 | ], 124 | "parameters": { 125 | "jsCode": "return {\n 'response': JSON.stringify($input.all().map(x => x.json))\n}" 126 | }, 127 | "typeVersion": 2 128 | }, 129 | { 130 | "id": "7df241eb-67d3-4724-8b32-4b53561ed55f", 131 | "name": "Sticky Note", 132 | "type": "n8n-nodes-base.stickyNote", 133 | "position": [ 134 | 880, 135 | 820 136 | ], 137 | "parameters": { 138 | "color": 7, 139 | "width": 150, 140 | "height": 293, 141 | "content": "### Replace me\nwith any other service, e.g. fetching your own data" 142 | }, 143 | "typeVersion": 1 144 | }, 145 | { 146 | "id": "270845df-7c2d-4035-9ac0-e41d418b3026", 147 | "name": "Sticky Note1", 148 | "type": "n8n-nodes-base.stickyNote", 149 | "position": [ 150 | 600, 151 | 738.125 152 | ], 153 | "parameters": { 154 | "color": 7, 155 | "width": 927.5, 156 | "height": 406.875, 157 | "content": "### Sub-workflow: Custom tool\nThis can be called by the agent above. This example fetches the top 50 posts ever on Hacker News" 158 | }, 159 | "typeVersion": 1 160 | }, 161 | { 162 | "id": "1d796a86-45d1-4fc4-8245-893525505d1f", 163 | "name": "Sticky Note2", 164 | "type": "n8n-nodes-base.stickyNote", 165 | "position": [ 166 | 600, 167 | 200 168 | ], 169 | "parameters": { 170 | "color": 7, 171 | "width": 927.5, 172 | "height": 486.5625, 173 | "content": "### Main workflow: AI agent using custom tool\nTry it out by clicking 'Chat' and entering 'What is the 5th most popular post ever on Hacker News?'" 174 | }, 175 | "typeVersion": 1 176 | }, 177 | { 178 | "id": "38ff64b5-6f47-4d2d-9051-caab418bb0e8", 179 | "name": "Sticky Note3", 180 | "type": "n8n-nodes-base.stickyNote", 181 | "position": [ 182 | 440, 183 | 300 184 | ], 185 | "parameters": { 186 | "width": 185.9375, 187 | "height": 218, 188 | "content": "## Try me out\n\nClick the 'Chat' button and enter:\n\n_What is the 5th most popular post ever on Hacker News?_" 189 | }, 190 | "typeVersion": 1 191 | }, 192 | { 193 | "id": "3532e461-bd74-48f7-93e1-96d608c88688", 194 | "name": "Custom tool to call the wf below", 195 | "type": "@n8n/n8n-nodes-langchain.toolWorkflow", 196 | "position": [ 197 | 1120, 198 | 520 199 | ], 200 | "parameters": { 201 | "name": "hn_tool", 202 | "workflowId": "={{ $workflow.id }}", 203 | "description": "Returns a list of the most popular posts ever on Hacker News, in json format" 204 | }, 205 | "typeVersion": 1 206 | } 207 | ], 208 | "pinData": {}, 209 | "connections": { 210 | "Hacker News": { 211 | "main": [ 212 | [ 213 | { 214 | "node": "Clean up data", 215 | "type": "main", 216 | "index": 0 217 | } 218 | ] 219 | ] 220 | }, 221 | "Clean up data": { 222 | "main": [ 223 | [ 224 | { 225 | "node": "Stringify", 226 | "type": "main", 227 | "index": 0 228 | } 229 | ] 230 | ] 231 | }, 232 | "OpenAI Chat Model": { 233 | "ai_languageModel": [ 234 | [ 235 | { 236 | "node": "AI Agent", 237 | "type": "ai_languageModel", 238 | "index": 0 239 | } 240 | ] 241 | ] 242 | }, 243 | "Execute Workflow Trigger": { 244 | "main": [ 245 | [ 246 | { 247 | "node": "Hacker News", 248 | "type": "main", 249 | "index": 0 250 | } 251 | ] 252 | ] 253 | }, 254 | "On new manual Chat Message": { 255 | "main": [ 256 | [ 257 | { 258 | "node": "AI Agent", 259 | "type": "main", 260 | "index": 0 261 | } 262 | ] 263 | ] 264 | }, 265 | "Custom tool to call the wf below": { 266 | "ai_tool": [ 267 | [ 268 | { 269 | "node": "AI Agent", 270 | "type": "ai_tool", 271 | "index": 0 272 | } 273 | ] 274 | ] 275 | } 276 | } 277 | } -------------------------------------------------------------------------------- /Agentic Telegram AI bot with with LangChain nodes and new tools.txt: -------------------------------------------------------------------------------- 1 | { 2 | "id": "U8EOTtZvmZPMYc6m", 3 | "meta": { 4 | "instanceId": "fb924c73af8f703905bc09c9ee8076f48c17b596ed05b18c0ff86915ef8a7c4a", 5 | "templateCredsSetupCompleted": true 6 | }, 7 | "name": "Agentic Telegram AI bot with LangChain nodes and new tools", 8 | "tags": [], 9 | "nodes": [ 10 | { 11 | "id": "13b3488e-af72-4d89-bef4-e9b895e3bf76", 12 | "name": "OpenAI Chat Model", 13 | "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", 14 | "position": [ 15 | 1640, 16 | 580 17 | ], 18 | "parameters": { 19 | "model": "gpt-4o", 20 | "options": { 21 | "temperature": 0.7, 22 | "frequencyPenalty": 0.2 23 | } 24 | }, 25 | "credentials": { 26 | "openAiApi": { 27 | "id": "rveqdSfp7pCRON1T", 28 | "name": "Ted's Tech Talks OpenAi" 29 | } 30 | }, 31 | "typeVersion": 1 32 | }, 33 | { 34 | "id": "864937a1-43f6-4055-bdea-61ab07db9903", 35 | "name": "Window Buffer Memory", 36 | "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow", 37 | "position": [ 38 | 1760, 39 | 580 40 | ], 41 | "parameters": { 42 | "sessionKey": "=chat_with_{{ $('Listen for incoming events').first().json.message.chat.id }}", 43 | "contextWindowLength": 10 44 | }, 45 | "typeVersion": 1 46 | }, 47 | { 48 | "id": "4ef838d4-feaa-4bd3-b2c7-ccd938be4373", 49 | "name": "Listen for incoming events", 50 | "type": "n8n-nodes-base.telegramTrigger", 51 | "position": [ 52 | 1580, 53 | 360 54 | ], 55 | "webhookId": "322dce18-f93e-4f86-b9b1-3305519b7834", 56 | "parameters": { 57 | "updates": [ 58 | "*" 59 | ], 60 | "additionalFields": {} 61 | }, 62 | "credentials": { 63 | "telegramApi": { 64 | "id": "9dexJXnlVPA6wt8K", 65 | "name": "Chat & Sound" 66 | } 67 | }, 68 | "typeVersion": 1 69 | }, 70 | { 71 | "id": "fed51c41-2846-4a1a-a5f5-ce121ee7fe88", 72 | "name": "Sticky Note", 73 | "type": "n8n-nodes-base.stickyNote", 74 | "position": [ 75 | 1460, 76 | 180 77 | ], 78 | "parameters": { 79 | "color": 7, 80 | "width": 926.3188190787038, 81 | "height": 553.452795998601, 82 | "content": "## Generate an image with Dall-E-3 and send it via Telegram" 83 | }, 84 | "typeVersion": 1 85 | }, 86 | { 87 | "id": "1c7a204b-3ed7-47bd-a434-202b05272d18", 88 | "name": "Send final reply", 89 | "type": "n8n-nodes-base.telegram", 90 | "onError": "continueErrorOutput", 91 | "position": [ 92 | 2140, 93 | 360 94 | ], 95 | "parameters": { 96 | "text": "={{ $json.output }}", 97 | "chatId": "={{ $('Listen for incoming events').first().json.message.from.id }}", 98 | "additionalFields": { 99 | "appendAttribution": false 100 | } 101 | }, 102 | "credentials": { 103 | "telegramApi": { 104 | "id": "9dexJXnlVPA6wt8K", 105 | "name": "Chat & Sound" 106 | } 107 | }, 108 | "typeVersion": 1.1 109 | }, 110 | { 111 | "id": "bebbe9d4-47ba-4c13-9e1e-d36bfe6e472e", 112 | "name": "Send back an image", 113 | "type": "n8n-nodes-base.telegramTool", 114 | "position": [ 115 | 2020, 116 | 580 117 | ], 118 | "parameters": { 119 | "file": "={{ $fromAI(\"url\", \"a valid url of an image\", \"string\", \" \") }}", 120 | "chatId": "={{ $('Listen for incoming events').first().json.message.from.id }}", 121 | "operation": "sendDocument", 122 | "additionalFields": {} 123 | }, 124 | "credentials": { 125 | "telegramApi": { 126 | "id": "9dexJXnlVPA6wt8K", 127 | "name": "Chat & Sound" 128 | } 129 | }, 130 | "typeVersion": 1.2 131 | }, 132 | { 133 | "id": "38f2410d-bd55-4ddf-8aaa-4e28919de78f", 134 | "name": "Generate image in Dalle", 135 | "type": "@n8n/n8n-nodes-langchain.toolHttpRequest", 136 | "position": [ 137 | 1880, 138 | 580 139 | ], 140 | "parameters": { 141 | "url": "https://api.openai.com/v1/images/generations", 142 | "method": "POST", 143 | "sendBody": true, 144 | "authentication": "predefinedCredentialType", 145 | "parametersBody": { 146 | "values": [ 147 | { 148 | "name": "model", 149 | "value": "dall-e-3", 150 | "valueProvider": "fieldValue" 151 | }, 152 | { 153 | "name": "prompt" 154 | } 155 | ] 156 | }, 157 | "toolDescription": "Call this tool to request a Dall-E-3 model, when the user asks to draw something. If you gеt a response from this tool, forward it to the Telegram tool.", 158 | "nodeCredentialType": "openAiApi" 159 | }, 160 | "credentials": { 161 | "openAiApi": { 162 | "id": "rveqdSfp7pCRON1T", 163 | "name": "Ted's Tech Talks OpenAi" 164 | } 165 | }, 166 | "typeVersion": 1.1 167 | }, 168 | { 169 | "id": "34265eab-9f37-475a-a2ae-a6c37c69c595", 170 | "name": "AI Agent", 171 | "type": "@n8n/n8n-nodes-langchain.agent", 172 | "position": [ 173 | 1780, 174 | 360 175 | ], 176 | "parameters": { 177 | "text": "={{ $json.message.text }}", 178 | "options": { 179 | "systemMessage": "=You are a helpful assistant. You are communicating with a user named {{ $json.message.from.first_name }}. Address the user by name every time. If the user asks for an image, always send the link to the image in the final reply." 180 | }, 181 | "promptType": "define" 182 | }, 183 | "typeVersion": 1.7 184 | } 185 | ], 186 | "active": false, 187 | "pinData": {}, 188 | "settings": { 189 | "executionOrder": "v1" 190 | }, 191 | "versionId": "b36989c5-295a-4df6-84e9-776815509bc9", 192 | "connections": { 193 | "AI Agent": { 194 | "main": [ 195 | [ 196 | { 197 | "node": "Send final reply", 198 | "type": "main", 199 | "index": 0 200 | } 201 | ] 202 | ] 203 | }, 204 | "OpenAI Chat Model": { 205 | "ai_languageModel": [ 206 | [ 207 | { 208 | "node": "AI Agent", 209 | "type": "ai_languageModel", 210 | "index": 0 211 | } 212 | ] 213 | ] 214 | }, 215 | "Send back an image": { 216 | "ai_tool": [ 217 | [ 218 | { 219 | "node": "AI Agent", 220 | "type": "ai_tool", 221 | "index": 0 222 | } 223 | ] 224 | ] 225 | }, 226 | "Window Buffer Memory": { 227 | "ai_memory": [ 228 | [ 229 | { 230 | "node": "AI Agent", 231 | "type": "ai_memory", 232 | "index": 0 233 | } 234 | ] 235 | ] 236 | }, 237 | "Generate image in Dalle": { 238 | "ai_tool": [ 239 | [ 240 | { 241 | "node": "AI Agent", 242 | "type": "ai_tool", 243 | "index": 0 244 | } 245 | ] 246 | ] 247 | }, 248 | "Listen for incoming events": { 249 | "main": [ 250 | [ 251 | { 252 | "node": "AI Agent", 253 | "type": "main", 254 | "index": 0 255 | } 256 | ] 257 | ] 258 | } 259 | } 260 | } -------------------------------------------------------------------------------- /Daily meetings summarization with Gemini AI.txt: -------------------------------------------------------------------------------- 1 | { 2 | "id": "jAML9xW28lOdsObH", 3 | "meta": { 4 | "instanceId": "be04c66ddabda64dad2c5d4c4611c3879370cfcff746359dfed22dbbfaacfc1a", 5 | "templateCredsSetupCompleted": true 6 | }, 7 | "name": "Daily meetings summarization with Gemini AI", 8 | "tags": [], 9 | "nodes": [ 10 | { 11 | "id": "2f5c6f8b-023a-4fc0-8684-66d7f743af0a", 12 | "name": "Sticky Note3", 13 | "type": "n8n-nodes-base.stickyNote", 14 | "position": [ 15 | 100, 16 | 380 17 | ], 18 | "parameters": { 19 | "color": 4, 20 | "width": 217.47708894878716, 21 | "height": 233, 22 | "content": "### Gemini Flash model a base" 23 | }, 24 | "typeVersion": 1 25 | }, 26 | { 27 | "id": "8c159251-d78c-4f18-a886-b930194e6459", 28 | "name": "Sticky Note4", 29 | "type": "n8n-nodes-base.stickyNote", 30 | "position": [ 31 | 600, 32 | 40 33 | ], 34 | "parameters": { 35 | "color": 4, 36 | "width": 223.7196765498655, 37 | "height": 236.66152029520293, 38 | "content": "### Send the response from AI back to slack channel\n" 39 | }, 40 | "typeVersion": 1 41 | }, 42 | { 43 | "id": "ee7164d8-f257-4e47-9867-239440153fd4", 44 | "name": "Sticky Note1", 45 | "type": "n8n-nodes-base.stickyNote", 46 | "position": [ 47 | 0, 48 | -20 49 | ], 50 | "parameters": { 51 | "color": 4, 52 | "width": 561, 53 | "height": 360, 54 | "content": "## Trigger the task daily, receive the meetings data, process the data and return response for sending\n\n\n\n\n\n\n\n\n\n\n\nNo memory assigned to the model since the model is running one task and doesn't need a followup, then send the data to the user." 55 | }, 56 | "typeVersion": 1 57 | }, 58 | { 59 | "id": "30ac78b7-08ba-4df9-a67c-e6825a9de380", 60 | "name": "Send response back to slack channel", 61 | "type": "n8n-nodes-base.slack", 62 | "position": [ 63 | 660, 64 | 100 65 | ], 66 | "webhookId": "636ae330-cc22-408b-b6a5-caf02e48897f", 67 | "parameters": { 68 | "text": "=Gemini : {{ $json.output.removeMarkdown() }} ", 69 | "select": "channel", 70 | "channelId": { 71 | "__rl": true, 72 | "mode": "list", 73 | "value": "C07QMTJHR0A", 74 | "cachedResultName": "ai-chat-gemini" 75 | }, 76 | "otherOptions": { 77 | "mrkdwn": true, 78 | "includeLinkToWorkflow": false 79 | } 80 | }, 81 | "credentials": { 82 | "slackApi": { 83 | "id": "DFQMzAsWKIdZFCR4", 84 | "name": "Slack account - iKemo" 85 | } 86 | }, 87 | "typeVersion": 2.1 88 | }, 89 | { 90 | "id": "938738d6-1e2e-4e93-a5bf-70d11fd4fd32", 91 | "name": "Google Calendar - Get Events", 92 | "type": "n8n-nodes-base.googleCalendarTool", 93 | "position": [ 94 | 400, 95 | 460 96 | ], 97 | "parameters": { 98 | "options": { 99 | "timeMax": "={{ $fromAI('end_date') }}", 100 | "timeMin": "={{ $fromAI('start_date') }}" 101 | }, 102 | "calendar": { 103 | "__rl": true, 104 | "mode": "list", 105 | "value": "john@iKemo.io", 106 | "cachedResultName": "john@iKemo.io" 107 | }, 108 | "operation": "getAll", 109 | "descriptionType": "manual", 110 | "toolDescription": "Use this tool when you’re asked to retrieve events data." 111 | }, 112 | "credentials": { 113 | "googleCalendarOAuth2Api": { 114 | "id": "R2W7XHvEyQgyykI0", 115 | "name": "Google Calendar - John" 116 | } 117 | }, 118 | "typeVersion": 1.2 119 | }, 120 | { 121 | "id": "2290c30e-9e9f-471a-a882-df6856a1dd9d", 122 | "name": "Calendar AI Agent", 123 | "type": "@n8n/n8n-nodes-langchain.agent", 124 | "position": [ 125 | 240, 126 | 100 127 | ], 128 | "parameters": { 129 | "text": "=summarize today's meetings.\nstartdate = {{ $now.format('yyyy-MM-dd 00:00:00') }}\nenddate = {{ $now.format('yyyy-MM-dd 23:59:59') }}", 130 | "options": { 131 | "systemMessage": "=You are a Google Calendar assistant.\nYour primary goal is to assist the user in managing their calendar effectively using Event Retrieval tool. \nAlways base your responses on the current date: \n{{ DateTime.local().toFormat('cccc d LLLL yyyy') }}.\nGeneral Guidelines:\nAlways mention all meetings attendees\nTool: Event Retrieval\nFormat the date range:\nstart_date: Start date and time in YYYY-MM-DD HH:mm:ss.\nend_date: End date and time in YYYY-MM-DD HH:mm:ss.\n" 132 | }, 133 | "promptType": "define" 134 | }, 135 | "typeVersion": 1.7 136 | }, 137 | { 138 | "id": "dd63bab9-0f95-4b84-8bbd-26a1f91fe635", 139 | "name": "Schedule Trigger", 140 | "type": "n8n-nodes-base.scheduleTrigger", 141 | "position": [ 142 | 20, 143 | 100 144 | ], 145 | "parameters": { 146 | "rule": { 147 | "interval": [ 148 | { 149 | "triggerAtHour": 9 150 | } 151 | ] 152 | } 153 | }, 154 | "typeVersion": 1.2 155 | }, 156 | { 157 | "id": "06b9ecd2-83e0-498f-ad79-fbc89242a6f0", 158 | "name": "Sticky Note2", 159 | "type": "n8n-nodes-base.stickyNote", 160 | "position": [ 161 | 340, 162 | 380 163 | ], 164 | "parameters": { 165 | "color": 4, 166 | "width": 221.73584905660368, 167 | "height": 233, 168 | "content": "### Access Google Calendar and fetch all the data" 169 | }, 170 | "typeVersion": 1 171 | }, 172 | { 173 | "id": "48679508-2af8-4507-80a9-fc0aad171169", 174 | "name": "Google Gemini Chat Model", 175 | "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini", 176 | "position": [ 177 | 160, 178 | 480 179 | ], 180 | "parameters": { 181 | "options": {}, 182 | "modelName": "models/gemini-1.5-flash-latest" 183 | }, 184 | "credentials": { 185 | "googlePalmApi": { 186 | "id": "3BBJHhMKD8W8VfL4", 187 | "name": "Google Gemini(PaLM) Api account" 188 | } 189 | }, 190 | "typeVersion": 1 191 | } 192 | ], 193 | "active": false, 194 | "pinData": {}, 195 | "settings": { 196 | "executionOrder": "v1" 197 | }, 198 | "versionId": "e517b214-b0e5-4119-8aaf-77ee0655dd78", 199 | "connections": { 200 | "Schedule Trigger": { 201 | "main": [ 202 | [ 203 | { 204 | "node": "Calendar AI Agent", 205 | "type": "main", 206 | "index": 0 207 | } 208 | ] 209 | ] 210 | }, 211 | "Calendar AI Agent": { 212 | "main": [ 213 | [ 214 | { 215 | "node": "Send response back to slack channel", 216 | "type": "main", 217 | "index": 0 218 | } 219 | ] 220 | ] 221 | }, 222 | "Google Gemini Chat Model": { 223 | "ai_languageModel": [ 224 | [ 225 | { 226 | "node": "Calendar AI Agent", 227 | "type": "ai_languageModel", 228 | "index": 0 229 | } 230 | ] 231 | ] 232 | }, 233 | "Google Calendar - Get Events": { 234 | "ai_tool": [ 235 | [ 236 | { 237 | "node": "Calendar AI Agent", 238 | "type": "ai_tool", 239 | "index": 0 240 | } 241 | ] 242 | ] 243 | } 244 | } 245 | } -------------------------------------------------------------------------------- /MongoDB AI Agent - Intelligent Movie Recommendations.txt: -------------------------------------------------------------------------------- 1 | { 2 | "id": "22PddLUgcjSJbT1w", 3 | "meta": { 4 | "instanceId": "fa7d5e2425ec76075df7100dbafffed91cc6f71f12fe92614bf78af63c54a61d", 5 | "templateCredsSetupCompleted": true 6 | }, 7 | "name": "MongoDB Agent", 8 | "tags": [], 9 | "nodes": [ 10 | { 11 | "id": "d8c07efe-eca0-48cb-80e6-ea8117073c5f", 12 | "name": "OpenAI Chat Model", 13 | "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", 14 | "position": [ 15 | 1300, 16 | 560 17 | ], 18 | "parameters": { 19 | "options": {} 20 | }, 21 | "credentials": { 22 | "openAiApi": { 23 | "id": "TreGPMKr9hrtCvVp", 24 | "name": "OpenAi account" 25 | } 26 | }, 27 | "typeVersion": 1 28 | }, 29 | { 30 | "id": "636de178-7b68-429a-9371-41cf2a950076", 31 | "name": "MongoDBAggregate", 32 | "type": "n8n-nodes-base.mongoDbTool", 33 | "position": [ 34 | 1640, 35 | 540 36 | ], 37 | "parameters": { 38 | "query": "={{ $fromAI(\"pipeline\", \"The MongoDB pipeline to execute\" , \"string\" , [{\"$match\" : { \"rating\" : 5 } }])}}", 39 | "operation": "aggregate", 40 | "collection": "movies", 41 | "descriptionType": "manual", 42 | "toolDescription": "Get from AI the MongoDB Aggregation pipeline to get context based on the provided pipeline, the document structure of the documents is : {\n \"plot\": \"A group of bandits stage a brazen train hold-up, only to find a determined posse hot on their heels.\",\n \"genres\": [\n \"Short\",\n \"Western\"\n ],\n \"runtime\": 11,\n \"cast\": [\n \"A.C. Abadie\",\n \"Gilbert M. 'Broncho Billy' Anderson\",\n ...\n ],\n \"poster\": \"...jpg\",\n \"title\": \"The Great Train Robbery\",\n \"fullplot\": \"Among the earliest existing films in American cinema - notable as the ...\",\n \"languages\": [\n \"English\"\n ],\n \"released\": \"date\"\n },\n \"directors\": [\n \"Edwin S. Porter\"\n ],\n \"rated\": \"TV-G\",\n \"awards\": {\n \"wins\": 1,\n \"nominations\": 0,\n \"text\": \"1 win.\"\n },\n \"lastupdated\": \"2015-08-13 00:27:59.177000000\",\n \"year\": 1903,\n \"imdb\": {\n \"rating\": 7.4," 43 | }, 44 | "credentials": { 45 | "mongoDb": { 46 | "id": "8xGgiXzf2o0L4a0y", 47 | "name": "MongoDB account" 48 | } 49 | }, 50 | "typeVersion": 1.1 51 | }, 52 | { 53 | "id": "e0f248dc-22b7-40a2-a00e-6298b51e4470", 54 | "name": "Window Buffer Memory", 55 | "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow", 56 | "position": [ 57 | 1500, 58 | 540 59 | ], 60 | "parameters": { 61 | "contextWindowLength": 10 62 | }, 63 | "typeVersion": 1.2 64 | }, 65 | { 66 | "id": "da27ee52-43db-4818-9844-3c0a064bf958", 67 | "name": "When chat message received", 68 | "type": "@n8n/n8n-nodes-langchain.chatTrigger", 69 | "position": [ 70 | 1160, 71 | 400 72 | ], 73 | "webhookId": "0730df2d-2f90-45e0-83dc-609668260fda", 74 | "parameters": { 75 | "mode": "webhook", 76 | "public": true, 77 | "options": { 78 | "allowedOrigins": "*" 79 | } 80 | }, 81 | "typeVersion": 1.1 82 | }, 83 | { 84 | "id": "9ad79da9-3145-44be-9026-e37b0e856f5d", 85 | "name": "insertFavorite", 86 | "type": "@n8n/n8n-nodes-langchain.toolWorkflow", 87 | "position": [ 88 | 1860, 89 | 520 90 | ], 91 | "parameters": { 92 | "name": "insertFavorites", 93 | "workflowId": { 94 | "__rl": true, 95 | "mode": "list", 96 | "value": "6QuKnOrpusQVu66Q", 97 | "cachedResultName": "insertMongoDB" 98 | }, 99 | "description": "=Use this tool only to add favorites with the structure of {\"title\" : \"recieved title\" }" 100 | }, 101 | "typeVersion": 1.2 102 | }, 103 | { 104 | "id": "4d7713d1-d2ad-48bf-971b-b86195e161ca", 105 | "name": "AI Agent - Movie Recommendation", 106 | "type": "@n8n/n8n-nodes-langchain.agent", 107 | "position": [ 108 | 1380, 109 | 300 110 | ], 111 | "parameters": { 112 | "text": "=Assistant for best movies context, you have tools to search using \"MongoDBAggregate\" and you need to provide a MongoDB aggregation pipeline code array as a \"query\" input param. User input and request: {{ $json.chatInput }}. Only when a user confirms a favorite movie use the insert favorite using the \"insertFavorite\" workflow tool of to insertFavorite as { \"title\" : \"