by vvrr22042026
Reusable Retry Handler with Exponential Backoff, Jitter, Slack/Email Alerts, and Manual Suspend How it works This workflow is a reusable retry and resilience pattern for n8n. It can be called from any workflow using the Execute Workflow node. It runs a transient operation, classifies the result, retries retryable failures using exponential backoff with jitter, and stops retrying after a configurable maximum number of attempts. At a high level, it: • Accepts a generic operation input from another workflow • Runs an HTTP/API operation that can be replaced with any app node • Retries only transient failures such as 408, 409, 425, 429, 500, 502, 503, and 504 • Avoids retrying common permanent errors such as 400, 401, 403, 404, and 422 • Calculates exponential backoff delay with random jitter to reduce retry storms • Sends a Slack message when all retries are completed • Sends an email notification when all retries are completed • Suspends the workflow at a Wait node for manual review • Optionally continues to Stop and Error so your global Error Workflow can capture the final failure This template is useful for production workflows that call third-party APIs, SaaS apps, databases, or internal services that may fail temporarily. Set up steps Setup should take around 10–15 minutes. • Import the workflow JSON into n8n • Configure Slack credentials in the Slack alert node • Configure SMTP credentials in the email alert node • Replace the demo HTTP Request node with your real API/app operation if needed • Set your default max attempts, base delay, max delay, jitter percentage, Slack channel, and email recipient • Call this workflow from other workflows using Execute Workflow • Use n8n credentials or environment variables for secrets; do not hardcode API keys This template implements a generic retry wrapper for n8n workflows: Exponential backoff Random jitter Max attempts Retryable/non-retryable classification Slack alert when retries are exhausted Email alert when retries are exhausted Suspend/wait for manual review after retries are exhausted Optional final Stop and Error so a global Error Workflow can capture the failed execution Default retry policy Retryable by default: 408, 409, 425, 429, 500, 502, 503, 504. Not retried by default: 400, 401, 403, 404, 422. Backoff formula waitSeconds = min(maxDelaySeconds, baseDelaySeconds * 2^(attempt - 1)) finalWait = waitSeconds +/- random(jitterPercent) How to use Import the template into n8n. Configure Slack credentials in the Slack node. Configure SMTP credentials in the Email node. Replace the demo HTTP Request node with your real operation, or pass HTTP inputs into the template. From another workflow, call this workflow using Execute Workflow. Example input { "operationName": "Create customer in CRM", "url": "https://api.example.com/customers", "method": "POST", "headers": { "Authorization": "Bearer {{$env.API_TOKEN}}" }, "body": { "name": "Acme" }, "maxAttempts": 5, "baseDelaySeconds": 30, "maxDelaySeconds": 900, "jitterPercent": 25, "notifyEmail": "ops@example.com", "slackChannel": "#automation-alerts" } Suspended workflow behavior After all retries are completed, the workflow sends Slack and email notifications, then pauses at a Wait node. This keeps the failed execution suspended for manual review. After review, resume the workflow using the Wait node resume URL. It then reaches Stop and Error, allowing your global error workflow to capture the final failure.
by pei5
This workflow enables the automatic and regular tracking of competitors' Instagram Reels, providing rich insights for each video (summary, topic, hook, angles, tags, etc) through ChatGPT, and storing all information in a structured Google Sheets data table. This can optimize your workflow, allowing you to gain a deeper understanding of potential customers and partners, and enabling more timely personalized hot topic tracking and decision-making. How it works Trigger workflow on a schedule (e.g. every hour). Read active Instagram accounts from Google Sheets (Accounts tab). Filter accounts based on last check time to avoid redundant scraping. Loop through each account and fetch latest Reels via Apify (with limit per run). Skip already processed Reels by checking existing records in Google Sheets. Store new Reels into a centralized “Reels Library” sheet with the video information crawled. Generate transcript (if available) and send content to AI for analysis. Extract structured insights: summary, hook, topic, CTA, content angle, tags, etc. Update each Reel’s processing status (DONE / SKIPPED / FAILED). Update account last_checked_at timestamp after processing. Aggregate all results into a single batch report (success rate, per-account stats, failures). Send final report to Telegram. 💡 Running screenshot: Google sheet: Report message: Set up steps Set your relevant credentials Google Sheets (service account recommended) Apify (for Instagram Reel scraping) OpenAI (for content analysis) Telegram Bot (for notifications) Prepare your Google Sheet You can either copy a copy from the following address or create it yourself according to the example: https://docs.google.com/spreadsheets/d/1UjEUnSRWwHaG3c6SCO3PDCvlCRUkNdofzxkSoyBP4FA/copy Configure key parameters Max reels per account per run (default: 2) Account check interval (default: 24h) Output language for ChatGPT (default: English) Update google_sheet_share_link's value (default: https://docs.google.com/spreadsheets/d/1UjEUnSRWwHaG3c6SCO3PDCvlCRUkNdofzxkSoyBP4FA/edit?gid=0#gid=0) Modify the timing execution interval in the Schedule Trigger node (default: 1hour) Activate the workflow It will run automatically on schedule and handle everything end-to-end
by isaWOW
Description Connect Fireflies and WayinVideo to this workflow once and every recorded sales call automatically generates a set of training clips delivered to your Slack channel. The moment Fireflies finishes transcribing a call, the workflow takes the video recording, submits it to WayinVideo with your custom search query, waits for processing, and logs every matching clip with its timestamp, score, and description to Google Sheets. Your sales team receives a single Slack message with the top clips, ready to review and use for coaching. Built for sales managers and revenue teams who want a consistent stream of real training moments without manually scrubbing through call recordings. What This Workflow Does Triggers automatically when a call ends** — Fireflies fires the workflow the moment transcription completes, so clips are extracted from every call without any manual step Submits the recording to WayinVideo** — Sends the video URL with your natural language query to the WayinVideo Find Moments API to locate matching moments Polls until processing is complete** — Waits 45 seconds then checks WayinVideo's status repeatedly, retrying up to 20 times over approximately 15 minutes before timing out Sorts clips by relevance score** — Ranks all returned clips from highest to lowest score and keeps only your configured maximum number of top clips Converts timestamps to readable format** — Transforms raw millisecond timestamps into MM:SS format so your team can jump straight to the right moment in the recording Logs every clip to Google Sheets** — Appends one row per clip with date, meeting title, clip number, start and end time, duration, score, tags, and description Sends one Slack alert after all clips are saved** — Posts a formatted breakdown to your sales training channel exactly once after all rows are logged, never once per clip Setup Requirements Tools Needed n8n instance (self-hosted or cloud) Fireflies.ai account with webhook access and video recording enabled WayinVideo account with API access Google Sheets (one sheet with a tab named Sales Training Clips) Slack workspace with OAuth2 app configured Credentials Required Fireflies API key (pasted into 2. Set — Config Values) WayinVideo API key (pasted into 2. Set — Config Values) Google Sheets OAuth2 Slack OAuth2 Estimated Setup Time: 15–20 minutes Step-by-Step Setup Import the workflow — Open n8n → Workflows → Import from JSON → paste the workflow JSON → click Import Activate the workflow and copy the webhook URL — Toggle the workflow to Active → click on node 1. Webhook — Fireflies Transcript Done → copy the Production URL shown Register the webhook in Fireflies — Log in to app.fireflies.ai → Settings → Developer Settings → Webhooks → paste the webhook URL → save Get your Fireflies API key — In Fireflies, go to Settings → Integrations → Fireflies API → copy your API key Get your WayinVideo API key — Log in to your WayinVideo account → go to API settings or your account dashboard → copy your API key Fill in Config Values — Open node 2. Set — Config Values → replace all placeholders: | Field | What to enter | |---|---| | YOUR_FIREFLIES_API_KEY | Your Fireflies API key from step 4 | | YOUR_WAYINVIDEO_API_KEY | Your WayinVideo API key from step 5 | | YOUR_GOOGLE_SHEET_ID | The ID from your Google Sheet URL (the string between /d/ and /edit) | | Sales Training Clips | Leave as-is, or change to match your sheet tab name exactly | | #sales-training | Your Slack channel name including the # | | findMomentsQuery | Your natural language search query — default is objection handling and rebuttal moments — change to match what you want to extract (e.g. pricing discussion moments or closing technique moments) | | maxClips | Leave as 3 or change to a higher number to extract more clips per call | > ⚠️ findMomentsQuery should use 4–6 descriptive words for best WayinVideo results — very short queries may return no results. Create your Google Sheet tab — Open your Google Sheet → add a tab named exactly Sales Training Clips → add these 11 column headers in row 1: Date, Meeting Title, Clip #, Clip Title, Start, End, Duration (sec), Score, Tags, Description, Logged At Connect Google Sheets — Open node 14. Google Sheets — Log Training Clips → click the credential dropdown → add Google Sheets OAuth2 → sign in with your Google account → authorize access Connect Slack — Open node 16. Slack — Send Training Clips Alert → click the credential dropdown → connect your Slack workspace via OAuth2 → invite the n8n bot to your sales training channel (/invite @n8n) Activate the workflow — Confirm the workflow is Active — Fireflies will now fire it automatically after every recorded sales call How It Works (Step by Step) Step 1 — Webhook: Fireflies Transcript Done This step listens for a signal from Fireflies. Every time a meeting finishes transcribing, Fireflies sends a request to this webhook URL containing the meeting ID. No manual trigger is needed — it fires automatically after every recorded call. Step 2 — Set: Config Values Your Fireflies API key, WayinVideo API key, Google Sheet ID, sheet tab name, Slack channel, Find Moments query, max clips setting, and the meeting ID from the webhook are all stored here. The meeting ID is extracted automatically from all possible Fireflies payload formats. Step 3 — HTTP: Fetch Transcript A request is sent to the Fireflies API using your API key and the meeting ID. It retrieves the meeting title, date, duration, participants, transcript URL, and — most importantly — the video_url and audio_url fields for the recording. Only metadata is fetched, not full transcript sentences. Step 4 — Code: Extract Video URL This step checks for a video URL first, then falls back to an audio URL if no video is available. If neither is present, the workflow throws an error and stops cleanly — WayinVideo requires a media URL to process. The meeting metadata is also cleaned and formatted here for use in the sheet and Slack message. Step 5 — HTTP: Submit Find Moments Task The recording URL and your natural language query are submitted to the WayinVideo Find Moments API. The project name is set automatically using the meeting title. WayinVideo returns a project ID confirming the job was accepted and processing has started. Step 6 — Code: Save Project ID The project ID returned by WayinVideo is saved along with all the meeting metadata. A poll counter is initialized at zero — this counter tracks how many times the workflow has checked the status and enforces the 20-poll timeout. Step 7 — Wait: 45 Seconds The workflow pauses for 45 seconds before checking the WayinVideo status for the first time. This initial wait gives WayinVideo time to begin processing before the first poll. Step 8 — HTTP: Poll Find Moments Results A GET request is sent to the WayinVideo results endpoint using the project ID. It returns the current processing status and, once complete, the full list of matched clips with their timestamps, scores, titles, descriptions, and tags. Step 9 — Code: Check Status The poll counter is incremented and the status is evaluated. If the status is SUCCEEDED, the isReady flag is set to true and the workflow moves forward. If the status is FAILED, the workflow throws an error with the failure message and stops. If the status is anything else (still processing), the workflow continues to the next check. If the poll counter reaches 20 without a SUCCEEDED status (approximately 15 minutes), the workflow throws a timeout error and stops. Step 10 — IF: Processing Complete? This is the retry gate. If isReady is true (YES path — processing is done), the workflow moves forward to extract and log the clips. If isReady is false (NO path — still processing), the workflow routes to 11. Set — Still Processing which loops back to 7. Wait — 45 Seconds for another cycle. Step 11 — Set: Still Processing This step handles the not-yet-complete case. It sets a brief in-progress message and the loop continues back to the wait step for another 45-second pause before the next poll. Step 12 — Code: Process Clips All clips returned by WayinVideo are sorted by relevance score from highest to lowest. The top clips up to your maxClips limit are kept. Each clip's millisecond timestamps are converted to MM:SS format for easy reading. Sheet rows are assembled for each clip and the full Slack message is built — including meeting title, date, duration, the query used, total clips found, and a numbered clip breakdown with timestamps, duration, score, and a short description. Step 13 — Code: Split Rows for Sheets The clips array is converted into individual items — one per clip — so each can be written to Google Sheets as a separate row. An isLastRow flag is set to true only on the final clip, which controls when the Slack alert fires. Step 14 — Google Sheets: Log Training Clips Each clip is appended as one row to your Sales Training Clips tab. All 11 columns are populated: date, meeting title, clip number, clip title, start time, end time, duration in seconds, relevance score, tags, description, and logged-at timestamp. Step 15 — IF: Last Clip Logged? After each row is written, this check reads the isLastRow flag. If true (YES path — this was the final clip), the Slack alert fires. If false (NO path — more clips still need logging), the workflow routes to 17. Set — More Clips and the loop continues to the next clip row. Step 16 — Slack: Send Training Clips Alert Once all clips are logged, one formatted Slack message is posted to your sales training channel. It shows the meeting title, date, duration, the query used, total clips found, and a numbered breakdown of each clip with timestamps, duration, score, and a short description. Step 17 — Set: More Clips This step handles non-final clips during the logging loop. It sets a brief in-progress message and the loop continues to the next clip. Key Features ✅ Natural language clip search — You describe what you want to find in plain English and WayinVideo locates the matching moments — no manual scrubbing through recordings ✅ Retry loop with hard timeout — The workflow polls every 45 seconds for up to 20 attempts (approximately 15 minutes) before stopping — long calls never hang indefinitely ✅ Clips ranked by relevance score — Results are sorted by WayinVideo's confidence score so your top clip is always the most relevant match to your query ✅ MM:SS timestamps for every clip — Raw millisecond data is converted to human-readable timestamps so anyone on the team can jump straight to the right moment ✅ Slack fires exactly once — The isLastRow flag ensures your sales team receives one clean notification after all clips are logged, never one message per clip ✅ Video URL preferred, audio fallback — The workflow uses the video recording when available and falls back to audio automatically — no manual configuration per meeting type ✅ Per-clip Google Sheets logging — Each clip gets its own row with score, tags, timestamps, and description — your sheet becomes a searchable training library over time ✅ Customizable query per workflow instance — Change findMomentsQuery once in Config Values and every future call is analyzed against your chosen training focus Customisation Options Change the training focus — In node 2. Set — Config Values, update findMomentsQuery to match whatever you want to extract — for example pricing and discount discussions, discovery questions about pain points, or closing and next steps conversations to build different training clip libraries. Increase the number of clips per call — In node 2. Set — Config Values, change maxClips from 3 to 5 or 10 to capture more moments per recording — useful for longer calls or when you want a broader set of examples per session. Reduce the polling wait time for faster calls — In node 7. Wait — 45 Seconds, change the wait duration to 30 for shorter recordings that WayinVideo processes faster, or increase to 60 for very long calls to reduce unnecessary API calls. Add a Slack alert when no clips are found — In node 12. Code — Process Clips, the workflow currently throws an error if clips is empty — instead you can change this to return a noClips: true flag and add an IF check that posts a brief Slack message noting no matching moments were found for this call. Log clips to a different sheet per month — In node 2. Set — Config Values, make sheetName dynamic by appending the current month (e.g. Sales Training Clips — April 2026) so clips are automatically organized into monthly tabs without any manual file management. Troubleshooting Workflow not triggering when a call ends: Confirm the workflow is Active — inactive workflows do not receive Fireflies webhooks Log in to app.fireflies.ai → Settings → Developer Settings → Webhooks → confirm the URL matches the Production URL from node 1. Webhook — Fireflies Transcript Done exactly Fireflies only fires webhooks for meetings where you are the organizer and where the bot was invited to record — calls without the bot will not have a video URL WayinVideo returning no project ID or auth error: Confirm YOUR_WAYINVIDEO_API_KEY in node 2. Set — Config Values is replaced with your actual key — not the placeholder text Check the execution log of node 5. HTTP — Submit Find Moments Task for the exact API error response Confirm the findMomentsQuery uses 4–6 descriptive words — very short single-word queries may be rejected or return empty results Polling loop running too long or timing out: If the loop exceeds 20 polls, it stops with a timeout error — check the WayinVideo dashboard to see if the job is still processing or failed on their end For very long recordings (over 60 minutes), consider increasing the wait in node 7. Wait — 45 Seconds to 90 seconds to reduce the chance of timeout on a tight poll budget Check node 9. Code — Check Status execution log to see the current status value returned on each poll Google Sheets not logging rows: Confirm the Google Sheets OAuth2 credential in node 14. Google Sheets — Log Training Clips is connected and not expired Check that YOUR_GOOGLE_SHEET_ID in node 2. Set — Config Values is the ID from the sheet URL, not the full URL Confirm the tab is named Sales Training Clips exactly — capitalization must match sheetName in Config Values Verify all 11 column headers in row 1 match exactly: Date, Meeting Title, Clip #, Clip Title, Start, End, Duration (sec), Score, Tags, Description, Logged At Slack alert not arriving after clips are logged: Confirm the Slack OAuth2 credential in node 16. Slack — Send Training Clips Alert is connected and authorized Check that #sales-training in node 2. Set — Config Values includes the # prefix and matches your channel name exactly Type /invite @n8n in the channel to ensure the bot has posting permission Check the isLastRow value in the execution log of node 15. IF — Last Clip Logged? — if it never reaches true, the clips array may have had only one clip that was not marked as last correctly Support Need help setting this up or want a custom version built for your team or agency? 📧 Email: info@isawow.com 🌐 Website: https://isawow.com/
by Dinakar Selvakumar
Automate LinkedIn lead discovery, enrichment, and email follow-ups using Apify and Google Sheets What this template demonstrates End-to-end lead pipeline (discovery → enrichment → outreach) Google Search–based LinkedIn discovery (safe approach) Batch processing with controlled loops AI-generated cold emails and follow-ups Google Sheets as a structured lead database Use cases B2B outbound lead generation Recruitment sourcing workflows Founder-led sales outreach Building verified prospect lists Automated follow-up systems How it works Reads role + location inputs from Google Sheets Uses Apify to find LinkedIn profiles via Google Search Stores raw leads and filters valid profiles Enriches profiles with additional data Generates personalized email sequences using AI Sends emails and tracks responses Updates lead status to prevent duplicates How to use Add {{APIFY_API_TOKEN}} Connect Google Sheets and Gmail Prepare input sheet (Keyword, Location) Run workflow in test mode Verify outputs in Google Sheets Activate workflow Requirements n8n (cloud or self-hosted) Apify account Google Sheets Gemini / LLM API key Good to know No direct LinkedIn automation (safe and compliant) Email follow-ups include response tracking Uses batching to handle large datasets Google Sheets acts as the system state Customising this workflow Change target roles and locations Improve AI prompts for personalization Add email verification tools Replace Sheets with a database Add retry logic and rate limits What this template demonstrates Multi-step automation architecture API orchestration using HTTP nodes AI integration in workflows Conditional logic and batching Scalable lead processing design
by Incrementors
Description Add your approved SEO Q&A pairs to a Google Sheet, activate the workflow, and share the chat URL with your team or clients. The chatbot reads your entire knowledge base on every question and answers strictly from your own content — never from outside sources. Every conversation is automatically logged to a second sheet so you can track common questions and improve your knowledge base over time. Built for SEO agencies, consultants, and marketing teams who want a branded AI assistant without hallucinated or off-brand answers. What This Workflow Does Reads your knowledge base live** — Pulls all Q&A rows from your Google Sheet on every question so answers always reflect your latest approved content Answers strictly from your content** — GPT-4o-mini is instructed to never use outside knowledge, keeping every response on-brand and accurate Delivers an honest fallback** — If a question is not covered in your sheet, the bot tells the user directly and points them to your support team instead of guessing Maintains conversation memory** — Users can ask follow-up questions naturally without repeating context, just like a real chat Logs every exchange automatically** — Appends each session ID, timestamp, question, and answer to a Chat Log sheet for analytics and gap identification Returns the reply in real time** — The answer is sent back to the chat interface instantly at the same time as it is being logged Setup Requirements Tools Needed n8n instance (self-hosted or cloud) OpenAI account with GPT-4o-mini API access Google account with two Google Sheets (one for the knowledge base, one for the chat log) Credentials Required OpenAI API key Google Sheets OAuth2 (used in two steps — read and log) > ⚠️ Google Sheets OAuth2 appears in 2 steps — connect it in both 3. Google Sheets — Read Knowledge Base and 9. Google Sheets — Log Chat Estimated Setup Time: 15–20 minutes Step-by-Step Setup Import the workflow — Open n8n → Workflows → Import from JSON → paste the workflow JSON → click Import Create your Knowledge Base sheet — Open Google Sheets → create a new sheet → add a tab named exactly SEO FAQ → add these four column headers in row 1: Question, Answer, Category, Last Updated → fill in at least 5–10 Q&A rows before testing Create your Chat Log sheet — In the same Google Sheet or a separate one → add a tab named exactly Chat Log → add these four column headers in row 1: Session ID, Timestamp, User Question, Bot Answer Fill in Config Values — Open node 2. Set — Config Values → replace all placeholders: | Field | What to enter | |---|---| | YOUR_KNOWLEDGE_BASE_SHEET_ID | The ID from your Knowledge Base sheet URL (the string between /d/ and /edit) | | SEO FAQ | Leave as-is, or change to match your tab name exactly | | YOUR_CHAT_LOG_SHEET_ID | The ID from your Chat Log sheet URL (same method) | | Chat Log | Leave as-is, or change to match your log tab name exactly | | YOUR COMPANY NAME | Your agency or business name | | botPersona | Edit the persona description to match your brand voice | Connect Google Sheets for reading — Open node 3. Google Sheets — Read Knowledge Base → click the credential dropdown → add Google Sheets OAuth2 → sign in with your Google account → authorize access Connect OpenAI — Open node 6. OpenAI — GPT-4o-mini Model → click the credential dropdown → add your OpenAI API key → test the connection Connect Google Sheets for logging — Open node 9. Google Sheets — Log Chat → click the credential dropdown → select the same Google Sheets OAuth2 credential you connected in step 5 Activate the workflow — Toggle the workflow to Active → click on node 1. Chat Message Received → copy the Chat URL shown → share this URL with your team or embed it in your site How It Works (Step by Step) Step 1 — Chat Trigger: Receive User Question This step creates a public chat interface at a shareable URL. Every time a user types a message and hits send, that message is passed to the next step automatically. No credentials are needed for this step — it works as soon as the workflow is active. Step 2 — Set: Config Values Your knowledge base Sheet ID, log Sheet ID, tab names, company name, and bot persona are stored here as named variables. A unique session ID is also generated automatically for each new conversation so chats can be tracked individually in the log. Step 3 — Google Sheets: Read Knowledge Base The full contents of your SEO FAQ tab are read from Google Sheets every time a question comes in. This means you can add, edit, or remove Q&A rows at any time and the chatbot will reflect your changes immediately — no redeployment needed. Step 4 — Code: Build Knowledge Base Text All the rows from your sheet are formatted into a numbered Q&A text block grouped by category. The user's question is also pulled from the chat trigger here. If the sheet is empty, a clear fallback message is used instead of crashing the workflow. Everything is assembled into one clean package for the AI step. Step 5 — AI Agent: SEO Consultant GPT-4o-mini receives your bot persona, the full knowledge base text, and the user's question. It searches the knowledge base for a matching answer and responds in plain, friendly language. If the question is not covered, it returns exactly: "I do not have information about this topic in my current knowledge base. Please contact [your company name] support directly for help with this." Answers are kept under 150 words and contain no markdown formatting. Step 6 — OpenAI: GPT-4o-mini Model This is the language model powering the AI step. It runs at temperature 0.3 for factual, consistent answers and is capped at 400 tokens to keep responses concise and costs low per conversation. Step 7 — Memory: Conversation Buffer This step stores the conversation history for the current session. It allows users to ask follow-up questions naturally — for example, asking "Can you explain that in more detail?" — without the bot losing context from earlier in the same chat. Step 8 — Set: Prepare Log Fields The bot's answer, the user's original question, the session ID, and the timestamp are all assembled here into a clean set of fields ready for logging and for returning to the chat interface. Step 9 — Google Sheets: Log Chat A new row is appended to your Chat Log tab with four fields: session ID, timestamp, user question, and bot answer. This runs at the same time as the reply is sent back to the user. Over time this log shows you which questions are being asked most and where your knowledge base has gaps. Step 10 — Set: Return Answer to Chat The bot answer is sent back to the chat interface so the user sees the reply immediately. This step runs simultaneously with the logging step so there is no delay in the response. The final result: the user sees a clean, on-brand answer in the chat window within seconds, and the exchange is permanently recorded in your Google Sheet. Key Features ✅ Live knowledge base sync — Edit your Google Sheet and the chatbot reflects your changes on the very next question — no redeployment ✅ Hallucination-free by design — GPT-4o-mini is explicitly instructed to answer only from your sheet, never from its own training data ✅ Honest fallback built in — Unknown questions get a clear, branded fallback message instead of a confabulated answer that damages trust ✅ Multi-turn conversation support — Conversation memory lets users ask follow-up questions in the same session without losing context ✅ Automatic chat logging — Every exchange is saved to Google Sheets with session ID and timestamp — no manual export needed ✅ Category-organized knowledge base — Q&A rows include a Category column so the AI receives structured, scannable content per topic ✅ Zero-cost trigger — The chat interface is built into n8n with no third-party chat platform required ✅ Token-efficient responses — Answers are capped at 400 tokens and 150 words, keeping GPT costs predictable even at high chat volume Customisation Options Expand the knowledge base to other topics — In node 2. Set — Config Values, edit the botPersona field to change the bot's scope from SEO-only to any topic your team needs (e.g. HR policies, product FAQs, onboarding guides) — then populate your sheet accordingly. Increase answer length for complex topics — In node 6. OpenAI — GPT-4o-mini Model, raise maxTokens from 400 to 700 and change the 150-word limit in the prompt inside node 5. AI Agent — SEO Consultant to allow longer, more detailed answers for technical subjects. Use two separate Google Sheets — If you want your knowledge base and chat log in different files, paste different Sheet IDs into knowledgeBaseSheetId and logSheetId in node 2. Set — Config Values — the workflow handles both independently. Add a Slack notification for unanswered questions — After node 9. Google Sheets — Log Chat, add a Slack node that checks if the bot answer contains the fallback phrase and posts an alert to a #kb-gaps channel so your team knows which topics to add next. Track question frequency in sheets — Add a Google Sheets step after logging that searches the Chat Log for the same question and increments a count in a separate Frequency tab — helping you prioritize which knowledge base gaps to fill first. Troubleshooting Chat not responding after activation: Make sure the workflow is toggled to Active — inactive workflows do not respond to chat messages Click on node 1. Chat Message Received and confirm the Chat URL is visible — copy it fresh after activating Send a test message and check the n8n execution log for which step failed OpenAI credential not working: Confirm the API key is connected in node 6. OpenAI — GPT-4o-mini Model specifically Check that your OpenAI account has available credits — a depleted account silently fails Verify the key has access to gpt-4o-mini — some restricted keys block specific models Knowledge base returning empty or wrong answers: Open node 3. Google Sheets — Read Knowledge Base and confirm the Google Sheets OAuth2 credential is connected Check that knowledgeBaseSheetId in node 2. Set — Config Values exactly matches the ID in your Google Sheet URL Confirm the tab is named SEO FAQ exactly — spelling and capitalization must match knowledgeBaseSheetName Chat Log not saving rows: Open node 9. Google Sheets — Log Chat and confirm the Google Sheets OAuth2 credential is connected (this is a separate connection from the read step) Check that logSheetId in node 2. Set — Config Values is correct and the tab is named Chat Log exactly Confirm your Chat Log sheet has the four column headers in row 1: Session ID, Timestamp, User Question, Bot Answer Bot answering from outside the knowledge base: The prompt in node 5. AI Agent — SEO Consultant explicitly restricts answers to the knowledge base — if the bot strays, check that the full prompt text is intact and has not been accidentally edited Lower the temperature in node 6. OpenAI — GPT-4o-mini Model from 0.3 to 0.1 for stricter, more literal responses Support Need help setting this up or want a custom version built for your team or agency? 📧 Email:info@incrementors.com 🌐 Website: https://www.incrementors.com/
by AppStoneLab Technologies LLP
Weekly Google Analytics 4 Report - Full WoW Tracking & Auto-Generated with Gemini AI Stop manually building weekly analytics reports. This workflow automatically fetches your GA4 data every Monday morning, generates an AI-written executive summary using Gemini, builds a premium formatted HTML email with deep Week-over-Week (WoW) comparisons for every metric, and delivers it straight to your stakeholders' inboxes — fully hands-free. 👤 Who is this for? Marketing teams* and *agency owners** who report GA4 metrics weekly to clients Product managers* and *founders** who want a Monday morning performance digest Freelancers** managing analytics for multiple clients who want to automate reporting Anyone who spends 30–60 minutes every week manually pulling GA4 numbers and calculating WoW changes 🚩 What problem does this solve? Manual GA4 reporting is repetitive, error-prone, and time-consuming. This template eliminates that entirely — every Monday at 8:00 AM in your configured timezone, a fully formatted report lands in your inbox. With the new dual-node architecture, it automatically calculates accurate WoW trends for your overall metrics, specific pages, traffic sources, and more, all contextualized by a Gemini-generated executive summary. ⚙️ What this workflow does ⏰ Triggers every Monday at 8:00 AM via the Schedule Trigger node 📡 Fetches 14 GA4 reports in parallel - pulling both Current Week and Previous Week data simultaneously for speed: Overview metrics Top 5 Screens / Pages by views Top 5 Traffic Sources / Referrals Top 5 Events by count Top 5 Countries by sessions Device breakdown (mobile / desktop / tablet) New vs Returning users 🔀 Merges all 14 responses and passes the complete historical dataset forward 🤖 Gemini writes a 3-5 bullet point summary analyzing the full WoW dataset to highlight performance trends, audience behaviour, and actionable recommendations 🧮 Code node processes all data - aligns current vs. previous week data, calculates WoW % changes for every single category, handles new/dropped entries, and builds the full inline-CSS HTML email 📧 Sends the report via standard SMTP / Email node to your configured recipients 📧 What the email report includes Header** - dark luxury card with 4 KPI tiles (Users, Sessions, Bounce Rate, Avg Duration) and WoW arrows AI Executive Summary** - 3-5 bullet point Gemini-generated insight (hidden automatically if Gemini fails) Overview Table** - all 5 core metrics with This Week / Last Week / WoW % change pill badges Audience** - New vs Returning users with visual progress bars and WoW changes Top Screens** - ranked by views, including previous week values and WoW trend pills. (not set) and (empty) rows are preserved for transparency Traffic Sources** - top referral channels with WoW changes; direct traffic auto-labelled as Direct / App Open Top Events** - tracks interaction trends with WoW changes; system events (first_open, os_update, etc.) are filtered out automatically Geography** - top 5 countries by sessions with WoW comparisons Devices** - mobile / desktop / tablet with visual progress bars and WoW trend pills 🛠️ Setup Instructions Step 1 - Google Analytics 4 Credential Go to n8n Credentials → Add new → search Google Analytics OAuth2 Sign in with the Google account that has access to your GA4 property Assign this credential to all 14 GA4 nodes Step 2 - Set your GA4 Property ID Open each of the 14 GA4 nodes In the Property ID field, replace {YOUR_PROPERTY_ID} with your GA4 numeric property ID Find your Property ID at: GA4 Admin → Property Settings → Property ID (looks like 123456789) Step 3 - Gemini API Credential Get your free API key at aistudio.google.com Go to n8n Credentials → Add new → search Google Gemini Paste your API key and assign it to the Generate AI Summary node Step 4 - Email / SMTP Credential Go to n8n Credentials → Add new → search SMTP (or swap the node for Gmail OAuth2 if preferred) Enter your email host, port, and login credentials Assign to the Send Weekly Report node Step 5 - Set Recipients Open the Send Weekly Report node (or the Code node depending on your mapping preference) Update the To Email field with your recipient address(es): 'email@example.com, email2@example.com' Alternatively, update the recipients: line at the bottom of the Build Report & Email HTML Code node. Step 6 - Set Timezone Open the Weekly Monday Trigger node Update the workflow settings to match your local timezone so the 8:00 AM trigger fires correctly. 🔧 How to Customise Change the schedule** → Open the trigger node, adjust the day and time to any cadence you need (daily, bi-weekly, monthly) Change the client brand in the footer** → Search for AppStoneLab Technologies in the Code node and replace it with your client or company name Filter or change events** → In the Code node, find the EXCLUDE_EVENTS array and add/remove event names to control which events appear in the report Change the AI summary language or tone** → Edit the prompt inside the Generate AI Summary Gemini node to match your client's preferred reporting style 📦 Requirements | Service | Purpose | Free Tier Available | | --- | --- | --- | | Google Analytics 4 | Source of all report data | ✅ Yes | | Google Gemini API | AI executive summary generation | ✅ Yes (via AI Studio) | | SMTP / Email | Email delivery | ✅ Yes | ⚠️ Notes Mobile app properties** - If your GA4 property tracks a mobile app, the workflow uses unifiedScreenName instead of pagePath, which works correctly for both web and app properties WoW calculations** - Bounce rate change is intentionally inverted (a decrease is shown as positive/green). If a metric like a specific page or country is new this week, the workflow dynamically tags it as "New" instead of breaking the calculation. Gemini failure handling** - If the Gemini node fails for any reason, the AI summary section is automatically hidden and the rest of the report sends normally Execute Once** - All 14 GA4 nodes have Execute Once enabled to prevent duplicate rows from the merge operation
by WeblineIndia
LeadFlow AI: n8n Webhook + OpenAI + Airtable + Slack Lead Automation This workflow captures leads via webhook, validates and deduplicates them, uses OpenAI to score and summarize intent and sends high-quality leads (score > 70) to Airtable and Slack for immediate sales action. Quick Setup (Start in Minutes) Login to your n8n account and import this workflow Connect your form/API to the webhook endpoint Add Airtable credentials and select base/table Add OpenAI API credentials Connect Slack and choose a channel Activate workflow and test with sample data What It Does This workflow automates your entire lead handling process from capture to qualification and notification. When a new lead is submitted through a webhook, the system extracts and standardizes the data, ensuring all required fields are present and usable. Next, it checks if the lead already exists in Airtable using the email address. If the lead is new, it is sent to an AI model that evaluates the message content and assigns a score, category (Hot/Warm/Cold) and a short summary. Finally, only high-intent leads (score greater than 70) are stored in Airtable and instantly sent to Slack. This ensures your sales team focuses only on the most valuable opportunities without manual filtering. Who It's For Sales teams who want instant high-quality lead alerts Marketing teams handling inbound leads from forms or ads Agencies managing multiple client lead pipelines Startups looking to automate lead qualification Anyone using Airtable as a lightweight CRM Requirements To use this workflow, you need: n8n account (self-hosted or cloud) OpenAI API key Airtable account with: Base created Table with required fields Slack workspace with bot access A form or system that can send webhook POST requests How It Works & Setup Guide Workflow Logic Webhook Trigger Receives lead data (name, email, company, message) Data Normalization Maps incoming fields into structured format Validation Ensures email exists and message length > 10 characters Deduplication Searches Airtable using email Only new leads move forward AI Scoring OpenAI analyzes message Returns: Score (0–100) Category (Hot/Warm/Cold) Summary Safety Parsing Ensures valid JSON output Applies fallback if AI response fails Filtering Only leads with score > 70 proceed Storage + Notification Saves lead in Airtable Sends Slack notification instantly Setup Steps Webhook Setup Copy webhook URL from n8n Connect it to your form/API Airtable Setup Create base and table Add fields: Name, Email, Company, Message Lead Score, Lead Category, AI Summary Connect Airtable credentials in n8n OpenAI Setup Add API key in credentials Ensure model (gpt-4o-mini) is selected Slack Setup Connect Slack account Select channel for notifications Test & Activate Send test webhook Verify Airtable + Slack outputs Activate workflow How To Customize Nodes Validation Node** Adjust message length or add more conditions (e.g., required company) AI Prompt** Modify scoring rules or summary format Add industry-specific logic Score Filter** Change threshold (e.g., 60 instead of 70) Slack Message** Add email, message or direct contact link Airtable Fields** Add tags, source, campaign tracking Add-ons (Enhancements) Send email alerts for hot leads Add CRM integrations (HubSpot, Salesforce) Store rejected leads separately Add lead source tracking (UTM parameters) Auto-assign leads to sales reps Add follow-up automation workflows Use Case Examples Website contact form lead qualification Facebook/Google Ads lead filtering SaaS demo request prioritization Agency client lead routing system Freelancer inquiry management And many more use cases depending on your business needs. Troubleshooting Guide | Issue | Possible Cause | Solution | |------|------|------| | No data in Airtable | Field mapping issue | Check field names and mappings | | Slack not sending messages | Wrong channel or credentials | Reconnect Slack and verify channel | | AI output parsing fails | Invalid JSON from AI | Check prompt and parser fallback | | Duplicate leads processed | Airtable filter issue | Verify email matching formula | | Workflow not triggering | Webhook not connected | Recheck webhook URL and method | Need Help? If you need help setting up, customizing or extending this workflow, our n8n workflow development team at WeblineIndia can assist you. We can help you: Customize AI scoring logic Integrate with advanced CRMs Build complete lead automation systems Add analytics and reporting Feel free to reach out to build powerful automation workflows tailored to your business.
by Victor Manuel Lagunas Franco
Turn any topic into a ready-to-study Anki deck. This workflow generates vocabulary flashcards with AI images and native pronunciation, then sends the .apkg file straight to your inbox. What it does You fill out a simple form (topic, languages, difficulty) GPT-4 creates vocabulary with translations, readings, and example sentences DALL-E 3 generates a unique image for each word ElevenLabs adds native pronunciation audio (word + example) Everything gets packaged into a real .apkg file The deck lands in your email, ready to import into Anki A backup copy saves to Google Sheets Why I built this I was spending hours making flashcards by hand for language learning. Finding images, recording audio, formatting everything for Anki... it took forever. This workflow does all of that in about 3 minutes. Setup (~15 min) Install npm packages: jszip and sql.js Add OpenAI credentials (for GPT-4 + DALL-E) Add ElevenLabs credentials Connect Gmail and Google Sheets via OAuth Update OPENAI_API_KEY in the DALL-E code node Update the Spreadsheet ID in the Sheets node Features 20 languages supported 7 image styles (minimal icons, kawaii, realistic, watercolor, pixel art...) 6 difficulty levels (A1 to C2) Optional reverse cards (target→native AND native→target) Works on Anki desktop and mobile
by Anwar Bouilouta
Most service businesses and freelancers track their quotes in Airtable (or something similar), but when it comes to actually sending the quote, they're still manually copying data into a document, exporting a PDF, attaching it to an email, and then going back to update the record. This workflow cuts all of that out. Who is this for Freelancers, agencies, and small service businesses who already use Airtable to track client work and want to stop manually creating quote documents. If you've ever caught yourself copying the same line items into a Google Doc for the third time in a week, this is for you. How it works The workflow starts with a webhook. You can call it from an Airtable automation (when a record hits "Ready to Send", for example) or trigger it manually from Postman or any HTTP client. Once triggered, it pulls the quote record from Airtable, grabs the client details and line items, and builds a branded HTML document with proper formatting, subtotals, tax calculation, and a grand total. That HTML then gets converted to a PDF through pdf.co's free API. From there, the PDF gets uploaded to a Google Drive folder and emailed to the client as an attachment via Gmail. The Airtable record is updated with the Drive link and marked as "Sent" so you have a clear audit trail. How to set it up Create an Airtable base with a "Quotes" table. You'll need these columns: Client Name, Client Email, Line Items (long text, one per line in the format Description | Qty | Price), Tax Rate, Notes, and Status Open the "Configure Settings" node in the workflow and fill in your business name, email address, physical address, and Google Drive folder ID Connect your Airtable, Gmail, and Google Drive accounts in n8n Sign up for a free pdf.co account and add the API key as an HTTP Header Auth credential Activate the workflow and test it by sending a POST request with {"recordId": "rec..."} to the webhook URL Requirements Airtable account (free tier works) Gmail account with OAuth connected in n8n Google Drive for PDF storage pdf.co API key (free tier gives you 100 credits/month, each conversion costs 1 credit) Customizing the workflow The HTML template lives inside the "Build HTML Quote" code node. You can change the layout, fonts, colors, and add your logo by editing the HTML string directly. The brand color is pulled from the Configure Settings node, so changing it there updates the whole document. You can also adjust the quote validity period (default is 30 days) or change the reference number format in the same code node. If you want to swap pdf.co for another HTML-to-PDF service, just update the HTTP Request node URL and payload format.
by Milos Vranes
Quick overview This workflow receives web form submissions via webhook, uses OpenAI to score and classify each lead, then emails hot leads through Gmail and logs them to separate Google Sheets tabs for hot versus cold review. How it works Receives a POST webhook request containing lead details (name, email, company, role, message). Normalizes the incoming fields and adds a timestamp. Sends the lead details to OpenAI Chat Completions to return a JSON score (1–10), intent label, and one-sentence rationale. Parses and validates the AI JSON output and merges it back into the lead record. If the score is 7 or higher, sends a Gmail alert and appends the lead to the “Hot Leads” tab in Google Sheets. If the score is below 7, appends the lead to the “Cold Review” tab in Google Sheets. Responds to the webhook caller with a JSON payload including ok, score, and intent. Setup Add an OpenAI API key (used via HTTP Header Auth) and ensure the Authorization header is set for requests to https://api.openai.com/v1/chat/completions. Connect a Gmail OAuth2 credential and set the recipient email (update the workflow variable alertInbox or replace the default you@example.com). Create a Google Sheet with two tabs named exactly “Hot Leads” and “Cold Review”, add the expected header columns, and replace REPLACE_WITH_YOUR_SHEET_ID in both Google Sheets nodes. Activate the workflow, copy the production webhook URL for the lead-qualifier endpoint, and configure your form tool to POST submissions to it as JSON.
by WeblineIndia
Commodity Portfolio Tracker using n8n, Google Sheets, Gemini AI & Gmail Alerts This workflow automatically monitors a commodity portfolio stored in Google Sheets, compares actual allocation against predefined targets, detects deviations and sends intelligent rebalance alerts via email using Gemini AI. It also logs every run (success, failure or no action) into a tracking sheet for audit purposes. Quick Implementation Steps Connect Google Sheets, Gmail and Gemini credentials in your n8n account Add holdings data in Google Sheets Configure targets in "Workflow Settings" node Create rebalance_log sheet with required columns Test workflow → Activate schedule What It Does This workflow acts as an automated portfolio monitoring system specifically designed for commodity-based investments such as Gold, Silver, Oil, Copper and Natural Gas. It reads portfolio holdings using the Read Holdings node and combines them with configuration from the Workflow Settings node. The workflow validates data through Validate Portfolio Data, calculates allocation via Calculate Portfolio Allocation and identifies deviations using Detect Portfolio Drift. If deviations exceed limits, Classify Alert Severity determines how critical the situation is. Finally, Build Alert Prompt and Generate Alert Message (Gemini AI) create a human-readable alert, which is processed in Prepare Alert Payload, sent via Send Rebalance Email and logged using Log Sent Alert, Log Validation Failure or Log No Action depending on the outcome. Who It's For Financial advisors managing client portfolios Individual investors tracking commodity allocations Portfolio managers looking for automation FinTech developers building advisory tools Anyone who wants rule-based rebalancing alerts Requirements n8n account (cloud or self-hosted) Google Sheets account (for holdings + logs) Gmail account (for sending alerts) Google Gemini API credentials Basic understanding of n8n nodes and workflows How It Works & Setup Instructions Step 1: Prepare Google Sheets Create two sheets: Holdings Sheet Columns example: asset, units, price, current_value, last_updated Log Sheet (rebalance_log) Columns: run_date,total_value,rebalance_needed,severity,affected_assets,alert_sent,summary,reason_skipped Step 2: Configure Workflow Settings Node Update values inside Workflow Settings node: Target allocation (must sum to 100) Min/Max ranges Alert email Severity thresholds Currency Step 3: Connect Credentials Google Sheets → used in Read Holdings, Log Sent Alert, Log Validation Failure, Log No Action Gmail → used in Send Rebalance Email Gemini → used in Generate Alert Message Step 4: Workflow Execution Flow (Node-by-Node) Schedule Trigger starts the workflow Read Holdings fetches portfolio data Workflow Settings provides configuration Synchronize Inputs merges both sources Prepare Portfolio Context structures the data Validate Portfolio Data ensures correctness Check Validation Status routes valid/invalid data Calculate Portfolio Allocation computes percentages Detect Portfolio Drift identifies deviations Check Rebalance Requirement decides action path Classify Alert Severity assigns severity level Build Alert Prompt prepares AI input Generate Alert Message creates final message Merge Alert Data combines AI + data Prepare Alert Payload formats output Send Rebalance Email sends alert Log Sent Alert / Log No Action / Log Validation Failure store results How To Customize Nodes Workflow Settings**: Change targets, thresholds, email Schedule Trigger**: Modify frequency (hourly/daily/weekly) Gemini Node**: Adjust tone of alert messages Email Node**: Add CC/BCC or change format Code Nodes**: Customize calculation logic (e.g., percentage vs amount-based rebalancing) Add-ons Slack integration for high severity alerts Dashboard visualization using Google Data Studio Multi-client portfolio support Real-time price API integration (NSE, Alpha Vantage, etc.) Risk scoring system for portfolios Use Case Examples Daily monitoring of commodity portfolios Automated advisory alerts for wealth managers DIY investor portfolio tracking system Risk management for diversified assets Audit trail for compliance and reporting There can be many more variations of this workflow depending on business needs. Troubleshooting Guide | Issue | Possible Cause | Solution | | ----------------------- | ----------------------- | ----------------------------------------------- | | No columns found | Sheet missing headers | Add header row in first row | | Undefined values in log | Wrong node connection | Connect from payload node instead of email node | | Email not sent | Gmail credentials issue | Reconnect Gmail account | | AI output empty | Prompt or API issue | Check Gemini node input | | Validation failed | Incorrect data format | Fix holdings sheet values | Need Help If you need assistance setting up this workflow, customizing features or building automation solutions, feel free to reach out to our n8n experts at WeblineIndia. We can help you: Customize workflows for your business Integrate advanced AI capabilities Build scalable automation systems Develop end-to-end FinTech solutions Get in touch to turn your ideas into production-ready workflows.
by Milos Vranes
Quick Overview This workflow hosts an n8n lead-capture form, uses Anthropic Claude to score and classify real estate inquiries, then routes ready leads to Gmail and Google Sheets while logging early-stage leads to a separate Google Sheets tab. How it works Receives a new submission from an n8n Form trigger with contact details, intent, area, budget, timeline, financing status, and notes. Normalizes the submitted fields (for example trimming strings, lowercasing email, and adding a timestamp) for consistent downstream processing. Sends the normalized lead details to the Anthropic Messages API (Claude) to return a strict JSON classification, summary, timeline band, financing readiness, recommended agent role, and score. Parses the Claude JSON response, clamps the score to a 1–10 range, and calculates whether the lead is “ready” (score 7). If the lead is ready, sends a formatted Gmail alert to the agent and appends the lead to the “Active Leads” tab in Google Sheets. If the lead is not ready, appends the lead to the “Nurture Leads” tab in Google Sheets. Returns a confirmation message to the form submitter after the lead is routed. Setup Create an Anthropic HTTP Header Auth credential (x-api-key) and attach it to the HTTP request to the Anthropic Messages API. Add a Gmail credential and replace the placeholder recipient address (you@example.com) with your agent inbox. Add a Google Sheets credential, create a spreadsheet with “Active Leads” and “Nurture Leads” tabs, and replace REPLACE_WITH_YOUR_SHEET_ID in both Google Sheets append steps. Review and adjust the n8n form fields and the Claude prompt rubric (scoring, readiness threshold, and schema) to match your lead intake process.