by nero
How it works This template uses the n8n AI agent node as an orchestrating agent that decides which tool (knowledge graph) to use based on the user's prompt. How to use Create an account and apply for an API key on https://ai.nero.com/ai-api?utm_source=n8n-base-workflow. Fill your key into the Create task and Query task status nodes. Select an AI service and modify Create task node parameters, the API doc: https://ai.nero.com/ai-api/docs. Execute the workflow so that the webhook starts listening. Make a test request by postman or other tools, the test URL from the Webhook node. You will receive the output in the webhook response. Our API doc Please create an account to access our API docs. https://ai.nero.com/ai-api/docs. Use cases Large Scale Printing Upscale images into ultra-sharp, billboard-ready masterpieces with 300+ DPI and billions of pixels. Game Assets Compression Improve your game performance with AI-Image Compression: Faster, Better & Lossless. E-commerce Image Editing Remove & replace your product image backgrounds, create virtual showrooms. Photo Retouching Remove & reduce grains & noises from images. Face Animation Transform static images into dynamic facial expression videos or GIFs with our cutting-edge Face Animation API Photo Restoration Our Al-driven Photo Restoration API offers advanced scratch removal, face enhancement, and image upscaling. Colorize Photo Transform black & white images into vivid colors. Avatar Generator Turn your selfie into custom avatars with different styles and backgrounds Website Compression Speed up your website, compress your images in bulk.
by RedOne
This workflow is designed for e-commerce store owners, operations managers, and developers who use Shopify as their e-commerce platform and want an automated way to track and analyze their order data. It is particularly useful for businesses that: Need a centralized view of all Shopify orders Want to analyze order trends without logging into Shopify Need to share order data with team members who don't have Shopify access Want to build custom reports based on order information What Problem Is This Workflow Solving? While Shopify provides excellent order management within its platform, many businesses need their order data available in other systems for various purposes: Data accessibility**: Not everyone in your organization may have access to Shopify's admin interface Custom reporting**: Google Sheets allows for flexible analysis and report creation Data integration**: Having orders in Google Sheets makes it easier to combine with other business data Backup**: Creates an additional backup of your critical order information What This Workflow Does This n8n workflow creates an automated bridge between your Shopify store and Google Sheets: Listens for new order notifications from your Shopify store via webhooks Processes the incoming order data and transforms it into a structured format Stores each new order in a dedicated Google Sheets spreadsheet Sends real-time notifications to Telegram when new orders are received or errors occur Setup Create a Google Sheet Create a new Google Sheet to store your orders Add a sheet named "orders" with the following columns: orderId orderNumber created_at processed processed_at json customer shippingAddress lineItems totalPrice currency Set Up Telegram Bot Create a Telegram bot using BotFather (send /newbot to @BotFather) Save your bot token for use in n8n credentials Start a chat with your bot and get your chat ID (you can use @userinfobot) Configure the Workflow Set your Google Sheet ID in the "Edit Variables" node Enter your Telegram chat ID in the "Edit Variables" node Set up your Telegram API credentials in n8n Configure Shopify Webhook In your Shopify admin, go to: Settings > Notifications > Webhooks Create a new webhook for "Order creation" Set the URL to your n8n webhook URL (from the "Receive New Shopify Order" node) Set the format to JSON How to Customize This Workflow to Your Needs Additional data**: Modify the "Transform Order Data to Standard Format" function to extract more Shopify data Multiple sheets**: Duplicate the Google Sheets node to store different aspects of orders in separate sheets Telegram messages**: Customize the text in Telegram nodes to include more details or rich formatting Data processing**: Add nodes to perform calculations or transformations on order data Additional notifications**: Add more channels like Slack, Discord, or SMS Integrations**: Extend the workflow to send order data to other systems like CRMs, ERPs, or accounting software Final Notes This workflow serves as a foundation that you can build upon to create a comprehensive order management system tailored to your specific business needs.
by Alex Kim
Automate Video Creation with Luma AI Dream Machine and Airtable (Part 1) Description This workflow automates video creation using Luma AI Dream Machine and n8n. It generates dynamic videos based on custom prompts, random camera motion, and predefined settings, then stores the video and thumbnail URLs in Airtable for easy access and tracking. This automation makes it easy to create high-quality videos at scale with minimal effort. 👉 Airtable Base Template 🎥 Tutorial Video Setup 1. Luma AI Setup Create an account with Luma AI. Generate an API key from Luma AI for authentication. Ensure the API key has permission to create and manage video requests. 2. Airtable Setup Create an Airtable base with the following fields: Generation ID** – To match incoming webhook data. Status** – Workflow status (e.g., "Done"). Video URL** – Stores the generated video URL. Thumbnail URL** – Stores the thumbnail URL. Prompt** – The video prompt used in the request. Aspect Ratio** – Defines the video format (e.g., 9:16). Duration** – Length of the video. 👉 Use the Airtable template linked above to simplify setup. 3. n8n Setup Install n8n (local or cloud). Set up Luma AI and Airtable credentials in n8n. Import the workflow and customize the settings based on your needs. How It Works 1. Global Settings Configuration The Set node defines key settings such as: Prompt** – Example: "A crocheted parrot in a crocheted pirate outfit swinging on a crocheted perch." Aspect Ratio** – Example: "9:16" Loop** – Example: "true" Duration** – Example: "5 seconds" Cluster ID** – Used to group related videos for easy tracking. Callback URL** - Used for the Webhook workflow in Part 2 2. Random Camera Motion The Code node randomly selects a camera motion (e.g., Zoom In, Pan Left, Crane Up) to create dynamic and visually engaging videos. 3. API Request to Luma AI The HTTP Request node sends a POST request to Luma AI’s API with the following parameters: Prompt – Uses the defined global settings. Aspect Ratio – Matches the target platform (e.g., TikTok or YouTube). Duration – Length of the video. Loop – Determines if the video should loop. Callback URL – Sends a POST response when the video is complete. 4. Capture API Response Luma AI sends a POST response to the callback URL once video generation is complete. The response includes: Video URL – Direct link to the video. Thumbnail URL – Link to the video thumbnail. Generation ID – Used to match the record in Airtable. 5. Store in Airtable The Airtable node updates the record with the video and thumbnail URLs. Generation ID** is crucial for matching future webhook responses to the correct video record. Why This Workflow is Useful ✅ Automates high-quality video creation ✅ Reduces manual effort by handling prompt generation and API calls ✅ Random camera motion makes videos more dynamic ✅ Ensures organized tracking with Airtable ✅ Scalable – Ideal for automating large-scale content creation Next Steps Part 2** – Handling webhook responses and updating Airtable automatically. Future Enhancements** – Adding more camera motions, multi-platform support, and automated video editing.
by OneClick IT Consultancy P Limited
Automate Customer Feedback Analysis with Google Sheets, WhatsApp, and Email Introduction: Drowning in Data, Starving for Insight? Imagine this: Your team launches a new feature. Feedback starts pouring in emails, support tickets, social media mentions, and survey responses. You know gold is buried in there, but manually reading, tagging, and summarising hundreds, maybe thousands, of comments? It takes days, maybe weeks. By the time you have a clear picture, the moment might have passed. Sounds exhausting, right? What if you could have an AI assistant tirelessly working 24/7, instantly analysing every piece of feedback the moment it arrives? This isn't science fiction anymore. AI-powered automation can transform this slow, manual chore into a real-time insight engine, giving you the pulse of your customer base almost instantly. Let's explore how. What's the Goal? Understanding the Workflow Objective The core challenge is transforming raw, unstructured customer feedback into actionable intelligence quickly and efficiently. The Problem: Manual Overload: Sifting through vast amounts of feedback manually is incredibly time-consuming and prone to human error or bias. Delayed Insights: The lag between receiving feedback and understanding it means missed opportunities and slow responses to critical issues. Inconsistent Analysis: Different team members might interpret or categorize feedback differently, leading to unreliable trend spotting. The AI Solution: Automated Data Collection: Connects directly to feedback sources (surveys, social media, review sites, helpdesks). AI-Powered Analysis: Uses Large Language Models (LLMs) like GPT-4 or Claude to analyze sentiment, extract key topics, and summarize comments. Intelligent Categorization: Automatically tags feedback based on predefined or dynamically identified themes (e.g., "bug report," "feature request," "pricing issue"). Real-time Reporting: Pushes structured insights into dashboards, databases, or triggers notifications for immediate awareness. Outcome: You move from reactive problem-solving based on stale data to proactive, strategic decisions driven by a near real-time understanding of customer sentiment and needs. Why Does It Matter? Achieving 100X Productivity and Efficiency Look, automating feedback isn't just about saving time; it's about scaling your ability to listen and respond smarter, not harder. When you leverage AI, the gains aren't incremental - they're exponential. Here’s why this is a game changer: Blazing Speed: Analyse feedback 100x Faster (or more!) than manual methods. Insights appear in minutes or hours, not days or weeks. Unhuman Scalability: Process virtually unlimited volumes of feedback without needing to scale your human team proportionally. AI doesn't get tired or bored. Consistent Accuracy: AI applies analysis rules consistently, reducing human bias and ensuring reliable categorisation and sentiment scoring over time. Proactive Trend Spotting: Identify emerging issues or popular requests much earlier by analysing aggregated data automatically. Spot patterns humans might miss. Free Up Your Team: Let your talented team focus on acting on insights – improving products, fixing issues, engaging customers – instead of drowning in data entry. How It Works: AI Automation Step by Step Getting this set up is more straightforward than you might think, especially with tools like n8n acting as the central hub. Automated Feedback Triggering CRM/Website Event Node Trigger feedback requests after: Purchases (eCommerce) Support ticket resolution Feature usage (SaaS) Time-Based Node Schedule recurring NPS surveys Customer health check-ups Chat App Node (WhatsApp/Telegram/Messenger) Send conversational feedback prompts: "How was your recent experience with [specific interaction]?" Multi-Channel Feedback Collection Email Node (SendGrid/Mailchimp) Send personalized feedback requests Embed 1-5 rating widgets SMS Node (Twilio) Short mobile surveys: "Reply 1-5: How satisfied with your purchase?" Webhook Node Capture in-app feedback Process chatbot responses Social Media Node Monitor Twitter/X, Instagram mentions Analyze comments for unsolicited feedback AI-Powered Real-Time Analysis OpenAI/ChatGPT Node (Sentiment Analysis) Prompt: "Analyze sentiment (positive/neutral/negative) and key themes from: [customer feedback]" Output fields: Sentiment score (1-5) Urgency flag (high/medium/low) Key topics (billing, support, product, etc.) Translation Node (Optional) Convert multilingual feedback into a consistent language Instant AI Response System Conditional Node (Routing Logic) Positive feedback → Send thank-you + referral ask Neutral feedback → Follow-up question for details Negative feedback → Escalate to the human team AI Response Generator Node Prompt: "Create a personalized response to [feedback type] about [topic] with sentiment [score]" Adjust tone (professional/friendly/empathetic) Escalation Node Route critical issues to the support team with full context Automated Insights & Alerts Dashboard Node Real-time sentiment tracking Emerging issue detection Alert Node (Slack/Teams/Email) Notify teams of negative trends: "3+ complaints about checkout flow in the past hour!" Report Node Auto-generate weekly/monthly summaries: "Top 5 customer pain points this week" Product Board Integration Auto-create feature requests Prioritize based on feedback volume Tools of the Trade: AI & Automation Tech Stack You don't need a massive, complex tech stack. Focus on a few core, powerful tools: n8n: The workflow automation platform. This is the 'glue' that connects everything and orchestrates the process without needing deep coding knowledge. Honestly, it's incredibly versatile. OpenAI (GPT-4/GPT-4o): State-of-the-art LLM for high-quality text analysis, summarization, and classification. Great for complex understanding. Anthropic (Claude 3 Sonnet/Opus): Another top-tier LLM, known for strong performance in analysis and handling large contexts. Often, a great alternative or complement to GPT models. Feedback Sources APIs: Connectors for where your feedback lives (e.g., Typeform, SurveyMonkey, Twitter API, Zendesk API, Google Play/App Store review APIs). Data Storage/Destination: Where the processed insights go (e.g., Google Sheets, Airtable, Notion, PostgreSQL database, BigQuery). (Optional) Visualization Tool: Tools like Metabase, Grafana, Looker Studio, or Power BI to create dashboards from your structured feedback data. What's the Cost? Estimated Budget Let's talk investment. You're mainly looking at: Setup Costs: Primarily your time (or a consultant's) to design and build the initial workflow in n8n. Depending on complexity, this could range from a few hours to a few days. No major software licenses are usually needed upfront if using self-hosted n8n or starting with free/low-tier cloud plans. AI API Calls: You pay per usage to OpenAI/Anthropic. Costs depend heavily on volume but can start from $20-$50/month for moderate usage and scale up. Newer models are getting more cost-effective. n8n Hosting: Free if self-hosted (requires a server), or tiered cloud pricing starting around $20/month. Feedback Source APIs: Some platforms might have API access costs or rate limits on free tiers. Total Estimated Monthly Cost: For many businesses, ongoing costs can range from $50 - $500+ per month, highly dependent on feedback volume and AI model choice. The Return on Investment (ROI) is typically rapid. Consider the hours saved from manual analysis, the value of faster issue resolution, preventing churn, and the benefits of making product decisions based on real-time data. It often pays for itself very quickly. Who Benefits? Target Users and Industries This automated feedback loop isn't niche; it's valuable across many sectors and roles: Top Industries: SaaS (Software as a Service): Understanding user friction, feature requests, bug reports. E-commerce & Retail: Analyzing product reviews, post-purchase surveys, and support chats. Hospitality & Travel: Processing guest reviews, survey feedback. Mobile Apps: Monitoring app store reviews, in-app feedback. Financial Services: Gauging customer satisfaction with services, identifying pain points. Key Roles: Product Managers: Prioritizing features, understanding user needs, tracking launch reception. Customer Experience (CX) / Success Managers: Monitoring customer health, identifying churn risks, and improving support processes. Marketing Teams: Understanding brand perception, campaign feedback, and voice of the customer. Support Leads: Identifying recurring issues, measuring support quality, spotting training needs. This approach works for businesses of all sizes, from startups wanting to stay lean and agile to large enterprises needing to manage massive feedback volumes. How to use workflow? Importing a workflow in n8n is a straightforward process that allows you to use pre-built or shared workflows to save time. Below is a step-by-step guide to import a workflow in n8n, based on the official documentation and community resources. Steps to Import a Workflow in n8n 1. Obtain the Workflow JSON Source the Workflow:** Workflows are typically shared as JSON files or code snippets. You might receive them from: The n8n community (e.g., n8n.io workflows page). A colleague or tutorial (e.g., a .json file or copied JSON code). Exported from another n8n instance (see export instructions below if needed). Format:** Ensure you have the workflow in JSON format, either as a file (e.g., workflow.json) or as text copied to your clipboard. 2. Access the n8n Workflow Editor Log in to n8n:** Open your n8n instance (via n8n Cloud or your - self-hosted instance). Navigate to the Workflows tab in the n8n dashboard. Open a New Workflow:** Click Add Workflow to create a blank workflow, or open an existing workflow if you want to merge the imported workflow. 3. Import the Workflow Option 1: Import via JSON Code (Clipboard): In the n8n editor, click the three dots (⋯) in the top-right corner to open the menu. Select Import from Clipboard. Paste the JSON code of the workflow into the provided text box. Click Import to load the workflow into the editor. Option 2: Import via JSON File: In the n8n editor, click the three dots (⋯) in the top-right corner. Select Import from File. Choose the .json file from your computer. Click Open to import the workflow. Note: If the workflow includes nodes for apps requiring credentials (e.g., Google Sheets), you’ll need to configure those credentials separately after importing.
by Yang
Who is this for? This template is designed for content creators, marketing teams, educators, or media managers who want to repurpose video content into written blog posts with visuals. It's ideal for anyone looking to automate the process of transforming YouTube videos into professional blog articles and custom images. What problem is this workflow solving? Creating written content from video material is time-consuming and manual. This workflow solves that by automating the entire pipeline: from detecting new YouTube video uploads to transcribing the audio, turning it into an engaging blog post, generating a matching visual, and saving both in Airtable. It saves hours of work while keeping your blog or social feed active and consistent. What this workflow does This automation listens for new YouTube videos added to a Google Drive folder, extracts the full transcript using Dumpling AI, and sends it to GPT-4o to generate a blog post and image prompt. Dumpling AI then turns the prompt into a 16:9 visual. The blog and visual are saved into Airtable for easy publishing or curation. Setup Google Drive Trigger Create a folder in Google Drive and upload your YouTube videos there. Link this folder in the "Watch Folder for New YouTube Videos" node. Enable polling every minute or adjust as needed. Download & Prepare the Video The video is downloaded and converted into base64 format by the next two nodes: Download Video File and Convert Downloaded Video to Base64. Transcription with Dumpling AI The base64 video is sent to Dumpling AI’s extract-video endpoint. You must have a Dumpling AI account and an API key with access to this endpoint: Dumpling AI Docs Generate Blog Content with GPT-4o GPT-4o takes the transcript and generates: A human-like blog post A descriptive prompt for AI image generation Make sure your OpenAI credentials are configured. Generate the Visual The prompt is passed to Dumpling AI’s generate-ai-image endpoint using model FLUX.1-pro. The result is a clean 1024x576 image. Save to Airtable Blog content is stored under the Content field in Airtable. The image prompt is also added to the Attachments column as a visual reference. Ensure Airtable base and table are preconfigured with the correct field names. How to customize this workflow to your needs Change the GPT prompt to alter the tone or format of the blog post (e.g., add bullet points or SEO tags). Modify the Dumpling AI prompt to generate different image styles. Add a scheduler or webhook trigger to run at different intervals or through other integrations. Connect this output to Ghost, Notion, or your CMS using additional nodes. 🧠 Sticky Note Summary Part 1: Transcription & Blog Prompt Watches a Google Drive folder for new video uploads. Downloads and encodes the video. Transcribes full audio with Dumpling AI. GPT-4o writes a blog post and descriptive image prompt. Part 2: Image Generation & Airtable Save Dumpling AI generates a visual from the image prompt. Blog content is saved to Airtable. The image prompt is patched into the Attachments field in the same record. ✅ Use this if you want to automate repurposing YouTube videos into blog content with zero manual work.
by InfraNodus
Using the knowledge graphs instead of RAG vector stores This workflow creates an AI chatbot agent that has access to several knowledge bases at the same time (used as "experts"). These knowledge bases are provided using the InfraNodus GraphRAG using the knowledge graphs and providing high-quality responses without the need to set up complex RAG vector store workflows. The advantages of using GraphRAG instead of the standard vector stores for knowledge are: Easy and quick to set up (no complex data import workflows needed) A knowledge graph has a holistic view of your knowledge base Better retrieval of relations between the document chunks = higher quality responses How it works This template uses the n8n AI agent node as an orchestrating agent that decides which tool (knowledge graph) to use based on the user's prompt. Here's a description step by step: The user submits a question using the AI chatbot (n8n interface, in this case, which can be accessed via a URL or embedded to any website) The AI agent node checks a list of tools it has access to. Each tool has a description of the knowledge it has auto-generated by InfraNodus. The AI agent decides which tool should be used to generate a response. It may reformulate user's query to be more suitable for the expert. The query is then sent to the InfraNodus HTTP node endpoint, which will query the graph that corresponds to that expert. Each InfraNodus GraphRAG expert provides a rich response that takes the whole context into account and provides a response from each expert (graph) along with a list of relevant statements retrieved using a combination or RAG and GraphRAG. The n8n AI Agent node integrates the responses received from the experts to produce the final answer. The final answer is sent back to the user's chat (or a webhook endpoint) How to use You need an InfraNodus GraphRAG API account and key to use this workflow. Create an InfraNodus account Get the API key at https://infranodus.com/api-access and create a Bearer authorization key for the InfraNodus HTTP nodes. Create a separate knowledge graph for each expert (using PDF / content import options) in InfraNodus For each graph, go to the workflow, paste the name of the graph into the body name field. Keep other settings intact or learn more about them at the InfraNodus access points page. Once you add one or more graphs as experts to your flow, add the LLM key to the OpenAI node and launch the workflow Requirements An InfraNodus account and API key An OpenAI (or any other LLM) API key Customizing this workflow You can use this same workflow with a Telegram bot, so you can interact with it using Telegram. There are many more customizations available. Check out the complete guide at https://support.noduslabs.com/hc/en-us/articles/20174217658396-Using-InfraNodus-Knowledge-Graphs-as-Experts-for-AI-Chatbot-Agents-in-n8n Also check out the video tutorial with a demo:
by n8n Team
This workflow creates a Jira issue when a new ticket is created in Zendesk. Subsequent comments on the ticket in Zendesk are added as comments to the issue in Jira. Prerequisites Zendesk account and Zendesk credentials. Jira account and Jira credentials. Jira project to create issues in. How it works The workflow listens for new tickets in Zendesk. When a new ticket is created, the workflow creates a new issue in Jira. The Jira issue key is then saved in one of the ticket's fields (in setup we call this "Jira Issue Key"). The next time a comment is added to the ticket, the workflow retrieves the Jira issue key from the ticket's field and adds the comment to the issue in Jira. Setup This workflow requires that you set up a webhook in Zendesk. To do so, follow the steps below: In the workflow, open the On new Zendesk ticket node and copy the webhook URL. In Zendesk, navigate to Admin Center > Apps and integrations > Webhooks > Actions > Create Webhook. Add all the required details which can be retrieved from the On new Zendesk ticket node. The webhook URL gets added to the “Endpoint URL” field, and the “Request method” should match what is shown in n8n. Save the webhook. In Zendesk, navigate to Admin Center > Objects and rules > Business rules > Triggers > Add trigger. Give the trigger a name such as “New tickets”. Under “Conditions” in “Meet ALL of the following conditions”, add “Status is New”. Under “Actions”, select “Notify active webhook” and select the webhook you created previously. In the JSON body, add the following: { "id": "{{ticket.id}}", "comment": "{{ticket.latest_comment_html}}" } Save the Zendesk trigger. You will also need to set up a field in Zendesk to store the Jira issue key. To do so, follow the steps below: In Zendesk, navigate to Admin Center > Objects and rules > Tickets > Fields > Add field. Use the text field option and give the field a name such as “Jira Issue Key". Save the field. In n8n, open the Update ticket node and select the field you created in Zendesk.
by ist00dent
This n8n template empowers you to instantly fetch a list of public holidays for any given year and country using the Nager.Date API. This is incredibly useful for scheduling, planning, or integrating holiday data into various business and personal automation workflows. 🔧 How it works Receive Holiday Request Webhook: This node acts as the entry point, listening for incoming POST requests. It expects a JSON body containing the year (e.g., 2025) and countryCode (e.g., US for United States, PH for Philippines, DE for Germany) for which you want to retrieve public holidays. Get Public Holidays: This node makes an HTTP GET request to the Nager.Date API (date.nager.at). It dynamically uses the year and countryCode from your webhook request to query the API. The API responds with a JSON array, where each object represents a public holiday with details like its date, name, and type. Respond with Holiday Data: This node sends the full list of public holidays received from Nager.Date back to the service that initiated the webhook. 👤 Who is it for? This workflow is ideal for: Businesses with International Operations: Automatically check holidays for different country branches to adjust production schedules, customer service hours, or delivery estimates. HR & Payroll Departments: Accurately calculate workdays, plan leave schedules, or process payroll taking public holidays into account. Event Planners: Avoid scheduling events on public holidays, which could impact attendance or venue availability. Travel Agencies: Inform clients about holidays in their destination country that might affect local business hours or attractions. Content & Social Media Schedulers: Plan content around national holidays to maximize engagement or avoid insensitive postings. Personal Productivity & Travel Planning: Integrate holiday data into your calendar or task management tools to plan trips or personal time off more effectively. Developers: Easily integrate a reliable source of public holiday data into custom applications, dashboards, or internal tools without managing complex datasets. 📑 Data Structure When you trigger the webhook, send a POST request with a JSON body structured as follows: { "year": 2025, "countryCode": "PH" // Example: "US", "DE", "GB", etc. } You can find a comprehensive list of supported country codes on the Nager.Date API documentation: https://www.nager.at/Country The workflow will return a JSON array, where each element is a holiday object, like this example for a single holiday: [ { "date": "2025-01-01", "localName": "New Year's Day", "name": "New Year's Day", "countryCode": "PH", "fixed": true, "global": true, "counties": null, "launchYear": null, "types": [ "Public" ] } // ... more holiday objects ] ⚙️ Setup Instructions Import Workflow: In your n8n editor, click "Import from JSON" and paste the provided workflow JSON. Configure Webhook Path: Double-click the Receive Holiday Request Webhook node. In the 'Path' field, set a unique and descriptive path (e.g., /public-holidays). Activate Workflow: Save and activate the workflow. 📝 Tips This workflow is a foundation for many powerful automations: Conditional Branching for Specific Holidays: Add an IF node after "Get Public Holidays" to check for a specific holiday (e.g., "Christmas Day"). You can then trigger different actions (e.g., send a reminder, adjust a schedule) only for that particular holiday. Filtering and Aggregating Data: Use a Filter node to only keep holidays of a certain type (e.g., "Public"). Use a Code or Function node to count the number of public holidays, or extract just the names and dates into a simpler list. Storing Holiday Data: Google Sheets/Airtable: Automatically append new holidays to a spreadsheet for easy reference or further analysis. Database: Store holiday data in a database (like PostgreSQL or MySQL) to build a custom holiday calendar application. Scheduling and Reminders: Connect this workflow to a Cron or Schedule node to run periodically (e.g., once a year at the start of the year). Use the retrieved holiday dates to set up reminders in your calendar (Google Calendar node) or send notifications (Slack, Email, SMS) a few days before an upcoming holiday. Integrate with Business Logic: Employee Leave Management: Cross-reference employee leave requests with public holidays to ensure accuracy. Automated Messages: Schedule automated "Happy Holiday" messages to customers or employees. E-commerce Shipping: Adjust estimated shipping times based on upcoming non-working days. API Key (Not needed for Nager.Date free tier): The Nager.Date API used here does not require an API key for basic public holiday lookups, which makes this template very easy to use out-of-the-box.
by Dhruv Dalsaniya
Description: This n8n workflow automates a Discord bot to fetch messages from a specified channel and send AI-generated responses in threads. It ensures smooth message processing and interaction, making it ideal for managing community discussions, customer support, or AI-based engagement. This workflow leverages Redis for memory persistence, ensuring that conversation history is maintained even if the workflow restarts, providing a seamless user experience. How It Works The bot listens for new messages in a specified Discord channel. It sends the messages to an AI model for response generation. The AI-generated reply is posted as a thread under the original message. The bot runs on an Ubuntu server and is managed using PM2 for uptime stability. The Discord bot (Python script) acts as the bridge, capturing messages from Discord and sending them to the n8n webhook. The n8n workflow then processes these messages, interacts with the AI model, and sends the AI's response back to Discord via the bot. Prerequisites to host Bot Sign up on Pella, which is a managed hosting service for Discord Bots. (Easy Setup) A Redis instance for memory persistence. Redis is an in-memory data structure store, used here to store and retrieve conversation history, ensuring that the AI can maintain context across multiple interactions. This is crucial for coherent and continuous conversations. Set Up Steps 1️⃣ Create a Discord Bot Go to the Discord Developer Portal. Click “New Application”, enter a name, and create it. Navigate to Bot > Reset Token, then copy the Bot Token. Enable Privileged Gateway Intents (Presence, Server Members, Message Content). Under OAuth2 > URL Generator, select bot scope and required permissions. Copy the generated URL, open it in a browser, select your server, and click Authorize. 2️⃣ Deploy the Bot on Pella Create a new folder discord-bot and navigate into it: Create and configure an .env file to store your bot token: Copy the code to .env: (You can copy the webhook URL from the n8n workflow) TOKEN=your-bot-token-here WEBHOOK_URL=https://your-domain.tld/webhook/getmessage Create file main.py copy the below code and save it: Copy this Bot script to main.py: import discord import requests import json import os from dotenv import load_dotenv Load environment variables from .env file load_dotenv() TOKEN = os.getenv("TOKEN") WEBHOOK_URL = os.getenv("WEBHOOK_URL") Bot Configuration LISTEN_CHANNELS = ["YOUR_CHANNEL_ID_1", "YOUR_CHANNEL_ID_2"] # Replace with your target channel IDs Intents setup intents = discord.Intents.default() intents.messages = True # Enable message event intents.guilds = True intents.message_content = True # Required to read messages client = discord.Client(intents=intents) @client.event async def on_ready(): print(f'Logged in as {client.user}') @client.event async def on_message(message): if message.author == client.user: return # Ignore bot's own messages if str(message.channel.id) in LISTEN_CHANNELS: try: fetched_message = await message.channel.fetch_message(message.id) # Ensure correct fetching payload = { "channel_id": str(fetched_message.channel.id), # Ensure it's string "chat_message": fetched_message.content, "timestamp": str(fetched_message.created_at), # Ensure proper formatting "message_id": str(fetched_message.id), # Ensure ID is a string "user_id": str(fetched_message.author.id) # Ensure user ID is also string } headers = {'Content-Type': 'application/json'} response = requests.post(WEBHOOK_URL, data=json.dumps(payload), headers=headers) if response.status_code == 200: print(f"Message sent successfully: {payload}") else: print(f"Failed to send message: {response.status_code}, Response: {response.text}") except Exception as e: print(f"Error fetching message: {e}") client.run(TOKEN) Create requirements.txt and copy: discord python-dotenv 3️⃣ Follow the video to set up the bot which will run 24/7 Tutorial - https://www.youtube.com/watch?v=rNnK3XlUtYU Note: Free Plan will expire after 24 hours, so please opt for the Paid Plan in Pella to keep your bot running. 4️⃣ n8n Workflow Configuration The n8n workflow consists of the following nodes: Get Discord Messages (Webhook):** This node acts as the entry point for messages from the Discord bot. It receives the channel_id, chat_message, timestamp, message_id, and user_id from Discord when a new message is posted in the configured channel. Its webhook path is /getmessage and it expects a POST request. Chat Agent (Langchain Agent):** This node processes the incoming Discord message (chat_message). It is configured as a conversational agent, integrating the language model and memory to generate an appropriate response. It also has a prompt to keep the reply concise, under 1800 characters. OpenAI -4o-mini (Langchain Language Model):** This node connects to the OpenAI API and uses the gpt-4o-mini-2024-07-18 model for generating AI responses. It is the core AI component of the workflow. Message History (Redis Chat Memory):** This node manages the conversation history using Redis. It stores and retrieves chat messages, ensuring the Chat Agent maintains context for each user based on their user_id. This is critical for coherent multi-turn conversations. Calculator (Langchain Tool):** This node provides a calculator tool that the AI agent can utilize if a mathematical calculation is required within the conversation. This expands the capabilities of the AI beyond just text generation. Response fromAI (Discord):** This node sends the AI-generated response back to the Discord channel. It uses the Discord Bot API credentials and replies in a thread under the original message (message_id) in the specified channel_id. Sticky Note1, Sticky Note2, Sticky Note3, Sticky Note4, Sticky Note5, Sticky Note:** These are informational nodes within the workflow providing instructions, code snippets for the Discord bot, and setup guidance for the user. These notes guide the user on setting up the .env file, requirements.txt, the Python bot code, and general recommendations for channel configuration and adding tools. 5️⃣ Setting up Redis Choose a Redis Hosting Provider: You can use a cloud provider like Redis Labs, Aiven, or set up your own Redis instance on a VPS. Obtain Redis Connection Details: Once your Redis instance is set up, you will need the host, port, and password (if applicable). Configure n8n Redis Nodes: In your n8n workflow, configure the "Message History" node with your Redis connection details. Ensure the Redis credential ✅ redis-for-n8n is properly set up with your Redis instance details (host, port, password). 6️⃣ Customizing the Template AI Model:** You can easily swap out the "OpenAI -4o-mini" node with any other AI service supported by n8n (e.g., Cohere, Hugging Face) to use a different language model. Ensure the new language model node is connected to the ai_languageModel input of the "Chat Agent" node. Agent Prompt:** Modify the text parameter in the "Chat Agent" node to change the AI's persona, provide specific instructions, or adjust the response length. Additional Tools:** The "Calculator" node is an example of an AI tool. You can add more Langchain tool nodes (e.g., search, data lookup) and connect them to the ai_tool input of the "Chat Agent" node to extend the AI's capabilities. Refer to the "Sticky Note5" in the workflow for a reminder. Channel Filtering:** Adjust the LISTEN_CHANNELS list in the main.py file of your Discord bot to include or exclude specific Discord channel IDs where the bot should listen for messages. Thread Management:** The "Response fromAI" node can be modified to change how threads are created or managed, or to send responses directly to the channel instead of a thread. The current setup links the response to the original message ID (message_reference). 7️⃣ Testing Instructions Start the Discord Bot: Ensure your main.py script is running on Pella. Activate the n8n Workflow: Make sure your n8n workflow is active and listening for webhooks. Send a Message in Discord: Go to one of the LISTEN_CHANNELS in your Discord server and send a message. Verify Response: The bot should capture the message, send it to n8n, receive an AI-generated response, and post it as a thread under your original message. Check Redis: Verify that the conversation history is being stored and updated correctly in your Redis instance. Look for keys related to user IDs. ✅ Now your bot is running in the background! 🚀
by The O Suite
This n8n workflow automates website security audits. It combines direct website scanning, threat intelligence from AlienVault OTX, and advanced analysis from an OpenAI large language model (LLM) to generate and email a comprehensive security report. How it Works (Workflow Flow): Input: A user provides a website URL via a simple web form. Data Collection: An HTTP Request node visits the provided URL to gather initial data (status code, headers). An AlienVault HTTP Request node queries AlienVault OTX for known threats associated with the website's hostname. Data Preparation (Prepare Data for AI): A custom code node consolidates the collected website data and AlienVault intelligence, performing initial checks for common issues (e.g., error codes, missing security headers, AlienVault warnings). AI Analysis (Security Configuration Audit): The prepared data is sent to an OpenAI Chat Model, which acts as a cybersecurity expert. The AI analyzes the data to identify vulnerabilities, explain their impact, suggest exploitation methods, and outline mitigation steps. Report Formatting (Format Report for Email): Another custom code node takes the AI's plain-text report and converts it into a structured HTML format suitable for email. Delivery (Send Security Report): The final HTML report is sent via Gmail to a specified email address. Setup Steps: To use this workflow, you'll need an n8n instance and the following credentials: n8n Instance: Ensure your n8n environment is running. OpenAI API Key: Generate a key from OpenAI. Add an "OpenAI API" credential in n8n (e.g., "OpenAI account"). AlienVault OTX API Key: Obtain a key from your AlienVault OTX profile. Add an "AlienVault OTX API" credential in n8n (e.g., "AlienVault account"). Gmail Account: Set up a "Gmail OAuth2" credential in n8n for sending emails (recommended for security; involves Google Cloud setup). Import Workflow: Copy the workflow's JSON code. In n8n, import the workflow via "Workflows" > "New" > "Import from JSON". Configure Recipient: In the "Send Security Report" node, specify the email address where reports should be sent. Activate: Enable the workflow to start processing submissions. Once activated, access the "On form submission" webhook URL to input a URL and trigger an audit.
by ist00dent
This n8n template enables you to instantly generate high-quality screenshots of any specified public URL by simply sending a webhook request. It’s an indispensable tool for developers, content creators, marketers, or anyone needing on-demand visual captures of web pages without manual intervention, all while including crucial security measures. 🔧 How it works Receive URL Webhook: This node acts as the entry point for the workflow. It listens for incoming POST requests and expects a JSON body containing a url property with the website you want to screenshot. You can trigger it from any application or service capable of sending an HTTP POST request. Validate URL for SSRF: This is a crucial security step. This Function node validates the incoming url to prevent Server-Side Request Forgery (SSRF) vulnerabilities. It checks for valid http:// or https:// protocols and, more importantly, ensures the URL does not attempt to access internal/private IP addresses or localhost. If the URL is deemed unsafe or invalid, it flags it for an error response. IF URL Valid: This IF node checks the isValidUrl flag set by the previous validation step. If the URL is valid (true), the workflow proceeds to take the screenshot. If the URL is invalid or flagged for security (false), the workflow branches to Respond with Validation Error. Take Screenshot: This node sends an HTTP GET request to the ScreenshotMachine API to capture an image of the validated URL. Remember to replace YOUR_API_KEY in the URL field of this node with your actual API key from ScreenshotMachine. Respond with Screenshot Data: This node sends the data received directly from the Take Screenshot node back to the original caller of the webhook. This response typically includes information about the generated screenshot, such as the URL to the image file, success status, and other metadata from the ScreenshotMachine API. Respond with Validation Error: If the IF URL Valid node determines the URL is unsafe or invalid, this node sends a descriptive error message back to the webhook caller, explaining why the request was denied due to security concerns or an invalid format. 🔒 Security Considerations This template includes a dedicated Validate URL for SSRF node to mitigate Server-Side Request Forgery (SSRF) vulnerabilities. SSRF attacks occur when an attacker can trick a server-side application into making requests to an unintended location. Without validation, an attacker could potentially use your n8n workflow to scan internal networks, access sensitive internal resources, or attack other services from your n8n server. The validation checks for: Only http:// or https:// protocols. Prevention of localhost or common private IP ranges (e.g., 10.x.x.x, 172.16.x.x - 172.31.x.x, 192.168.x.x). While this validation adds a significant layer of security, always ensure your n8n instance is properly secured and updated. 👤 Who is it for? This workflow is ideal for: Developers: Automate screenshot generation for testing, monitoring, or integrating visual content into applications. Content Creators: Quickly grab visuals for articles, presentations, or social media posts. Marketing Teams: Create dynamic visual assets for campaigns, ads, or competitive analysis. Automation Enthusiasts: Integrate powerful screenshot capabilities into existing automated workflows. Website Owners: Monitor how your website appears across different tools or over time. 📑 Prerequisites To use this template, you will need: An n8n instance (cloud or self-hosted). An API Key from ScreenshotMachine. You can obtain one by signing up on their website: https://www.screenshotmachine.com/ 📑 Data Structure When you trigger the webhook, send a POST request with a JSON body structured as follows: { "url": "https://www.example.com" } If the URL is valid, the workflow will return the JSON response directly from the ScreenshotMachine API. This response typically includes information about the generated screenshot, such as the URL to the image file, success status, and other metadata: { "status": "success", "hash": "...", "url": "https://www.screenshotmachine.com/...", "size": 12345, "mimetype": "image/jpeg" } If the URL is invalid or blocked by the security validation, the workflow will return an error response similar to this: { "status": "error", "message": "Access to private IP addresses is not allowed for security reasons." } ⚙️ Setup Instructions Import Workflow: In your n8n editor, click "File" > "Import from JSON" and paste the provided workflow JSON. Configure Webhook Path: Double-click the Receive URL Webhook node. In the 'Path' field, set a unique and descriptive path (e.g., /website-screenshot). Add ScreenshotMachine API Key: Double-click the Take Screenshot node. In the 'URL' parameter, locate YOUR_API_KEY and replace it with your actual API key obtained from ScreenshotMachine. Example URL structure: http://api.screenshotmachine.com/?key=YOUR_API_KEY&url={{ $json.validatedUrl }} Activate Workflow: Save and activate the workflow. 📝 Tips Processing Screenshots: You're not limited to just responding with the screenshot data! You can insert additional nodes after the Take Screenshot node (and before the Respond with Screenshot Data node) to further process or utilize the generated image. Common extensions include: Saving to Cloud Storage: Use nodes for Amazon S3, Google Drive, or Dropbox to store the screenshots automatically, creating an archive. Sending via Email: Attach the screenshot to an email notification using an Email or Gmail node for automated alerts or reports. Posting to Chat Platforms: Share the screenshot directly in a Slack, Discord, or Microsoft Teams channel for team collaboration or visual notifications. Image Optimization: Use an image processing node (if available via an API or a custom function) to resize, crop, or compress the screenshot before saving or sending. Custom Screenshot Parameters: The ScreenshotMachine API supports various optional parameters (e.g., width, height, quality, delay, fullpage). Upgrade: Extend the Receive URL Webhook to accept these parameters in the incoming JSON body (e.g., {"url": "...", "width": 1024, "fullpage": true}). Leverage: Dynamically pass these parameters to the Take Screenshot HTTP Request node's URL to customize your screenshots for different use cases. Scheduled Monitoring: Upgrade: Combine this workflow with a Cron or Schedule node. Set it to run periodically (e.g., daily, hourly). Leverage: Automatically monitor your website or competitors' sites for visual changes. You could then save screenshots to cloud storage and even trigger a comparison tool if a change is detected. Automated Visual Regression Testing: Upgrade: After taking a screenshot, store it with a unique identifier. In subsequent runs, take a new screenshot, then use an external image comparison API or a custom function to compare the new screenshot with a baseline. Leverage: Get automated alerts if visual elements on your website change unexpectedly, which is critical for quality assurance. Dynamic Image Generation for Social Media/Marketing: Upgrade: Feed URLs (e.g., for new blog posts, product pages) into this workflow. After generating the screenshot, use it to create dynamic social media images or marketing assets. Leverage: Streamline the creation of engaging visual content, saving design time.
by Zain Ali
🧾 Generate Project Summary from meeting transcript Who’s it for 🤝 Project managers looking to automate client meeting summaries Client success teams needing structured deliverables from transcripts Agencies and consultants who want consistent, repeatable documentation How it works / What it does ⚙️ Trigger: Manual or webhook trigger kicks off the workflow. Get meeting transcript: Reads the raw transcript from a specified Google Docs file. Generate summary: Sends transcript + instructions to OpenAI (gpt-4.1-mini) to produce a structured project summary. Convert to HTML: Transforms the LLM-generated Markdown into styled HTML. Prepare request: Wraps HTML and metadata into a multipart request body. Create Google Doc: Uploads the new “Project Summary” document into your Drive folder. How to set up 🛠️ Credentials Google Docs & Drive OAuth2 credentials OpenAI API key (gpt-4.1-mini) Nodes configuration Manual Trigger / webhook node Google Docs “Get meeting transcript” node: set documentURL AI Chat Model node: select gpt-4.1-mini Markdown node: enable tables & emoji Google Drive “CreateGoogleDoc” node: set target folder ID Paste in your IDs Update documentURL to your transcript doc Update google_drive_folder_id in the Set node Execute Click “Execute Workflow” or call via webhook Requirements 📋 n8n Google OAuth2 scopes for Docs & Drive OpenAI account with GPT-4.1-mini access A Google Drive folder to store summaries How to customize ✨ Output format**: Edit the Markdown prompt in the ChainLlm node to adjust headings or tone Timeline section**: Extend LLM prompt template with your own phase table Styling**: Tweak inline CSS in the Code node (Prepare_Request) for fonts or margins Trigger**: Swap Manual Trigger for HTTP/Webhook trigger to integrate with other tools Language model**: Upgrade to a different model by changing model.value in the AI node