by BHSoft
📌Who is this for? HR teams, IT Operations, and System Administrators managing employee onboarding at scale. It’s perfect if you use Odoo 18 to trigger account requests and need Redmine + GitLab accounts created instantly and consistently. 📌The Problem Manual account creation creates bottlenecks: IT waits for HR notifications that often get missed or delayed. Duplicate accounts pile up when no one checks existing data first. Account creation timelines are inconsistent (sometimes correct, sometimes wrong). Zero visibility into what succeeded or failed. 📌What It Does Catches an employee account creation request from Odoo 18 → queries employee data → checks for existing accounts → creates only the accounts that are missing → notifies your team via Slack with the full status. Here's the flow in detail: Webhook trigger from Odoo 18 - automatically fires when your HR team marks an employee as needing Redmine, GitLab, or both. Fetch employee data from Odoo 18 - pulls email and account type requirements. Deduplicate requests - separates "needs both," "GitLab only," and "Redmine only" cases. Check for existing accounts - queries Redmine and GitLab to avoid duplicate creation attempts. Create accounts - uses Redmine and GitLab APIs to spin up accounts (only if they don't exist). Slack notification - sends a summary showing what was created, skipped, or failed- including error details if something went wrong. 📌Quick Setup Generate a Webhook URL in n8n and configure Odoo 18 to call it during onboarding. Add Redmine admin API key and GitLab admin access token. Enable /users.json (Redmine) and /users (GitLab) endpoints. Configure Slack webhook for notifications. Test with sample data, then activate. 📌Results Zero duplicates - the system checks before creating. Full visibility - Slack reports every single attempt. Instant delivery - new hires get accounts on day one. Dramatically reduced IT workload. 📌Take It Further Auto-assign projects in Redmine/GitLab post-creation. Generate passwords or TOTP setup and email them to new hires. Log everything to Google Sheets, Notion, or a database. Handle multi-tenant setups if your Odoo manages multiple organizations. Add provisioning for Slack, Google Workspace, VPN, or other systems. 📌Need help customizing? Contact me for consulting and support: Linkedin / Website
by Robert Breen
🧑💻 Description This workflow automatically fetches new Gmail messages since the last run and appends them into a Google Sheet with their ID, snippet, and timestamp. It’s designed for professionals, small business owners, and operations teams who need a simple way to keep an ongoing log of emails, build lightweight CRMs, or power downstream automations like email tracking, reporting, or follow-up reminders. ⚙️ Setup Instructions for Gmail → Google Sheets Email Log 1️⃣ Connect Gmail In n8n → Credentials → New → Gmail OAuth2 Log in with your Gmail account & approve access Attach this credential to the Get new messages node in the workflow 2️⃣ Connect Google Sheets Copy this Google Sheet template into your own Drive In n8n → Credentials → New → Google Sheets (OAuth2) → log in with your Google account & save In the workflow, select your Spreadsheet ID and Worksheet (Sheet1 by default) in the Google Sheets nodes 🧠 How Email Logging Automation Works Get Current Emails** → Reads the last logged messages from Google Sheets Get Max Date** → Finds the most recent email timestamp Combine** → Passes the last timestamp and today’s date together Get New Messages** → Fetches all new Gmail messages after the last logged date Add Emails to Sheets** → Appends message ID, snippet, and date to the sheet 🎛️ Customization Guidance Filter by Sender or Subject** → Modify the Gmail query to only log messages from specific addresses or with certain keywords. Track Labels** → Add Gmail labels to your sheet to separate categories (e.g., “Leads,” “Support,” “Invoices”). Auto-Reply** → Extend with an additional Gmail node to send automated responses to new messages. Send Alerts** → Add a Slack or Email node to ping your team whenever a new email is logged. Analytics** → Use Google Sheets formulas or connect to BI tools to analyze trends like response times or sender frequency. 📬 Contact Need advanced customization (e.g., multi-inbox tracking, CRM integration, or automated follow-ups)? 📧 robert@ynteractive.com 🔗 Robert Breen 🌐 ynteractive.com
by Elegant Biztech
Automated QuickBooks Payment Reminders with Dynamic Invoice Tables This workflow provides a powerful solution for businesses using QuickBooks Online to automate their payment reminder process. It solves the time-consuming and manual task of chasing late payments by creating a fully automated system that ensures every customer with an outstanding balance receives a timely, professional, and consolidated reminder email. The workflow periodically fetches all unpaid invoices from your QuickBooks account. Its core strength lies in its ability to group multiple outstanding invoices for a single customer into one email, presenting them in a clean, easy-to-read table. This improves clarity for your customers, reduces email clutter, and significantly increases the likelihood of prompt payment. This template was crafted with care by the team at Prompt-Wizards to help you streamline your finances and build stronger customer relationships through smart automation. How the Workflow Operates Scheduler: The workflow initiates on a customizable schedule (e.g., every day at 9 AM). Get Unpaid Invoices: It fetches all invoices from your QuickBooks account that have an outstanding balance greater than zero and were created within a specified date range. Get Customer Wise Invoice list: This Code node intelligently processes the list of invoices and groups them by customer name, preparing the data for email generation. Invoice Template: This Code node dynamically generates a beautiful, responsive HTML email for each customer, complete with a personalized greeting, an invoice table, and the total amount due. Send Reminder Email: The final node sends the uniquely crafted email to the customer's billing address on file. Prerequisites Before you begin, please ensure you have the following: An active n8n instance. A QuickBooks Online account with API access. An email service (e.g., SMTP, Gmail, Outlook) connected to n8n as credentials. Step-by-Step Setup Guide Follow these instructions carefully to configure the workflow for your business in under 5 minutes. 1. Connect Your QuickBooks Account You must authenticate your QuickBooks account to allow n8n to fetch invoice data. Select the Get Unpaid Invoices node. In the Credentials section on the right, either select your existing QuickBooks account from the dropdown or click Create New to connect your account. (Optional): In the Options section of this node, you can adjust the TxnDate filter. It is pre-set to look at invoices from the last 90 days. You can change this date range to suit your needs. 2. Personalize the Email Template Personalize the email to match your brand and include your payment information. Open the Invoice Template node. Inside the code editor, find and replace these two placeholder values: Your Payment Link: On line 115, find href="https://your-payment-portal-link.com" and replace the placeholder URL with a link to your actual payment portal or website. Your Company Details: On line 120, find Your Company Name | ... and replace the placeholder text with your real company name and address in the email footer. 3. Configure Your Email Account You must connect the email account you want to send reminders from. Select the Send Reminder Email node. In the Credentials section, select your email account (e.g., Gmail, Outlook) or create a new connection. The To Address, Subject, and HTML fields are already configured with expressions to work automatically. No changes are needed here! 4. Activate the Workflow Open the Scheduler node to set the schedule for how often you want the workflow to run. Save the workflow using the button at the top. Click the Active toggle at the top right of the screen. Your automated payment reminder system is now live!!! For questions or to explore more custom solutions, visit us at Elegant Biztech or contact us at sales@elegantbiztech.com.
by WeblineIndia
Daily Weather Reports with OpenWeather API, Google Sheets, and Gmail This workflow fetches real-time weather data from the OpenWeather API, stores it in a Google Sheet, formats it into a beautifully styled HTML report and emails it to recipients automatically every day at 10:00 AM. It helps teams track and monitor daily weather trends and optionally correlate them with energy production or field operations. Who’s it for? Renewable energy teams monitoring solar/wind energy output vs weather Facility or operations managers requiring daily climate updates Researchers or analysts logging environmental metrics Any team needing automated, daily weather reports by email How it works? The workflow begins with a Schedule Trigger set to run at 10:00 AM IST daily. It calls the OpenWeather API to fetch weather metrics for a predefined location. The data is then passed to a Google Sheets node named "Append Weather to Sheet", which stores all the key values into a structured spreadsheet. A Set or Function node generates a clean, styled HTML email using inline CSS and the weather values. Finally, a Gmail node sends this report to one or more recipients with a clear subject line and formatted body. How to set up? Create/Open your n8n instance (Cloud or Self-hosted). Connect the following credentials: Google Sheets (OAuth2) Gmail (OAuth2) Set your OpenWeather API key in the HTTP Request node (api.openweathermap.org). Replace latitude/longitude in the request URL as per your location. Link a Google Sheet and define the correct tab name and headers. Configure recipient email(s) in the Gmail node. Deploy the workflow and test. Requirements n8n account (self-hosted or cloud) OpenWeather API key (free or paid) Google account with access to: Google Sheets Gmail A valid Google Sheet created with the following headers (columns): Country Location Latitude Location Longitude Temperature (°C) Feels Like (°C) Min Temp (°C) Max Temp (°C) Humidity (%) Pressure (hPa) Sea Level (hPa) Ground Level (hPa) Visibility (m) Wind Speed (m/s) Wind Direction (°) Wind Gust (m/s) Cloudiness (%) Sunrise (UTC) Sunset (UTC) Date Time (UTC) How to customize? Change the scheduled time in the Schedule Trigger node. Modify the location coordinates in the OpenWeather API URL. Update the HTML template with different formatting or styling. Add a second email or sheet for energy output to correlate with weather. Extend the workflow with Slack, Notion, or Telegram alerts. Add‑ons Integrate with a solar energy API to track power production with weather. Post weather summaries to Notion, Slack or internal dashboards. Generate a visual chart in Google Sheets over time using the collected data. Trigger alerts when specific thresholds are exceeded (e.g., wind gust > 10 m/s). Use Case Examples Solar farm reporting**: Monitor daily weather impact on solar panel output. Logistics planning**: Notify teams of visibility or wind risks before dispatch. Site operations**: Send forecasts to maintenance or ground staff. Academic/weather logging**: Track atmospheric data over time. Common Troubleshooting | Issue | Possible Cause | Solution | | ------------------------------ | ---------------------------------------- | --------------------------------------------------------- | | Email not sent | Gmail credentials not connected properly | Reconnect Gmail account via n8n credential manager | | Weather data is missing fields | API response changed or API key invalid | Verify OpenWeather API key and URL format | | Google Sheet not updating | Incorrect spreadsheet ID or tab name | Double-check spreadsheet ID and sheet name in node | | HTML email renders incorrectly | Broken or missing tags in HTML | Test output HTML separately in browser/email preview tool | Need Help? If you need assistance setting up or customizing this workflow, feel free reach out. We’re here to help!
by Jaures NYA
Who’s it for This automation template is designed for content creators, social media managers, and automation enthusiasts who want to automatically scrape X (Twitter) posts with images and publish them directly to a Telegram channel — without writing a single line of code. With this workflow, you can keep your Telegram community constantly updated with the latest tweets from any account. It collects, cleans, and shares content in a fully automated cycle. How It Works Trigger – Start scraping from a specific X (Twitter) account using its unique ID and username. Fetch Data – The workflow calls the Twitter API (or a scraping endpoint) to gather recent tweets. Format & Filter – Extracts key fields (author name, username, text, URL, creation date, images, video) and keeps only tweets containing text and at least one image. Remove Duplicates – Ensures no tweet is processed or posted twice. Save to Google Sheets – Stores cleaned tweet data for backup and future use. Clean Text – Removes unwanted links and hashtags for a polished message. Loop & Publish – Sends each tweet (text + image) to your Telegram channel. Delay – Waits 3 minutes between each post to prevent spamming. How to Use Enter the Twitter ID and username of the target account. Connect your Google Sheets account to store scraped tweets. Connect your Telegram bot and specify the channel for publication. Run the workflow — tweets will be automatically scraped, filtered, saved, and posted to Telegram. Requirements A valid Twitter API connection or alternative scraping endpoint. A Google Sheet to store tweet data. A Telegram Bot linked to your channel. n8n (or any compatible automation platform) to run the workflow. Need help Contact me for consulting and support: LinkedIn / YouTube
by David Olusola
Inventory Low Stock Alerts E-commerce Automation This n8n template automatically monitors your Shopify inventory levels and sends alerts when products fall below your defined threshold. Prevent stockouts and maintain sales revenue with proactive inventory management. Good to know Default threshold is 10 units but easily customizable in the Code node Monitors all product variants individually Runs daily at 9 AM but schedule is fully adjustable Only sends alerts when action is needed (no empty notifications) How it works The schedule runs daily at 9 AM and connects to Shopify to download all products and variants. The workflow loops through every product and variant, checking inventory quantity for each item. It compares current stock against your threshold (default: 10 units) and identifies items below threshold. If any low stock items are found, it creates a comprehensive list and formats an alert message. The formatted report is sent to your Slack team so they can take immediate restocking action. Set up instructions Set up Shopify credentials in n8n: API Key, Password, Shop Subdomain, and Shared Secret The schedule trigger runs daily at 9 AM but feel free to adjust timing based on your business needs Modify "lowStockThreshold" variable in the Code node (default is set to 10 units) Set up Slack credentials and create a dedicated #inventory channel for alerts Ensure your Shopify products have inventory tracking enabled in product settings Test the workflow manually to verify it correctly identifies low-stock items What team sees: "🚨 Low Stock Alert! T-Shirt Blue (Medium): 3 left Coffee Mug (White): 7 left Phone Case (Black): 2 left" Business logic: Stock above threshold equals no alert. Stock at or below threshold equals alert sent. Stock at zero equals out of stock which is critical. Customising this workflow Add email alerts for critical out-of-stock items Set different thresholds for different product categories Include supplier contact information in alerts
by Barbora Svobodova
Telegram AI Voice & Email Assistant: Manage, Draft & Discuss Emails via Voice Who’s it for This workflow is perfect for professionals and teams who want to manage email communications hands-free directly from Telegram. Simply send a voice message to your bot and seamlessly check your recent emails, draft or send a reply, and discuss email threads—all powered by OpenAI’s transcription and chat capabilities, with no third-party voice agent required. How it works / What it does Sends voice messages to a Telegram bot, which are then transcribed via OpenAI. Retrieves recent emails, drafts, or sends replies based on your commands. Engages the user in conversational discussion about email content using OpenAI chat. Responds in text or synthesized voice (OpenAI), creating a natural interactive experience. Automates email management from Telegram, keeping you efficient on the go. How to set up Create a Telegram bot via @BotFather and obtain your API token. Add the OpenAI API key and Gmail OAuth credentials to n8n. Assign your credentials to the Telegram, OpenAI, and Gmail nodes (Draft/Send/Get Email). Deploy and activate the workflow. Interact with your Telegram bot: just send voice messages and let the assistant manage your emails! Requirements Telegram Bot Token OpenAI API Key Gmail OAuth Credentials How to customize the workflow Adjust the Switch node to route and handle new message types or responses. Integrate additional services such as Slack, Notion, or custom tools as needed. Fine-tune prompts or the OpenAI transcription settings for your specific use case. Modify email templates and memory/session nodes for advanced conversation flows. Embed video guides or extra sticky notes for enhanced onboarding and usability.
by WeblineIndia
Background Verification Executive Digest Automation: Track Completed & Pending Verifications via Email (from Google Sheets) This automation sends a daily late-night email summary to each Background Verification (BGV) executive — straight out of your “BGV Tracker” Google Sheet. Each executive gets their own digest listing candidates whose background checks were completed today and which ones are still pending, complete with clear “stale” alerts for overdue follow-ups. The workflow runs reliably via n8n, auto-grouping entries and packaging the results in a user-friendly tabular email, every day at 23:00 IST. Who’s it for BGV team leads & vendors** who want automatic updates on their queue. HR managers** looking to automate candidate tracking without manual report compilation. Ops teams** with Google Sheets-based BGV tracking wanting digest emails for each owner. Any organization managing candidate checks across multiple owners/executives. How it works Schedule Trigger: Runs every night at 23:00 IST (Asia/Kolkata), weekends OFF by default. Google Sheets: Reads all rows from your “BGV Tracker” (tab), using columns: candidate_name, previous_company, prevco_hr_name, prevco_hr_email bgv_status, last_follow_up, bgv_completion_date, bgv_executive, bgv_exe_email Code Node #1 (“Normalize & Parse”): Cleans and lower-cases all column names for consistency. Parses last_follow_up & bgv_completion_date from multiple local date formats. Adds helper flags: isCompletedToday, isStale (pending and last-follow-up ≥ 3 days). Code Node #2 (“Group & Filter”): Groups rows by bgv_exe_email (executive). Within each group: Segregates “Completed Today” and “Pending” items. Code Node #3 (“Format Digest”): Generates a personalized HTML email per executive, with two tables: Completed Today (with candidate/prevco info) Pending (with “stale” ⚠️ flags) Builds the subject line showing per-executive summary counts. Gmail Node: Sends the formatted email to each executive automatically. Can be customized for preview/test mode, CC or CSV attachments. How to set up Prepare Google Sheet: Create “BGV Tracker” tab (case-insensitive column names). Fill columns: candidate_name, previous_company, prevco_hr_name, prevco_hr_email, bgv_status, last_follow_up, bgv_completion_date, bgv_executive, bgv_exe_email n8n Configuration: Authenticate Google Sheets node (OAuth). Authenticate Gmail node (App Password recommended). Import workflow JSON and adjust credentials and sheet IDs. Test run (optional): Fill sample data in the sheet. Start workflow and review “dry run” outputs (optional). Activate workflow for daily auto-emails. Requirements A Google Sheet tab called “BGV Tracker” with supported columns. Gmail (SMTP or OAuth) credentials with permissions to send. n8n cloud or self-hosted, with Google and Gmail creds configured. How to customize Change run time:** Modify the Schedule Trigger for different hours/days. Weekend handling:** Add condition to skip Sat/Sun. Stale threshold:** Adjust the “>= 3 days” flag logic in code node. Email template:** Edit HTML layout, subject, header/footer as needed. Digest content:** Add/remove columns in the email tables within the code node. Preview/test mode:** Add a DRY_RUN variable and IF node for safe previewing before going live. Attachment/CC:** Add extra nodes to attach CSV, send summary to managers or post to Slack. Add‑ons Manager summary:** Aggregate all digests and send to HR head or ops manager. CSV exports:** Automatically attach filtered candidate lists per executive. Slack reminders:** DM executives with only their stale pending items. Auto-writeback:** Update next follow-up date in Sheet for stale cases. Use Case Examples BGV vendor:** Nightly queue email lets each checker focus on fresh items to close first. Recruiter audit:** HRBP gets an easy, nightly record of outstanding verifications, with overdue flags for fast escalation. Multi-client projects:** Divide the worksheet, send only relevant candidates to each exec, boosting clarity and compliance. Common Troubleshooting | Issue | Possible Cause | Solution | |-------------------------------|-------------------------------------------------|----------------------------------------------| | No emails sent | SMTP/Gmail credentials missing or expired | Re-authenticate Gmail node; check permissions| | Some candidates missing | Sheet has missing/invalid bgv_exe_email | Ensure every row has valid executive email | | Completed items not listed | Wrong/combo date formats in completion column | Use supported date format; ensure status="Completed" | | Pending doesn’t show stale | Last follow-up date out of expected format | Use supported date format & review data | | Workflow runs on weekends | Schedule misconfigured (or missed weekend filter)| Add/exclude Sat/Sun via config/node logic | | Pending pool includes “To be Sent” | Status filter in code not precise | Adjust code node filter to exclude explicitly| | Emails not delivered | Gmail sending limit exceeded | Add rate limit (wait node), check quota | Need Help? If you need a hand setting up, customizing or want to add more integrations (Slack, CSVs, approvals, etc.) reach out to us at WeblineIndia anytime. We can setup error handling, advanced templates and even help connect your flows to external systems!
by Praneel S
⚠️ Disclaimer: This workflow uses Google Calendar and Gmail nodes which you will have to configure yourself Who’s it for Anyone who wants an AI-powered personal assistant that can handle Gmail and Google Calendar tasks through a simple webhook. This is useful for developers, small teams, and productivity enthusiasts who want to connect a chatbot (Discord, Telegram, WhatsApp, or custom frontends) to their email and calendar. How it works / What it does This workflow acts as a chat-based AI assistant. You send text requests through a webhook (e.g., from a chatbot), and the AI agent interprets them to take actions like: 📧 Sending emails in Gmail 📥 Reading and summarizing your emails 📅 Checking your Google Calendar events ✅ Checking your availability before booking 📝 Creating new calendar events with Google Meet links ✏️ Updating existing events ⏰ Converting natural time expressions like “tomorrow at 3 PM” into exact timestamps The AI agent is powered by the Google Gemini Chat Model (or any LLM you choose) and follows strict guardrails: Confirms actions before executing Asks for clarification if details are missing Prevents double-booking by checking availability How to set up Import this workflow into n8n. Set up credentials for: Gmail (OAuth2) Google Calendar (OAuth2) AI provider (Gemini, OpenAI, Claude, etc.) Configure the webhook node (/chat) as your chatbot endpoint. You can connect it to Discord, WhatsApp, Telegram, or a frontend app. Customize the AI Agent’s system prompt if you want to tweak tone or rules. Deploy and start sending messages like: “Check my emails from today” “Schedule a meeting with John tomorrow at 3 PM” “Email my team about the deadline extension” Requirements n8n installed and running (cloud or self-hosted) Gmail and Google Calendar accounts with API access API key for your chosen AI provider Webhook Chatbot interface How to customize Swap Google Gemini with another LLM node (e.g., OpenAI GPT or Anthropic Claude). Add more tools (e.g., Slack, Notion, Trello) to extend capabilities. Adjust memory length in the Simple Memory node. Modify sticky notes with instructions tailored to your use case. Disclaimer This workflow uses the community webhook entry point, so it is best suited for self-hosted n8n instances. Do not hardcode API keys or sensitive credentials. Always use n8n’s Credentials system. Other Details Thanks for viewing this automation! Feel Free to contact me at praneel.tech Also Use my Webhook chatbot interface Which is configured perfectly for n8n Automations!
by Takuya Ojima
Who’s it for Teams that collect meeting requests via a form and want instant, error-free scheduling: customer success, sales, education, agencies, and community managers. How it works / What it does This workflow ingests a form submission (name, email, preferred date/time), checks Google Calendar for conflicts, and branches automatically. If the slot is free, it creates a calendar event, spins up a Zoom meeting, emails the guest a confirmation, and posts a Slack summary to your team. If busy, it sends a polite “please pick another time” email. Time handling defaults to Asia/Tokyo and converts to ISO internally to keep downstream integrations consistent. How to set up Import the workflow and rename nodes for clarity if needed. Open the Workflow Configuration (Set) node and adjust variables (calendar ID, meeting duration, Slack channel, sender info). Map your form fields in Extract Booking Details. Connect credentials in each service node (Google Calendar, Zoom, Gmail, Slack). Test once with a real submission. Requirements Active accounts and n8n credentials for Google Calendar, Zoom, Gmail, and Slack. A form or webhook source that sends name, email, and a valid datetime. How to customize the workflow Duration & buffers: Change end time calculation in Extract Booking Details. Time zones: If you accept multiple time zones, normalize before building ISO strings. Email copy: Personalize confirmation/alternative-time messages and add attachments if desired. Slack format: Enrich the post with fields (host, Zoom join URL, internal tags). Routing: Add CRM updates or reminders after the “slot free” branch. Security note: No hardcoded API keys in HTTP nodes. Configure all credentials via n8n’s credential manager.
by Florent
Automated n8n Workflows & Credentials Backup to Local/Server Disk & FTP Complete backup solution that saves both workflows and credentials to local/server disk with optional FTP upload for off-site redundancy. What makes this workflow different: Backs up workflows AND credentials together Saves to local/server disk (not Git, GitHub, or any cloud services) Optional FTP upload for redundancy (disabled by default) Comprehensive error handling and email notifications Timezone-aware** scheduling Ready to use with minimal configuration How it works Backup Process (Automated Daily at 4 AM): Initialisation - Sets up timezone-aware timestamps and configurable backup paths for both local/server disk and FTP destinations Folder Creation - Creates date-stamped backup directories (YYYY-MM-DD format) on local/server disk Dual Backup Operations - Processes credentials and workflows in two separate branches: Credentials Branch: Exports n8n credentials using the built-in CLI command with backup flag Lists exported credential files in the credentials folder Reads each credential file from disk Optional: Uploads to FTP server (disabled by default) Optional: Logs FTP upload results for credentials Workflows Branch: Retrieves all workflows via n8n API Cleans workflow names for cross-platform compatibility Converts workflows to formatted JSON files Writes files to local/server disk Optional: Uploads to FTP server (disabled by default) Optional: Logs FTP upload results for workflows Data Aggregation - Combines all workflow data with binary attachments for comprehensive reporting Results Merging - Consolidates credentials FTP logs, workflows FTP logs, and aggregated workflow data Summary Generation - Creates detailed backup logs including: Statistics (file counts, sizes, durations) Success/failure tracking for local and FTP operations Error tracking with detailed messages Timezone-aware timestamps Notifications - Sends comprehensive email reports with log files attached and saves execution logs to disk How to use Initial Setup: Configure the Init Node - Open the "Init" node and customize these key parameters in the "Workflow Standard Configuration" section: // Admin email for notifications const N8N_ADMIN_EMAIL = $env.N8N_ADMIN_EMAIL || 'youremail@world.com'; // Workflow name (auto-detected) const WORKFLOW_NAME = $workflow.name; // Projects root directory on your server const N8N_PROJECTS_DIR = $env.N8N_PROJECTS_DIR || '/files/n8n-projects-data'; // projects-root-folder/ // └── Your-project-folder-name/ // ├── logs/ // ├── reports/ // ├── ... // └── [other project files] // Project folder name for this backup workflow const PROJECT_FOLDER_NAME = "Workflow-backups"; Then customize these parameters in the "Workflow Custom Configuration" section: // Local backup folder (must exist on your server) const BACKUP_FOLDER = $env.N8N_BACKUP_FOLDER || '/files/n8n-backups'; // FTP backup folder (root path on your FTP server) const FTP_BACKUP_FOLDER = $env.N8N_FTP_BACKUP_FOLDER || '/n8n-backups'; // FTP server name for logging (display purposes only) const FTPName = 'Synology NAS 2To'; These variables can also be set as environment variables in your n8n configuration. Set Up Credentials: Configure n8n API credentials for the "Fetch Workflows" node Configure SMTP credentials for email notifications Optional: Configure FTP credentials if you want to enable off-site backups Configure Backup Folder: Ensure the backup folder path exists on your server Verify proper write permissions for the n8n process If running in Docker, ensure volume mapping is correctly configured Customize Email Settings: Update the "Send email" node with your recipient email address or your "N8N_ADMIN_EMAIL" environment value Adjust email subject and body text as needed Enabling FTP Upload (Optional): By default, FTP upload nodes are disabled for easier setup. To enable off-site FTP backups: Simply activate these 4 nodes (no other changes needed): "Upload Credentials To FTP" "FTP Logger (credentials)" "Upload Workflows To FTP" "FTP Logger (workflows)" Configure FTP credentials in the two upload nodes The workflow will automatically handle FTP operations and include upload status in reports Requirements n8n API credentials (for workflow fetching) SMTP server configuration (for email notifications) Adequate disk space for local backup storage Proper file system permissions for backup folder access Docker environment with volume mapping (if running n8n in Docker) Optional: FTP server access and credentials (for off-site backups) Good to know Security**: Credentials are exported using n8n's secure backup format - actual credential values are not exposed in plain text Timezone Handling**: All timestamps respect configured timezone settings (defaults to Europe/Paris, configurable in Init node) File Naming**: Automatic sanitization ensures backup files work across different operating systems (removes forbidden characters, limits length to 180 characters) FTP Upload**: Disabled by default for easier setup - simply activate 4 nodes to enable off-site backups without any code changes Connection Resilience**: FTP operations include error handling for timeout and connection issues without failing the entire backup Graceful Degradation**: If FTP nodes are disabled, the workflow completes successfully with local backups only and indicates FTP status in logs Error Handling**: Comprehensive error catching with detailed logging and email notifications Dual Logging**: Creates both JSON logs (for programmatic parsing) and plain text logs (for human readability) Storage**: Individual workflow JSON files allow for selective restore and easier version control integration Scalability**: Handles any number of workflows efficiently with detailed progress tracking This automated backup workflow saves your n8n data to both local disk and FTP server. To restore your backups, use: "n8n Restore from Disk - Self-Hosted Solution" for local/server disk restores "n8n Restore from FTP - Remote Backup Solution" for FTP remote restores
by Rahul Joshi
📊 Description Empower your workflows with an intelligent AI chat assistant that retrieves real-time context from Google Sheets and a Pinecone knowledge base using Retrieval-Augmented Generation (RAG). 🤖📂 This workflow processes chat messages, retrieves relevant contextual data, generates natural and context-aware responses via OpenAI GPT-5, and automatically logs every interaction in Google Sheets. It also auto-indexes new documents from Google Drive into Pinecone for knowledge expansion and emails weekly chat history summaries for review. 💬📊 What This Template Does 1️⃣ Chat Trigger – Receives incoming chat messages through a webhook. 💬 2️⃣ Data Enrichment – Extracts topic, intent, and context from messages. 🧩 3️⃣ Context Retrieval – Fetches structured data from Google Sheets and semantic data from Pinecone. 🧠 4️⃣ AI Response Generation – Uses GPT-5 to produce relevant, human-like replies with contextual references. 🤖 5️⃣ Conversation Logging – Stores chat sessions with timestamps and detected intent in Google Sheets. 📋 6️⃣ Knowledge Base Expansion – Automatically indexes new files from Google Drive to Pinecone for future RAG responses. 📂 7️⃣ Weekly Report – Aggregates all chats and sends an email summary with logs attached via Gmail every Monday. 📧 Key Benefits ✅ AI chat assistant with contextual accuracy using RAG ✅ Auto-updating knowledge base via Google Drive → Pinecone ✅ End-to-end chat tracking and audit-ready logging ✅ Weekly performance reports via Gmail ✅ Seamless integration with Google Workspace Features Retrieval-Augmented Generation (RAG) workflow Google Sheets integration for structured memory Pinecone vector database for semantic retrieval GPT-5 for context-aware conversation generation Google Drive watcher for automatic knowledge updates Gmail integration for weekly report delivery Built-in JSON validation and session memory Requirements OpenAI API key (GPT-4/GPT-5) Google Sheets OAuth2 credentials Pinecone API credentials Google Drive OAuth2 credentials Gmail OAuth2 credentials Replace: PINECONE_INDEX with your index name GOOGLE_SHEET_ID with your log sheet ID GOOGLE_DRIVE_FOLDER_ID with monitored folder Target Audience Support and helpdesk automation teams 💬 AI chatbot developers enhancing context recall 🤖 Businesses maintaining searchable conversation history 🏢 Knowledge managers syncing chat + document intelligence 🧠 Step-by-Step Setup Instructions 1️⃣ Connect your OpenAI, Pinecone, Google Sheets, Google Drive, and Gmail credentials. 2️⃣ Update the Pinecone index and Google Sheet ID in the nodes. 3️⃣ Set your chat webhook URL for real-time message input. 4️⃣ Add your Google Drive folder ID for automated knowledge ingestion. 5️⃣ Test the chat workflow with sample messages. 6️⃣ Enable the schedule trigger to email weekly chat logs automatically. ✅