by Cheng Siong Chin
Overview Automate AI content creation from request to approval. While AI writes quickly, human review often delays delivery—and multiple tools create workflow gaps and version confusion. This unified solution streamlines the entire process, enabling teams to produce quality content at scale with transparent tracking. How it works Submit a form with your topic, tone, and keywords. GPT-4o generates the content and assigns a quality score (0–100). The reviewer receives an email to approve, edit, or reject the draft—all actions are automatically logged in Google Sheets for tracking and audit purposes. Setup steps Import the workflow JSON file into n8n Connect your OpenAI and Google account credentials Update three variables in the workflow: SHEET_ID (your Google Sheets document ID), REVIEWER_EMAIL (recipient for review notifications), and WEBHOOK_URL (for form submissions) Test the workflow with a sample submission Workflow Stages Submit a form with topic, tone, and keywords. GPT-4o generates content and assigns a quality score (0–100). Reviewer receives an email to approve, edit, or reject the draft. All review actions are automatically logged in Google Sheets with timestamps and approval status. Requirements n8n v1.0+ instance, OpenAI API key with GPT-4o access, and Google Workspace with OAuth2 credentials. Custom options Choose model: gpt-4o, 4o-mini, or 3.5-turbo. Adjust score weights: Readability 40%, Keywords 30%, Length 30%. Key benefits Generate drafts 99% faster and approve content 95% quicker. Centralized tracking ensures clarity and accountability.
by Nitin Dixit
This n8n template demonstrates how to leverage AI to analyze trending short-form video content and automatically generate original, high-engagement video scripts inspired by proven viral formats. Use cases are many: Create consistent content calendars for beauty salons and aestheticians, maintain a steady stream of reels without creative burnout, or study viral patterns to understand what drives engagement across Instagram's trending hashtags! Good to know The workflow scrapes real trending reels from Instagram based on your chosen hashtag, ensuring you're always learning from current viral patterns Video transcription happens automatically, extracting the core messaging and pacing strategies from successful content Generated scripts use proven engagement structures—hook, value delivery, and call-to-action timing—without copying original content All data is organized in Google Sheets for easy review, editing, and tracking of script performance The AI model intelligently mirrors the emotional tone and narrative structure while creating entirely new storylines How it works A form trigger collects your hashtag and desired number of reels to analyze The Apify API scrapes trending Instagram reels matching your hashtag, filtering for high engagement (1000+ likes from the last 7 days) Filtered reels are added to your Google Sheet with metadata: captions, engagement metrics, video links, and music information Each reel is automatically transcribed using video-to-text technology, capturing the exact dialogue and timing The AI Agent analyzes each transcript to understand its underlying structure—pacing, tone, curiosity hooks, and CTA placement Using this analysis, Claude generates a completely original script that follows the same proven engagement formula but with a fresh topic or angle Generated scripts are saved back to your Google Sheet alongside the source materials for comparison and refinement A summary email is sent confirming the number of scripts created and ready for production How to use Start by entering a beauty or lifestyle hashtag (e.g., #aiautomation, #beautysalon, #haircare) and specify how many trending reels to analyze Review the scraped content in your Google Sheet to understand what's currently resonating Check the generated scripts and use them as jumping-off points for your own video production Iterate on the process with different hashtags to discover emerging trends in your niche Requirements Apify account and API key for Instagram scraping (free tier available) Google Sheets document set up to store reel data and generated scripts OpenAI API key for the AI script generation Gmail account for the completion notification (optional but recommended) Customising this workflow Adjust the engagement filter thresholds (currently 1000+ likes, 7 days old) to capture micro-trends or evergreen content Modify the AI prompt in the "AI Agent" node to enforce specific brand voice, tone, or content guidelines Add additional Google Sheet columns to track metrics like script-to-video conversion rates or audience response Connect to additional distribution channels—automatically post scripts to team Slack, create video production briefs, or trigger video editing templates Experiment with different video categories by creating multiple instances of this workflow for different hashtags or niches
by Growth AI
SEO Anchor Text Generator with n8n and Claude AI Generate optimized SEO anchor texts for internal linking using AI automation. This workflow processes your website pages and creates diverse, SEO-compliant anchor variations automatically. Who's it for SEO specialists managing large websites with extensive internal linking needs Content managers looking to automate anchor text creation for better search rankings Digital marketers seeking to optimize internal linking strategies at scale Web agencies handling multiple client websites with SEO requirements What it does This workflow automatically generates 10 unique SEO anchor texts with 3-5 linguistic variations each (40-50 total variations per page) using Claude AI. It analyzes your page content, applies advanced SEO criteria, and creates diverse anchor types including exact match, brand anchors, long-tail keywords, contextual phrases, and call-to-action variants. How it works The system connects to your Google Sheets document containing page information, filters pages needing anchor generation, processes each page individually through Claude AI, and updates your spreadsheet with generated anchor texts. The workflow ensures semantic relevance, keyword optimization, natural language flow, and linguistic diversity while avoiding over-optimization penalties. Requirements Google Sheets with OAuth2 authentication configured in n8n Anthropic API key for Claude AI model access Template spreadsheet with proper column structure (Page, URL, Description, Anchors) Pages must have URL and description but empty anchor fields to trigger processing How to set up Step 1: Prepare Your Data Duplicate the template spreadsheet: https://docs.google.com/spreadsheets/d/1VNl8xLYgRrNcKrmN9hCdfov1dMnwD44tAALJZAlagCo Fill in your page information in the "Anchor" sheet: Page: Name/title of your page (can use hierarchical levels Niv 0-3) URL: Complete URL of the page Description: Brief description of page content to help AI generate relevant anchors Leave the "Anchors" column empty for pages needing anchor generation Step 2: Configure n8n Credentials Set up Google Sheets OAuth2: Go to n8n credentials settings Add new Google Sheets OAuth2 API credential Follow OAuth flow to authenticate with Google Test connection with your spreadsheet Configure Anthropic API: Obtain API key from Anthropic Console Add new Anthropic API credential in n8n Enter your API key and test connection Step 3: Import and Activate Workflow Import the workflow from the provided JSON Update credential references to match your configured credentials Test the Chat Trigger webhook to ensure it's accessible Activate the workflow in n8n Step 4: Execute the Workflow Send a chat message with your Google Sheets URL to trigger the workflow Monitor execution through n8n interface to track progress Check your spreadsheet for automatically generated anchor texts Review and customize generated anchors as needed for your content How to customize the workflow Modify AI Prompt Instructions Update the "Générateur d'ancres" node prompt to: Change the number of anchor variations generated Adjust SEO criteria and anchor types Modify linguistic variation requirements Customize language style and tone Add specific industry terminology Adjust Data Processing Customize the "Filter" node conditions to: Change criteria for pages requiring anchor generation Add additional validation rules Modify column names to match your spreadsheet structure Enhance Output Formatting Modify the "Import Sheets" code node to: Change data transformation logic Add additional processing steps Customize how results are formatted for Google Sheets Include timestamp or processing metadata Scale for Large Datasets Optimize the "Loop Over Items" batch processing: Adjust batch sizes for better performance Add error handling for failed API calls Implement retry logic for robustness Add progress tracking mechanisms Integration Extensions Extend functionality by adding nodes for: Slack notifications when processing completes Email reports with generation statistics Integration with content management systems Automated content publishing with generated anchors Advanced Customization Tips Language Adaptation: Modify the AI prompt for different languages by adjusting linguistic variation rules Industry Specialization: Add domain-specific terminology and SEO best practices to the prompt Quality Control: Implement additional filtering to review generated anchors before updating sheets Analytics Integration: Connect with Google Analytics to prioritize high-traffic pages for anchor generation Content Integration: Add nodes to automatically insert generated anchors into CMS or static site generators
by Fariez
X (Twitter) and Threads (by Meta) both have different maximum character lengths. Different X and Threads Content Auto Poster This n8n template demonstrates how to post different content optimized for X (Twitter) and Meta Threads using the Late API. You can use it for any niche. For example: posting AI news to X and Threads. Possible use cases: Schedule your posts to X and Threads. Use this workflow as a content calendar and automated posting system. Apply it across different content niches. How it works The automation runs according to the time defined in the Schedule Trigger node. Content is pulled from Google Sheets. Any URL is shortened using your preferred short URL API. Images are uploaded to Late’s server first. Content for X is posted in Step 2. The workflow checks that the content length is under 280 characters. Content for Threads is posted in Step 3. The workflow checks that the content length is under 500 characters. Posts on X are published as threaded posts, while on Threads they are single posts. Once posted, the Google Sheets content database is updated. Requirements Google OAuth credentials with the Google Sheets API enabled Bitly account and access token (or OAuth) GetLate API connected to your X and Threads accounts HOW TO USE STEP 1 Adjust the settings in the Schedule Trigger node to define when the workflow runs. Open this Google Sheets template, then go to File → Make a copy, and update the settings in the Get Topic node. Get your Bitly OAuth or Access Token here and add the credentials in the Short Link node. Get your API key from getlate.dev and add the credentials in the Upload IMG node. STEP 2 Add your Late credentials to the Post Twitter node. Get your Twitter account ID from Late, and update it in the JSON Body section of the Post Twitter node. STEP 3 Add your Late credentials to the Post Threads node. Get your Threads account ID from Late, and update it in the JSON Body section of the Post Threads node.
by Cheng Siong Chin
Introduction Automate price monitoring for e-commerce competitors—ideal for retailers, analysts, and pricing teams. ⚠️ Self-Hosted Only: Requires self-hosted n8n instance. How It Works Scrapes competitor URLs, extracts data via AI, detects price/stock changes, logs to Google Sheets with email alerts. Workflow Template Trigger → Scrape → AI Extract → Parse → Compare → Detect Changes → Update Sheets + Alert Workflow Steps Scraping: Firecrawl fetches Nike, Adidas, Sneaker data AI Extraction: Processes product details Parsing: Structures response Historical Check: Reads Sheets data Change Detection: Identifies price/stock updates Dual Output: Updates Sheets + sends alerts Setup Instructions 1. Firecrawl API Get key from dashboard → Add to n8n 2. OpenAI API Get key from platform → Add to n8n 3. Google Sheets OAuth2 Create OAuth2 in Google Cloud Console → Authorize in n8n → Enable API 4. Gmail OAuth2 Use same project → Authorize in n8n → Enable API 5. Spreadsheet Setup Create Sheet with required columns → Copy ID from URL → Paste in workflow Prerequisites Self-hosted n8n, Firecrawl account, OpenAI key, Google account (Sheets + Gmail OAuth2) Customization Add URLs, adjust thresholds, integrate Slack Benefits Saves 2+ hours daily, real-time tracking, automated alerts Google Sheets Structure Required Columns: Product Name** (Column A) Current Price** (Column B) Previous Price** (Column C) Stock Status** (Column D) Last Updated** (Column E) URL** (Column F) Change Detected** (Column G)
by Elegant Biztech
Automated QuickBooks New Customer Welcome Emails This workflow provides a robust solution for QuickBooks users looking to automate their new customer onboarding process. It solves the time-consuming and error-prone task of manually sending welcome emails by creating a fully automated system that ensures every new customer receives a timely, personalized, and professional welcome. The workflow periodically checks your QuickBooks Online account for new entries. To prevent sending duplicate emails to existing customers, it cleverly uses a Google Sheet as a simple database, tracking every customer who has already been contacted. This makes the process reliable and safe to run on an automated schedule. This template was crafted with care by the team at Elegant Biztech to help you build stronger customer relationships through smart automation. How the Workflow Operates Scheduled Trigger: The workflow initiates on a customizable schedule (e.g., every hour). Fetch Data: It simultaneously fetches all customer data from your QuickBooks account and the list of already-processed customer IDs from your Google Sheet. Find New Customers: It compares the two lists to isolate only the new customers who have not yet been processed. Log New Customers: For each new customer found, the workflow performs two logging actions: It appends their full details (Name, Company, Email, etc.) to a "log" sheet for your records. It adds their unique Customer ID to the "tracking" sheet to ensure they are not emailed again in the future. Craft Personalized Email: A Email Template node dynamically generates a beautiful, responsive HTML email, personalized with the customer's name, company, and location details. Send Welcome Email: The final node sends the uniquely crafted email to the new customer. Prerequisites Before you begin, please ensure you have the following: An active n8n instance. A QuickBooks Online account with API access. A Google account. An email service (e.g., SMTP, Gmail, Outlook) connected to n8n as credentials. Step-by-Step Setup Guide Follow these instructions carefully to configure the workflow for your use. 1. Create the Google Sheet This workflow requires a Google Sheet with two specific tabs to function as its database. Create a new Google Sheet. Rename the first tab to Processed IDs. In cell A1, create the header: CustomerIds. Create a second tab and name it New Customer Logs. In row 1, create the following headers: Customer_Name, Company_Name, Email_ID, Phone_No, Customer_ID. 2. Connect Your Accounts You must authenticate your accounts in the designated nodes. Get many Customers node:** Select this node and connect your QuickBooks Online credentials. Read Old Customers node:** Connect your Google Sheets account credentials here. This will be automatically used by the other Google Sheets nodes. Send Personalized Welcome Email node:** Connect the credentials for the email account you wish to send from. 3. Configure the Google Sheets Nodes Point the workflow to the correct sheet and tabs you just created. Read Old Customers node:** In the Document ID field, select your new Google Sheet. In the Sheet Name field, select the Processed IDs tab. Log New Customer Details node:** Verify the Document ID field is correctly set to your Google Sheet. In the Sheet Name field, select the New Customer Logs tab. Log New Customer ID for Tracking node:** Verify the Document ID is correct. In the Sheet Name field, select the Processed IDs tab. 4. Customize the Email Template Personalize the welcome email to match your brand. Open the Code node. Inside the code editor, find and replace these four placeholder values: Your Logo URL: Replace the placeholder link with a public URL to your company's logo. Your Website Link: Replace the placeholder with a link to your website's dashboard or homepage. Your Support Email: Replace the mailto: link with your company's support email. Your Company Name: Update the company name in the copyright footer. Next, select the Send Personalized Welcome Email node and update the Subject field with your company's name. 5. Activate the Workflow Open the Scheduler node to set the schedule for how often you want the workflow to run. Save the workflow. Click the Active toggle at the top right of the screen. Your automated welcome email system is now live! For questions or to explore more custom solutions, visit us at elegantbiztech.com.
by Rahul Joshi
Description Automate Zendesk ticket follow-up management by fetching pending tickets daily, enriching and logging them into Google Sheets, creating ClickUp tasks for team reminders, and sending professional follow-up emails to customers. Keeps your support pipeline clean and ensures no pending tickets fall through the cracks. 🎫📊📧✅ What This Template Does Triggers daily (Mon–Fri at 8 PM) to check Zendesk for pending tickets. ⏰ Filters only "pending" status tickets to reduce noise. 🔍 Formats ticket data with priority, age, and attention flags. 🧠 Logs all tickets into Google Sheets for reporting and analytics. 📊 Creates ClickUp tasks for team follow-up and accountability. 📋 Generates professional HTML follow-up emails grouped by customer. 🎨 Sends emails via Gmail with ticket details and next steps. 📧 Key Benefits Ensures no pending Zendesk tickets are forgotten. ⏱️ Builds a historical log for analytics and audit trails. 🧾 Keeps your support team accountable with ClickUp tasks. ✅ Delivers personalized, branded follow-up emails to customers. 💡 Reduces manual effort in tracking and responding to tickets. 🔄 Features Schedule Trigger – Runs Mon–Fri at 8:00 PM. 🗓️ Zendesk Integration – Fetches pending tickets automatically. 🎫 Smart Data Processing – Cleans descriptions, calculates age, flags urgent tickets. ⚡ Google Sheets Logging – Maintains a structured log with Ticket ID, URL, tags, status, etc. 📈 ClickUp Tasks – Automatically creates tasks per pending ticket. 📋 Email Generation – Groups tickets per customer, builds professional HTML follow-ups. 🎨 Gmail Delivery – Sends personalized follow-ups directly to customers. 📧 Requirements n8n instance (cloud or self-hosted). Zendesk API credentials with read access. Google Sheets OAuth2 credentials with write access. ClickUp API credentials for task creation. Gmail OAuth2 credentials for sending emails. Pre-configured Google Sheet for pending ticket tracking. Target Audience Customer support teams managing Zendesk tickets. 🎧 SaaS companies wanting automated follow-ups. 🚀 CS managers ensuring accountability in ticket handling. 🛠️ SMBs reducing customer wait time with proactive follow-ups. 🏢 Remote support teams needing automated reminders and logs. 🌐 Step-by-Step Setup Instructions Connect Zendesk, Google Sheets, ClickUp, and Gmail credentials in n8n. 🔑 Update the schedule trigger (default: Mon–Fri at 8:00 PM). ⏰ Replace the Google Sheet ID with your pending ticket log sheet. 📊 Configure your ClickUp space/list IDs for task creation. 📋 Update email branding and sender address in the email generator. 🎨 Test with sample tickets to validate Sheets logging, ClickUp tasks, and Gmail delivery. ✅
by Avkash Kakdiya
How it works This workflow automatically captures website visitors using Albacross, enriches their data with Datagma, and syncs it into HubSpot. Once leads are created or updated, a personalized email is generated and sent through Gmail. All email activities are logged in HubSpot for proper sales tracking and follow-up. Step-by-step 1. Trigger the workflow Schedule Trigger** – Runs the workflow at set intervals (hourly, daily, or custom). 2. Capture website visitors Albacross Website Visitor** – Pulls company and visitor details from website activity. 3. Enrich lead data Enrich Lead Data** – Enhances visitor records with personal and professional details via Datagma. 4. Sync to CRM Create/Update HubSpot Contact** – Creates or updates contact records in HubSpot with enriched lead data. 5. Generate personalized outreach Generate Personalized Message** – Builds a tailored email including company, industry, and value propositions. 6. Send and track emails Send Personalized Email** – Sends the outreach message through Gmail. Log Email Activity in HubSpot** – Tracks email engagement automatically in HubSpot. Why use this? Capture and identify anonymous website visitors as potential leads. Enrich contact details with accurate, professional information. Keep HubSpot updated automatically without manual data entry. Send highly personalized outreach emails tailored to each lead. Log all communication for better pipeline visibility and sales follow-up.
by Rahul Joshi
Description Automatically generate multi-jurisdiction tax summaries from Stripe invoices and sync them into Google Sheets with daily reporting. This workflow ensures compliance-ready tax data, detailed breakdowns by country/state/tax rate, and real-time Slack notifications for both success and error handling. 💳📈📢 What This Template Does Triggers daily at 2:00 AM using a scheduled cron. ⏰ Fetches paid invoices from Stripe (last 30 days). 💳 Validates data integrity before processing. ✅ Summarizes taxes by period, country, state, and rate. 🧮 Formats and logs results in Google Sheets for reporting. 📊 Sends Slack notifications for both success and failure. 📢 Key Benefits Automated tax compliance reporting. 🧾 Accurate multi-jurisdiction tracking. 🌍 Eliminates manual spreadsheet work. ⏱️ Maintains a historical audit trail. 📋 Real-time notifications keep your team informed. 🔔 Built-in error handling ensures reliability. 🛡️ Features Daily cron schedule (0 2 * * *). Stripe invoices fetched with expanded tax amounts. Intelligent grouping by period, country, state, and tax rate. Google Sheets integration with append/update logic. Success Slack message: summary totals, record count, period. Error Slack message: troubleshooting guidance and failure logs. Uses environment variables for secure configuration (GOOGLE_SHEETS_DOCUMENT_ID, SLACK_CHANNEL_ID). Requirements n8n instance (cloud or self-hosted). Stripe API credentials with invoice read access. Google Sheets OAuth2 credentials with write access. Slack API credentials with chat:write permissions. Proper tax configuration in Stripe for accurate reporting. Target Audience Finance teams handling recurring billing and tax filings. 💼 Accountants needing automated jurisdiction tax breakdowns. 📊 SaaS businesses managing global customers. 🌐 Agencies and SMEs streamlining monthly tax reporting. 🏢 Remote teams requiring real-time workflow notifications. 📲 Step-by-Step Setup Instructions Configure Stripe API credentials in n8n. Set up Google Sheets with a “Tax Summary” sheet (columns: period, country, state, tax rate, taxable amount, tax collected, processing date). Configure Slack API credentials and channel ID (e.g., tax-reports). Replace hardcoded values with environment variables for security. Import this workflow JSON into n8n. Run once manually with test invoices to validate. Enable the workflow for daily automated reporting. ✅
by Vlad Arbatov
Summary Send a number to your Telegram bot (e.g., 2) and get a neatly formatted digest of all Gmail newsletters received since that date. Each email is summarized by an LLM into concise topics, merged into a single Telegram message, automatically split into chunks to fit Telegram limits, and safely formatted as HTML. What this workflow does Triggers on your Telegram message containing a number of days, e.g., 1, 2, 7 Fetches all Gmail messages since that date using a custom search query, optionally filtered by senders Retrieves and decodes each email’s HTML, subject, sender name, date Prompts an LLM (GPT‑4.1‑mini) to produce a consistent JSON summary of topics per email Merges topics from all emails into a single digest Builds a readable, enumerated message (with bold titles) Splits it into 3 500‑char parts and sanitizes Markdown to Telegram‑safe HTML Sends the digest to your Telegram chat with preview disabled Apps and credentials Gmail OAuth2: Gmail account Telegram: Telegram account (bot) OpenAI: OpenAi account Typical use cases Personal or team daily/weekly newsletter digests in Telegram Curated feeds from selected senders compiled on demand Lightweight knowledge briefings without leaving Telegram How it works (node-by-node) Telegram Trigger Waits for your message (e.g., "2"). Chat ID is restricted to your Telegram ID for safety. Get days (Code) Takes the numeric daysAgo from the Telegram message text Computes YYYY/MM/DD for Gmail’s after: filter Get many messages (Gmail → getAll, returnAll: true) Uses a custom q filter like: =(from:@.com) OR (from:@.com) OR (from:@.com -"__") after:{{ $json.dateString }} Returns a list of message IDs Loop Over Items (Split in Batches) Iterates through each message ID Get a message (Gmail → get) Retrieves the full message/payload for the current email Get message data (Code) Extracts HTML from Gmail’s payload (body/parts) Normalizes sender to just the name Formats the date as DD.MM.YYYY Passes html, subject, from, date forward Clean (Code) Converts DD.MM.YYYY → MM.DD (for prompt brevity) Passes html, subject, from, date to the LLM Message a model (OpenAI, model: gpt‑4.1‑mini, JSON output) Prompt instructs: Produce JSON: { "topics": [ { "title", "descr", "subject", "from", "date" } ] } Split multi-news blocks into separate topics Combine or ignore specific blocks for particular senders (placeholders __) Keep subject untranslated; other values in __ language Injects subject/from/date/html from the current email Loop Over Items (continues) After all iterations complete, the aggregated per-email results are available Merge (Code) Flattens the topics arrays from all processed emails into one combined topics list Create TG message (Code) Renders an enumerated list: 1. Title (bold) Short description Original subject From — Date Split (Code) Splits into 3 500‑character chunks to stay below Telegram’s 4 096 limit with HTML overhead Sanitize (Code) Escapes &, <, > Fixes unbalanced * and _ Converts basic Markdown markers to Telegram HTML Send a message (Telegram) Sends each part with parse_mode=HTML, previews disabled Node map | Node | Type | Purpose | |---|---|---| | Telegram Trigger | Trigger | Receive daysAgo command from Telegram | | Get days | Code | Compute Gmail after:YYYY/MM/DD from daysAgo | | Get many messages | Gmail (getAll) | Search emails since date with custom from: filters | | Loop Over Items | Split in Batches | Iterate messages one-by-one | | Get a message | Gmail (get) | Fetch full message payload | | Get message data | Code | Extract HTML/subject/from/date; normalize sender and date | | Clean | Code | Reformat date and forward fields to LLM | | Message a model | OpenAI | Summarize email into JSON topics | | Merge | Code | Merge topics from all emails | | Create TG message | Code | Build human-friendly digest text | | Split | Code | Chunk into 3 500‑char parts | | Sanitize | Code | Escape HTML and map Markdown to Telegram HTML | | Send a message | Telegram | Deliver digest to Telegram chat | Before you start Create a Telegram bot and get its token (via @BotFather) Get your Telegram user ID to restrict access Connect Gmail OAuth2 in n8n Add your OpenAI API key Import the provided workflow JSON into n8n Setup instructions 1) Telegram Telegram Trigger node: additionalFields.chatIds = your Telegram user ID Send a message node: chatId = your Telegram user ID parse_mode = HTML disable_web_page_preview = true 2) Gmail Connect a Gmail OAuth2 credential (Gmail account) In Get many messages, adjust filters.q to your senders and rules: Example: =(from:news@publisher.com) OR (from:briefs@media.com -"promo") after:{{ $json.dateString }} If needed, add label: or category: filters 3) OpenAI Message a model: Model: gpt‑4.1‑mini (can swap to gpt‑4o‑mini or your preferred) Update the prompt placeholders: __ language → your target language __ sender rules → your special cases (combine blocks, ignore sections) 4) Safety and formatting Keep parse_mode=HTML in Telegram The Sanitize node is designed for ` and ` only; avoid other HTML tags The Split node uses 3 500 chars per part to stay safe under Telegram limits How to use In Telegram, send a number indicating “days ago” Example: 2 → will query Gmail after the date 2 days ago The workflow compiles and returns a digest in your chat Rerun anytime with a new number Customization ideas Labels instead of global search: q = label:Newsletters after:{{ $json.dateString }} Time window control: add before: or exact date ranges Different language: set the __ language in the LLM prompt Model choice: swap to cheaper/faster models if volume is high Chunk size: adjust from 3 500 to your needs Formatting: tweak Create TG message to include links parsed from HTML (if you add an HTML parser step) Limits and notes Telegram messages are limited to ~4 096 characters; we chunk to 3 500 per part Gmail “after:” uses YYYY/MM/DD and Google’s interpretation of dates; your n8n server time influences the computed date LLM usage incurs cost and latency proportional to email size and count HTML extraction is robust for typical Gmail structures but may need tweaks for exotic MIME layouts Privacy and safety Emails are sent to OpenAI for summarization—ensure that’s acceptable for your data policies The Telegram Trigger restricts chat access; keep your chatIds locked down Avoid sending raw HTML to Telegram; rely on the Sanitize node Sample output format (Telegram) Bold topic title One-sentence description Original Subject Line → Sender Name — DD.MM.YYYY Next topic title ... Tips and troubleshooting Got empty digests? Check Gmail filters.q and make sure there really are emails after the computed date Model errors or empty JSON? Lower prompt complexity or switch model HTML formatting issues in Telegram? Ensure parse_mode=HTML and keep only `, ` Long messages not fully delivered? Reduce chunk size from 3 500 Tags gmail, telegram, openai, llm, newsletters, digest, summarization, automation Changelog v1: Initial release with sender filters, topic merging, Telegram HTML sanitization, and on-demand time window via Telegram message
by takuma
Who’s it for This template is for individuals or households who want to: Easily digitize and track their spending from physical receipts. Automate budget management and financial reporting. Get quick insights into their spending habits on a daily and monthly basis. Stay informed about their remaining budget through Slack notifications. What it does This workflow automates your household budget tracking in several steps: Receipt Photo Upload: You upload a photo of your receipt to a webhook. Parse Receipt: An AI agent extracts the date, store name, purchased items, and total amount from the receipt text. Add to Budget Sheet: The extracted data is then appended to your designated Google Sheet. Daily Budget Report: After each receipt entry, the workflow calculates your current month's spending, remaining budget, and sends a summary to Slack. Monthly Budget Report: Once a day (triggered by a cron job), it reads all budget data for the current month from Google Sheets, performs an analysis (total spending, daily average, top stores, items, and spending days), and sends a comprehensive report to Slack. How to set up Requirements n8n Account**: Self-hosted or Cloud. Google Sheets**: A Google Sheet set up with columns for "Date", "Store", "Items", and "Amount". Slack Workspace**: A Slack channel where you want to receive budget updates. OpenRouter Account**: An API key for OpenRouter to use their chat models. Steps Google Sheets Setup: Create a new Google Sheet (or use an existing one) and name it "Household Budget". In the first sheet (e.g., "Sheet1"), set up the following headers in the first row: "Date", "Store", "Items", "Amount". Share the Google Sheet with the service account email associated with your n8n Google Sheets credentials, granting "Editor" access. In the 'Add to Budget Sheet' and 'Get Budget Sheet (Daily)' nodes, select your Google Sheet and the appropriate sheet name. OpenRouter Credentials: Sign up or log in to OpenRouter (https://openrouter.ai/). Generate an API key. In n8n, create a new "OpenRouter" credential using your API key. Apply this credential to the 'OpenRouter Chat Model1', 'OpenRouter Chat Model2', and 'OpenRouter Chat Model' nodes. Slack Credentials: In n8n, create a new "Slack" credential. Follow the instructions to connect your Slack workspace. In the 'Send a message' and 'Send monthly report' nodes, select the Slack channel where you want to receive messages. Make sure the Slack app has permission to post to the selected channels. Webhook URLs: After activating the workflow, the 'Receipt Photo Upload' node will generate a webhook URL. Copy this URL. You will use this URL to send receipt text (e.g., from a mobile app that scans text). Monthly Budget Adjustment: In the 'Code in JavaScript2' node, locate the line const budget = 30000; and change 30000 to your desired monthly budget in JPY. How to customize the workflow Daily Report Trigger The 'Daily Report Trigger' node is set to run once a day. You can modify its schedule to trigger more or less frequently by adjusting its cron settings. AI Model You can change the AI models used in the 'OpenRouter Chat Model' nodes to any other large language model supported by n8n, such as OpenAI, Anthropic, or custom hosted models, by updating the credentials and model names. Output Formatting The Slack messages generated by the 'Report Budget' and 'Monthly Report' nodes can be customized by editing the systemMessage and text parameters in those nodes to change the tone, content, or language of the reports. Additional Integrations You can extend this workflow by adding more nodes: Integrate with other accounting software. Send notifications to different platforms (e.g., email, Discord, Telegram). Add sentiment analysis to your spending habits. Categorize expenses automatically based on items or stores using another AI node.
by Satoshi
Overview The workflow automatically gathers weekly user and page view metrics. It then uses AI to analyze, compare, and compile a summary report. Finally, it sends the report to the manager's email. How it works Get Data from GA Automatically retrieve data from Google Analytics (GA) for the two most recent weeks. Compare the data and calculate the variances between the two weeks. Generate Report Automatically analyze the data and generate reports using Artificial Intelligence (AI). Generate charts to visualize the data. Export the report to PDF. Send Report Send the report via email to the manager. Set up steps Google cloud account Create the credentials and replace them in the workflow. Please enable the following APIs: Gmail API Google Analytics Admin API Google Analytics Data API HTML to PDF account You need to install node HTML to PDF. Get API key and replace in the workflow.