by Amjid Ali
Detailed Title "Triathlon Coach AI Workflow: Strava Data Analysis and Personalized Training Insights using n8n" Description This n8n workflow enables you to build an AI-driven virtual triathlon coach that seamlessly integrates with Strava to analyze activity data and provide athletes with actionable training insights. The workflow processes data from activities like swimming, cycling, and running, delivers personalized feedback, and sends motivational and performance improvement advice via email or WhatsApp. Workflow Details Trigger: Strava Activity Updates Node:** Strava Trigger Purpose:** Captures updates from Strava whenever an activity is recorded or modified. The data includes metrics like distance, pace, elevation, heart rate, and more. Integration:** Uses Strava API for real-time synchronization. Step 1: Data Preprocessing Node:** Code Purpose:** Combines and flattens the raw Strava activity data into a structured format for easier processing in subsequent nodes. Logic:** A recursive function flattens JSON input to create a clean and readable structure. Step 2: AI Analysis with Google Gemini Node:** Google Gemini Chat Model Purpose:** Leverages Google Gemini's advanced language model to analyze the activity data. Functionality:** Identifies key performance metrics. Provides feedback and insights specific to the type of activity (e.g., running, swimming, or cycling). Offers tailored recommendations and motivational advice. Step 3: Generate Structured Output Node:** Structure Output Purpose:** Processes the AI-generated response to create a structured format, such as headings, paragraphs, and bullet lists. Output:** Formats the response for clear communication. Step 4: Convert to HTML Node:** Convert to HTML Purpose:** Converts the structured output into an HTML format suitable for email or other presentation methods. Output:** Ensures the response is visually appealing and easy to understand. Step 5: Send Email with Training Insights Node:** Send Email Purpose:** Sends a detailed email to the athlete with performance insights, training recommendations, and motivational messages. Integration:** Utilizes Gmail or SMTP for secure and efficient email delivery. Optional Step: WhatsApp Notifications Node:** WhatsApp Business Cloud Purpose:** Sends a summary of the activity analysis and key recommendations via WhatsApp for instant access. Integration:** Connects to WhatsApp Business Cloud for automated messaging. Additional Notes Customization: You can modify the AI prompt to adapt the recommendations to the athlete's specific goals or fitness levels. The workflow is flexible and can accommodate additional nodes for more advanced analysis or output formats. Scalability: Ideal for individual athletes or coaches managing multiple athletes. Can be expanded to include additional metrics or insights based on user preferences. Performance Metrics Handled: Swimming: SWOLF, stroke count, pace. Cycling: Cadence, power zones, elevation. Running: Pacing, stride length, heart rate zones. Implementation Steps Set Up Strava API Key: Log in to Strava Developers to generate your API key. Integrate the API key into the Strava Trigger node. Configure Google Gemini Integration: Use your Google Gemini (PaLM) API credentials in the Google Gemini Chat Model node. Customize Email and WhatsApp Messaging: Update the Send Email and WhatsApp Business Cloud nodes with the recipient’s details. Automate Execution: Deploy the workflow and use n8n's scheduling features or cron jobs for periodic execution. GET n8n Now N8N COURSE n8n Book Developer Notes Author:** Amjid Ali improvements. Resources:** See in Action: Syncbricks Youtube PayPal: Support the Developer Courses : SyncBricks LMS By using this workflow, triathletes and coaches can elevate training to the next level with AI-powered insights and actionable recommendations.
by Matt F.
AI Customer-Support Assistant that auto-maps any business site, answers WhatsApp in real time, and lets you earn or save thousands by replacing pricey SaaS chat tools. ⚡ What the workflow does Live “AI employee”* - the bot crawls pages on demand (products, policies, FAQs) so you *never** upload documents or fine-tune a model. No-code setup** - Drop in API keys, paste your domain, publish the webhook—ready in \~15 min. Chat memory** - each conversation turn is written to Supabase/Postgres and automatically replayed into the next prompt, letting the assistant remember context so follow-up questions feel natural and coherent even across long sessions. WhatsApp ready** - Free-form replies inside the 24-hour service window, automatically switches to a template when required (recommended by Meta). 🚀 Why you’ll love it | Benefit | Impact | | ------------------------- | --------------------------------------------------------------------- | | Zero content training | Point the AI Agent at any domain → go live. | | Save or earn money | Replace pricey SaaS chat tools or sell white-label bots to clients. | | Channel-agnostic | Ships with WhatsApp; swap one node for Telegram, Slack, or web chat. | | Flexible voice | Adjust tone & language by editing one prompt line. | 🧰 Prerequisites (all free-tier friendly) OpenAI key Meta WhatsApp Cloud API number + permanent token (easy setup) Supabase (or Postgres) URL for chat memory (easy setup) 🛠 5-step setup Import the template into n8n. Add credentials for OpenAI, WhatsApp, and Supabase. Enter your root domain in the root\_url variable. Point Meta’s Webhook to the n8n URL. Hit Execute Trigger and send “Hi” from WhatsApp—watch the bot answer with live data. 🔄 Easy to extend Voice & language** – change wording in the System Prompt. Escalation** – add an “If fallback” branch → Zendesk, email, live agents. Extra channels** – duplicate the reply node for Telegram or Slack. Commerce API hooks** – plug in Shopify, Woo, Stripe for order status or payments. 💡 Monetization ideas Replace costly SaaS seats.* Deploy the bot on your own server and *stop paying \$300–\$500 every month for third-party “AI support” platforms. Sell it as a service.* Spin up a branded instance for local shops, clinics, or e-commerce stores and *charge each client \$300–\$500 per month**—setup time is under 15 minutes. Upsell premium coverage (24/7 human hand-off) once the bot handles routine questions. Embed product links in answers and earn affiliate or upsell revenue automatically. Spin it up, connect a domain and a phone number, and you—or your customers—get enterprise-grade support without code, training, or ongoing licence fees.
by dataplusminus+-
🎯 Project Purpose This project automates the process of collecting and managing new leads submitted through a web form. It eliminates the need for manual data entry and ensures that each lead is: Properly recorded and time-stamped in a structured format Automatically communicated to the sales or support team Ready for follow-up, with a reminder system in place It’s a lightweight but effective solution suitable for freelancers, small teams, and growing businesses that want to streamline their lead intake process. 🛠️ Tools & Technologies Used Google Forms / Web Form** – Frontend for capturing leads Google Sheets** – Central database for storing lead information n8n** – Automation platform that connects and coordinates all services Gmail** – Handles email notifications for new leads Slack* *(optional) – Provides instant team notifications Date & Time nodes** – Tracks and manages lead response timing Conditional (IF) nodes** – Filters out duplicate and incomplete entries 🔄 Workflow Overview ✨ Key Features ✅ No-code integration using n8n ✅ Instant alerts via Gmail and/or Slack ✅ Google Sheets as an easily accessible backend ✅ Modular design — easy to expand with CRM tools (like HubSpot) ✅ Clean JSON structure and logic, beginner-friendly 📈 Possible Improvements Add email validation via external API (e.g., NeverBounce, Hunter) Integrate with a CRM for deeper automation Add lead scoring based on answers Include automatic follow-up emails after X days Schedule weekly summary reports via email 🧑🏻💻 Creator Information Developed by: Adem Tasin Adem T. 🌐 Website: Dataplusminus+- 📧 Email:dataplusminuss@gmail.com 💼 LinkedIn: Adem Tasin
by Oneclick AI Squad
This workflow contains community nodes that are only compatible with the self-hosted version of n8n. This automated n8n workflow streamlines the process of screening CVs and validating candidate information using AI and email parsing. The system listens for new emails with CV attachments, extracts and processes the data, and either saves valid CVs to a target directory or notifies HR of invalid submissions. Good to Know The workflow improves efficiency by automating CV screening and validation. Ensures only CVs with essential fields (e.g., name, email, skills) are processed further. Email notifications alert HR to incomplete or invalid CVs for timely follow-up. The system pauses until all CV data is fully loaded to avoid processing errors. How It Works Trigger on New CV Email - Detects new emails with CV attachments. Extract Text from PDF CV - Parses content from attached PDF files. Ensure All CV Data Loaded - Waits until all data is ready for processing. Parse & Structure CV Information - Extracts structured details like name, skills, and experience using AI or custom logic. Check CV for Required Fields - Verifies the presence of essential fields (e.g., name, email, skills). Save Valid CV to Folder - Stores successfully validated CVs into a target directory. Notify HR of Invalid CV - Sends an email alert for incomplete or invalid CVs. Data Sources The workflow processes data from email attachments: CV PDF Files** - Contains candidate information in PDF format. How to Use Import the workflow into n8n. Configure email account credentials for monitoring new CV emails. Set up a target directory for storing validated CVs. Test with sample CV PDFs to verify extraction and validation. Adjust AI or custom logic based on specific required fields. Monitor email notifications for invalid CVs and refine the process as needed. Requirements Email account access with IMAP/POP3 support. PDF parsing capabilities (e.g., OCR or text extraction tools). AI or custom logic for data extraction and validation. A target directory for storing validated CVs. Customizing This Workflow Modify the "Check CV for Required Fields" node to include additional required fields (e.g., education, certifications). Adjust the email notification format to include more details about invalid CVs. Integrate with HR software for seamless candidate tracking. Details The workflow ensures efficient CV screening by automating repetitive tasks. Notifications help maintain a high-quality candidate pool by addressing issues early.
by Yaron Been
This workflow provides automated access to the Fire Part Crafter AI model through the Replicate API. It saves you time by eliminating the need to manually interact with AI models and provides a seamless integration for image generation tasks within your n8n automation workflows. Overview This workflow automatically handles the complete image generation process using the Fire Part Crafter model. It manages API authentication, parameter configuration, request processing, and result retrieval with built-in error handling and retry logic for reliable automation. Model Description: PartCrafter is a structured 3D mesh generation model that creates multiple parts and objects from a single RGB image. Key Capabilities High-quality image generation from text prompts** Advanced AI-powered visual content creation** Customizable image parameters and styles** Tools Used n8n**: The automation platform that orchestrates the workflow Replicate API**: Access to the Fire/part-crafter AI model Fire Part Crafter**: The core AI model for image generation Built-in Error Handling**: Automatic retry logic and comprehensive error management How to Install Import the Workflow: Download the .json file and import it into your n8n instance Configure Replicate API: Add your Replicate API token to the 'Set API Token' node Customize Parameters: Adjust the model parameters in the 'Set Image Parameters' node Test the Workflow: Run the workflow with your desired inputs Integrate: Connect this workflow to your existing automation pipelines Use Cases Content Creation**: Generate unique images for blogs, social media, and marketing materials Design Prototyping**: Create visual concepts and mockups for design projects Art & Creativity**: Produce artistic images for personal or commercial use Marketing Materials**: Generate eye-catching visuals for campaigns and advertisements Connect with Me Website**: https://www.nofluff.online YouTube**: https://www.youtube.com/@YaronBeen/videos LinkedIn**: https://www.linkedin.com/in/yaronbeen/ Get Replicate API**: https://replicate.com (Sign up to access powerful AI models) #n8n #automation #ai #replicate #aiautomation #workflow #nocode #imagegeneration #aiart #texttoimage #visualcontent #aiimages #generativeart #machinelearning #artificialintelligence #aitools #automation #digitalart #contentcreation #productivity #innovation
by Yaron Been
Stop manually checking keyword rankings and let automation do the work for you. This comprehensive SEO monitoring workflow automatically tracks your keyword positions, compares them against your target URLs, and instantly alerts your team via Slack whenever rankings change - ensuring you never miss critical SEO movements. ✨ What This Workflow Does: 📊 Automated Rank Checking**: Continuously monitors keywords stored in Airtable 🔍 Real-Time SERP Analysis**: Uses Firecrawl API to fetch current search rankings 📈 Intelligent Comparison**: Compares current vs. previous rankings automatically 📝 Database Updates**: Updates Airtable records with new ranking data 🚨 Instant Alerts**: Sends Slack notifications only when rankings change 🎯 Target URL Matching**: Specifically tracks your domain's position in search results 🔧 Key Features: Trigger-based automation** that activates when Airtable data changes Smart rank comparison** logic that prevents false alerts Conditional notifications** - only alerts on actual ranking changes Clean data management** with automatic Airtable updates Team collaboration** through Slack integration Scalable monitoring** for unlimited keywords 📋 Prerequisites: Airtable account with Personal Access Token Firecrawl API key for SERP data Slack workspace with API access Basic Airtable setup with keyword data 🎯 Perfect For: SEO agencies managing multiple client campaigns Digital marketing teams tracking organic performance Content creators monitoring content rankings E-commerce businesses tracking product visibility Startups needing cost-effective SEO monitoring Any business serious about search visibility 💡 How It Works: Data Collection: Fetches keywords, target URLs, and current ranks from Airtable SERP Analysis: Queries Firecrawl API for real-time search results Rank Detection: Searches results for your target URL and determines position Smart Comparison: Compares new ranking against stored data Database Update: Updates Airtable with latest ranking information Conditional Alert: Sends Slack notification only if ranking changed Team Notification: Delivers actionable ranking updates to your team 📦 What You Get: Complete n8n workflow with all integrations configured Airtable template with proper field structure Firecrawl API integration setup Slack notification templates Comprehensive setup documentation Sample keyword data for testing 🚀 Benefits: Save Hours Weekly**: Eliminate manual rank checking Never Miss Changes**: Get instant alerts on ranking movements Team Alignment**: Keep everyone informed via Slack Historical Tracking**: Maintain ranking history in Airtable Cost Effective**: Replace expensive SEO tools with automation Scalable Solution**: Monitor unlimited keywords effortlessly 💡 Need Help or Want to Learn More? Created by Yaron Been 📧 Support: Yaron@nofluff.online 🎥 YouTube Tutorials: https://www.youtube.com/@YaronBeen/videos 💼 LinkedIn: https://www.linkedin.com/in/yaronbeen/ Discover more SEO automation workflows and digital marketing tutorials on my channels! 🏷️ Tags: SEO, Keyword Tracking, Airtable, Slack, Firecrawl, SERP, Automation, Rank Monitoring, Digital Marketing, Search Rankings
by Daniel Rosehill
AI Agent System Prompt 'Auto-Tuner' This workflow configures an AI agent which provides an edited system prompt for an autonomous AI agent Based on the following pieces of information provided by the user in an input form: Agent name Agent purpose What's working What's not working Current system prompt There are two additional form elements that I've marked as non-required but if you want to force more detail from the user you can mark these as required: Example prompt Example output This information gets sent to the AI agent which is configured with a system prompt of its own and the form elements are concatenated into a user prompt prompting the agent to evaluate the system prompt, deliver an improved version, and provide some notes for logging. The output structure is constrained with JSON. OpenAI 4o is recommended for its overall strong adherence to structured outputs. Once the agent delivers its improved system prompt, this gets passed to the user via email notification. The final delivery stage can be alternated according to user preference When This Is Useful Anyone working on AI agent configurations will likely be familiar with the pivotal importance of the system prompt in directing the desired behavior of the agent. Frequently this requires long hours of iteration before a consistent desired behaviour is achieved. Sometimes we can figure out what's working and not based on our own intuition and experience, but at other times soliciting the outside perspective of another AI tool can be a helpful way to consider alternative explanations or improve our own prompt engineering. This configuration is intended to speed up this iterative process and reduce the amount of time we spend working on system prompts to configure effective agent workflows
by Akhil Varma Gadiraju
📬 Gmail to Google Drive Email Export Workflow (n8n) 🧩 Overview This n8n workflow automates the process of: Retrieving all emails from a specific sender using Gmail. Extracting essential fields like subject, message, and date. Formatting the email date to the desired time zone (e.g., IST). Exporting the parsed data as a CSV file. Uploading the file to a specified folder in Google Drive. 🛠 Nodes Breakdown 1. Start Workflow (Manual Trigger) Type**: Manual Trigger Purpose**: Initiates the workflow manually. 2. Gmail Node (Get All Emails) Type**: Gmail Operation**: getAll Filters**: sender: akhilgadiraju@gmail.com Returns**: All emails from the specified sender. Credentials**: Gmail OAuth2 - Akhil 3. Parse Data (Set Node) Purpose**: Extracts key fields from the email JSON. Mapped Fields**: id: Email ID subject: Email subject message: Email text time: Email date 4. Convert Time Field (Code Node) Purpose**: Converts the email time (ISO 8601) to a human-readable format. Output Format**: Local time using Asia/Kolkata timezone. Format: "Month Day, Year, Hour:Minute AM/PM" Customizable**: Change the timezone as needed: timeZone: 'Asia/Kolkata' 5. Convert to File Type**: Convert to File Node Purpose**: Converts JSON data to a downloadable .csv file. Output File**: CSV containing id, subject, message, and time. 6. Google Drive Type**: Google Drive Purpose**: Uploads the generated CSV file to Google Drive. Drive**: My Drive Folder**: Root File Name**: Current timestamp + _n8n_export.csv 7. End Workflow (NoOp) Purpose**: Final node to explicitly end the workflow. ✅ Use Cases Personal Email Archiving**: Back up or export emails from a specific sender (e.g., invoices, reports). Audit Logs**: Save conversations for compliance. Team Reports**: Aggregate project emails into a central file store. 🔧 Customization Guide | Customization | How to Do It | |---------------------------|------------------------------------------------------------| | Change Sender Email | Update the sender field in the Gmail node. | | Filter by Date/Subject | Add filters in the Gmail node settings. | | Change Time Zone | Edit timeZone in the Code node. | | Add More Email Fields | Modify the Set node to include more fields. | | Change File Format | Use a different format in the Convert to File node. | | Rename Output File | Adjust the name in the Google Drive node. | | Change Upload Folder | Set a different folderId in the Google Drive node. | 🚀 Deployment Tips Schedule the Workflow**: Replace Manual Trigger with a Cron node. Avoid Duplicates**: Store email IDs and skip duplicates using conditional logic. Security**: Use environment variables for sensitive credentials. 🧪 Testing Steps Manually trigger the workflow. Verify email data is parsed and formatted. Confirm CSV is generated correctly. Ensure the file is uploaded to Google Drive. 🧰 Requirements Connected Gmail and Google Drive OAuth2 credentials. n8n instance (self-hosted or cloud). Required nodes available in the n8n environment. > 💡 Need more features? You can add: > - Error handling > - Slack/Email notifications > - Conditional filters > - Google Sheets integration instead of Drive
by Rajneesh Gupta
IP Reputation Check & Threat Summary using Splunk + VirusTotal + AlienVault + n8n This workflow automates IP reputation analysis using Splunk alerts, enriches data via VirusTotal and AlienVault OTX, and generates actionable threat summaries for SOC teams — all without any coding. What It Does When a Splunk alert contains a suspicious IP: Ingests the IP** from the Splunk alert via webhook. Performs dual threat enrichment** using: VirusTotal IP reputation & tags. AlienVault OTX pulses, reputation & WHOIS. Merges & processes** threat intel data. Generates a rich HTML summary** for analyst review. Routes action based on severity**: Sends Slack alert for suspicious IPs. Creates an incident in ServiceNow. Emails a formatted HTML report to the SOC inbox. Tech Stack Used Splunk** – SIEM alert source VirusTotal API** – Reputation check & analysis stats AlienVault OTX API** – Community threat intel & pulse info n8n** – For orchestration, merging, summary generation Slack, Gmail, ServiceNow** – For SOC notifications and ticketing Ideal Use Case Perfect for security teams wanting to: Automatically validate IP reputation from SIEM logs Get quick context from multiple threat feeds Generate email-ready reports and escalate high-risk IPs Included Nodes Webhook (Splunk) Function nodes for IOC extraction and intel processing HTTP Request (VirusTotal & AlienVault) Merge + Switch nodes for conditional logic Gmail, Slack, ServiceNow integration Tips Add your VirusTotal and AlienVault credentials in n8n's credential manager. Use the Switch node to route based on your internal threat score logic. Easily extend this to include AbuseIPDB or GreyNoise for deeper enrichment.
by Akhil Varma Gadiraju
Conference Feedback Collection and OneDrive Logging Workflow This n8n workflow is designed to collect feedback through a web form, log the responses into an Excel file stored in Microsoft OneDrive, and notify the support team via email. 🧭 Overall Goal To collect user feedback from a web form, structure the data, log it into a OneDrive Excel file, and notify support via Outlook email. 🔄 Workflow Breakdown 1. Form Submission (On form submission) Node Type**: formTrigger Purpose**: Captures user feedback via a web form. Form Fields**: Full Name (Required) Email (Required) Company Name Job Title How did you hear about the conference? (Required) Overall experience rating (Required) Favorite sessions/speakers Relevance to interests/work (Required) Networking opportunities (Required) Suggestions for improvement Future topics/speakers Willingness to attend again (Required) Additional comments Contact permission (Required) Access URL**: /webhook/feedback (or /webhook-test/feedback during testing) 2. Parse Data (Set) Purpose**: Renames form fields to snake_case. Output**: Structured JSON with renamed fields. 3. Sample File (Convert to File) Purpose**: Generates a file name reference for search. Filename**: test-n8n-feedback-form-data.xlsx 4. Search Document (Microsoft OneDrive) Purpose**: Searches OneDrive for the specified Excel file. Query**: test-n8n-feedback-form-data.xlsx 5. Extract File ID (Code) Purpose**: Extracts the ID of the file from the search result. Output**: { "id": "someFileId" } or { "id": null } 6. Check File Existence (If) Purpose**: Branch logic based on file existence. Condition**: If id exists. 7. Build Sheet Data (Set) Purpose**: Prepares the data to match the Excel column headers. Only Runs If**: File was found. 8. Append Data to Excel (Microsoft Excel) Purpose**: Appends the new feedback as a row. Workbook ID**: {{ $('Code').item.json.id }} Worksheet Name**: Sheet1 Mode**: Auto-map from input fields 9. Notify Support (Microsoft Outlook) Purpose**: Sends a notification email with key feedback details. To**: test@gmail.com Subject**: "New Feedback Submission Received" Body**: Includes key details from submission 10. End Workflow (NoOp) Purpose**: Marks logical end of the workflow. 📝 Sticky Notes ✅ Upload Target Excel File First: Ensure the Excel file exists in OneDrive. 📝 Filename Consistency: Filename should match in "Sample File" and "Search Document" nodes. 📧 Customize Email Content: Update "Notify Support" node with your desired message and recipient. 🔧 Customization Guide 🧾 Form Customization Change form title, description, fields, or path. 🧪 Parsing Logic Update field mappings if form labels change. 📁 Excel File Settings Filename must match your actual OneDrive file. Worksheet name and column headers must match in "Build Sheet Data". 📬 Email Settings Update subject and body using variables like {{ $('Parse Data').item.json.full_name }}. ❗ Error Handling Tips Adjust email content based on file presence. Add an "Error Trigger" for advanced error management. 🔁 Alternatives and Extensions Use Google Sheets, Airtable, or databases instead of OneDrive/Excel. Add Slack or SMS notifications. 📌 Use Cases Post-event Feedback CSAT Surveys Employee Feedback Bug Reporting Lead Capture Contact Forms Webinar Registration 🔐 Required Credentials 1. Microsoft OneDrive (OAuth2) Used by**: "Search Document" Credential Name**: Microsoft Drive account 2. Microsoft Excel (OAuth2) Used by**: "Append Data" Credential Name**: Microsoft Excel account 3. Microsoft Outlook (OAuth2) Used by**: "Notify Support" Credential Name**: Outlook 0Auth2 ❤️ Made with n8n by Akhil
by Daniel Ng
This n8n workflow template uses community nodes and is only compatible with the self-hosted version of n8n. Restore n8n Credentials from Google Drive Backup This template enables you to restore your n8n credentials from a backup file in Google Drive. It's an essential companion to a credential backup workflow, ensuring you can recover your setup in case of data loss, instance migration, or disaster recovery. The workflow intelligently checks for existing credentials to prevent accidental overwrites of credentials with the same name that are already present. This workflow is manually triggered. We recommend you use this restore workflow in conjunction with a backup solution like our "Auto Backup Credentials to Google Drive" template. For more powerful n8n templates, visit our website or contact us at AI Automation Pro. We help your business build custom AI workflow automation and apps. Who is this for? This workflow is for n8n administrators and users who have backed up their n8n credentials to Google Drive (e.g., using a companion backup template) and need to restore them to the same or a different n8n instance. It's crucial for those managing self-hosted instances. What problem is this workflow solving? / use case If an n8n instance becomes corrupted, needs to be migrated, or if credentials are accidentally deleted, a manual re-creation of all credentials can be extremely time-consuming and error-prone. This workflow automates the restoration process from a known backup, saving significant time and ensuring accuracy. It's particularly useful for: Disaster recovery. Migrating n8n instances. Quickly setting up a new n8n instance with existing credentials. What this workflow does The workflow is manually triggered and performs the following operations: Fetch Current Credentials: An "On Click Trigger" starts the process. It executes the command npx n8n export:credentials --all --decrypted via the "Execute Command Get All Credentials" node to get a list of all credentials currently in your n8n instance. This list is then processed by "JSON Formatting Data" and "Aggregate Credentials" nodes to extract just the names of existing credentials for comparison. Download Backup File from Google Drive: The "Google Drive Get Credentials File" node searches your Google Drive for the n8n_backup_credentials.json file. The "Google Drive Download File" node then downloads the found file. Process Backup Data: The "Convert Files To JSON" (an Extract From File node) converts the downloaded file content, expected to be JSON, into a usable JSON object. "Split Out" nodes then process this data to handle individual credential entries from the backup file. Loop and Restore Credentials: The "Loop Over Items" (a SplitInBatches node) iterates through each credential from the backup file. Duplicate Check: For each credential, an "IF" node ("Check For Skipped Credentials") checks two conditions using an OR combinator: If the credential name from the backup ($('Loop Over Items').item.json.name) is empty. If a credential with the same name already exists in the current n8n instance (by checking against the list from the "Aggregate Credentials" node). Conditional Restore: If the credential name is NOT empty AND it does NOT already exist (i.e., the conditions in the IF node are false), the workflow proceeds to the "Restore N8n Credentials" node (an n8n API node). This node uses the name, type, and data for each new credential from the backup file to create it in the n8n instance. Credentials with empty names or those already present are skipped as they take the true path of the IF node, which loops back. A "Wait" node introduces a 1-second delay after each restoration attempt, to prevent API rate limiting before looping to the next item. Step-by-step setup n8n Instance Environment (for current credentials check): The n8n instance must have access to npx and n8n-cli for the "Execute Command Get All Credentials" node to function. Google Drive Credentials: Configure the "Google Drive Get Credentials File" and "Google Drive Download File" nodes with your Google OAuth2 credentials. n8n API Credentials: Configure the "Restore N8n Credentials" node with your n8n API credentials. This API key needs permissions to manage credentials. Backup File Name: The workflow is configured to search for a file named n8n_backup_credentials.json in the "Google Drive Get Credentials File" node. If your backup file has a different name or you want to specify a path, update the "Query String" parameter in this node. How to customize this workflow to your needs Backup File Location/Query:** Modify the "Google Drive Get Credentials File" node parameters if your backup file is in a specific folder, has a different naming convention, or if you want more specific query logic. Overwrite Logic:** The current workflow skips existing credentials by name. If you need to update/overwrite existing credentials, you would need to modify the logic in the "Check For Skipped Credentials" (IF) node and potentially use an "update" operation in the "n8n" API node if available for credentials (note: updates often require the credential ID, which might not be in the backup file). Notifications:** Add notification steps (e.g., Email, Slack) to report on the success or failure of the restoration process, and to list which credentials were restored or skipped. Selective Restore:** To restore only specific credentials, you could add a filter step after "Split Out1" or modify the IF condition in "Check For Skipped Credentials" to check for particular credential names or types from the backup file. Error Handling:** Implement more robust error handling for API errors (e.g., from the n8n API node or Google Drive nodes), file not found issues, or problems during command execution. Important Note on Credential Security Decrypted Backup File:** This workflow assumes the n8n_backup_credentials.json file contains decrypted credential data, typically created by a companion backup workflow. Execution Environment:** The "Execute Command Get All Credentials" node requires npx n8n-cli access on the server running n8n.
by Samir Saci
Tags*: Sustainability, Business Travel, Carbon Emissions, Flight Tracking, Carbon Interface API Context Hi! I’m Samir — a Supply Chain Engineer and Data Scientist based in Paris, and founder of LogiGreen Consulting. I help companies monitor and reduce their environmental footprint by combining AI automation, carbon estimation APIs, and workflow automation. This workflow is part of our sustainability reporting initiative, allowing businesses to track the CO₂ emissions of employee flights. > Automate carbon tracking for your business travel with AI-powered workflows in n8n! 📬 For business inquiries, feel free to connect with me on LinkedIn Who is this template for? This workflow is designed for travel managers, sustainability teams, or finance teams who need to measure and report on emissions from business travel. Let’s imagine your company receives a flight confirmation email: The AI Agent reads the email and extracts structured data, such as flight dates, airport codes, and number of passengers. Then, the Carbon Interface API is called to estimate CO₂ emissions, which are stored in a Google Sheet for sustainability reporting. How does it work? This workflow automates the end-to-end process of tracking flight emissions from email to CO₂ estimation: 📨 Gmail Trigger captures booking confirmations 🧠 AI Agent extracts structured data (airports, dates, flight numbers) ✈️ Each flight leg is processed individually 🌍 Carbon Interface API returns distance and carbon emissions 📄 A second Google Sheet node appends the emission data for reporting Steps: 💌 Trigger on new flight confirmation email 🧠 Extract structured trip data using AI Agent (flights, airports, dates) 📑 Store flight metadata in Google Sheets 🧭 For each leg, call the Carbon Interface API 📥 Append distance, CO₂ in kg, and timestamp to the flight row What do I need to get started? You’ll need: A Gmail account receiving SAP Concur or travel confirmation emails A Google Sheet to record trip metadata and CO₂ emissions A free Carbon Interface API key Access to OpenAI for parsing the email via AI Agent A few sample flight confirmation emails to test Next Steps 🗒️ Use the sticky notes in the n8n canvas to: Add your Gmail and Carbon Interface credentials Send a sample booking email to your inbox Verify that emissions and distances are correctly added to your sheet This template was built using n8n v1.93.0 Submitted: June 7, 2025