by JPres
A Discord bot that responds to mentions by sending messages to n8n workflows and returning the responses. Connects Discord conversations with custom automations, APIs, and AI services through n8n. Full guide on: https://github.com/JimPresting/AI-Discord-Bot/blob/main/README.md Discord Bot Summary Overview The Discord bot listens for mentions, forwards questions to an n8n workflow, processes responses, and replies in Discord. This workflow is intended for all Discord users who want to offer AI interactions with their respective channels. What do you need? You need a Discord account as well as a Google Cloud Project Key Features 1. Listens for Mentions The bot monitors Discord channels for messages that mention it. Optional Configuration**: Can be set to respond only in a specific channel. 2. Forwards Questions to n8n When a user mentions the bot and asks a question: The bot extracts the question. Sends the question, along with channel and user information, to an n8n webhook URL. 3. Processes Data in n8n The n8n workflow receives the question and can: Interact with AI services (e.g., generating responses). Access databases or external APIs. Perform custom logic. n8n formats the response and sends it back to the bot. 4. Replies to Discord with n8n's Response The bot receives the response from n8n. It replies to the user's message in the Discord channel with the answer. Long Responses**: Handles responses exceeding Discord's 2000-character limit by chunking them into multiple messages. 5. Error Handling Includes error handling for: Issues with n8n communication. Response formatting problems. Manages cases where: No question is asked. An invalid response is received from n8n. 6. Typing Indicator While waiting for n8n's response, the bot sends a "typing..." indicator to the Discord channel. 7. Status Update For lengthy n8n processes, the bot sends a message to the Discord channel to inform the user that it is still processing their request. Step-by-Step Setup Guide as per Github Instructions Key Takeaways You’ll configure an n8n webhook to receive Discord messages, process them with your workflow, and respond. You’ll set up a Discord application and bot, grant the right permissions/intents, and invite it to your server. You’ll prepare your server environment (Node.js), scaffold the project, and wire up environment variables. You’ll implement message‐chunking, “typing…” indicators, and robust error handling in your bot code. You’ll deploy with PM2 for persistence and know how to test and troubleshoot common issues. 1. n8n: Create & Expose Your Webhook New Workflow Log into your n8n instance. Click Create Workflow (➕), name it e.g. Discord Bot Handler. Webhook Trigger Add a node (➕) → search Webhook. Set: Authentication: None (or your choice) HTTP Method: POST Path: e.g. /discord-bot Click Execute Node to activate. Copy Webhook URL After execution, copy the Production Webhook URL. You’ll paste this into your bot’s .env. Build Your Logic Chain additional nodes (AI, database lookups, etc.) as required. Format the JSON Response Insert a Function node before the end: return { json: { answer: "Your processed reply" } }; Respond to Webhook Add Respond to Webhook as the final node. Point it at your Function node’s output (with the answer field). Activate Toggle Active in the top‐right and Save. 2. Discord Developer Portal: App & Bot New Application Visit the Discord Developer Portal. Click New Application, name it. Go to Bot → Add Bot. Enable Intents & Permissions Under Privileged Gateway Intents, toggle Message Content Intent. Under Bot Permissions, check: Read Messages/View Channels Send Messages Read Message History Grab Your Token In Bot → click Copy (or Reset Token). Store it securely. Invite Link (OAuth2 URL) Go to OAuth2 → URL Generator. Select scopes: bot, applications.commands. Under Bot Permissions, select the same permissions as above. Copy the generated URL, open it in your browser, and invite your bot. 3. Server Prep: Node.js & Project Setup Install Node.js v20.x sudo apt purge nodejs npm sudo apt autoremove curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - sudo apt install -y nodejs node -v # Expect v20.x.x npm -v # Expect 10.x.x Project Folder mkdir discord-bot cd discord-bot Initialize & Dependencies npm init -y npm install discord.js axios dotenv 4. Bot Code & Configuration Environment Variables Create .env: nano .env Populate: DISCORD_BOT_TOKEN=your_bot_token N8N_WEBHOOK_URL=https://your-n8n-instance.com/webhook/discord-bot Optional: restrict to one channel TARGET_CHANNEL_ID=123456789012345678 Bot Script Create index.js: nano index.js Implement: Import dotenv, discord.js, axios. Set up client with MessageContent intent. On messageCreate: Ignore bots or non‐mentions. (Optional) Filter by channel ID. Extract and validate the user’s question. Send “typing…” every 5 s; after 20 s send a status update if still processing. POST to your n8n webhook with question, channelId, userId, userName. Parse various response shapes to find answer. If answer.length ≤ 2000, message.reply(answer). Else, split into ~1900‑char chunks at sentence/paragraph breaks and send sequentially. On errors, clear intervals, log details, and reply with an error message. Login client.login(process.env.DISCORD_BOT_TOKEN); 5. Deployment: Keep It Alive with PM2 Install PM2 npm install -g pm2 Start & Monitor pm2 start index.js --name discord-bot pm2 status pm2 logs discord-bot Auto‐Start on Boot pm2 startup Follow the printed command (e.g. sudo env PATH=$PATH:/usr/bin pm2 startup systemd -u your_user --hp /home/your_user) pm2 save 6. Test & Troubleshoot Functional Test In your Discord server: @YourBot What’s the weather like? Expect a reply from your n8n workflow. Common Pitfalls No reply → check pm2 logs discord-bot. Intent Errors → verify Message Content Intent in Portal. Webhook failures → ensure workflow is active and URL is correct. Formatting issues → confirm your Function node returns json.answer. Inspect Raw Data Search your logs for Complete response from n8n: to debug payload shapes. `
by Airtop
Automating LinkedIn Profile Discovery with Verification Use Case Accurately identifying and verifying a person’s LinkedIn profile is essential for prospecting, recruiting, or contact enrichment. This automation ensures high accuracy by combining search logic with optional profile validation. What This Automation Does This automation locates and verifies a LinkedIn profile using the following inputs: Person_info**: Any identifying information about the person (e.g., name, company, email). Airtop_profile**: Your Airtop Profile authenticated on LinkedIn, used for verifying the profile. How It Works Extracts a likely LinkedIn URL by performing a Google search using the provided person info. Validates the result (if Airtop Profile is provided): Visits the LinkedIn profile. Verifies match by checking the content (e.g., experience, role) against the person info. Returns a verified LinkedIn profile URL or "NA" if not found or not valid. Setup Requirements Airtop API Key Optional but recommended: an Airtop Profile authenticated on LinkedIn. Next Steps Combine with Email Lookup**: Use email-to-profile tools upstream to gather inputs. CRM Integration**: Automatically append LinkedIn profiles to contact records. Automate Outreach**: Use the verified URLs for personalized LinkedIn engagement workflows. Read more about how find and verify Linkedin profiles
by Hostinger
This n8n workflow template is designed to help system administrators and DevOps professionals monitor key resource usage metrics — CPU, RAM, and Disk — on a VPS (Virtual Private Server). The workflow automatically checks these resources every 15 minutes and sends an email alert if any resource usage exceeds the 80% threshold. This proactive monitoring helps maintain optimal server performance and prevents resource-related downtimes. Who This Workflow Is For • System Administrators managing Linux-based servers who need to ensure their systems are running smoothly without manual monitoring. • DevOps Professionals who manage multiple environments and need automated tools to alert them to potential issues before they affect operations. • IT Support Teams who require an easy way to keep tabs on server health across an organization’s infrastructure. How It Works Schedule Trigger: The workflow is triggered every 15 minutes by a Cron node. Resource Checks: Separate SSH Command nodes are configured to execute specific commands that check the current usage of RAM, Disk, and CPU. Data Aggregation: The results from each check are merged using a Merge node, which combines the data into a single payload for analysis. Threshold Analysis: A Function node evaluates whether any resource’s usage exceeds the predefined 80% threshold. Alerts: If any metric exceeds the threshold, an email alert is sent through an Email node, ensuring that administrators can react promptly to potential issues. Setup Steps Configure SSH Nodes: Update each SSH node with the appropriate credentials and target server details where the resource checks will be performed. Set Thresholds: If different sensitivity levels are required, review and adjust the resource usage thresholds within the Function node. Email Configuration: Enter the correct email addresses in the Email node for where alerts should be sent. Ensure that your email-sending credentials and server details are correctly configured.
by Mariano Kostelec
A fully automated content engine that researches, writes, scores, and visualizes LinkedIn posts — built with n8n, OpenAI, Perplexity, and Replicate. What it does: ✅ Researches any topic using real-time data ✅ Writes a personalized post in your voice ✅ Refines tone and structure ✅ Generates abstract, high-quality visual assets ✅ Scores the output and saves it to Google Sheets How it works: Triggered when you change a row status in Google Sheets Uses Perplexity to research GPT-4o (OpenAI) to create and polish content Replicate (FLUX Pro) to generate images Scores the post using heuristics Appends everything back to your sheet
by Yaron Been
Automated monitoring system that sends instant alerts when target companies make technology changes, delivered directly to your inbox or Slack. 🚀 What It Does Monitors technology stack changes Sends real-time email alerts Posts updates to Slack Tracks historical changes Filters by technology type 🎯 Perfect For Sales teams IT departments Competitive intelligence Technology vendors Market researchers ⚙️ Key Benefits ✅ Instant technology change alerts ✅ Multiple notification channels ✅ Historical tracking ✅ Customizable filters ✅ Team collaboration 🔧 What You Need BuiltWith API access Email service (SMTP/SendGrid) Slack workspace (optional) n8n instance 📊 Alerts Include Company name Technology changes Timestamp Impact assessment Direct links 🛠️ Setup & Support Quick Setup Get alerts in 15 minutes with our step-by-step guide 📺 Watch Tutorial 💼 Get Expert Support 📧 Direct Help Stay informed about technology changes that matter to your business with automated monitoring alerts and notifications.
by Mike Russell
Boost engagement on your Discord server by automatically sharing new YouTube videos along with AI generated summaries of their content. This workflow is ideal for content creators and community managers looking to provide value and spark interest through summarized content, making it easier for community members to decide if a video is of interest to them. Watch this video tutorial to learn more about the template. How it works RSS Feed Trigger**: Monitors your YouTube channel for new uploads using the RSS feed. Video Captions Retrieval**: Fetches video captions using the YouTube API to get detailed content data. AI Summary Generation**: Uses an AI model to generate concise summaries from the video captions, highlighting key points. Discord Notification**: Posts video announcements along with their AI generated summaries to a specified Discord channel using a webhook. Set up steps Configure YouTube RSS Feed: Set up the RSS feed node to detect new video uploads. Add your YouTube channel ID to the URL in the first node: https://www.youtube.com/feeds/videos.xml?channel_id=YOUR_CHANNEL_ID. Connect OpenAI Account: To enable AI summary generation, connect your OpenAI account in n8n. Set Up Discord Webhook: Create a webhook in your Discord server and configure it in the Discord node. Design the Message: Format the Discord message as you like to include the video title, link, and the AI generated summary. Example This template empowers you to maintain a highly engaging Discord community, ensuring members receive not only regular updates but also valuable insights into each video's content without needing to watch immediately.
by SamirLiu
📝 Overview This workflow leverages Google Gemini 2.0 Flash multimodal AI to automatically generate detailed descriptions of video content from any public URL. It streamlines video understanding, making it ideal for content cataloging, accessibility, and content moderation. 💡 Use Cases ♿ Accessibility: Automatically generate detailed video descriptions for visually impaired users. 🛡️ Content Moderation: Detect inappropriate or off-brand material without manual watching. 🗂️ Media Cataloging: Enrich your media library with automatically extracted metadata. 📈 Marketing & Branding: Gain fast insights into key elements, tone, and branding in video content. ⚙️ Setup Instructions 🔑 Get a Gemini API Key Register at ai.google.dev and create an API key. Before running the workflow, set your Gemini API key as an environment variable named GeminiKey for secure access within the workflow. In the Set Input node, reference this environment variable instead of hardcoding the key. 🌐 Configure Video URL Replace the sample URL in the Set Input node with your desired public video URL. Ensure the video is directly accessible (no login or special permissions required). 📝 Optional: Customize the Analysis Edit the prompt in the Analyze video Gemini node to focus on the most relevant video details for your use case (e.g., branding, key actions, visual elements). 🔒 Security Tip Use n8n's credentials manager or environment variables (like GeminiKey) to store your API key securely. Avoid hardcoding API keys directly in workflow nodes, especially in production environments. 🔄 How It Works 📥 Download the video from the provided URL. ☁️ Upload the video to Gemini’s server for processing. ⏳ Wait for Gemini to complete processing. 🤖 Analyze the video with Gemini AI using your customized prompt. 📄 Output a comprehensive description of the video as videoDescription. ⚡ Technical Details Uses HTTP Request nodes to interact with Gemini API endpoints. Handles file download, upload, status checking, and result retrieval. Customizable Gemini AI parameters for fine-tuned response. Main output: videoDescription (detailed text describing video content). 🚀 Quickstart Set your Gemini API key as the GeminiKey environment variable and configure your video URL in the workflow. Execute the workflow. Retrieve your rich, AI-generated video description for downstream use such as automation, tagging, or reporting.
by Davi Saranszky Mesquita
Use case Workshop We are using this workflow in our workshops to teach how to use Tools a.k.a functions with artificial intelligence. In this specific case, we will use a generic "AI Agent" node to illustrate that it could use other models from different data providers. Enhanced Weather Forecasting In this small example, it's easy to demonstrate how to obtain weather forecast results from the Open-Meteo site to accurately display the upcoming days. This can be used to plan travel decisions, for example. What this workflow does We will make an HTTP request to find out the geographic coordinates of a city. Then, we will make other HTTP requests to discover the weather for the upcoming days. In this workshop, we demonstrate that the AI will be able to determine which tool to call first—it will first call the geolocation tool and then the weather forecast tool. All of this within a single client conversation call. Setup Insert an OpenAI Key and activate the workflow. by Davi Saranszky Mesquita https://www.linkedin.com/in/mesquitadavi/
by Mujtaba
Overview This n8n workflow template automatically parses incoming Telegram transaction messages and logs structured data into a Google Sheet. It’s designed to help individuals and small businesses track and record transactions shared via Telegram without manual data entry. Target Audience This template is ideal for: Individuals, freelancers, and small businesses who receive transaction or payment notifications through Telegram and want to organize them in Google Sheets. Anyone using self-hosted n8n (required due to custom community nodes). Problem Solved Manually copying transaction details from Telegram to Google Sheets is error-prone and time-consuming. This workflow automates the process by: Monitoring a Telegram bot/chat for new messages. Parsing transaction details (amount, sender, date, etc.). Logging them in real-time into a Google Sheet for easy tracking. Setup Instructions Telegram Bot Setup Create a Telegram bot using BotFather. Add the bot to the desired group/channel and grant admin permissions if needed. Note down the bot token. Google Sheets Setup Create a Google Sheet with relevant columns (e.g., Date, Amount, Sender, Transaction ID). Set up Google Sheets credentials in n8n for access. n8n Workflow Configuration Import this template into your self-hosted n8n instance. Update the Telegram node: Add your bot token and specify the chat/group ID. Update the Google Sheets node: Link it to your created sheet and ensure column mapping matches your sheet structure. Adjust parsing logic if your message format varies (see next section for examples). Community Nodes This workflow uses custom community nodes. Ensure these are installed via the n8n settings or CLI: [List your required community nodes here, e.g., n8n-nodes-telegram, n8n-nodes-gsheet, etc.] Activate the Workflow Save and activate your workflow. Send a test transaction message to your Telegram group/chat and verify data appears in your Google Sheet. Troubleshooting If messages are not being picked up, check bot permissions and the chat ID. Ensure Google Sheets credentials are correct and the sheet is accessible. Double-check that custom nodes are properly installed and up-to-date. Example Telegram Message Formats Received: $75 from @john_doe on 2024-05-29. Transaction ID: 12345XYZ. Paid $120 to @vendor on 2024-05-28. Ref: 67890ABC. You received ₹5,000 from @amit. ID: 54321PQR. Date: 29/05/2024 The workflow parses messages in the above formats and logs the following columns: Date Amount Sender/Receiver Transaction/Reference ID If your message format differs, update the regex in the parsing node. Disclaimer This n8n workflow template uses custom community nodes and is only compatible with the self-hosted version of n8n. Workflow Changes (For n8n Canvas) Rename the Nodes: 'If' node → “Is Transaction Message?” 'Google Sheets' node → “Log to Google Sheet” (Rename other generic nodes for clarity, e.g., 'Telegram' → “Listen for Telegram Messages”, 'Function' → “Parse Transaction Details”) Sticky Note Improvement: (Edit the sticky note or add one if missing) Workflow Steps: Listen for Telegram Messages: This node receives new messages from the Telegram bot. Is Transaction Message? Checks if the message matches known transaction patterns. Parse Transaction Details: Extracts amount, sender, date, and transaction ID using regex. Log to Google Sheet: Records the parsed transaction in the linked Google Sheet for easy tracking.
by Promovaweb
When you collect leads from a form, you need to format the incoming data such as the lead's name and also apply a basic validation of the email entered. Lucky for us, N8N offers all of these features with simple expressions that can easily be applied to data. This workflow aims to show how you can process your lead data before saving it in Mautic. How it Works This workflow receives data from a Wordpress form; applies name formatting and basic validation to the email; Creates the contact in Mautic; If e-mail is invalid, add the lead in Dot Not Contact list. Setup Steps Set up credentials when you first open the workflow. You'll need a Mautic account. You need to configure a form in Wordpress (Elementor, WPForms, etc.) and send it to the N8N Webhook address; Now map the fields you need to apply formatting and validation. After testing your workflow, swap the Test URL to Production URL in Discourse and activate your workflow
by CreativeCreature
Workflow Overview This workflow automates the process of forwarding e-book files to a Kindle device using a Telegram bot and Outlook email. Setup Steps: Telegram Bot Setup: Create a Telegram bot via BotFather and configure its credentials in the workflow. Outlook Email Configuration: Set up your Outlook email credentials. (Currently, only Outlook is supported, but you can modify the workflow to support other email providers.) Amazon Kindle Email Setup: Find your Kindle device's email address from your Amazon account. This will be the recipient address for the e-books. Allow Email Sending to Kindle: Ensure your Amazon account is configured to allow emails from your Outlook address to send files to your Kindle. Workflow Explanation: The workflow begins with a Telegram bot trigger node that listens for new chat messages. When a new message is received, the workflow checks if the message contains a file attachment. If no file is detected, the bot will send a warning reply to the user in the chat. If a file is found, it will be renamed to ensure it appears correctly on the Kindle device when sent. The workflow then composes an email with the file attached and sends it to the Kindle's receiving address. If the email is sent successfully, the bot will notify the user with a success message in the chat. Only Amazon-supported file types will be accepted by Kindle. If sending fails, you will receive a notification email from Amazon in your Outlook inbox. In case of delivery issues, retry sending the file as network issues may occasionally interfere with the process.
by Angel Menendez
Who is this for? This subworkflow is ideal for developers and automation builders working with UniPile and n8n to automate message enrichment and LinkedIn lead routing. What problem is this workflow solving? UniPile separates personal and organization accounts into two different API endpoints. This flow handles both intelligently so you're not missing sender context due to API quirks or bad assumptions. What this workflow does This subworkflow is used by: LinkedIn Auto Message Router with Request Detection** LinkedIn AI Response Generator with Slack Approval** It receives a message sender ID and tries to enrich it using UniPile's /people and /organizations endpoints. It returns a clean, consistent profile object regardless of which source was used. Setup Generate a UniPile API token and save it in your n8n credentials Make sure this subworkflow is triggered correctly by your parent flows Test both people and organization lookups to verify responses are normalized How to customize this workflow to your needs Add a secondary enrichment layer using tools like Clearbit or FullContact Customize the fallback logic or error handling Expand the returned data for more AI context or user routing (e.g., job title, region)