### README Style Guide Table Format Source: https://github.com/enescingoz/awesome-n8n-templates/blob/main/CONTRIBUTING.md This table defines the expected format for columns in the README.md when listing templates. Adhere to these guidelines for consistency. ```markdown | Column | Format | |--------|--------| | Title | Full template name as it appears in n8n | | Description | 1-2 sentences explaining what the template does | | Department | The business function (e.g., Marketing, Support, Engineering, HR, Ops) | | Link | Relative path to the JSON file in the repository | ``` -------------------------------- ### Control Docker Services via n8n Webhook Source: https://context7.com/enescingoz/awesome-n8n-templates/llms.txt Use cURL commands to interact with n8n webhooks for starting or stopping Docker services. Ensure correct authentication and service names are used. Invalid actions will result in an error. ```bash curl -X POST \ -u "username:password" \ https://your-n8n-domain/webhook/docker/start/nextcloud ``` ```bash curl -X POST \ -u "username:password" \ https://your-n8n-domain/webhook/docker/stop/nextcloud ``` ```bash curl -X POST -u "username:password" \ https://your-n8n-domain/webhook/docker/restart/nextcloud ``` -------------------------------- ### WhatsApp Chatbot Webhook Verification (GET) Source: https://context7.com/enescingoz/awesome-n8n-templates/llms.txt This node handles the GET request for webhook verification by echoing the `hub.challenge` parameter. It's part of the setup for a WhatsApp Business API chatbot. ```json { "name": "Respond to Webhook", "type": "n8n-nodes-base.respondToWebhook", "parameters": { "respondWith": "text", "responseBody": "={{ $json.query['hub.challenge'] }}" } } ``` -------------------------------- ### Telegram AI Chatbot with Image Generation Source: https://context7.com/enescingoz/awesome-n8n-templates/llms.txt This n8n workflow creates a Telegram bot that supports free-form chat, a start message, and image generation via DALL-E. The Settings node configures model parameters and the system prompt, including language detection and response style. The image generation node uses the OpenAI resource for creating images. ```json { "name": "Settings", "type": "n8n-nodes-base.set", "parameters": { "values": { "number": [ { "name": "model_temperature", "value": 0.8 }, { "name": "token_length", "value": 500 } ], "string": [ { "name": "system_command", "value": "You are a friendly chatbot. User name is {{ $json?.message?.from?.first_name }}. Detect the user's language and reply in the same language. Include suitable emojis." }, { "name": "bot_typing", "value": "={{ $json?.message?.text.startsWith('/image') ? 'upload_photo' : 'typing' }}" } ] } } } ``` ```json { "name": "Create an image", "type": "n8n-nodes-base.openAi", "parameters": { "resource": "image", "prompt": "={{ $json.message.text.split(' ').slice(1).join(' ') }}", "options": { "n": 1, "size": "512x512" }, "responseFormat": "imageUrl" } } ``` -------------------------------- ### Importing n8n Templates via CLI and API Source: https://context7.com/enescingoz/awesome-n8n-templates/llms.txt Demonstrates how to download an n8n template JSON file and import it into an n8n instance using the command-line interface or the REST API. ```bash # Download a template from the repository curl -LO "https://raw.githubusercontent.com/enescingoz/awesome-n8n-templates/main/devops/linux-update-via-webhook.json" # Import via n8n CLI (self-hosted) n8n import:workflow --input=linux-update-via-webhook.json # Or via the n8n REST API curl -X POST http://localhost:5678/api/v1/workflows \ -H "Content-Type: application/json" \ -H "X-N8N-API-KEY: your-api-key" \ -d @linux-update-via-webhook.json # Expected response # {"id":"XGBwtopjOPIN0oNt","name":"Update Server","active":true,...} ``` -------------------------------- ### Contributing a New Template: Git Commands Source: https://context7.com/enescingoz/awesome-n8n-templates/llms.txt This section provides bash commands for contributing a new n8n template. It covers forking the repository, cloning locally, exporting the workflow, adding it to the correct category, and committing changes. ```bash # 1. Fork the repository and clone locally git clone https://github.com/your-username/awesome-n8n-templates.git cd awesome-n8n-templates # 2. Export your workflow from n8n (UI: Workflow menu → Download) # Place the JSON in the correct category folder cp ~/Downloads/my-workflow.json Gmail_and_Email_Automation/ # 3. Add a row to README.md in the appropriate category table # Format: # | Template Title | Brief 1-2 sentence description. | Department | [Link to Template](Category/File%20Name.json) | # 4. Validate the JSON is well-formed python3 -c "import json,sys; json.load(open('Gmail_and_Email_Automation/my-workflow.json'))" \ && echo "JSON valid" || echo "JSON invalid" # 5. Commit and open a pull request git add Gmail_and_Email_Automation/my-workflow.json README.md git commit -m "Add: AI-powered Gmail auto-responder workflow" git push origin main # Then open a PR at https://github.com/enescingoz/awesome-n8n-templates/pulls ``` -------------------------------- ### Add Template Row to README Source: https://github.com/enescingoz/awesome-n8n-templates/blob/main/CONTRIBUTING.md When adding a new template, update the category table in README.md with this row format. Ensure the link points to the correct JSON file. ```markdown | Template Title | Brief description of what it does. | Department | [Link to Template](Category_Folder/Template%20Name.json) | ``` -------------------------------- ### RAG Chatbot Retrieval and Chat Pipeline Source: https://context7.com/enescingoz/awesome-n8n-templates/llms.txt This configuration outlines the retrieval and chat pipeline for a RAG chatbot. It uses an AI chat trigger, an AI agent with a language model (gpt-4o-mini), a Qdrant retriever for semantic search, and window buffer memory. ```json // Retrieval + chat pipeline: // [Chat Trigger] → [AI Agent] // ↓ ai_languageModel: lmChatOpenAi (gpt-4o-mini) // ↓ ai_tool: Qdrant Retriever (semantic search over movie embeddings) // ↓ ai_memory: Window Buffer Memory // Output: "Based on your interest in sci-fi thrillers, I recommend 'Interstellar' (2014) — a mind-bending journey through space and time directed by Christopher Nolan." ``` -------------------------------- ### AI Agent for PostgreSQL Database Queries Source: https://context7.com/enescingoz/awesome-n8n-templates/llms.txt This AI agent interacts with a PostgreSQL database, using GPT-4o-mini and specialized tools for schema introspection and SQL execution. It's prompted to always schema-prefix table names in queries. ```json { "name": "AI Agent", "type": "@n8n/n8n-nodes-langchain.agent", "parameters": { "agent": "openAiFunctionsAgent", "options": { "systemMessage": "You are a DB assistant. Run queries aligned with user requests.\nMake sure every table has schema prefix in SQL queries (get schema from 'Get DB Schema and Tables List' tool)." } } } ``` ```json { "name": "Execute SQL Query", "type": "n8n-nodes-base.postgresTool", "parameters": { "query": "{{ $fromAI(\"sql_query\", \"SQL Query\") }}", "operation": "executeQuery", "toolDescription": "Get all data from Postgres. Always prefix tables with correct schema." } } ``` ```json { "name": "Get DB Schema and Tables List", "type": "n8n-nodes-base.postgresTool", "parameters": { "query": "SELECT table_schema, table_name FROM information_schema.tables WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog','information_schema') ORDER BY table_schema, table_name;", "toolDescription": "Get list of all tables with their schema in the database" } } ``` -------------------------------- ### AI Agent Chat with Web Search Source: https://context7.com/enescingoz/awesome-n8n-templates/llms.txt This AI agent uses GPT-4o-mini for language processing, SerpAPI for web searches, and a rolling window buffer for conversation memory. It's designed to be triggered by chat messages. ```json { "name": "AI Agent", "type": "@n8n/n8n-nodes-langchain.agent", "parameters": { "options": {} }, "typeVersion": 1.6 } ``` ```json { "connections": { "OpenAI Chat Model": { "ai_languageModel": [[{"node": "AI Agent", "type": "ai_languageModel", "index": 0}]] }, "Window Buffer Memory": { "ai_memory": [[{"node": "AI Agent", "type": "ai_memory", "index": 0}]] }, "SerpAPI": { "ai_tool": [[{"node": "AI Agent", "type": "ai_tool", "index": 0}]] }, "When chat message received": { "main": [[{"node": "AI Agent", "type": "main", "index": 0}]] } } } ``` -------------------------------- ### AI Label Assignment for Incoming Gmail Messages Source: https://context7.com/enescingoz/awesome-n8n-templates/llms.txt This n8n workflow polls Gmail, extracts message content, uses GPT-4 via LangChain to assign labels, and applies them to the email. The LLM chain node configures the prompt and AI model, while the structured output parser enforces valid label names. ```json { "name": "Assign labels for message", "type": "@n8n/n8n-nodes-langchain.chainLlm", "parameters": { "prompt": "={{ $json.text }}", "messages": { "messageValues": [{ "message": "Categorize the email using these labels:\nPartnership - sponsored/cooperation emails\nInquiry - questions about products/services\nNotification - emails that don't require a response\nReturn ONLY label names as JSON. One email may have multiple labels." }] } } } ``` ```json { "name": "JSON Parser", "type": "@n8n/n8n-nodes-langchain.outputParserStructured", "parameters": { "jsonSchema": "{\"type\":\"object\",\"properties\":{\"labels\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"Inquiry\",\"Partnership\",\"Notification\"]}}}}" } } ``` -------------------------------- ### Trigger Linux System Update via Webhook Source: https://context7.com/enescingoz/awesome-n8n-templates/llms.txt Triggers a system update on a remote Debian-based server via SSH using an authenticated HTTP POST request. Requires httpBasicAuth and sshPassword credentials in n8n. ```bash # Trigger a system update on the remote server curl -X POST \ -u "username:password" \ https://your-n8n-domain/webhook/update # Expected response (stdout from the server): # Hit:1 http://archive.ubuntu.com/ubuntu jammy InRelease # ... # 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. # Workflow node chain: # [Webhook (POST /update, basicAuth)] # → [SSH: sudo apt update && sudo apt upgrade -y] # → [Respond to Webhook: $json.stdout] ``` -------------------------------- ### WhatsApp Chatbot AI Agent Configuration Source: https://context7.com/enescingoz/awesome-n8n-templates/llms.txt This node configures the AI Agent for a WhatsApp chatbot. It extracts user messages from the Meta webhook payload and uses a LangChain conversational agent with a system prompt and vector store retriever. ```json { "name": "AI Agent", "type": "@n8n/n8n-nodes-langchain.agent", "parameters": { "agent": "conversationalAgent", "text": "={{ $('Respond').item.json.body.entry[0].changes[0].value.messages[0].text.body }}", "options": { "systemMessage": "You are an AI-powered assistant for an electronics store. Use the provided knowledge base to answer questions with precision and professionalism..." } } } ```