by Neloy Barman
Whoโs it for Affiliate managers, partner programs, and teams collecting leads via public forms who want automated, error-free routing to separate spreadsheets per affiliate โ no more manual copying or sheet hunting. What it does This workflow captures new submissions from a Tally.so form, extracts the affiliate code, finds or creates the corresponding Google Sheet, appends the lead data, and sends a real-time Slack notification. New affiliates are handled automatically: if no sheet exists for the submitted code, the workflow creates one and places it in a designated Google Drive folder. Key features ๐ Real-time Tally form capture (Name, Email, Affiliation Code, Phone) ๐ Smart routing by affiliation code ๐ Auto-creates new affiliate sheets when needed ๐ Organized storage in a single Google Drive folder ๐ Instant Slack notifications with full lead details ๐ How it works Tally submission โ Webhook trigger Extract fields: Name, Email Address, Phone Number, Affiliation Code Add current Submission Date and Submission Time Search Google Drive for sheet matching the Affiliation Code โ Found โ Append row with all data โ Not found โ Create new sheet โ Move to folder โ Append row Send formatted Slack alert with full lead info ๐ Requirements Tally.so form including Name, Email Address, Phone Number, and Affiliation Code fields Google Drive folder for storing affiliate sheets Google Sheets & Drive OAuth2 credentials (with Drive + Sheets APIs enabled) Slack bot token with chat:write scope Slack channel ID where notifications will be sent โ๏ธ How to set up Import the workflow into n8n Create credentials: Tally API Google Sheets OAuth2 Google Drive OAuth2 Slack Bot Configure nodes: Select your Tally form in the webhook Set the parent Folder ID for affiliate sheets Enter your Slack Channel ID Activate the workflow and start receiving leads! ๐ ๏ธ How to customize Add extra fields: Capture additional data (e.g., UTM parameters, notes, referral source) by adding the fields to your Tally form, then map them in the webhook parsing and Google Sheets **Append nodes. Change notification channels: Replace the **Slack node with Discord Webhook, Send Email, Microsoft Teams, or any other notification node to fit your teamโs preferred platform. Add validation & duplicate checks: Insert **IF nodes or a Code node before the sheet append to validate data quality, reject incomplete entries, or check for duplicate emails/phone numbers. Support multiple programs or priority routing: Extend the routing logic with **Switch nodes or additional Drive searches to handle different affiliate programs, tiers, or priority queues.
by Rajeet Nair
Overview This workflow demonstrates an AI task routing system using multiple agents in n8n. It analyzes incoming user requests, determines their complexity, and routes them to the most appropriate AI agent for processing. A Supervisor Agent evaluates each request and classifies it as either simple or complex, returning a confidence score and reasoning. Based on this classification, an orchestrator agent delegates the task to the correct specialized agent. The workflow also includes a confidence validation mechanism. If the classification confidence falls below a defined threshold, an email alert is sent to an administrator for manual review. This architecture helps build scalable AI systems where tasks are intelligently routed to agents optimized for different levels of complexity. How It Works Webhook Trigger The workflow starts when a request is received through a webhook endpoint. Workflow Configuration The request and a configurable confidence threshold are stored using a Set node. Supervisor Agent Classification The Supervisor Agent analyzes the user request and determines whether the task is simple or complex, returning a confidence score and reasoning. Structured Output Parsing The classification result is parsed using a structured output parser to ensure reliable JSON formatting. Confidence Validation An IF node checks whether the confidence score meets the configured threshold. Agent Orchestration If the confidence is sufficient, an orchestrator agent delegates the task to either: Simple Task Agent for straightforward questions Complex Task Agent for tasks requiring deeper reasoning Fallback Handling If the confidence score is too low, the workflow sends an email alert requesting manual review. Webhook Response The final AI response is returned to the original requester through the Respond to Webhook node. Setup Instructions Add OpenAI credentials to all OpenAI model nodes: Supervisor Model Executor Model Simple Agent Model Complex Agent Model Configure the Workflow Configuration node: Set the userRequest placeholder if testing manually. Adjust the confidenceThreshold if required. Configure the Email Send node: Enter sender and administrator email addresses. Connect SMTP or your preferred email credentials. Activate the workflow and send requests to the Webhook endpoint to start task processing. Use Cases AI support systems that route queries based on complexity Customer service automation with intelligent escalation Multi-agent AI architectures for research or analysis tasks AI workflow orchestration for automation platforms Intelligent request classification and routing systems Requirements OpenAI API credentials** Email (SMTP) credentials** for alert notifications A system capable of sending requests to the workflow webhook
by Avkash Kakdiya
How it works This workflow automates the full offer letter lifecycle, from generation to final candidate response tracking. When a new row with a Pending status is added to Google Sheets, it creates a personalized offer letter using a Google Docs template. The document is converted to PDF, stored in Google Drive, shared securely, and sent to the candidate via Gmail. Candidate responses are captured through webhooks, validated against deadlines, and used to update status and trigger follow-up communications. First set: Generate and send offer letter Monitor new candidates** Google Sheets Trigger โ Watches for newly added rows in the offer sheet. If โ Ensures only rows with a Pending status are processed. Generate offer letter** Google Drive โ Copies the offer letter template for the candidate. Google Docs โ Replaces placeholders with candidate-specific data. Google Drive โ Converts the document to a PDF file. Store and share document** Google Drive โ Saves the PDF to a designated folder. Google Drive โ Assigns public read-only access to the file. Send offer email** Gmail โ Sends the offer email with Accept and Decline action links. Google Sheets โ Updates the sheet with offer link, date, and Sent status. Second set: Capture response and finalize outcome Capture candidate response** Webhook โ Receives the candidateโs decision from email buttons. Google Sheets โ Fetches the corresponding candidate record. If โ Checks whether the response is already locked. Code โ Validates decision against the response deadline. Finalize outcome** Switch โ Routes Accepted, Rejected, or Timeout outcomes. Google Sheets โ Updates final status and locks further responses. Gmail โ Sends confirmation emails to the candidate and HR.
by Andrew Loh
How it works Complaints arrive via Gmail or a web form webhook Claude AI classifies each complaint: fault category, priority (P1/P2/P3), tenant tone, and drafts an acknowledgement email The right technician is looked up in Airtable by fault category A work order is created and the tenant receives an ACK email with their ticket reference and SLA commitment The FM team is notified in Slack with ticket summary An hourly schedule checks open tickets โ any past their SLA deadline trigger an urgent escalation to FM management How to set up Connect Gmail to the Gmail Trigger and Send ACK email nodes Create your Airtable base with a Complaints table and a Technician table (one row per fault category) Connect Airtable, Anthropic, and Slack in their respective nodes If using a web form, point it to the Webhook URL
by Nirav Gajera
๐ฐ AI Expense Tracker โ Chat to Track Spending Instantly Track your expenses by chatting naturally. No forms, no apps โ just type and it's saved. ๐ Description This workflow turns a simple chat interface into a powerful personal expense tracker. Just describe your spending in plain language โ the AI understands it, categorizes it, and saves it to Google Sheets automatically. Example inputs the AI understands: spent 500 on lunch uber 150 paid 1200 electricity bill lunch in feb 25 cost 500 โ handles past dates too netflix 499 $50 hotel booking โ detects currency No rigid formats. No dropdowns. Just type naturally. โจ Key Features Natural language input** โ type expenses exactly how you'd say them AI-powered parsing** โ Claude Haiku extracts amount, category, date, currency automatically 9 auto-detected categories** โ Food, Transport, Shopping, Bills, Entertainment, Health, Business, Education, Other Multi-currency support** โ INR, USD, EUR, GBP Past date handling** โ "lunch in feb 25 cost 500" saves to February 2025, not today Running monthly total** โ each row stores the cumulative month total Monthly summary** โ type SUMMARY or summary february for any month Works on empty sheet** โ no errors on first use Invalid input handling** โ friendly error if no amount detected ๐ฌ Commands | What you type | What happens | | :--- | :--- | | spent 500 on lunch | โ Saved: ๐ Food & Dining โ Lunch ยท โน500 | | uber 150 | โ Saved: ๐ Transport โ Uber ยท โน150 | | 1200 electricity bill | โ Saved: ๐ก Bills & Utilities ยท โน1200 | | lunch in feb 25 cost 500 | โ Saved to February 2025 correctly | | SUMMARY | ๐ Current month report with breakdown | | summary february | ๐ February report (current year) | | summary february 2025 | ๐ February 2025 specific report | | HELP | ๐ Shows all commands and categories | ๐ Setup Requirements 1. Google Sheet Create a new Google Sheet with these exact headers in Row 1: | Col | Header | | :---: | :--- | | A | Date | | B | Amount | | C | Category | | D | Description | | E | Currency | | F | Month | | G | Raw Message | | H | Total | 2. Credentials needed | Credential | Used for | Free? | | :--- | :--- | :--- | | Anthropic API | Claude Haiku AI parsing | Paid (very low cost) | | Google Sheets OAuth2 | Read & write expenses | Free | 3. After importing Connect your Anthropic credential to the Claude Haiku node Connect your Google Sheets credential to all sheet nodes Update the Sheet ID in all Google Sheets nodes to point to your sheet Open the workflow chat and type your first expense ๐ How It Works You type: "spent 500 on car wash" โ Detect Intent โ classified as: expense โ Read All Expenses โ loads sheet (works even if empty) โ Prepare Data โ calculates existing month total โ AI Parse Expense (Claude Haiku) โ amount: 500 โ category: Transport โ description: Car wash โ date: today โ currency: INR โ Parse & Total โ derives Month from parsed date โ computes new running total โ Is Valid? (amount > 0 and is_expense = true) โ YES โ Save to Sheet โ Reply with confirmation โ NO โ Ask user to include an amount Summary flow: You type: "summary february" โ Detect Intent โ classified as: summary โ Read for Summary โ loads all rows โ Build Summary โ detects "february" in message โ filters rows by February (current year) โ calculates total, breakdown by category, daily avg โ Returns formatted report ๐ Sample Summary Output ๐ March 2026 Report ๐ณ Total: โน8,450 ๐ Entries: 12 ๐ Daily avg: โน470 ๐ Top: ๐ Food & Dining Breakdown: ๐ Food & Dining: โน3,200 (38%) ๐ Transport: โน1,800 (21%) ๐ก Bills & Utilities: โน1,200 (14%) ๐๏ธ Shopping: โน1,050 (12%) ๐ฌ Entertainment: โน800 (9%) ๐ฅ Health: โน400 (5%) ๐ Auto-Detected Categories | Emoji | Category | Example keywords | | :---: | :--- | :--- | | ๐ | Food & Dining | lunch, dinner, restaurant, zomato, swiggy, grocery | | ๐ | Transport | uber, ola, petrol, metro, flight, car wash, parking | | ๐๏ธ | Shopping | amazon, flipkart, clothes, electronics, shoes | | ๐ก | Bills & Utilities | electricity, wifi, rent, recharge, emi, gas | | ๐ฌ | Entertainment | netflix, movie, spotify, concert, gaming | | ๐ฅ | Health | medicine, doctor, gym, pharmacy, hospital | | ๐ผ | Business | office, software, domain, hosting, tools | | ๐ | Education | course, books, tuition, udemy, fees | | ๐ฐ | Other | anything that doesn't match above | โ๏ธ Workflow Nodes | Node | Type | Purpose | | :--- | :--- | :--- | | When chat message received | Chat Trigger | Entry point | | Detect Intent | Code | Classify: expense / summary / help | | Intent Switch | Switch | Route to correct path | | Read All Expenses | Google Sheets | Load rows (alwaysOutputData: true) | | Prepare Data | Code | Compute month total, handle empty sheet | | AI Parse Expense | LLM Chain | Extract fields using Claude Haiku | | Claude Haiku | Anthropic Model | AI model for parsing | | Parse & Total | Code | Validate, derive month, compute total | | Is Valid Expense? | IF | Check amount > 0 | | Save Expense to Sheet | Google Sheets | Append new row | | Reply Saved | Code | Format confirmation message | | Reply Invalid | Code | Request amount from user | | Read for Summary | Google Sheets | Load all rows for report | | Build Summary | Code | Filter by month, compute breakdown | | Send Help | Code | Return command reference | ๐ง Customisation Ideas Add a budget alert** โ warn when monthly total exceeds a set limit Telegram integration** โ replace chat trigger with Telegram bot WhatsApp integration** โ use Twilio WhatsApp as the input channel Weekly digest** โ add a Schedule Trigger for automatic weekly reports Multi-user** โ store user ID with each row to support team expense tracking Export to PDF** โ generate monthly expense report as a PDF โ ๏ธ Important Notes The Read All Expenses node has Always Output Data enabled โ this is required so the flow works on an empty sheet Month is derived from the parsed date, not today's date โ so past-dated entries file correctly The Total column stores the running month total at the time of each entry โ it does not update retroactively if you delete rows ๐ฆ Requirements Summary n8n (cloud or self-hosted) Anthropic API key (Claude Haiku โ very low token usage) Google account with Sheets access Built with n8n ยท Claude Haiku ยท Google Sheets By Nirav Gajera
by DataForSEO
Once a week, this workflow automatically detects newly ranked keywords in Google AI Overview across your domains using DataForSEO API. It pulls the latest data for every target, stores a new snapshot in Google Sheets, and compares it with the previous run. Any new keywords and related info is automatically appended to a dedicated log sheet, and a short email recap is sent to your chosen recipients, so your team can easily review updates without manual monitoring. Whoโs it for SEO specialists and marketers who want a hands-off way to track newly ranked keywords in Googleโs AIO for specific domains and get weekly updates without manual checks. What it does This workflow automatically discovers new keywords your domains started ranking for in Google AI Overview (AIO), logs them in Google Sheets, and emails you a weekly summary of whatโs changed. How it works Triggers on a chosen schedule (default: once a week). Reads your keywords and domains from Google Sheets. Pulls the latest data from Google AI Overview via DataForSEO API. Compares the results with the previous snapshot. Appends newly ranked keywords to a dedicated Google Sheet. Sends a weekly summary email. Requirements DataForSEO account A spreadsheet in Google Sheets with your keywords that matches the required column structure (as in the example). A spreadsheet in Google Sheets with your target domains that matches the required column structure (as in the example). Gmail account Customization You can customize this workflow by changing the schedule, exporting results to other tools (such as Looker Studio and BigQuery) instead of Google Sheets, and modifying the email text.
by Cheng Siong Chin
How It Works This workflow automates tax compliance by aggregating multi-channel revenue data, calculating jurisdiction-specific tax obligations, detecting anomalies, and generating submission-ready reports for tax authorities. Designed for finance teams, tax professionals, and e-commerce operations, it solves the challenge of manually reconciling transactions across multiple sales channels, applying complex tax rules, and preparing compliant filings under tight deadlines. The system triggers monthly or on-demand, fetching revenue data from e-commerce platforms, payment processors, and accounting systems. Transaction records flow through validation layers that merge historical context, classify revenue streams, and calculate tax obligations using jurisdiction-specific rules engines. AI models detect anomalies in tax calculations, identify unusual deduction patterns, and flag potential audit risks. The workflow routes revenue data by tax jurisdiction, applies progressive tax brackets, and generates formatted reports matching authority specifications. Critical anomalies trigger immediate alerts to tax teams via Gmail, while finalized reports store in Google Sheets and Airtable for audit trails. This eliminates 80% of manual tax preparation work, ensures multi-jurisdiction compliance, and reduces filing errors. Setup Steps Configure e-commerce API credentials for transaction access Set up payment processor integrations (Stripe, PayPal) for revenue reconciliation Add accounting system credentials (QuickBooks, Xero) for financial data Configure OpenAI API key for anomaly detection and tax analysis Set Gmail OAuth credentials for tax team alert notifications Link Google Sheets for report storage and audit trail documentation Connect Airtable workspace for structured tax record management Prerequisites Active e-commerce platform accounts with API access. Payment processor credentials. Use Cases Automated monthly sales tax calculations for multi-state e-commerce. Customization Modify tax calculation rules for specific jurisdiction requirements. Benefits Reduces tax preparation time by 80% through end-to-end automation.
by WeblineIndia
Daily Inventory Monitoring & Reorder System This workflow automatically monitors your WooCommerce store inventory, calculates stock health based on recent sales, classifies products, computes reorder quantities, assigns urgency levels and sends actionable alerts to Slack. This workflow runs daily to track your inventory and prevent stock issues. It fetches all active products and recent completed orders, calculates units sold in the last 30 days, evaluates stock health, and classifies products as Top Performer, Steady, At Risk, or Consider Discontinue. You receive: Daily inventory check (automated)** Database record of each productโs stock and recommended action** Slack alerts for urgent items and a daily summary** Ideal for teams wanting simple, automated visibility of inventory without manually reviewing stock levels. Quick Start โ Implementation Steps Connect your WooCommerce account (products and orders). Connect Supabase to store inventory records. Connect Slack to receive alerts and daily summaries. Set the schedule time for daily checks. Review and adjust stock thresholds (lead time, safety days) if needed. Activate the workflow โ daily inventory monitoring begins automatically. What It Does This workflow automates inventory monitoring: Fetches all published products from WooCommerce with current stock. Retrieves completed orders from the last 30 days to calculate sales. Calculates units sold per product and estimates average daily demand. Merges product and sales data for stock evaluation. Classifies products based on stock and demand: Top Performer Steady At Risk Consider Discontinue Calculates safety stock, reorder points, and reorder quantities. Assigns urgency levels (Normal, High, Critical) with clear action messages. Sends Slack alerts for high-priority products. Saves all inventory data into Supabase for tracking. Builds and sends a daily summary with totals, at-risk products, and reorder needs. This ensures your team always knows stock status and can act quickly to prevent shortages. Whoโs It For This workflow is ideal for: Inventory managers Operations teams E-commerce teams Supply chain planners Anyone needing automated stock monitoring and alerts Requirements to Use This Workflow To run this workflow, you need: n8n instance** (cloud or self-hosted) WooCommerce API credentials** (products & orders) Supabase account** (database for inventory tracking) Slack workspace** with API permissions Basic understanding of inventory management and reorder logic How It Works Daily Check โ Workflow triggers automatically at the scheduled time. Fetch Products & Orders โ Gets all published products and completed orders from the last 30 days. Calculate Sales & Demand โ Determines units sold and average daily demand per product. Merge Data โ Combines stock data with sales to evaluate inventory health. Inventory Classification โ Categorizes products as Top Performer, Steady, At Risk, or Consider Discontinue. Reorder Calculations โ Computes safety stock, reorder point, and recommended reorder quantity. Assign Urgency & Actions โ Flags products as Normal, High, or Critical and sets clear action messages. Immediate Action Check โ Identifies high-priority products that need urgent attention. Save to Database โ Stores inventory status and recommendations in Supabase. Daily Summary โ Builds summary and sends Slack notifications for overall stock health. Setup Steps Import the provided n8n JSON workflow. Connect your WooCommerce account (products and orders). Connect Supabase account and configure the table for inventory tracking. Connect Slack and select channels for urgent alerts and daily summary. Adjust lead time, safety stock days, and any thresholds if needed. Activate the workflow โ daily automated inventory monitoring and reporting begins. How To Customize Nodes Customize Reorder Calculations Adjust safety stock days, lead time, or reorder formulas in the Reorder Calculator node. Customize Urgency & Actions Modify logic in the Urgency & Recommendation node to change thresholds or messaging. Customize Slack Alerts You can change: Slack channel Message format Include emojis or tags Customize Database Storage Add extra fields in Supabase to store more product information if needed. Add-Ons (Optional Enhancements) You can extend this workflow to: Track multiple warehouses Send alerts only for specific categories Generate weekly inventory reports Include stock valuation or cost metrics Integrate with other communication channels (email, Teams) Use Case Examples Daily Inventory Check Automatically tracks stock levels for all products. Urgent Stock Alerts Notifies the team immediately when items are At Risk or need reorder. Reporting & Tracking Keeps a historical record of stock health in the database. Troubleshooting Guide | Issue | Possible Cause | Solution | |-------|----------------|---------| | Slack alerts not sent | Invalid credentials | Update Slack API key | | Supabase row not saved | Wrong table/field mapping | Check table and field names | | Wrong stock classification | Thresholds incorrect | Adjust lead time, safety days, or demand calculation | | Workflow not running | Schedule not active | Enable Schedule Trigger node | Need Help? If you need help in customizing or extending this workflow with multi-warehouse tracking, advanced alerts, dashboards or scaling, then our n8n automation developers at WeblineIndia will be happy to assist you.
by Mariรกn Danaลก
Generate personalized concert ticket PDFs with QR codes using PDF Generator API, then email them to attendees, log sales to Google Sheets, and notify organizers via Slack โ all triggered from a simple web form. Who is this for Event organizers, ticketing teams, and developers who need an automated pipeline to issue branded PDF concert tickets with unique QR codes for venue entry โ without building a custom backend. How it works An attendee fills out a web form with their name, email, event details, seat number, and ticket tier (General / VIP / Backstage). The workflow generates a unique ticket ID and prepares all data for the PDF template. PDF Generator API renders a personalized PDF ticket. The QR code is a native template component that encodes the ticket ID automatically. A styled HTML confirmation email with a download link is sent to the attendee via Gmail. The ticket details are logged to a Google Sheets spreadsheet for tracking and attendance management. A Slack notification alerts the event organizer with a summary of the newly issued ticket. Set up PDF Generator API โ Sign up at pdfgeneratorapi.com, create a ticket template with a QR Code component bound to {{ ticket_id }}, and note your template ID. Template ID โ Open the "Prepare Ticket Data" Code node and replace the TEMPLATE_ID value with your own. Credentials โ Connect your accounts in each node: PDF Generator API, Gmail, Google Sheets, and Slack. Google Sheets โ Create a spreadsheet with columns: Ticket ID, Attendee, Email, Event, Venue, Date, Seat, Tier, PDF URL, Issued At. Set the spreadsheet ID in the "Log Ticket Sale" node. Slack โ Choose a channel (e.g. #tickets) in the "Notify Event Organizer" node. Requirements PDF Generator API account (free trial available) Gmail account (OAuth) Google Sheets account (OAuth) Slack workspace (optional โ remove the last node if not needed) How to customize Output format** โ The PDF node returns a hosted URL by default (valid 30 days). Switch to File output to attach the PDF directly to the email instead. Ticket tiers** โ Add or rename tiers in the form node and update the tier mapping logic in the "Prepare Ticket Data" Code node. Email design** โ Edit the "Build Confirmation Email" Code node to match your brand colors and layout. Remove Slack** โ Simply delete the "Notify Event Organizer" node if you don't need organizer alerts. Add payment** โ Insert a Stripe or payment node before the form confirmation to handle paid tickets.
by Masaki Go
About This Template This workflow creates high-quality, text-rich advertising banners from simple LINE messages. It combines Google Gemini (for marketing-focused prompt engineering) and Nano Banana Pro (accessed via Kie.ai API) to generate images with superior text rendering capabilities. It also handles the asynchronous API polling required for high-quality image generation. How It Works Input: Users send a banner concept via LINE (e.g., "Coffee brand, morning vibe"). Prompt Engineering: Gemini optimizes the request into a detailed prompt, specifying lighting, composition, and Japanese catch-copy placement. Async Generation: The workflow submits a job to Nano Banana Pro (Kie API) and intelligently waits/polls until the image is ready. Hosting: The final image is downloaded and uploaded to a public AWS S3 bucket. Delivery: The image is pushed back to the user on LINE. Who Itโs For Marketing teams creating A/B test assets. Japanese market advertisers needing accurate text rendering. Developers looking for an example of Async API Polling patterns in n8n. Requirements n8n** (Cloud or Self-hosted). Kie.ai API Key** (for Nano Banana Pro model). Google Gemini API Key**. AWS S3 Bucket** (Public access enabled). LINE Official Account** (Messaging API). Setup Steps Credentials: Configure the "Header Auth" credential for the Kie.ai nodes (Header: Authorization, Value: Bearer YOUR_API_KEY). AWS: Ensure your S3 bucket allows public read access so LINE can display the image. Webhook: Add the production webhook URL to your LINE Developers console.
by Kirill Khatkevich
This workflow continuously monitors the TikTok Ads Library for new creatives from specific advertisers or keyword searches, scrapes them via Apify, logs them into Google Sheets, and sends concise notifications to Telegram or Slack 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 TikTok 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 adId field. Get lightweight notifications* in Telegram or Slack 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. Monitor by advertiser ID or keywords** with flexible search parameters. How it Works The workflow is organized into four logical blocks: 1. Configuration & Date Conversion Configuration:** The Set Parameters Set node stores all key request variables: Ad target country (e.g., all or specific ISO country codes), Ad published date From (automatically set to yesterday by default), Ad published To (automatically set to today by default), Advertiser name or keyword (for keyword-based searches), adv_biz_ids (advertiser business IDs for specific advertiser tracking), Ad limit (optional limit on the number of results to scrape). Date Conversion:** Convert Dates to Unix transforms the human-readable date format (DD/MM/YYYY) into Unix timestamps in milliseconds, which are required by the TikTok Ads Library API. 2. Request Building & Data Fetching Body Construction:** Build Apify Body creates the JSON request body for the Apify actor: Builds the TikTok Ads Library URL with all search parameters (region, date range, advertiser name/keyword, advertiser IDs). Conditionally adds resultsLimit to the request body only if the Ad limit field is not empty, allowing you to scrape all results or limit them as needed. Data Fetching:** Get TT Ads through Apify executes the Apify actor (Tiktok Ads Scraper) and retrieves all matching ads from the TikTok Ads Library. 3. Data Preparation & De-duplication Data Extraction:** Prepare Data for Sheets safely extracts nested data from the API response: Extracts the first video URL from the videos array (if available). Extracts the cover image URL from the first video object. Extracts the TikTok username from the tiktokUser object (if available). Handles cases where arrays are empty or objects are missing without throwing errors. Load Existing IDs:** Read existing IDs pulls the existing adId column from your Google Sheet (configured to read a specific column/range, e.g., column K). 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 TikTok response with the historical existingIds array from Sheets. Filter New Creatives:** Filter new creatives Code node compares each ad's adId (string) against the existingIds set and builds a new 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. 4. Data Logging & Notification Write New Ads:** Append or update row in sheet performs an appendOrUpdate into Google Sheets, mapping core fields such as adId, adName, advertiserName, advertiserId, paidBy, impressions, regionStats, targeting, tiktokUser, startUrl, videos, and coverImageURL (using the =IMAGE() formula to display images directly in the sheet). The column mapping uses adId as the matching column so that existing rows can be updated if needed. Count:** In parallel with the write step, Filter new creatives 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, both Send a text message (Telegram) and Send a message (Slack) send notifications to the configured channels. 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 Apify:** Configure the Apify account credentials used by Get TT Ads through Apify. You'll need an Apify account with access to the Tiktok Ads Scraper actor. Google Sheets:** Connect your Google account in: Read existing IDs, Append or update row in sheet. Telegram (optional):** Connect your Telegram account credentials in Send a text message. Slack (optional):** Configure your Slack credentials in Send a message. 2. The Set Parameters Node Open the Set Parameters Set node and customize: Ad target country: Which countries to monitor (all for all countries, or specific ISO 3166 country codes like US, GB, etc.). Ad published date From: Start date for the search range (defaults to yesterday using {{ $now.minus({ days: 1 }).toFormat('dd/MM/yyyy') }}). Ad published To: End date for the search range (defaults to today using {{ $now.toFormat('dd/MM/yyyy') }}). Advertiser name or keyword: Search by advertiser name or keywords (URL-encoded format, e.g., %22Applicave%20LLC%22). adv_biz_ids: Specific advertiser business IDs to track (comma-separated if multiple). Ad limit: Optional limit on the number of results (leave empty to scrape all available results). 3. Google Sheets Configuration Read existing IDs** Set documentId and sheetName to your tracking spreadsheet and sheet (e.g., Sheet1). Configure the range to read only the column holding the ad adId values (e.g., column K: K:K). Append or update row in sheet** Point documentId and sheetName to the same spreadsheet/sheet. Make sure your sheet has the columns expected by the node (e.g., adId, coverImageURL, adName, Impressions, regionStats, targeting, tiktokUser, advertiserID, paidBy, advertiserName, startURL, videos). Confirm that adId is included in matchingColumns so de-duplication works correctly. 4. Notification Configuration Telegram:** 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. Slack:** In Send a message, set: channelId: Your target Slack 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 TikTok competitor monitoring. You can extend it to: Track multiple advertisers** by turning adv_biz_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 engagement metrics (likes, shares, comments) for each logged adId from TikTok's API (if available), and merges the metrics back. Add more notification channels** such as email, or send a weekly summary that aggregates new ads by advertiser, format, or country. Tag or categorize creatives** (e.g., "video vs image", "country", "language", "advertiser type") directly in the sheet to make later analysis easier. Combine with Meta Ads monitoring** by running both workflows in parallel and creating a unified competitor intelligence dashboard. Add image analysis** by integrating Google Vision API to automatically detect objects, text, and themes in the cover images, similar to the Meta Ads creative analysis workflow.
by Rahul Joshi
๐ Description The scoreboard shows you what happened. This workflow tells you why it happened. Every time an IPL match ends this automation detects the completed result, fetches the full scorecard, and sends it to GPT-4o which produces a detailed journalist-style post-match analysis โ innings breakdowns, tactical decisions, key turning points, player of the match, and what the result means for both teams. Every Monday it also generates a weekly roundup digest covering all the week's matches in one beautifully designed email. Built for sports media companies, IPL fan platforms, cricket newsletters, and automation agencies who want to produce expert-level match analysis at scale without a dedicated editorial team. What This Workflow Does โฐ Polls CricAPI every 30 minutes for recently completed IPL matches ๐ Checks the Match Log sheet to avoid analyzing the same match twice ๐ Detects new completed IPL matches and saves them to the Match Log ๐งฎ Computes both innings run rates and builds a structured analytical prompt ๐ค Sends full match context to GPT-4o which generates a complete post-match analysis ๐ง Assembles the analysis into a branded HTML email and sends it immediately after the match ๐ Logs every analysis to the Analysis Log sheet with match name, winner, and player of match ๐ Every Monday reads all analyses from the past 7 days and generates a weekly roundup ๐ค GPT-4o writes the weekly digest with match recaps, player of the week, and next week preview ๐ง Sends the weekly roundup as a branded HTML email every Monday at 9AM Key Benefits โ Fully automatic โ detects match completion and triggers analysis without manual input โ Duplicate prevention โ never analyzes the same match twice โ GPT-4o writes like a cricket journalist not a data report โ Two email formats โ immediate post-match deep dive and weekly roundup digest โ Complete audit trail across two Google Sheets โ Falls back to any completed T20 when IPL is off-season so testing always works โ Clean termination on both IF nodes โ no dangling branches How It Works SW1 โ Match Completion Detector Every 30 minutes the workflow fetches all current and recent matches from CricAPI and reads the Match Log sheet. The Code node filters for completed IPL T20 matches by checking that the match name contains IPL or Indian Premier League, the match type is T20, and both matchStarted and matchEnded are true. It then compares every completed match against the set of already-analyzed match IDs in the Match Log. If a new unanalyzed match is found it gets saved to the Match Log with analyzed set to false and all scorecard data flows forward into the analysis engine. If no new match is found an IF node stops the workflow cleanly. SW2 โ Deep Dive Analyzer The match data flows directly from SW1 into the analysis prompt builder. The Code node computes run rates for both innings and assembles a structured prompt containing both innings stats, the match result, and clear instructions for GPT-4o to act as a cricket journalist. GPT-4o returns a headline, 3-4 sentence match summary, separate tactical breakdowns for each innings, three key moments that decided the match, an overall tactical assessment, player of the match with reasoning, and a one-sentence forward-looking note. The response is parsed and assembled into a branded HTML email with a dark blue header, score display, color-coded analysis sections, and a player of the match spotlight. The email is sent immediately and both Google Sheets are updated to record that this match has been analyzed and the email has been sent. SW3 โ Weekly Digest Every Monday at 9AM the workflow reads all rows from the Analysis Log and filters for entries from the past 7 days. If matches exist GPT-4o generates a weekly roundup covering the week's headline, individual one-liner recaps for each match, player of the week, the biggest talking point or controversy, and a preview of the upcoming week. The response is assembled into a branded weekly roundup email and sent. If no matches were analyzed in the past 7 days the workflow stops cleanly without sending a blank email. Features 30-minute polling for match completion detection Dynamic IPL match filtering โ no hardcoded IDs Duplicate prevention via Match Log sheet lookup Both innings run rate computation GPT-4o post-match analysis with 8 structured output fields Immediate post-match email delivery Weekly Monday digest with recaps, POTW, talking point, and preview Two branded HTML email templates with dark blue cricket theme Two Google Sheets for match tracking and analysis history IF nodes with No Operation fallbacks on both SW1 and SW3 Fallback to any completed T20 for off-season testing Requirements CricAPI account and API key โ free tier at cricapi.com OpenAI API key (GPT-4o access) Google Sheets OAuth2 connection Gmail OAuth2 connection Setup Steps Sign up at cricapi.com and get your free API key Create a Google Sheet called "IPL Post Match Analyzer" with 2 sheets โ Match Log and Analysis Log Add the correct column headers to both sheets. Paste your Sheet ID into all Google Sheets nodes Connect Google Sheets OAuth2 credentials Add your OpenAI API key to both OpenAI nodes Add your Gmail OAuth2 credentials and set your email in both Gmail nodes Activate the workflow โ the system runs itself from here Target Audience ๐บ Sports media companies automating post-match editorial content ๐ IPL cricket newsletters and fan platforms delivering expert analysis ๐ค Automation agencies building cricket intelligence products for media and franchise clients ๐ฑ Fan apps that want to surface match analysis without hiring a commentary team