by Darsheel
This n8n workflow acts as an AI-powered Inbox Assistant that automatically summarizes and classifies Gmail emails, prioritizes important messages, and sends a daily digest to Slack. It’s ideal for startup founders and small teams juggling investor intros, customer leads, and support queries — all from a busy Gmail inbox. Each email is processed using ChatGPT to generate a concise summary, classify the message (e.g., Support, Investor, Spam), and determine its urgency. High and medium priority messages are forwarded to Slack instantly. Lower priority emails are logged to Google Sheets for review. A daily 7 PM digest summarizes the day’s most important messages. 💡 Use Cases Preventing missed investor or lead emails Lightweight CRM alternative using Google Sheets Slack summaries of critical Gmail activity 🔧 How It Works Gmail node fetches new messages ChatGPT summarizes and extracts urgency + type High/medium urgency → sent to Slack + labeled in Gmail Low urgency → logged in Google Sheets Cron node triggers a daily 7 PM Slack summary ✅ Requirements OpenAI API Key (GPT-4 or GPT-4o recommended) Gmail access with read and label permission Slack Bot Token or Webhook URL Google Sheets integration (optional) 🛠 Customization Ideas Replace Slack with Telegram or WhatsApp Route investor leads to Airtable or Notion Add multi-language support in ChatGPT prompt Create weekly summaries via email
by Dhrumil Patel
This n8n workflow template is designed to route user input to specialized agents (like a Reminder Agent, Email Agent, etc.) using a structured output from a language model. Here's a complete description of what it does and how each part works: 🔁 Workflow Purpose: This template receives a user's request via Webhook, processes it using an LLM, extracts structured data like the agent name and user query, and routes the input to the appropriate sub-workflow (agent) based on the specified agent type. 🧩 Workflow Breakdown: 1. Webhook (Trigger) Node: Webhook Purpose: Accepts a POST request from any frontend or API source. It contains the raw user input. 2. GPT Model (LLM Inference) Node: GPT 4o Mini Purpose: Interprets the user input and determines: Which agent should handle it (e.g., "Reminder Agent", "Email Agent", etc.) The actual user request (in structured format) 3. Auto-Fixing Output Parser Node: Auto-fixing Output Parser Purpose: Ensures that the output from the LLM matches the expected structure. If there's a mismatch, it automatically corrects it using a re-prompt. 4. Structured Output Parser Node: Structured Output Parser Purpose: Converts the language model's response into a strict JSON structure with keys like: "Agent Name" "user input" "sessionID" 5. Agent Router Node: Switch ("Agent Route") Purpose: Based on "Agent Name", it routes the input to one of the following sub-workflows: 📅 Reminder Agent 📧 Email Agent 🧾 Document Agent 🤝 Meeting Agent 6. Sub-Workflow Call (Execute Workflow) Each agent is implemented as a separate n8n workflow: The input is forwarded to the selected agent. For example, if "Agent Name" is "Reminder Agent", the workflow "Reminder Agent" is called with "user input". 7. Webhook Response After the sub-agent workflow finishes, a Respond to Webhook node sends the output back as an HTTP response. ✅ Key Features: Fully modular and extensible LLM-driven routing using OpenRouter GPT-4o Auto-corrects structured output errors Clean separation of concerns (agent logic is decoupled in sub-workflows) Easily add more agents by updating the switch logic 📦 Use Case Examples: User says: “Remind me to call my mom tomorrow.” → Routed to Reminder Agent User says: “Send an email to the HR team.” → Routed to Email Agent User says: “Schedule a meeting with John next week.” → Routed to Meeting Agent
by Usman Liaqat
This workflow listens for incoming WhatsApp messages that contain media (e.g., images) and automatically downloads the media file using WhatsApp's private media URL. The trigger node activates when a WhatsApp message with media is received. The media ID is extracted from the message payload. A private media URL is retrieved using the media ID. The media file is downloaded using an authenticated HTTP request. Ideal for: Archiving WhatsApp media to external systems. Triggering further automations based on received media. Integrating with cloud storage like Google Drive, Dropbox, or Amazon S3. Set up steps Connect your WhatsApp Business API account. Add HTTP credentials for downloading media via private URL. Set up the webhook in your WhatsApp Business account. Extend the workflow as needed for your use case (e.g., file storage, alerts).
by Pablo
Get Scaleway Server Info with Dynamic Filtering Description This workflow is designed for developers, system administrators, and DevOps engineers who need to retrieve and filter Scaleway server information quickly and efficiently. It gathers data from Scaleway instances and baremetal servers across multiple zones and is ideal for: Quickly identifying servers by tags, names, public IPs, or zones. Automating server status checks in production, staging, or test environments. Integrating Scaleway data into broader monitoring or inventory systems. High-Level Steps Webhook Trigger:** Receives an HTTP POST request (with basic authentication) containing the search criteria (search_by and search). Server Data Collection:** Fetches server data from Scaleway’s API endpoints for both instances and baremetal servers across defined zones. Data Processing:** Aggregates and normalizes the fetched data using a Code node with helper functions. Dynamic Filtering:** Routes data to dedicated filtering routines (by tags, name, public_ip, or zone) based on the input criteria. Response:** Returns the filtered data (or an error message) via a webhook response. Set Up Steps Insert Your Scaleway Token: In the “Edit Fields” node, replace the placeholder Your personal Scaleway X Auth Token with your Scaleway API token. Configure Zones: Review or update the zone lists (ZONE_INSTANCE and ZONE_BAREMETAL) to suit your environment. Send a Request: Make a POST request to the workflow’s webhook endpoint with a JSON payload, for example: { "search_by": "tags", "search": "Apiv1" } View the Results: The workflow returns a JSON array of servers matching your criteria, including details like name, tags, public IP, type, state, zone, and user.
by Jitesh Dugar
Customer Support Ticket Documentation Automation Automatically transform resolved support tickets into professional, AI-powered PDF documentation with complete tracking and team notifications. Overview This workflow automates the entire process of documenting resolved support tickets — from receiving ticket data to generating professional PDF case studies, storing them in Google Drive, tracking in spreadsheets, and notifying your team. Powered by AI, it creates consistent, high-quality documentation that can be reused for knowledge base articles, training materials, and compliance records. What This Workflow Does Receives resolved support tickets via webhook from your support platform Extracts and normalizes ticket data (works with Zendesk, Freshdesk, and custom formats) Generates AI-powered summaries using OpenAI GPT-4, creating structured case studies with: Problem description Troubleshooting steps taken Final resolution Key takeaways and prevention tips Creates professional PDF documents with branded HTML templates Uploads PDFs to organized Google Drive folders Tracks all tickets in a Google Sheets database for reporting and analytics Sends Slack notifications to your team with links to completed documentation Handles errors gracefully with automatic alerts when issues occur Key Features Fully Automated:** Zero manual intervention after setup AI-Powered Documentation:** Intelligent summaries that extract insights from raw ticket data Professional Output:** Branded, print-ready PDFs with modern styling Multi-Platform Support:** Works with any support tool that can send webhooks Centralized Tracking:** All tickets logged in Google Sheets for easy reporting Error Handling:** Built-in failure detection with Slack alerts Customizable:** Easy to brand with your company colors, logo, and styling Scalable:** Handles hundreds of tickets per day Use Cases Knowledge Base Building:** Automatically create searchable documentation from real support cases Team Training:** Build a library of resolved issues for onboarding new support agents Compliance & Audit:** Maintain complete records of all customer interactions Performance Analytics:** Track resolution times, common issues, and agent performance Customer Success:** Share professional case studies with stakeholders Process Improvement:** Identify recurring issues and optimize workflows Prerequisites Required Services & Accounts n8n** (self-hosted or cloud) OpenAI Account** with API access PDFMunk Account** (for HTML → PDF conversion) Google Workspace** (for Drive & Sheets) Slack Workspace** (optional but recommended) Support Platform** that can send webhooks (Zendesk, Freshdesk, Intercom, etc.) Required Credentials OpenAI API Key PDFMunk API Key Google Drive OAuth2 credentials Google Sheets OAuth2 credentials Slack Bot Token (OAuth2) Setup Instructions 1. Import the Workflow Copy the workflow JSON. In n8n, click “Import from File” or “Import from Clipboard.” Paste and import. 2. Configure Credentials OpenAI API Get API key from OpenAI Add in n8n: Credentials → OpenAI API → Paste key PDFMunk API Sign up at pdfmunk.com Copy API key → Add in Credentials → HtmlcsstopdfApi Google Drive OAuth2 Create project at Google Cloud Console Enable Drive API Create OAuth 2.0 credentials Add in n8n: Credentials → Google Drive OAuth2 → Connect Google Sheets OAuth2 Enable Google Sheets API in the same project Add in n8n: Credentials → Google Sheets OAuth2 → Connect Slack OAuth2 Create app at Slack API Add scopes: chat:write, chat:write.public Install to workspace Add bot token in Credentials → Slack OAuth2 API 3. Configure Node Settings Google Drive Folder ID Create a folder in Drive for PDFs Copy folder ID from the URL → https://drive.google.com/drive/folders/FOLDER_ID_HERE Paste in the “Upload to Google Drive” node Google Sheets Configuration Create a new sheet titled “Support Ticket Documentation Log.” Add these headers in Row 1: | Ticket ID | Subject | Customer Name | Customer Email | Agent Name | Priority | Category | Resolved Date | Resolution Time | PDF Link | Document Generated | Status | | --------- | ------- | ------------- | -------------- | ---------- | -------- | -------- | ------------- | --------------- | -------- | ------------------ | ------ | Copy Sheet ID from URL → https://docs.google.com/spreadsheets/d/SHEET_ID_HERE/edit Paste it in the “Update Google Sheets” node configuration. Slack Channel ID Right-click your Slack channel → View Channel Details Copy the Channel ID Update it in: “Send Slack Notification” node “Error – PDF Failed” node “Error – Upload Failed” node 4. Configure Webhook in Support Tool Activate the workflow in n8n Copy the Webhook URL from the “Webhook – Receive Ticket” node In Zendesk/Freshdesk: Trigger: “Ticket Status = Resolved” Method: POST Paste the n8n webhook URL Send ticket data as JSON 5. Test the Workflow Click “Execute Workflow” manually Send a test webhook Verify each step completes successfully Check: Generated PDF in Google Drive Row entry in Google Sheets Slack notification delivery How It Works Webhook Trigger → Receives resolved ticket Data Extraction → Normalizes ticket fields AI Summarization (OpenAI) → Generates structured summary HTML Formatting → Styles and adds branding PDF Conversion (PDFMunk) → Converts HTML → PDF Google Drive Upload → Saves and returns shareable link Sheets Logging → Appends ticket info + PDF link Slack Notification → Notifies team with summary Error Handling → Detects and reports failures Result → Clean, documented ticket case study in minutes Customization Branding Update company name, logo URL, and color scheme in the “Format HTML” node. Default color: #4CAF50 → Replace with your brand color. AI Prompt Customization Modify “AI Summarization (OpenAI)” node to add: Industry-specific terms Additional sections or insights Different summary tone or length Notification Customization Add @mentions or emojis in Slack messages for better visibility. Data Flow Webhook → Extract Data → AI Summary → Format HTML → Convert to PDF ↓ Download PDF → Upload to Drive → Log in Sheets → Notify Team ↓ Error Handling (if any) Expected Output PDF Document Includes: Branded header with company name/logo Resolution time badge Ticket metadata (ID, priority, customer, agent, etc.) Full AI-generated case study Professional footer with timestamp Google Sheets Entry: All ticket info Resolution metrics Direct PDF link Status = “Generated” Slack Notification: Summary of ticket Clickable PDF link Timestamp Performance Processing Time:** 10–20 seconds/ticket Capacity:** 100+ tickets/day PDF Size:** 50–300 KB Troubleshooting Webhook not triggering → Check webhook URL, trigger conditions, and public access. PDF generation fails → Verify HTML syntax and PDFMunk API key. Google Drive upload fails → Re-authenticate credentials or check folder permissions. Slack notification missing → Ensure bot token, scopes, and channel ID are valid. Data extraction errors → Adjust field mappings or inspect payload format. Best Practices Test before production rollout Monitor first-week error logs Organize Drive by date/priority Validate Sheets columns Use a dedicated Slack channel Archive old PDFs regularly Review AI summaries weekly Document configuration changes Security Notes All credentials stored securely in n8n PDF links are restricted by Drive sharing settings Webhooks use HTTPS for secure data transfer No sensitive info logged in error messages Future Enhancements Multi-language summaries Integration with Confluence or Notion Customer satisfaction feedback link ML-based issue categorization Analytics dashboard Weekly email digests Public knowledge base generation Support Resources n8n Documentation n8n Community OpenAI API Docs PDFMunk Support Google Drive API Slack API Docs License This workflow template is provided as-is for use with n8n under the MIT License.
by Ficky
This workflow contains community nodes that are only compatible with the self-hosted version of n8n. 🎉 n8n Workflow: Meetup Registration & Giveaway Picker This n8n workflow is designed to handle both participant registration and giveaway winner selection, fully integrated with a frontend experience. 📋 Participant Registration Flow This part of the workflow automates the registration process for meetup attendees. 🔄 Steps: 📝 Participant Form (Webhook Trigger) Triggered when a user submits the form. Captures fields like nama_lengkap, email, whatsapp, discord_username, and more. 🛠️ Data Mapping Maps raw form inputs into a structured format. Supports trimming, validation, and transformation as needed. 💾 Save to Database Performs an upsert operation to store participant info in PostgreSQL. Prevents duplicate entries based on unique ID (e.g., WhatsApp or email). ✅ Confirmation Screen Returns a success message or thank-you page after registration is complete. 🎁 Giveaway App This section serve frontend app to display and select random winners. 🔄 Steps: 🌐 Webhook GET (Giveaway App) Exposes a public endpoint that delivers a ready-to-use HTML app. Can be opened in a browser or projected during the event. 📥 Fetch Participants Executes a SQL query to retrieve all participant records from the database. 🧮 Format Participant Data Redacts personal details (e.g., masks WhatsApp numbers). Encodes the id using Base64 for privacy and uniqueness. 📤 Render Giveaway App Returns an HTML-based Single Page Application with the participant list included. Allows the host to click a button to pick random winners live. ✅ Use Case Highlights Streamlined participant collection and storage using n8n workflows Secure data handling with redaction and ID encoding Frontend integration for a fun, interactive giveaway experience Reusable for other community events, workshops, or internal team draws
by Eduard
Are you a visual thinker working with n8n? 🎨 View and understand workflow structures at a glance with this template! Built with mermaid.js, Bootstrap 5 and AXAJ to create an interactive web page displaying n8n workflows as flowcharts. 🌟 Perfect for documentation, presentations, or just getting a clearer picture of your automation processes. Need customization help? Reach out to Eduard! Benefits 📊 Instant workflow visualization 📱 Responsive design 🔗 Direct links to n8n workflows 🧩 Special shapes for different node types 🚫 Disabled node indication 🔒 No external dependencies – just paste the workflow and call the webhook 🛠️ Easily customizable – enhance the JS script or add custom styling ⚠️ Important note for cloud users ⚠️ Since the cloud version doesn't support environmental variables, please make the following changes in the CONFIG node: Update the instance_url variable: Enter your n8n URL instead of {{$env["N8N_PROTOCOL"]}}://{{$env["N8N_HOST"]}} Change the webhook_path to simply "webhook" instead of {{$env["N8N_ENDPOINT_WEBHOOK"] || "webhook"}} 🌟 Examples Multiple flowcharts on a single page: Several shapes for different nodes: Langchain nodes with special connections styling:
by Don Jayamaha Jr
Get deep insights into NFT market trends, sales data, and collection statistics—all powered by AI and OpenSea! This workflow connects GPT-4o-mini, OpenSea API, and n8n automation to provide real-time analytics on NFT collections, wallet transactions, and market trends. It is ideal for NFT traders, collectors, and investors looking to make informed decisions based on structured data. How It Works Receives user queries via Telegram, webhooks, or another connected interface. Determines the correct API tool based on the request (e.g., collection stats, wallet transactions, event tracking). Retrieves data from OpenSea API (requires API key). Processes the information using an AI-powered analytics agent. Returns structured insights in an easy-to-read format for quick decision-making. What You Can Do with This Agent 🔹 Retrieve NFT Collection Stats → Get floor price, volume, sales data, and market cap. 🔹 Track Wallet Activity → Analyze transactions for a given wallet address. 🔹 Monitor NFT Market Trends → Track historical sales, listings, bids, and transfers. 🔹 Compare Collection Performance → View side-by-side market data for different NFT projects. 🔹 Analyze NFT Transaction History → Check real-time ownership changes for any NFT. 🔹 Identify Market Shifts → Detect sudden spikes in demand, price changes, and whale movements. Example Queries You Can Use ✅ "Get stats for the Bored Ape Yacht Club collection." ✅ "Show me all NFT sales from the last 24 hours." ✅ "Fetch all NFT transfers for wallet 0x123...abc on Ethereum." ✅ "Compare the last 3 months of sales volume for Azuki and CloneX." ✅ "Track the top 10 wallets making the most NFT purchases this week." Available API Tools & Endpoints 1️⃣ Get Collection Stats → /api/v2/collections/{collection_slug}/stats (Retrieve NFT collection-wide market data) 2️⃣ Get Events → /api/v2/events (Fetch global NFT sales, transfers, listings, bids, redemptions) 3️⃣ Get Events by Account → /api/v2/events/accounts/{address} (Track transactions by wallet) 4️⃣ Get Events by Collection → /api/v2/events/collection/{collection_slug} (Get sales activity for a collection) 5️⃣ Get Events by NFT → /api/v2/events/chain/{chain}/contract/{address}/nfts/{identifier} (Retrieve historical transactions for a specific NFT) Set Up Steps Get an OpenSea API Key Sign up at OpenSea API and request an API key. Configure API Credentials in n8n Add your OpenSea API key under HTTP Header Authentication. Connect the Workflow to Telegram, Slack, or Database (Optional) Use n8n integrations to send alerts to Telegram, Slack, or save results to Google Sheets, Notion, etc. Deploy and Test Send a query (e.g., "Azuki latest sales") and receive instant NFT market insights! Stay ahead in the NFT market—get real-time analytics with OpenSea’s AI-powered analytics agent!
by Davide
This workflow integrates a chatbot frontend with a backend powered by Langflow, a visual low-code AI development tool. The flow is triggered whenever a chat message is received via the n8n chatbot widget embedded on a website. It then sends the message to a Langflow flow for processing and returns the generated response to the user. How It Works Chat Trigger: The workflow starts with a webhook trigger (When chat message received) that listens for incoming chat messages from the n8n Chat interface. Langflow Integration: The chat input is sent to a Langflow instance via an HTTP request (Langflow node). The request includes the user's message and expects a response from the Langflow flow. Response Processing: The output from Langflow is extracted and formatted using the Edit Fields node, ensuring the chatbot displays the response correctly. Customization: Sticky notes provide instructions for embedding the n8n Chat widget on a website and customizing its appearance, including welcome messages, language settings, and branding. Set Up Steps Configure Langflow Connection: Replace LANGFLOW_URL and FLOW_ID in the HTTP request node with your Langflow instance details. Ensure the API headers (e.g., Content-Type: application/json) and authentication (if required) are correctly set. Deploy n8n Chat: Add the provided CDN script to your website, replacing YOUR_PRODUCTION_WEBHOOK_URL with the webhook URL generated by the When chat message received node. Customize the chatbot’s UI (e.g., title, placeholder text, initial messages) using the JavaScript snippet in the sticky notes. Activate Workflow: Toggle the workflow to "Active" in n8n. Test the chatbot by sending a message and verifying the Langflow response is processed and displayed correctly. Advantages ✅ Seamless Langflow Integration It allows n8n to communicate directly with a Langflow flow via API, enabling AI responses using custom-designed Langflow logic. ✅ No-Code Chatbot Deployment With just a script snippet, the chatbot widget can be embedded into any website. Minimal coding is required to launch a fully functioning AI chatbot. ✅ Customizable UI/UX The included embed code offers full control over the chatbot's appearance, language, welcome message, input placeholder, and branding—ideal for white-label or customer-facing deployments. ✅ Modular and Extensible Because it's built in n8n, this chatbot can be easily extended with other services like CRMs, email alerts, or databases, without leaving the platform. ✅ Real-Time AI Interactions Thanks to Langflow's API and chat response support, users get immediate and dynamic AI-driven replies. Need help customizing? Contact me for consulting and support or add me on Linkedin.
by Charles
Modern AI systems are powerful but pose privacy risks when handling sensitive data. Organizations need AI capabilities while ensuring: ✅ Sensitive data never leaves secure environments ✅ Compliance with regulations (GDPR, HIPAA, PCI, SOX) ✅ Real-time decision making about data sensitivity ✅ Comprehensive audit trails for regulatory review The Concept: Intelligent Data Classification + Smart Routing The goal of this concept is to build the foundations of the safe and compliant use of LLMs in Agentic workflows by automatically detecting sensitive data, applying sanitization rules, and intelligently routing requests through secure processing channels. This workflow will analyze the user's chat or webhook input and attempt to detect PII using the Enhanced PII Pattern Detector. If detected, the workflow will process that input via a series of Compliance, Auditing, and Security steps which log and sanitizes the request prior to any LLM being pinged. Why Multi-Tier Routing? Traditional systems use binary decisions (sensitive/not sensitive). Our 3-tier approach provides: ✅ Granular Security: Critical PII gets maximum protection ✅ Performance Optimization: Clean data gets full cloud capabilities ✅ Cost Efficiency: Expensive local processing only when needed ✅ User Experience: Maintains conversational flow across security levels Why Context-Aware Detection? Regex patterns alone miss contextual sensitivity. Our approach: ✅ Catches Intent: "Bank account" discussion is sensitive even without account numbers ✅ Reduces False Negatives: Medical discussions stay secure even without explicit medical IDs ✅ Proactive Protection: Identifies sensitive contexts before PII is shared ✅ Compliance Alignment: Matches how regulations actually define sensitive data Why Risk Scoring vs Binary Classification? Binary PII detection creates artificial boundaries. Risk scoring provides: ✅ Nuanced Decisions: Multiple low-risk patterns might aggregate to high risk ✅ Adaptive Thresholds: Organizations can adjust sensitivity based on their needs ✅ Better UX: Users aren't unnecessarily restricted for low-risk scenarios ✅ Audit Transparency: Clear reasoning for every routing decision Why Comprehensive Monitoring? Privacy systems require trust and verification: ✅ Compliance Proof: Audit trails demonstrate regulatory compliance ✅ Performance Optimization: Identify bottlenecks and improve efficiency ✅ Security Validation: Ensure no sensitive data leakage occurs ✅ Operational Insights: Understand usage patterns and system health How to Install: All that you will need for this workflow are credentials for your LLM providers such as Ollama, OpenRouter, OpenAI, Anthropic, etc. This workflow is customizable and allows the user to define the best LLM and storage/memory solutions for their specific use case.
by Fady Bekkar
This automation allows you to track feature requests in Notion, create GitHub issues automatically, and notify your team via email based on issue status. It's ideal for technical and functional teams who collaborate on project delivery using Notion and GitHub. 🔹 SECTION 1: Detect and Sort Issues from Notion Combining: Schedule Trigger + Notion Database + Field Mapping + Status Routing ⏰ 1. Schedule Trigger 🔧 Node Type: Schedule Trigger (you can use a webhook trigger if you are on Notion paid plan) 💬 Description: Triggers the workflow every X minutes to check for new or updated Notion database pages. 📑 2. Get Many Database Pages (Notion) 🔧 Node Type: Notion → Get All Database Pages 📋 What it does: Fetches all rows (pages) from a Notion database that represents tasks or feature requests. ✏️ 3. Sort Issues Fields 🔧 Node Type: Set 📋 Goal: Restructures or cleans data fields such as Title, Status, Labels, and Repository. 🔀 4. Switch: Issue Status Decision 🔧 Node Type: Switch 🎯 What it does: Separates logic based on the Status of the Notion item: If status is "To develop" → proceed to create issue Else → send notification to the team 🔹 SECTION 2: GitHub Issue Creation (IF "To develop") Combining: GitHub Node + Notion Update 🐙 5. Create an Issue (GitHub) 🔧 Node Type: GitHub → Create Issue ⚙️ What it does: Creates a new issue on the GitHub repo defined in the Notion row. 📥 Inputs: Uses dynamic fields: Title, Description, Labels, Repository. 🧩 6. Set Status and Issue URL (Notion Update) 🔧 Node Type: Notion → Update Database Page 🧠 Role: Updates the status of the issue in Notion to In progress and stores the created GitHub Issue URL. 🔹 SECTION 3: Notify Team on Already In-Progress Items (IF NOT "To develop") Combining: Notion Users + Filtering + Email Grouping + Gmail 👥 7. Get Many Users (Notion Users) 🔧 Node Type: Notion → Get All Users 📥 What it does: Retrieves the list of team members (to be notified). 🧠 8. Map Notion Users 🔧 Node Type: Set 📋 Role: Maps and formats data for each user (e.g., Name, Email, Role). 🧹 9. Exclude Bot 🔧 Node Type: Switch 🚫 What it does: Excludes automation/bot users (e.g., notifications@noreply). 🧮 10. Group Recipients 🔧 Node Type: Aggregate 🎯 Goal: Collects all user emails into a single array to send one email to all recipients. 📬 11. Send a Message (Gmail) 🔧 Node Type: Gmail → Send Email
by Angel Menendez
Video Demo: Click here to see a video of this workflow in action. Summary Description: The "IT Department Q&A Workflow" is designed to streamline and automate the process of handling IT-related inquiries from employees through Slack. When an employee sends a direct message (DM) to the IT department's Slack channel, the workflow is triggered. The initial step involves the "Receive DMs" node, which listens for new messages. Upon receiving a message, the workflow verifies the webhook by responding to Slack's challenge request, ensuring that the communication channel is active and secure. Once the webhook is verified, the workflow checks if the message sender is a bot using the "Check if Bot" node. If the sender is identified as a bot, the workflow terminates the process to avoid unnecessary actions. If the sender is a human, the workflow sends an acknowledgment message back to the user, confirming that their query is being processed. This is achieved through the "Send Initial Message" node, which posts a simple message like "On it!" to the user's Slack channel. The core functionality of the workflow is powered by the "AI Agent" node, which utilizes the OpenAI GPT-4 model to interpret and respond to the user's query. This AI-driven node processes the text of the received message, generating an appropriate response based on the context and information available. To maintain conversation context, the "Window Buffer Memory" node stores the last five messages from each user, ensuring that the AI agent can provide coherent and contextually relevant answers. Additionally, the workflow includes a custom Knowledge Base (KB) tool (see that tool template here) that integrates with the AI agent, allowing it to search the company's internal KB for relevant information. After generating the response, the workflow cleans up the initial acknowledgment message using the "Delete Initial Message" node to keep the conversation thread clean. Finally, the generated response is sent back to the user via the "Send Message" node, providing them with the information or assistance they requested. This workflow effectively automates the IT support process, reducing response times and improving efficiency. To quickly deploy the Knowledge Ninja app in Slack, use the app manifest below and don't forget to replace the two sample urls: { "display_information": { "name": "Knowledge Ninja", "description": "IT Department Q&A Workflow", "background_color": "#005e5e" }, "features": { "bot_user": { "display_name": "IT Ops AI SlackBot Workflow", "always_online": true } }, "oauth_config": { "redirect_urls": [ "Replace everything inside the double quotes with your slack redirect oauth url, for example: https://n8n.domain.com/rest/oauth2-credential/callback" ], "scopes": { "user": [ "search:read" ], "bot": [ "chat:write", "chat:write.customize", "groups:history", "groups:read", "groups:write", "groups:write.invites", "groups:write.topic", "im:history", "im:read", "im:write", "mpim:history", "mpim:read", "mpim:write", "mpim:write.topic", "usergroups:read", "usergroups:write", "users:write", "channels:history" ] } }, "settings": { "event_subscriptions": { "request_url": "Replace everything inside the double quotes with your workflow webhook url, for example: https://n8n.domain.com/webhook/99db3e73-57d8-4107-ab02-5b7e713894ad", "bot_events": [ "message.im" ] }, "org_deploy_enabled": false, "socket_mode_enabled": false, "token_rotation_enabled": false } }