by Daniel
AI Email Support Agent with RAG & Cohere Reranking Transform your inbox into an intelligent support system: automatically detect new emails, retrieve relevant knowledge from Pinecone, rerank with Cohere for precision, generate contextual replies using Gemini AI, and respond—all while maintaining conversation history. What It Does This workflow triggers on incoming Gmail messages, leverages a LangChain agent with PostgreSQL memory for context, queries a Pinecone vector store (RAG) enhanced by Cohere reranking and OpenAI embeddings, crafts personalized responses via Gemini 2.5, and auto-replies to keep support flowing. Key Features Gmail Integration** - Real-time polling for new emails every minute RAG with Pinecone** - Retrieves top 10 relevant docs from "agency-info" index as agent tool Cohere Reranking** - Boosts retrieval accuracy by reordering results semantically Persistent Memory** - Postgres chat history keyed by email ID for ongoing threads Gemini-Powered Agent** - Handles queries with custom system prompt for agency support Seamless Auto-Reply** - Sends formatted text responses directly in Gmail Perfect For Agencies**: Automate client FAQs on services, pricing, and ownership Support Teams**: Scale responses without losing conversation context Small Businesses**: Handle inquiries 24/7 with AI-driven accuracy Developers**: Prototype RAG agents with vector stores and rerankers Marketers**: Personalize outreach replies based on knowledge base Consultants**: Quick, informed answers from internal docs Technical Highlights Built on n8n's LangChain ecosystem, this workflow highlights: Trigger-to-response pipeline with polling and webhooks Hybrid retrieval: Embeddings + vector search + semantic reranking Stateful agents with database-backed memory for multi-turn chats Multi-provider setup: OpenAI (embeddings), Cohere (rerank), Google (LLM) Scalable for production with configurable topK and session keys Setup Instructions Prerequisites n8n instance with LangChain nodes enabled Accounts for: Gmail (OAuth2), OpenAI (API key), Cohere (API key), Google Gemini (API key), Pinecone (API key and index), Postgres (database connection, e.g., Neon or Supabase) Required Credentials Gmail OAuth2 Enable Gmail API in Google Cloud Console Create OAuth2 credential in n8n with scopes: https://www.googleapis.com/auth/gmail.readonly, https://www.googleapis.com/auth/gmail.send OpenAI API Get API key from platform.openai.com Add as OpenAI credential in n8n Cohere API Sign up at cohere.com Copy API key to n8n Cohere credential Google Gemini API Generate key at https://aistudio.google.com/ Add as Google PaLM credential in n8n (compatible with Gemini) Pinecone API Create index "agency-info" with dimension 1024 Add API key to n8n Pinecone credential Postgres Set up database (e.g., Neon/Supabase) with a table for chat history Add connection details (host, database, user, password) to n8n Postgres credential Configuration Steps Import the workflow JSON into your n8n instance Assign all required credentials to the respective nodes Populate the Pinecone "agency-info" index with your knowledge base documents (use a separate upsert workflow or Pinecone dashboard) Customize the tableName in the Postgres Memory node if needed (default: "email_support_agent_") Adjust the agent's system prompt or topK retrieval if required for your use case Activate the workflow and test by sending a sample email to trigger it Troubleshooting No trigger firing**: Verify Gmail scopes and polling interval Empty retrieval**: Check Pinecone index population, dimensions (must be 1024), and document embeddings Rerank errors**: Ensure Cohere API key is valid and has sufficient quota Memory issues**: Confirm Postgres connection and that sessionKey uses email ID Perfect for deploying hands-off email automation. Import, connect credentials, and activate!
by Abdullah Alshiekh
What Problem Does It Solve? SEO professionals and marketers spend hours manually searching keywords to analyze competitor content. Copying and pasting SERP results into spreadsheets is tedious and prone to formatting errors. Analyzing "why" a page ranks requires significant mental effort and time for every single keyword. This workflow solves these by: Automatically fetching live Google search results for a list of keywords. Using AI to instantly analyze the top ranking pages for Intent, Strengths, and Weaknesses. Delivering a consolidated, strategic SEO report directly to your email inbox. How to Configure It API Setup: Connect your Decodo credentials (for scraping Google results).- Connect your Google Gemini credentials (for the AI analysis). Connect your Gmail account (to send the final report). Keyword Input: Open the "Edit Fields" node and replace the placeholder items (keyword_1, etc.) with the actual search terms you want to track. Email Recipient: Update the "Send a message" node with your email address. How It Works The workflow triggers manually (or can be scheduled). It loops through your defined list of keywords one by one. Decodo performs a real-time Google search for each term and extracts organic results. A JavaScript node cleans the data, removing ads and irrelevant snippets. The AI Agent acts as an expert SEO analyst, processing the top results to generate a concise audit. Finally, the workflow compiles all insights into a single email report and sends it to you. Customization Ideas Change the output: Save the analysis to a Google Sheet or Notion database instead of Email. Adjust the AI Persona: Modify the system prompt to focus on specific metrics (e.g., content gaps or backlink opportunities). Automate the Input: Connect a Google Sheet to dynamically pull new keywords every week. Schedule It: Replace the Manual Trigger with a Cron node to run this report automatically every Monday morning. If you need any help Get in Touch
by Kirill Khatkevich
This workflow continuously monitors the Meta Ads Library for new creatives from a specific competitor pages, logs them into Google Sheets, and sends a concise Telegram notification with the number of newly discovered ads. It is built as a safe, idempotent loop that can run on a schedule without creating duplicates in your sheet. Use Case Manually checking the Meta Ads Library for competitor creatives is time‑consuming, and it’s easy to lose track of which ads you’ve already seen. This workflow is ideal if you want to: Track competitor creatives over time** in a structured Google Sheet. Avoid duplicates** by matching ads via their unique id field. Get lightweight notifications* in Telegram that tell you *how many new ads appeared, without spamming you with full ad lists. Run the process on autopilot** (daily, weekly, etc.) with a single schedule. How it Works The workflow is organized into three logical blocks: 1. Fetch Ads & Handle Pagination Configuration:** The Add parameters Set node stores all key request variables: ad_active_status (e.g. active), search_page_ids (competitor page IDs), ad_reached_countries, access_token. Routing:** Page or keywords routes execution into one of two HTTP Request nodes: Facebook Ads API by page — the main branch that queries ads by page ID. Facebook Ads API by keywords — an optional branch for keyword‑based searches. Normalization:** Facebook Ads API by ... returns the raw ads_archive response. Check the pagination then: extracts data (array of ad objects) into a dedicated field, reads paging.next into next_url for pagination. Pagination Loop:** If checks whether next_url is not empty. Set Next URL assigns next_url to a generic url field. Facebook Ads API pagination requests the next page and feeds it back into Check the pagination. This loop continues until there is no next_url, ensuring all pages of the Ads Library response are processed. 2. De‑duplicate Ads & Log to Google Sheets Load Existing IDs:** Read existing IDs pulls the existing id column from your Google Sheet (configured to read a specific column/range). Collect ID list converts these into a unique, normalized string array existingIds, which represents all ads you have already logged. Attach State:** Attach existing ids (Merge node) combines, for each execution, the freshly fetched Meta response (data) with the historical existingIds array from Sheets. Filter New Creatives:** Filter new creatives Code node compares each ad’s id (string) against the existingIds set and builds a new data array containing only ads that are not yet present in the sheet. It also protects against duplicates inside the same batch by tracking seen IDs in a local Set. Write New Ads:** Split Out expands the filtered data array into individual items (one item per new ad). Add to sheet then performs an appendOrUpdate into Google Sheets, mapping core fields such as id, ad_creation_time, page_name, ad_creative_bodies, ad_snapshot_url, languages, publisher_platforms, and link fields. The column mapping uses id as the matching column so that existing rows can be updated if needed. 3. Count New Ads & Notify in Telegram Count:** In parallel with the write step, Split Out also feeds into Count new ads. This Code node returns a single summary item with newCount = items.length, i.e. the total number of new creatives processed in this run. Guard:** Any new ads? checks whether newCount is greater than 0. If not, the workflow ends silently and no message is sent, avoiding noise. Notify:** When there are new creatives, Send a text message sends a Telegram message to the configured chatId. The message includes {{$json.newCount}} and a fixed link to the Google Sheet, giving you a quick heads‑up without listing individual ads. Setup Instructions To use this template, configure the following components. 1. Credentials Meta Ads / HTTP Header Auth:** Configure the Meta Ads HTTP Header credentials used by: Facebook Ads API by page, Facebook Ads API by keywords, Facebook Ads API pagination. Google Sheets:** Connect your Google account in: Read existing IDs, Add to sheet. Telegram:** Connect your Telegram account credentials in Send a text message. 2. The Add parameters Node Open the Add parameters Set node and customize: ad_active_status: Which ads to monitor (active, all, etc.). search_page_ids: The numeric ID of the competitor Facebook Page you want to track. ad_reached_countries: Comma‑separated list of country codes (US, US, CA, etc.). access_token: A valid long‑lived access token with permission to query the Ads Library. 3. Google Sheets Configuration Read existing IDs** Set documentId and sheetName to your tracking spreadsheet and sheet (e.g. an ads tab). Configure the range to read only the column holding the ad id values. Add to sheet** Point documentId and sheetName to the same spreadsheet/sheet. Make sure your sheet has the columns expected by the node (e.g. id, creation time, page, title, description, delivery_start_time, snapshot, languages, platforms, link). Confirm that id is included in matchingColumns so de‑duplication works correctly. 4. Telegram Configuration In Send a text message, set: chatId: Your target Telegram chat or channel ID. text: Customize the message template as needed, but keep {{$json.newCount}} to show the number of new creatives. 5. Schedule Open Schedule Trigger and configure when you want the workflow to run (e.g. every morning). Save and activate the workflow. Further Ideas & Customization This workflow is a solid foundation for systematic competitor monitoring. You can extend it to: Track multiple competitors** by turning search_page_ids into a list and iterating over it with a loop or separate executions. Enrich the log with performance data** by creating a second workflow that reads the sheet, pulls spend/impressions/CTR for each logged ad_id from Meta, and merges the metrics back. Add more notification channels** such as Slack or email, or send a weekly summary that aggregates new ads by page, format, or country. Tag or categorize creatives** (e.g. “video vs image”, “country”, “language”) directly in the sheet to make later analysis easier.
by Avkash Kakdiya
How it works This workflow acts as an instant SDR that replies to new inbound leads across multiple channels in real time. It first captures and normalizes all incoming lead data into a unified structure. The workflow then evaluates IST working days and hours, generates a context-aware AI response, and routes the reply to the correct channel. Finally, it logs the full interaction, response status, and timing into Google Sheets. Step-by-step Step 1: Lead intake & normalization** Incomming Lead whatsapp1 – Receives new WhatsApp lead messages via webhook. Incomming Lead facebook1 – Captures incoming Facebook lead messages. Incomming Lead instagram1 – Listens for Instagram lead messages. Incomming Lead linkdin1 – Captures LinkedIn lead messages. Incomming Lead Website1 – Receives website form submissions. Normalize Lead Data6 – Normalizes WhatsApp lead fields. Normalize Lead Data7 – Normalizes Facebook lead fields. Normalize Lead Data8 – Normalizes Instagram lead fields. Normalize Lead Data9 – Normalizes LinkedIn lead fields. Normalize Lead Data5 – Normalizes website lead data. Switch2 – Merges all normalized leads into a single processing path. Step 2: Working hours & AI response** Extract Day and Hours1 – Converts timestamps to IST and extracts day and time. Is Working Day and Working Hour?1 – Determines whether the lead arrived during business hours. Code in JavaScript3 – Builds the AI prompt using lead details and timing context. Get Ai Response1 – Generates a short, human-like response. Step 3: Send reply & log data** Code in JavaScript4 – Combines AI output with normalized lead data. Switch3 – Routes the response based on the source channel. Send message – Sends WhatsApp replies. Send Instagram Message1 – Sends Instagram responses. Send Facebook Messages1 – Sends Facebook replies. Send Linkdin Messages1 – Sends LinkedIn responses. Send a message1 – Sends email replies for website leads. Code in JavaScript5 – Finalizes response status and metadata. google-sheet-name – Appends or updates lead and response data in Google Sheets. Why use this? Replies instantly to leads across all major inbound channels Keeps all lead data standardized and easy to manage Automatically respects IST working days and hours Reduces manual SDR workload without losing response quality Maintains a complete response log for reporting and follow-up
by Rahul Joshi
Description Turn raw marketing data into actionable insights with this n8n Source/UTM Attribution and Reporting workflow! It automatically aggregates lead submissions, calculates Cost Per Lead (CPL) per channel, and generates AI-powered weekly attribution reports—delivered straight to your inbox in a professional HTML format. What This Template Does 📅 Runs hourly to process new lead submissions 📊 Aggregates leads by source (Instagram, LinkedIn, Google Ads, etc.) 💰 Calculates key metrics like Cost Per Lead (CPL) 🧠 Uses AI to generate executive-ready HTML reports 📈 Highlights top-performing sources and growth opportunities 📧 Sends polished reports via Gmail automatically Prerequisites Google Sheets with lead submission data Google Forms (or similar) as the data input source n8n instance (self-hosted or cloud) Azure OpenAI (GPT-4o-mini) API key for AI-powered reporting Gmail API credentials for automated report delivery Step-by-Step Setup Trigger workflow hourly with n8n Scheduler. Fetch new lead submissions from Google Sheets. Aggregate and group data by Source/UTM parameters. Calculate CPL using spend + lead count per channel. Standardize column names for consistent reporting. Send raw + aggregated data to Azure OpenAI for report generation. Format into a professional HTML report (with insights & recommendations). Send report via Gmail node to stakeholders. Customization Ideas Replace Gmail with Slack/Teams notifications for real-time sharing. Add visual charts (Google Data Studio / Looker) for more analytics. Use additional UTM fields (campaign, adgroup, creative) for deeper granularity. Extend reporting to include ROI and ROAS calculations. Key Benefits ✅ Hands-free attribution tracking and analysis ✅ Accurate CPL metrics per channel ✅ AI-generated reports with actionable insights ✅ Saves time vs. manual data crunching ✅ Weekly reports ensure marketing strategy stays optimized Perfect For Marketing teams managing multi-channel campaigns Agencies providing client attribution reports Business owners optimizing ad spend efficiency Growth teams tracking lead quality by source
by Chad M. Crowell
How it works This workflow automatically scans AWS accounts for orphaned resources (unattached EBS volumes, old snapshots >90 days, unassociated Elastic IPs) that waste money. It calculates cost impact, validates compliance tags, and sends multi-channel alerts via Slack, Email, and Google Sheets audit logs. Key Features: 🔍 Multi-region scanning with parallel execution 💰 Monthly/annual cost calculation with risk scoring 📊 Professional HTML reports with charts and tables 🏷️ Tag compliance validation (SOC2/ISO27001/HIPAA) ✅ Conditional alerting (only alerts when resources found) 📈 Google Sheets audit trail for trend analysis What gets detected: Unattached EBS volumes ($0.10/GB/month waste) Snapshots older than 90 days ($0.05/GB/month) Unassociated Elastic IPs ($3.60/month each) Typical savings: $50-10K/month depending on account size Set up steps Prerequisites AWS Configuration: Create IAM user n8n-resource-scanner with these permissions: ec2:DescribeVolumes ec2:DescribeSnapshots ec2:DescribeAddresses ec2:DescribeInstances lambda:InvokeFunction Deploy Lambda function aws-orphaned-resource-scanner (Node.js 18+) Add EC2 read-only permissions to Lambda execution role Generate AWS Access Key + Secret Key Lambda Function Code: See sticky notes in workflow for complete implementation using @aws-sdk/client-ec2 Credentials Required: AWS IAM (Access Key + Secret) Slack (OAuth2 or Webhook) Gmail (OAuth2) Google Sheets (OAuth2) Configuration Initialize Config Node: Update these settings: awsRegions: Your AWS regions (default: us-east-1) emailRecipients: FinOps team emails slackChannel: Alert channel (e.g., #cloud-ops) requiredTags: Compliance tags to validate snapshotAgeDays: Age threshold (default: 90) Set Region Variables: Choose regions to scan Lambda Function: Deploy function with provided code (see workflow sticky notes) Google Sheet: Create spreadsheet with headers: Scan Date | Region | Resource Type | Resource ID | Monthly Cost | Compliance | etc. Credentials: Connect all four credential types in n8n Schedule: Enable "Weekly Scan Trigger" (default: Mondays 8 AM UTC) Testing Click "Execute Workflow" to run manual test Verify Lambda invokes successfully Check Slack alert appears Confirm email with HTML report received Validate Google Sheets logging works Customization Options Multi-region:** Add regions in "Initialize Config" Alert thresholds:** Modify cost/age thresholds Additional resource types:** Extend Lambda function Custom tags:** Update required tags list Schedule frequency:** Adjust cron trigger Use Cases FinOps Teams:** Automated cloud waste detection and cost reporting Cloud Operations:** Weekly compliance and governance audits DevOps:** Resource cleanup automation and alerting Security/Compliance:** Tag validation for SOC2/ISO27001/HIPAA Executive Reporting:** Monthly cost optimization metrics Resources AWS IAM Best Practices Lambda Function Code
by Marián Današ
Who’s this for 💼 This template is designed for teams and developers who need to generate PDF documents automatically from HTML templates. It’s suitable for use cases such as invoices, confirmations, reports, certificates, or any custom document that needs to be created dynamically based on incoming data. What this workflow does ⚙️ This workflow automates the full lifecycle of document generation, from request validation to delivery and storage. It is triggered by a POST webhook that receives structured JSON data describing the requested document and client information. Before generating the document, the workflow validates the client’s email address using Hunter Email Verification to prevent invalid or mistyped emails. If the email is valid, the workflow loads the appropriate HTML template from a Postgres database, fills it with the incoming data, and converts it into a PDF using PDF Generator API. Once the PDF is generated, it is sent to the client via Gmail, uploaded to Supabase Storage, and the transaction is recorded in the database for tracking and auditing purposes. How it works 🛠️ Receives a document generation request via a POST webhook. Validates the client’s email address using Hunter. Generates a PDF document from an HTML template using PDF Generator API. Sends the PDF via Gmail and uploads it to Supabase Storage. Stores a document generation record in the database. How to set up 🖇️ Before activating the workflow, make sure all required services and connections are prepared and available in your n8n environment. Create a POST webhook endpoint that accepts structured JSON input. Add Hunter API credentials for email verification. Add PDF Generator API credentials for HTML to PDF conversion. Prepare a Postgres database with tables for HTML templates and document generation records. Set up Gmail or SMTP credentials for email delivery. Configure Supabase Storage for storing generated PDF files. Requirements ✅ PDF Generator API account Hunter account Postgres database Gmail or SMTP-compatible email provider Supabase project with Storage enabled How to customize the workflow 🤖 This workflow can be adapted to different document generation scenarios by extending or modifying its existing steps: Add extra validation steps before document generation if required. Extend delivery options by sending the generated PDF to additional services or webhooks. Enhance security by adding document encryption or access control. Add support for additional document types by storing more HTML templates in the database. Modify the database schema or queries to store additional metadata related to generated documents. Adjust the data mapping logic in the Code node to match your input structure.
by Dhruv Mali
How it works This workflow automates the entire lifecycle of a service-based client, combining four distinct business flows into a single view: Intake Leads: Receives a webhook from your form builder, validates the data, optionally enriches the email using Clearbit, and creates records in Airtable and Notion. Manage Bookings: Processes scheduling webhooks to update lead status, create Google Calendar events, and send pre-call survey emails. Send Reminders: Runs a daily schedule to scan Airtable for upcoming calls and automatically sends 24h reminder emails to reduce no-shows. Onboard Clients: Reacts to successful payments by marking leads as "Paid," generating a Notion Onboarding Checklist, and sending a Welcome Kit via Email and WhatsApp. Set up steps Configure Credentials: Connect your accounts for Airtable, Notion, Slack, Google Calendar, and GMAIL. (Optional) Add credentials for Clearbit (enrichment) and Twilio (WhatsApp). Customize Emails: Open the four Email Send nodes. Customize the Body Text with your own booking links and survey URLs. Configure Tables & IDs: Update the Airtable nodes with your specific Base and Table names (e.g., tblLeads). Update the Notion nodes with your Database IDs for Projects and Onboarding. Connect Webhooks: Copy the Production URLs from the three Webhook nodes (Lead Intake, Booking, Payment) and paste them into your respective form, calendar, or payment provider settings.
by gotoHuman
Let AI classify your incoming emails and draft replies. Use gotoHuman to approve emails before they are sent out. It also lets you manually edit the draft or even ask for a retry. How it works The workflow is triggered for each new email which gets passed to an AI classification agent. It assigns the email to one of the categories defined in the prompt (Customer Support, Sales opportunity, Promo, Personal,...). The agent also determines whether a reply is needed and if it is important. If a reply is needed, we ask the AI Email Writer to draft a response. Even if it is missing context it can help us draft an outline for the response. The email draft is sent to gotoHuman where the reviewer can manually edit it or ask to regenerate it with the option to even edit the prompt (Retries loop back to the AI Email Writer node) Approved email replies are automatically sent from the workflow How to set up Most importantly, install the gotoHuman node before importing this template! (Just add the node to a blank canvas before importing) Set up your credentials for gotoHuman, OpenAI, and Gmail In gotoHuman, select and create the pre-built review template "Email agent" or import the ID: v81wzxwYoFYvWpmuIBgX Select this template in the gotoHuman node Requirements You need accounts for gotoHuman (human supervision) OpenAI (classification, drafting) Gmail How to customize Change the predefined categories in the prompt of the AI classification agent Provide the AI Email Writer with more context to create replies. Consider adding tools that allow the agent to fetch more infos about clients, your calendar, FAQs for your product,...
by InfyOm Technologies
✅ What problem does this workflow solve? Tracking what people say about your brand on Twitter can be overwhelming, especially when important mentions slip through the cracks. This workflow automates the process: it scrapes Twitter mentions, analyzes sentiment using OpenAI, logs everything in a Google Sheet, and sends real-time Slack alerts for negative tweets. No manual monitoring needed. ⚙️ What does this workflow do? Runs on a schedule to monitor Twitter mentions or hashtags. Uses Apify to scrape tweets based on brand keywords. Filters out tweets already processed (avoids duplicates). Performs sentiment analysis with OpenAI (Positive, Neutral, Negative). Logs tweet content, sentiment, and reply (if any) in a Google Sheet. Sends an instant Slack notification for negative tweets. Generates thank-you replies for positive tweets and logs them. 🔧 Setup Instructions 🗓 Schedule Trigger Use the Cron node to schedule checks (e.g., every hour, daily). 🐦 Apify Twitter Scraper Setup Sign up on Apify Generate your Apify API Token and use it in the HTTP node to run the actor and get tweet results. 🤖 OpenAI Sentiment Analysis Get your API key from OpenAI 📄 Google Sheet Configuration Prepare a Google Sheet with this sample format. Connect it using the Google Sheets node in n8n. 💬 Slack Notifications Connect your Slack workspace via the Slack node. Set up the channel where negative tweets should be sent as alerts. 🧠 How it Works 1. Scheduled Run Triggered at a fixed interval using the Schedule (Cron) node. 2. Scrape Mentions from Twitter The Apify actor runs and collects recent tweets mentioning your brand or using your hashtag. Links to the tweets are extracted. 3. Filter Previously Seen Tweets Each tweet is checked against the Google Sheet. If already present, it’s skipped to avoid duplicate analysis. 4. Analyze Sentiment with OpenAI For new tweets, sentiment is classified into: ✅ Positive ⚪ Neutral ❌ Negative 5. Store Results in Google Sheet The tweet link, content, and sentiment are stored in a row. If sentiment is positive, a thank-you reply is also generated and saved. 6. Notify Slack for Negative Tweets When a tweet is tagged Negative, a Slack message is sent to the designated channel with the tweet link. 👤 Who can use this? This workflow is ideal for: 📢 Social Media Teams 🧠 PR and Brand Managers 🧑💻 Solo Founders 🏢 Startups & SaaS Companies Stay ahead of your brand's reputation—automatically. 🛠 Customization Ideas 🎯 Add filters for specific campaign hashtags. 📬 Send weekly summary reports via email. 📥 Auto-open support tickets for negative mentions. 🗣 Expand sentiment categories with more detailed tagging. 🚀 Ready to get started? Just plug in: 🔑 Your Apify API Token 🔑 Your OpenAI API Key 📄 Your Google Sheet 💬 Your Slack Channel Then deploy the workflow, and let it monitor Twitter for you!
by MAMI YAMANE
Here is the template specification based on the provided workflow and guidelines. Audit Instagram Influencer Safety and Engagement to Slack Description Protect your brand reputation and optimize your marketing budget by automatically vetting potential influencer partners. Manually analyzing engagement rates and reading through hundreds of comments to detect brand safety risks is time-consuming and prone to error. This workflow streamlines the due diligence process. By simply entering an Instagram username into a form, the system scrapes recent data, calculates engagement metrics to detect potential fake followers or bot activity, and uses AI to scan content for offensive language or competitor mentions. The final detailed audit report is delivered instantly to your Slack channel and logged in Google Sheets for record-keeping. Who is this for Influencer Marketing Managers:** To quickly vet creators before sending collaboration offers. Digital Agencies:** To perform scalable due diligence for client campaigns. Brand Managers:** To ensure potential partners align with brand safety guidelines and do not promote direct competitors. How it works Input: The workflow starts with an n8n Form where you enter the influencer’s Instagram handle and optional competitor names. Data Extraction: It triggers Apify (using the Instagram Scraper) to fetch the profile’s statistics and their most recent 30 posts. Engagement Analysis: A Code Node calculates the average engagement rate. It logic flags the account as "Suspicious" if the rate is unnaturally low (indicating fake followers) or suspiciously high (indicating bot farms). AI Safety Check: Recent post captions are aggregated and sent to OpenAI. The AI analyzes the text for risk flags (controversy, profanity), competitor mentions, and assigns a safety score. Reporting: The workflow saves the raw request and results to Google Sheets and sends a formatted summary report to a specific Slack channel. Requirements Apify Account:** You will need an API token and access to the Instagram Scraper actor. OpenAI Account:** An API key to perform the content safety analysis. Google Cloud Platform:** Credential with access to the Google Sheets API. Slack Workspace:** A configured Slack app/bot to post messages. How to set up Configure Credentials: Connect your Apify, Google Sheets, OpenAI, and Slack accounts in the respective nodes. Setup Google Sheet: Create a Google Sheet with two tabs: Audit Requests (Columns: username, timestamp) Audit Results (Columns: username, followers, engagementRate, status, safetyScore, riskFlags, recommendation) Configure Variables: Open the Workflow Configuration node (Set node) to input: Your apifyApiToken. engagementThresholdLow (default is 1%). engagementThresholdHigh (default is 10%). Update IDs: In the Store Audit Request and Store Audit Results nodes, select your created Google Sheet. In the Send Audit Report to Slack node, select the channel where you want reports to appear. How to customize the workflow Adjust Thresholds:* Change the engagementThresholdLow or engagementThresholdHigh values in the *Workflow Configuration** node to fit your specific industry benchmarks. Modify AI Criteria:* Edit the system prompt in the *AI Content Safety Audit** node to check for specific brand values, specific keywords, or tone of voice requirements. Change Output:* Replace the Slack node with an *Email* node (Gmail/Outlook) or a *Notion** node if you prefer to store reports in a project management database.
by WeblineIndia
WooCommerce Product Reviews: Sentiment Analysis with Slack Summary This workflow automatically fetches product reviews from your WooCommerce store, analyzes the sentiment of each review using AI, stores the results in Airtable and sends a summary of positive, neutral and negative reviews to Slack. It helps teams quickly understand overall customer feedback, track product sentiment and stay updated without manually reading all reviews. Quick Start – Implementation Steps Import the workflow JSON file into n8n. Configure credentials: WooCommerce HTTP Basic Auth (for fetching reviews) OpenAI API (for sentiment analysis) Airtable Personal Access Token (for storing reviews) Slack API (for sending summary messages) Adjust the Cron/Schedule Trigger node to your preferred interval (e.g., every 10 minutes). Test the workflow with a few reviews to ensure AI and Slack integrations work correctly. Activate the workflow after confirming functionality. What It Does This workflow automates sentiment analysis and team notification: Schedule Trigger** – Runs the workflow automatically at defined intervals. Set WooCommerce Domain** – Defines the WooCommerce store to fetch reviews from. Fetch Reviews** – Retrieves all recent product reviews using WooCommerce API credentials. Loop Over Items** – Processes reviews in smaller batches for efficiency. Message a Model** – Sends each review to OpenAI to detect sentiment (positive, neutral, negative) and generate a short summary. Merge & Code Nodes** – Combines original review data with AI results and ensures proper data alignment. If Node** – Checks sentiment for further processing. Create a Record (Airtable)** – Stores each review and its sentiment in Airtable. Code Summary Node** – Counts positive, neutral, and negative reviews to create a summary. Send a Message (Slack)** – Posts the sentiment summary to the team’s Slack channel for visibility. Who’s It For This workflow is ideal for: E-commerce managers tracking WooCommerce product feedback Customer support teams monitoring review sentiment Marketing and product teams seeking automated insights Teams using Airtable and Slack for data tracking and collaboration Requirements to Use This Workflow An n8n instance (cloud or self-hosted) WooCommerce store** with API access OpenAI API key** for sentiment analysis Airtable account** with base/table configured Slack workspace** with API access for messaging Basic familiarity with APIs and workflow automation How It Works Schedule Trigger – Executes the workflow at the defined interval. Set WooCommerce Domain – Configures which store to fetch reviews from. Fetch Reviews – Retrieves all recent product reviews from WooCommerce. Loop Over Items – Splits reviews into manageable batches. Message a Model – Sends reviews to AI for sentiment analysis and short summary. Merge & Code Nodes – Combines AI results with original review data and prepares it for storage and summary. If Node – Checks review sentiment for saving or further processing. Create a Record (Airtable) – Saves each review with sentiment and AI summary. Code Summary Node – Counts the number of positive, neutral, and negative reviews. Send a Message (Slack) – Sends a concise summary of review sentiment to the Slack channel. Setup Steps Import the workflow JSON into n8n. Add credentials: WooCommerce HTTP Basic Auth OpenAI API Airtable Personal Access Token Slack API Configure the WooCommerce domain in the Set WooCommerce Domain node. Test the workflow with sample reviews to ensure AI outputs correctly. Adjust the Schedule Trigger interval as needed. Activate the workflow after confirming that data flows correctly from WooCommerce → AI → Airtable → Slack. How To Customize Nodes Schedule Trigger Adjust interval (minutes, hours, days) as needed. Set WooCommerce Domain Replace with your store domain URL. Fetch Reviews Update endpoint or filters if needed. Ensure WooCommerce credentials are correct. Message a Model Change AI model or prompts to adjust sentiment analysis or summary style. Create a Record (Airtable) Map additional fields if needed. Ensure the table has the necessary columns for sentiment, summary, rating, and product info. Send a Message (Slack) Customize Slack message format. Change the channel ID to send summaries to the right team. Optional Enhancements Include historical review trends. Automatically trigger notifications only for negative reviews. Send summaries to email or other messaging apps. Visualize sentiment trends in Airtable or external dashboards. Use Case Examples Automated Sentiment Tracking – Understand customer feedback without manual reading. Team Alerts – Notify product and support teams about negative reviews quickly. Data Storage & Reporting – Keep historical sentiment in Airtable for trend analysis. Efficient Batch Processing – Process large number of reviews without overloading the system. Troubleshooting Guide | Issue | Possible Cause | Solution | |--------------------------|--------------------------------------------------|--------------------------------------------------------------| | Reviews not fetched | Wrong WooCommerce credentials or endpoint | Check WooCommerce HTTP Basic Auth and store domain | | AI analysis fails | OpenAI API key invalid or prompt error | Verify OpenAI credentials and prompt syntax | | Slack message missing | Incorrect Slack channel or API token | Check Slack credentials and channel ID | | Airtable not storing reviews | Table or field mismatch | Verify Airtable base, table, and column mapping | Need Help? If you need assistance setting up the workflow, customizing AI sentiment analysis or integrating Slack summaries, feel free to contact our n8n development team at WeblineIndia. We provide workflow automation, AI integration and reporting solutions for WooCommerce stores.