by Cristina
Automated Weekly Newsletter with AI Research, Editorial Drafting, and Approval Flow This n8n template demonstrates how to automate the full production cycle of a professional weekly newsletter. It combines AI-powered market research, editorial drafting, compliance validation, and an approval loop — all before creating a final Gmail draft ready for distribution. Use cases are many: Wealth managers sending weekly market updates to clients Startups producing recurring research digests Teams creating automated newsletters for marketing or content distribution Good to know At time of writing, each AI call (research, editorial, QC) consumes API tokens from Perplexity and OpenAI. See provider pricing for updated info. Gmail integration requires OAuth setup with your account. You can adapt the prompts to any domain — from finance to tech to education. How it works Schedule Trigger runs every week and sets the date window. Research LLM fetches structured JSON market data using Perplexity. Editorial LLM transforms research into a polished ~2,000 word client-ready newsletter. QC LLM validates factual accuracy and compliance risks before approval. Preview Email is sent with Approve/Revise buttons. Clicking opens a secure n8n-hosted approval form. Final Draft Creation: Once approved, the workflow generates a clean Gmail draft, ready to send. How to use Replace the demo schedule trigger with your own (weekly, daily, or event-based). Set up Gmail OAuth credentials to enable email previews and final drafts. Update branding (logo, disclaimer, signature) in the HTML builder node. Adjust prompts to your audience — e.g., simplify tone for marketing, or keep institutional tone for financial clients. Requirements Perplexity account for research API (or your LLM of choice) OpenAI for editorial and QC steps (or your LLM of choice) Gmail account with OAuth credentials Optional: your own domain to host the approval webhook Customising this workflow This workflow can be extended beyond financial newsletters. Try: Content marketing: Automate weekly digests or trend reports Education: Generate curriculum summaries with approval loops for teachers Internal comms: Automate compliance-checked company updates
by Cheng Siong Chin
How It Works MQTT ingests real-time sensor data from connected devices. The workflow normalizes the values and trains or retrains machine learning models on a defined schedule. An AI agent detects anomalies, validates the results for accuracy, and ensures reliable alerts. Detected issues are then routed to dashboards for visualization and sent via email notifications to relevant stakeholders, enabling timely monitoring and response. Setup Steps MQTT: Configure broker connection, set topic subscriptions, and verify data flow. ML Model: Define retraining schedule and specify historical data sources for model updates. AI Agent: Connect Claude or OpenAI APIs and configure anomaly validation prompts. Alerts: Set dashboard URL and email recipients to receive real-time notifications. Prerequisites MQTT broker credentials; historical training data; OpenAI/Claude API key; dashboard access; email service Use Cases IoT sensor monitoring; server performance tracking; network traffic anomalies; application log analysis; predictive maintenance alerts Customization Adjust sensitivity thresholds; swap ML models; modify notification channels; add Slack/Teams integration; customize validation rules Benefits Reduces detection latency 95%; eliminates manual monitoring; prevents false alerts; enables rapid incident response; improves system reliability
by Rahul Joshi
📊 Description Automatically analyze the sentiment of Facebook posts and their audience comments using GPT-4 to identify trends and potential PR risks. 🧠💬 This workflow fetches recent posts via the Facebook Graph API, performs AI-powered sentiment analysis on both posts and comments, routes negative results to Slack for immediate attention, logs all data into Google Sheets, and sends a beautifully formatted sentiment summary report via Outlook. 📈📧 What This Template Does 1️⃣ Trigger – Runs daily at 10 AM to fetch the latest Facebook posts. ⏰ 2️⃣ Data Extraction – Pulls post text, reactions, and up to 100 comments per post using Facebook Graph API. 📲 3️⃣ Formatting – Structures and cleans Facebook data for AI analysis. 🧩 4️⃣ AI Sentiment Analysis – GPT-4 evaluates post tone and audience sentiment with confidence scores and explanations. 🤖 5️⃣ Routing – Sends negative sentiment alerts directly to Slack for quick response. ⚠️ 6️⃣ Logging – Records all sentiment metrics in Google Sheets, including positivity ratio and engagement data. 📊 7️⃣ Reporting – Generates a color-coded HTML email report and delivers it via Outlook. 💌 8️⃣ Error Handling – Sends Slack alerts if any node in the workflow fails. 🛡️ Key Benefits ✅ Monitors brand reputation automatically across Facebook comments ✅ Provides structured AI sentiment reports for data-driven decisions ✅ Flags negative audience sentiment for timely intervention ✅ Maintains an always-updated sentiment log in Google Sheets ✅ Delivers professional HTML summary emails to teams Features Automated daily trigger for post sentiment scanning Facebook Graph API integration for posts and comments GPT-4–powered comment tone and sentiment scoring Slack notifications for negative sentiment alerts Google Sheets sentiment dashboard logging Beautiful HTML report delivery through Microsoft Outlook Built-in error detection with Slack fallback alerts Requirements Facebook Graph API credentials with pages_read_engagement access OpenAI API key for GPT-4 or GPT-4o Slack Bot token with chat:write permission Google Sheets OAuth2 credentials with edit rights Microsoft Outlook OAuth2 credentials for email delivery Target Audience Social media and marketing teams monitoring brand perception 📣 PR teams managing engagement or audience sentiment 🧾 Analysts building data dashboards from engagement metrics 📊 Agencies offering automated reporting for client pages 🧑💼 Step-by-Step Setup Instructions 1️⃣ Connect Facebook Graph API credentials and set your page ID. 2️⃣ Add OpenAI credentials for GPT-4 sentiment analysis. 3️⃣ Configure Slack and provide your channel ID for alerts. 4️⃣ Set Google Sheets credentials and specify sheet ID and name. 5️⃣ Connect Microsoft Outlook for email report delivery. 6️⃣ Adjust the daily schedule (default 10 AM) as needed. 7️⃣ Run once manually to verify setup, then enable automation. ✅
by gclbck
Analyze YouTube videos for virality with an AI-powered report This workflow automates the discovery and analysis of potentially viral YouTube videos. It searches for recent, popular videos based on a keyword, calculates a unique "Algorithmic Lift Score" to measure virality, and uses an AI agent to generate an insightful summary report that is sent directly to your email. What it does This workflow identifies videos that are outperforming their channel's baseline, a key indicator of viral potential. It operates in several stages: Searches YouTube: It finds recent, top-performing videos based on your specified keyword and timeframe. Gathers Data: For each video found, it fetches detailed statistics for both the video (views, likes, comments) and its channel (subscriber count, total views). Calculates Virality Score: It calculates an "Algorithmic Lift Score" for each video. This custom metric prioritizes videos that achieve high view counts and engagement relative to their channel's subscriber base. Analyzes with AI: The top 5 videos, sorted by their virality score, are sent to an AI agent (pre-configured for OpenAI). The AI generates a concise summary highlighting trends, top performers, and other noteworthy patterns. Sends Email Report: The final AI-generated analysis is converted to HTML and emailed to you, providing a ready-to-read report on what's trending in your niche. Who it's for This workflow is perfect for: Content Creators** looking for trending topics and content ideas. Digital Marketers** conducting competitor analysis or market research. Social Media Managers** wanting to understand what content resonates on YouTube. Data Analysts** who need to automate the collection and analysis of YouTube trends. Requirements A Google API Key with the "YouTube Data API v3" enabled. An OpenAI API Key (or another compatible AI model credential). A connected Gmail account in n8n to send the final report. How to set up Configure the Setup Node: Click on the "Setup" node and fill in the values: query: The keyword you want to search for (e.g., "AI tools"). GoogleAPIkey: Your Google API key. daysback: How many days in the past to search for new videos. maxResult: The number of videos to analyze (e.g., 20). email: The email address where the report will be sent. Set AI Credentials: Click the "OpenAI Chat Model" node and add your OpenAI API key to the credentials. Set Gmail Credentials: Click the "Send_Report" node and connect your Gmail account to the credentials.
by Cheng Siong Chin
How It Works Automates sales data analysis and strategic insight generation for sales managers and strategists needing actionable intelligence. Fetches multi-source data from sales, marketing, and financial systems, validates data quality to prevent errors, applies advanced AI analysis via OpenAI to identify market trends and patterns, calculates comprehensive KPIs for performance measurement, generates prioritized recommendations, and automatically distributes detailed insights via Gmail alerts and Google Sheets dashboards—eliminating time-consuming manual analysis overhead. Setup Instructions OpenAI API: Add key via credentials Gmail: Authorize account for email delivery Google Sheets: Connect for dashboard logging Schedule: Set monthly trigger timing Modify data sources: Replace fetch nodes with your APIs Prerequisites OpenAI API key, Gmail account with send permissions, Google Sheets access, n8n instance, source data APIs (sales, marketing, financial systems). Use Cases E-commerce platforms analyzing sales trends; SaaS companies generating strategy reports; multi-channel retailers routing recommendations; Customization Add data sources via fetch nodes; swap OpenAI for Claude or Gemini; modify routing logic for different priority thresholds; Benefits Reduces analysis time from hours to minutes. Eliminates manual report crea
by Jitesh Dugar
Verified Gym Trial Pass with Photo ID Overview Automate gym trial pass generation with email verification, photo ID integration, QR codes, and professional PDF passes. This workflow handles the complete member onboarding process - from signup to verified pass delivery - in under 10 seconds. What This Workflow Does Receives signup data via webhook (name, email, photo URL, validity dates) Verifies email authenticity using VerifiEmail API (blocks disposable emails) Generates unique Pass ID in format GYM-{timestamp} Creates QR code for quick check-in at gym entrance Builds branded pass design with gradient styling, member photo, and validity dates Exports to PDF format for mobile-friendly viewing Sends email with PDF attachment and welcome message Logs all registrations in Google Sheets for record-keeping Returns API response with complete pass details Key Features ✅ Email Verification - Blocks fake and disposable email addresses ✅ Photo ID Integration - Displays member photo on digital pass ✅ QR Code Generation - Instant check-in scanning capability ✅ Professional Design - Gradient purple design with modern styling ✅ PDF Export - Mobile-friendly format that members can save ✅ Automated Emails - Welcome message with pass attachment ✅ Spreadsheet Logging - Automatic record-keeping in Google Sheets ✅ Error Handling - Proper 400 responses for invalid signups ✅ Success Responses - Detailed JSON with all pass information Use Cases Gyms & Fitness Centers** - Trial pass management for new members Yoga Studios** - Week-long trial class passes Sports Clubs** - Guest pass generation with photo verification Wellness Centers** - Temporary access cards for trial periods Co-working Spaces** - Day pass generation with member photos Swimming Pools** - Verified trial memberships with photo IDs What You Need Required Credentials VerifiEmail API - Email verification service Get API key: https://verifi.email HTMLCSSToImage API - PNG image generation Get credentials: https://htmlcsstoimg.com HTMLCSSToPDF API - PDF conversion Get credentials: https://pdfmunk.com Gmail OAuth2 - Email delivery Connect your Google account Enable Gmail API in Google Cloud Console Google Sheets API - Data logging Connect your Google account Same OAuth2 as Gmail Setup Instructions Step 1: Create Google Sheet Create a new Google Sheet named "Gym Trial Passes 2025" Add these column headers in Row 1: Pass ID Name Email Start Date Valid Till Issued At Email Verified Status Step 2: Configure Credentials Add VerifiEmail API credentials Add HTMLCSSToImage credentials Add HTMLCSSToPDF credentials Connect Gmail OAuth2 Connect Google Sheets OAuth2 Step 3: Update Google Sheets Node Open "Log to Google Sheets" node Select your "Gym Trial Passes 2025" sheet Confirm column mappings match your headers Step 4: Test the Workflow Copy the webhook URL from the Webhook node Open Postman and create a POST request Use this test payload: { "name": "Rahul Sharma", "email": "your-email@gmail.com", "photo_url": "https://images.unsplash.com/photo-1633332755192-727a05c4013d?w=400", "start_date": "2025-11-15", "valid_till": "2025-11-22" } Send the request and check: ✅ Email received with PDF pass ✅ Google Sheet updated with new row ✅ Success JSON response returned Step 5: Activate & Use Click "Active" toggle to enable the workflow Integrate webhook URL with your gym's website form Members receive instant verified passes upon signup Expected Responses ✅ Success Response (200 OK) { "status": "success", "message": "Gym trial pass verified and sent successfully! 🎉", "data": { "pass_id": "GYM-1731398400123", "email": "member@example.com", "name": "Rahul Sharma", "valid_from": "November 15, 2025", "valid_till": "November 22, 2025", "email_verified": true, "recorded_in_sheets": true, "pass_sent_to_email": true }, "timestamp": "2025-11-12T10:30:45.123Z" } ❌ Error Response (400 Bad Request) { "status": "error", "message": "Invalid or disposable email address. Please use a valid email to register.", "email_verified": false, "email_provided": "test@tempmail.com" } Customization Options Modify Pass Design Edit the Build HTML Pass node to customize: Colors and gradient (currently purple gradient) Layout and spacing Fonts and typography Logo placement (add your gym logo) Additional branding elements Change Email Template Edit the Send Email with Pass node to modify: Subject line Welcome message Instructions Branding elements Footer content Adjust Validity Period Workflow accepts custom start_date and valid_till from webhook payload. You can also hardcode validity periods in the Generate Pass Details node. Add Additional Fields Extend the workflow to capture: Phone number Emergency contact Medical conditions Membership preferences Referral source Performance Average execution time**: 8-12 seconds Handles**: 100+ passes per hour PDF size**: ~150-250 KB Email delivery**: Instant (Gmail API) Success rate**: 99%+ with valid emails Security & Privacy ✅ Email verification prevents fake signups ✅ Unique Pass IDs prevent duplication ✅ All data logged in your private Google Sheet ✅ No data stored in n8n (passes through only) ✅ HTTPS webhook for secure data transmission ✅ OAuth2 authentication for Google services Tags gym fitness trial-pass email-verification qr-code pdf-generation member-onboarding automation verification photo-id
by Rahul Joshi
Description Automatically qualify and route new leads from a Google Sheet into your CRM with AI-powered scoring and instant sales notifications. Turn raw form submissions into prioritized opportunities—effortlessly. ⚡ What This Template Does Monitors a Google Sheet for new form submissions. 📄 Uses Azure OpenAI (GPT-4o-mini) to analyze lead details (value, stage, company) and generate action items. 🤖 Parses the AI response into clean JSON for structured processing. 🗂️ Saves qualified lead data and AI-generated action items into a Lead Status sheet for tracking. 💾 Categorizes leads into Hot, Warm, or Cold based on AI scoring. 🔥❄️ Creates/updates the contact in HighLevel CRM. 📇 Sends an email notification to the assigned sales rep with lead details and priority. 📧 Key Benefits Save time with automated lead qualification instead of manual checks. ⏱️ Ensure consistent Hot/Warm/Cold scoring across all leads. ✅ Centralize lead data in both Google Sheets and CRM for tracking. 📊 Keep sales teams aligned with instant notifications. 🚀 Fully no-code configurable and customizable for your business logic. 🧩 Features Google Sheets Trigger for new form rows. 📥 AI Agent with Azure OpenAI (GPT-4o-mini) for lead scoring. 🧠 JSON parsing node to clean AI output. ✂️ Lead logging to “Lead Status” sheet. 📊 Function node to categorize leads by score. 🎯 CRM sync with HighLevel to update/create contact records. 🔗 SMTP email notification to sales reps. ✉️ Requirements n8n instance (cloud or self-hosted). 🧰 Google Sheet with headers: Lead Name, Lead Email, Lead Contact No., Company Name, Opportunity Value, Stage of Lead; shared with n8n Google account. 📑 Azure OpenAI access with a GPT-4o-mini deployment. ☁️ HighLevel CRM account connected via OAuth. 📇 SMTP email account configured in n8n. 📧 Target Audience Sales teams handling inbound leads. 📈 Agencies managing multiple client pipelines. 🤝 Founders/startups wanting quick qualification and CRM sync. 🚀 Ops teams needing reliable reporting of lead qualification. 🗂️ Step-by-Step Setup Instructions (Concise) Create a Google Sheet with required headers; share with n8n account. 📋 Configure the Google Sheets Trigger with the sheet’s Document ID. 🔐 Connect your Azure OpenAI credentials and link to the AI Agent node. 🧠 Assign your HighLevel CRM account credentials. 📇 Set up SMTP credentials for the email send node. ✉️ Import the workflow, update node configs, and run a test submission. ▶️ Security Best Practices Share Google Sheets only with the n8n Google account (Editor). 🔒 Keep API keys and credentials encrypted in n8n, not hardcoded. 🛡️ Validate AI outputs before saving to CRM (via the parse node). ✅ Regularly back up your Lead Status sheet and CRM data. 📂
by Țugui Dragoș
This workflow is a comprehensive, production-grade automation for B2B lead management and multichannel outreach, designed for Sales Development Representatives (SDRs), growth teams, and sales operations. It covers the entire SDR pipeline: from lead ingestion and validation, through enrichment, scoring, AI-powered outreach, reply handling, analytics, and reporting. Key Features: Lead validation (email, suppression, geo/GDPR) Multi-source data enrichment Lead scoring and tiering (HIGH/MEDIUM/LOW) AI-generated personalized cold emails (with A/B subject testing) Multichannel outreach (Email, LinkedIn, WhatsApp) with rate limiting and compliance AI-based reply simulation and intent classification Automated routing (qualification, follow-up, manual review) Full event logging to database Aggregated analytics and daily reporting Human-readable AI summary and Slack notifications What This Workflow Does 1. Lead Ingestion & Validation Loads leads from a source (test data, CRM, webhook, etc.) Validates email format and checks against suppression lists (blocked domains/emails) Applies geo and GDPR compliance logic (blocks/flags leads from restricted countries) 2. Data Enrichment Enriches each lead via one or more external APIs (company info, tech stack, revenue, etc.) Handles enrichment failures gracefully and logs them for analytics 3. Lead Scoring & Segmentation Scores leads based on industry, country, company size, revenue, and pain points Segments leads into HIGH, MEDIUM, or LOW tiers for tailored outreach 4. AI-Powered Outreach Generation Uses OpenAI (or compatible LLM) to generate personalized cold email content Creates A/B tested subject lines for each email Generates LinkedIn and WhatsApp message variants for multichannel outreach 5. Multichannel Outreach Execution Sends emails via SMTP (with rate limiting and quiet hours) Simulates LinkedIn and WhatsApp sends (can be replaced with real integrations) Logs all outreach events to a Postgres database 6. Reply Simulation & AI Classification Simulates a variety of lead replies (interested, not interested, follow-up, unclear) Uses AI to classify reply intent and suggest next actions 7. Automated Routing & Follow-up Routes leads based on AI classification: Interested: Schedules meeting, logs qualification, proposes follow-up Follow-up Later: Schedules future follow-up Not Interested: Marks as closed/lost Unclear: Flags for manual review and notifies team via Slack 8. Event Logging & Analytics Logs every significant event (enrichment, outreach, reply, status change) to a database Aggregates results by lead score, channel, and status Calculates key metrics (qualification rate, enrichment success, multichannel rate, etc.) 9. Reporting & Team Notification Generates a daily analytics row and stores it in the database Uses AI to create a human-readable summary of the run Posts a detailed summary to a Slack channel Use Cases Automated SDR Workflows:** Replace manual lead research, outreach, and follow-up with a fully automated, auditable process. Growth Experiments:** Run A/B tests on messaging, subject lines, and channels at scale. Sales Analytics:** Get transparent, granular reporting on every step of the SDR funnel. Compliance-First Outreach:** Ensure all outreach respects geo, GDPR, and suppression rules. AI-Driven Personalization:** Use LLMs to generate highly relevant, non-generic outreach at scale. Installation & Setup 1. Import the Workflow Download or copy the workflow from the n8n Template Store. In your n8n editor, click Import and paste the workflow JSON, or use the "Use Template" button. 2. Configure Required Credentials Postgres:** Set up a Postgres credential for event and analytics logging. SMTP:** Add your email provider's SMTP credentials for sending emails. OpenAI:** Add your OpenAI API key for AI-powered nodes. Slack:** Add your Slack API credential for notifications. Enrichment APIs:** Add credentials for any external enrichment APIs you use. 3. Customize Lead Source Replace the test data in the Load Test Leads node with your real lead source (e.g., webhook, CRM, Google Sheets, etc.). 4. Adjust Compliance & Suppression Logic Update the suppression lists and geo/GDPR logic in the relevant nodes to match your organization's requirements. 5. Review Multichannel Logic The workflow simulates LinkedIn and WhatsApp sends. Replace these with real integrations if needed. 6. Database Preparation Ensure your Postgres database has the following tables (or adjust node configs): lead_events (for all event logs) analytics_daily (for daily summary rows) meetings (for scheduled meetings) execution_runs (for workflow run metadata) 7. Test the Workflow Run the workflow manually with sample data. Check the database and Slack for logs and notifications. Review AI-generated content for tone and compliance. Configuration Details Rate Limiting:** Email, LinkedIn, and WhatsApp sends are rate-limited and respect quiet hours. A/B Testing:** Each email uses a randomly selected subject variant for ongoing optimization. AI Models:** Uses OpenAI GPT-4o-mini by default; can be swapped for other models. Event Logging:** Every action (enrichment, outreach, reply, status change) is logged with timestamp and payload for full traceability. Analytics:** Aggregates by lead score, channel, and status; calculates rates and averages. Slack Notifications:** Posts a summary of each run, including key metrics and AI-generated insights. Advanced Customization Add/Replace Enrichment APIs:** Plug in any HTTP-based enrichment service. Custom Lead Scoring:** Adjust the scoring logic in the Compute Lead Score node to fit your ICP. Custom AI Prompts:** Edit the system messages in AI nodes for your brand voice. Additional Channels:** Integrate SMS, phone, or other channels as needed. Webhook Triggers:** Replace manual trigger with webhook for real-time automation. Requirements n8n version 1.123.0 or later Postgres database (or adapt for your DB) SMTP email provider OpenAI API key (or compatible LLM) Slack workspace (for notifications) (Optional) Enrichment API keys Template Store Submission Notes All credentials are handled via n8n's credential system (no hardcoded secrets). The workflow is modular, well-commented, and ready for production use. All event and analytics logging is auditable and GDPR-compliant. Please review and test all integrations in your environment before using in production. Example Analytics Output | Metric | Value | |-----------------------|---------| | Total Leads | 100 | | Qualified | 22 | | Follow-up Scheduled | 15 | | Closed Lost | 40 | | Manual Review | 3 | | Qualification Rate | 22% | | Enrichment Success | 90% | | Multichannel Rate | 60% | Ready to automate your SDR pipeline? Import this workflow and start scaling your B2B outreach today!
by Leo Lara
AI Meeting Task Manager - Google Meet to GoHighLevel CRM 📋 TEMPLATE DESCRIPTION Transform your meeting follow-ups from chaos to clarity! This workflow automates the entire post-meeting workflow by scanning Google Meet recordings folders, extracting action items from AI-generated meeting notes, and creating tasks directly in your GoHighLevel CRM. 🎯 Who is this for? Sales teams using GoHighLevel CRM Agency owners managing multiple client meetings Anyone who uses Google Meet with Gemini note-taking Professionals drowning in meeting follow-ups ✨ What it does: Daily File Organization Scans your Google Meet recordings folder Automatically sorts recordings, notes, and chat logs into organized subfolders Keeps your Drive clean and searchable AI-Powered Task Extraction Reads Google Docs meeting notes (generated by Gemini) Identifies action items assigned to you Intelligently determines due dates from context (defaults to 3 business days) CRM Integration Searches for meeting participants in GoHighLevel Creates properly formatted tasks with full context Links tasks to the correct contact record Beautiful Email Summaries Sends a professionally designed HTML email Shows tasks created per contact Includes due dates and status updates 🔧 Technologies Used: Google Drive API (file management) Google Docs API (content extraction) GoHighLevel API (contact search + task creation) OpenAI GPT-4 (task extraction intelligence) Gmail API (email delivery) ⚙️ Setup Requirements: Google Cloud OAuth credentials (Drive, Docs, Gmail) GoHighLevel OAuth credentials OpenAI API key Create 4 Google Drive folders (source + 3 destination folders) 📖 Setup Instructions: Create Google Drive Folders: Source folder: Where Google Meet saves recordings Recordings folder: For video files Notes folder: For Gemini notes Chat folder: For meeting chat logs Configure Credentials: Connect Google Drive OAuth Connect Google Docs OAuth Connect GoHighLevel OAuth Connect Gmail OAuth Add OpenAI API key Update Folder URLs: Replace placeholder URLs in Google Drive nodes with your folder URLs Customize: Set your email address in the Gmail tool Set your GoHighLevel user ID for task assignment Adjust the schedule trigger timing as needed 💡 Pro Tips: Works best with Google Meet's Gemini note-taking feature Customize the AI prompts to match your task naming conventions The HTML email template is fully customizable
by Ibrahim Emre POLAT
How it works Automatically generates professional PDF invoices from webhook data and delivers them via email while storing backups in Google Drive. Perfect for freelancers, small businesses, and service providers who need automated billing workflows. Set up steps Configure environment variables for company information (name, address, email, phone). Set up your PDF generation API service account (PDFShift recommended). Configure SMTP email credentials for invoice delivery. Set up Google Drive OAuth2 for cloud storage. Deploy the workflow and test with sample invoice data. Key features Smart invoice number generation if not provided Automatic tax calculations with configurable rates Professional HTML templates with company branding Parallel processing for email and storage Comprehensive error handling and validation Detailed success confirmation responses Required environment variables COMPANY_NAME - Your business name COMPANY_ADDRESS - Business mailing address COMPANY_EMAIL - Billing contact email COMPANY_PHONE - Business phone number PDF_API_URL - PDF generation service endpoint PDF_API_KEY - API authentication key GDRIVE_INVOICE_FOLDER_ID - Google Drive folder ID API requirements PDF generation service (PDFShift, HTML/CSS to PDF API, or similar), SMTP email service for delivery, Google Drive API access for storage. Input format { "customerName": "John Smith", "customerEmail": "john@example.com", "items": [ {"description": "Web Design", "quantity": 1, "price": 500} ], "dueDate": "2025-02-15" }
by Jameson Kanakulya
🎨 Template Overview This comprehensive n8n workflow automates the complete process of generating professional interior design moodboards from concept to client delivery. Users submit a design brief through a form, and the system automatically generates 12 AI-powered images, compiles them into a beautifully formatted two-page PDF moodboard, and emails the final deliverable. Key Features: Form-based design brief submission AI-powered image prompt generation (12 detailed prompts per project) Automated image generation via Hugging Face API Nextcloud cloud storage with public URL sharing Professional two-page HTML/PDF moodboard creation Automated email delivery with PDF attachment Technologies Used: Claude Sonnet 4 (OpenRouter), Google Gemini 2.5 Pro, Hugging Face FLUX.1-schnell, Nextcloud, Gotenberg PDF Service, Gmail ⚙️ Self-Hosted Requirements This template requires the following self-hosted or third-party services: Nextcloud Instance** - For cloud file storage and public URL generation Gotenberg PDF Service** - For HTML to PDF conversion (can be self-hosted via Docker) OpenRouter API Access** - For Claude Sonnet 4 AI agent Google Gemini API Access** - For secondary AI processing Hugging Face API Access** - For FLUX.1-schnell image generation Gmail Account** - For email delivery (or any SMTP service) 📋 Setup Instructions Step 1: Configure API Credentials OpenRouter (Claude Sonnet 4) Sign up at openrouter.ai Generate an API key Add credentials to the "OpenRouter Chat Model" node Google Gemini API Visit Google AI Studio Create an API key Add credentials to the "Google Gemini Chat Model1" node Hugging Face API Register at huggingface.co Generate an access token from Settings → Access Tokens Add credentials to the "Image Generator" node using HTTP Header Auth Header name: Authorization, Value: Bearer YOUR_TOKEN Nextcloud Set up a Nextcloud instance or use a hosted provider Generate an app password from Settings → Security Configure credentials in all Nextcloud nodes: "Create a folder" "Upload Image" "Share a file" Gotenberg PDF Service Self-host using Docker: docker run --rm -p 3000:3000 gotenberg/gotenberg:8 Or use a hosted instance Update the URL in the "PDF creator" node Configure HTTP Basic Auth credentials if required Gmail Enable 2-Factor Authentication on your Google account Generate an App Password from Google Account settings Add OAuth2 credentials to the "Send PDF" node Step 2: Customize Workflow Settings Email Extractor Node Review the stripPlus variable (default: true) This removes "+tag" portions from email addresses for folder naming Nextcloud Folder Structure Default path: /moodboard/{username}/ Modify in "Create a folder" node if needed Image Generator Settings Model: FLUX.1-schnell (fast generation, good quality) Adjust model in "Image Generator" node if needed Alternative models: FLUX.1-dev, Stable Diffusion XL PDF Generation Settings Default timeout: 360 seconds Page size: A4 (210mm × 297mm) Adjust in "PDF creator" node headers if needed Step 3: Test the Workflow Activate the Form Open the "Moodboard Form" node Copy the webhook URL Access the form in your browser Submit a Test Request Fill in the form fields: Title: Short, descriptive name (e.g., "Modern Minimalist Bedroom") Description: Detailed design brief with colors, materials, mood, lighting Email: Your test email address Submit and monitor workflow execution Verify Each Stage Check Nextcloud folder creation Monitor image generation progress (12 images) Review HTML moodboard generation Confirm PDF creation Check email delivery Step 4: Configure Form Embedding (Optional) Embed the form on your website: <iframe src="YOUR_N8N_FORM_WEBHOOK_URL" width="100%" height="800" frameborder="0"> </iframe> 🔄 Workflow Structure 1. Form Input & Data Extraction Moodboard Form** - Collects project title, description, and user email Email Extractor** - Extracts username from email for folder organization 2. Storage Setup Create a Folder** - Creates personalized Nextcloud directory using email username 3. AI Concept Generation Conceptualization Agent** (Claude Sonnet 4) - Analyzes design brief and generates 12 detailed image prompts (300-500 words each) Images 1-11: Individual design elements (furniture, materials, details, styling) Image 12: Comprehensive 3D rendered view integrating all elements 4. Image Processing Loop Concept Splitter** - Separates 12 prompts into individual items Loop Over Items** - Processes each prompt sequentially: Image Generator - Sends prompt to Hugging Face FLUX.1-schnell API Upload Image - Stores generated image in Nextcloud folder Share a File - Creates public shareable URL Set Image Title and URL - Formats data for aggregation 5. URL Collection URL Aggregate** - Combines all 12 public image URLs Clean URLs** - Extracts and formats URLs into a structured list 6. Moodboard Compilation Moodboard Generator Agent** (Google Gemini 2.5 Pro) - Creates professional two-page HTML document: Page 1: Visual moodboard with all 12 images (Image #12 prominently featured 2-3x larger) Page 2: Administrative summary with design overview, color palette, materials, and project details 7. PDF Generation & Delivery Binary Converter** - Transforms HTML to base64-encoded binary format PDF Creator** - Converts HTML to print-ready PDF via Gotenberg service Send PDF** - Emails final moodboard PDF to user 🎯 Node Descriptions Moodboard Form Collects moodboard generation requests for any design topic. Users input a title, detailed description (colors, materials, patterns, textures, lighting), and email address for delivery. Email Extractor Extracts the username portion from email addresses, optionally stripping "+tags" for clean folder naming and user identification. Create a Folder Creates a dedicated Nextcloud folder using the extracted email username, organizing moodboard outputs by user. Conceptualization Agent AI agent that analyzes design briefs to generate 12 detailed image prompts (300-500 words each). Performs conceptual analysis of styles, colors, materials, and spatial requirements, outputting structured JSON. Concept Splitter Splits the 12 generated image prompts into individual items for parallel processing through the image generation pipeline. Loop Over Items Processes each prompt sequentially, generating images, uploading to Nextcloud, and creating public URLs. Image Generator Sends detailed prompts to Hugging Face FLUX.1-schnell API for AI-powered image generation, transforming written design concepts into high-quality visuals. Upload Image Uploads each generated moodboard image to the user's Nextcloud folder with appropriate naming conventions. Share a File Creates publicly shareable Nextcloud links for each uploaded image, enabling external viewing without authentication. Set Image Title and URL Formats image metadata (title and URL) for downstream aggregation. URL Aggregate Combines all 12 image URLs into a single consolidated output for moodboard compilation. Clean URLs Extracts and formats URLs from the aggregated data into a clean, structured list with count. Moodboard Generator Agent Transforms design concepts into professional two-page HTML moodboards. Analyzes project details and 12 image URLs, selecting appropriate visual styles. Creates artistic Page 1 with Image #12 as hero element, and comprehensive Page 2 with design documentation. Binary Converter Prepares HTML for PDF conversion by transforming it into binary format with proper encoding and filename ("index.html") for Gotenberg compatibility. PDF Creator Converts HTML moodboard into print-ready PDF with proper A4 dimensions, page breaks, and high-quality image resolution. Send PDF Emails the finalized PDF moodboard to the user's submitted email address with project details and PDF attachment. 🎨 Customization Options Design Styles The Moodboard Generator Agent automatically selects from 10 layout styles: Modern Sectional Grid Material Board Collage Editorial Magazine Clean Minimalist Split-Screen Dramatic Asymmetric Feature Centered Showcase Modular Block System Organic Flow Layered Depth Image Generation Models Replace FLUX.1-schnell with alternatives in the "Image Generator" node: black-forest-labs/FLUX.1-dev - Higher quality, slower stabilityai/stable-diffusion-xl-base-1.0 - Classic SD XL Email Templates Customize the email message in the "Send PDF" node to include: Brand messaging Next steps Support contact information Pricing information 🐛 Troubleshooting Images Not Generating Verify Hugging Face API token is valid Check API rate limits and quotas Increase timeout in "Image Generator" node (default: unlimited) PDF Generation Fails Ensure Gotenberg service is accessible Verify HTML output contains all 12 image URLs Check timeout settings (default: 360s) Review Gotenberg logs for specific errors Nextcloud Upload Errors Confirm folder creation succeeded Verify Nextcloud credentials and permissions Check available storage space Ensure WebDAV is enabled Email Not Received Verify Gmail OAuth2 credentials Check spam/junk folders Confirm email address is valid Review Gmail API quotas 📊 Performance Notes Average execution time**: 5-8 minutes (depends on image generation) Image generation**: ~20-30 seconds per image (12 images = 4-6 minutes) PDF generation**: ~30-60 seconds Total data processed**: ~15-25 MB per workflow execution 🔐 Security Considerations Store all API keys in n8n credentials (never hardcode) Use environment variables for sensitive configuration Implement rate limiting on the form webhook Consider adding CAPTCHA to prevent abuse Regularly rotate API keys and passwords Use HTTPS for all external communications 📝 License & Attribution This template is provided as-is for the n8n community. Feel free to modify and adapt to your needs. AI Models Used: Claude Sonnet 4 (Anthropic via OpenRouter) Google Gemini 2.5 Pro (Google) FLUX.1-schnell (Black Forest Labs via Hugging Face) 🤝 Support & Contributions For questions or improvements, please reach out through the n8n community forum or submit issues/PRs to enhance this template. Created by: Jameson Kanakulya Template Version: 1.0 Last Updated: November 2025
by Feras Dabour
Social Media Foto Creation Bot with Approval Loop Create & Share AI Photos with Telegram, Gemini & Post to Facebook, Instagram & X Description This n8n workflow turns your Telegram messenger into a complete AI Photo Content Pipeline. You send your photo idea as a text or voice message to a Telegram bot, collaborate with an AI to refine the prompt and social media caption, let Gemini generate the image, and then automatically publish it after your approval to Facebook, Instagram, and X (Twitter) – including status tracking and Telegram confirmations. What You Need to Get Started This workflow connects several external services. You will need the following credentials: Telegram Bot API Key** Create a bot via BotFather and copy the bot token. This is used by the Listen for incoming events and other Telegram nodes. OpenAI API Key** Required for Speech to Text (OpenAI Whisper) to transcribe voice notes. Used by the AI Agent model (OpenAI Chat Model) for prompt creation. Google Gemini API Key** Used by the Generate an image node (model: models/gemini-2.5-flash-image) to create the AI image. Google Drive & Sheets Access** The generated image is temporarily stored in a Google Drive folder (Upload image1) and later retrieved by Blotato. Prompts and post texts are logged to Google Sheets (Save Prompt & Post-Text) for tracking. Blotato API Key** The layer for social media publishing. Uploads the image as a media asset (Upload media1) and creates posts for Facebook, Instagram, and X. How the Workflow Operates – Step by Step 1. Input & Initial Processing (Telegram + Voice Handling) This phase receives your messages and prepares the input for the AI. | Node Name | Role in Workflow | | :--- | :--- | | Listen for incoming events | Telegram Trigger node that starts the workflow on any incoming message. | | Voice or Text | Set node that structures the incoming message into a unified text field. | | A Voice? | IF node that checks if the message is a voice note. | | Get Voice File | If voice is detected, this downloads the audio file from Telegram. | | Speech to Text | Uses OpenAI Whisper to convert the voice note into a text transcript. | The output of this stage is always a clean text string containing your image idea. 2. AI Core & Refinement Loop (Prompt + Caption via AI) Here, the AI drafts the image prompt (for Gemini) and the social media caption (for all platforms) and enters an approval loop with you. | Node Name | Role in Workflow | | :--- | :--- | | AI Agent | Central logic agent. Creates a videoPrompt (used for image generation) and socialMediaText based on your idea, and asks for feedback. | | OpenAI Chat Model | The LLM backing the agent (e.g., GPT-4.1-mini). | | Window Buffer Memory | Stores recent turns, allowing the agent to maintain context during revisions. | | Send questions or proposal to user | Sends the AI's suggestion for review back to you. | | Approved from user? | IF node that checks if the output is the approved JSON (meaning you replied with "ok" or "approved"). | | Parse AI Output | Code node that extracts the videoPrompt and socialMediaText fields from the agent’s final JSON output. | 3. Content Generation & Final Approval Once the prompt and caption are set, the image is created and sent to you for final approval before publishing. | Node Name | Role in Workflow | | :--- | :--- | | Inform user about processing | Telegram node to confirm: "Okay. Your image is being prepared now..." | | Save Prompt & Post-Text | Google Sheets node that logs the videoPrompt and socialMediaText. | | Generate an image | Gemini node that creates the image based on the videoPrompt. | | Send a photo message | Sends the generated image to Telegram for review. | | Send message and wait for response | Telegram node that waits for your response to the image (e.g., "Good?" / "Approve"). | | Upload image1 | Temporarily saves the generated image to Google Drive. | | Download image from Drive | Downloads the image back from Drive. | | If1 | IF node that checks if the image was approved in the previous step (approved == true). | 4. Upload & Publishing (Blotato) After final approval, the image is uploaded to Blotato, and post submissions for the social media platforms are created. | Node Name | Role in Workflow | | :--- | :--- | | Upload media1 | Blotato Media node. Uploads the approved image as a media asset and returns a public url. | | Create instagram Post | Creates an Instagram post using the media URL and socialMediaText. | | Create x post | Creates an X (Twitter) post using the media URL and socialMediaText. | | Create FB post | Creates a Facebook post using the media URL and socialMediaText. | 5. Status Monitoring & Retry Loops (X, Facebook, Instagram) An independent loop runs for each platform, polling Blotato until the post is either published or failed. | Node Name | Role in Workflow | | :--- | :--- | | Wait, Wait1, Wait2 | Initial pauses after post creation. | | Check Post Status, Get post1, Check Post Status1 | Blotato Get operations to fetch the current status of the post. | | Published to X?, Published to Facebook?, Published to Instagram? | IF nodes checking for the "published" status. | | Confirm publishing to X, Confirm publishing to Facebook, Confirm publishing to Instagram | Telegram nodes that notify you of successful publication (often including the post link). | | In Progress?, In Progress?1, In Progress?2 | IF nodes that check for "in-progress" status and loop back to the Wait nodes (Give Blotat other 5s). | | Send X Error Message, Send Facebook Error Message, Send Instagram Error Message | Telegram nodes that notify you if a failure occurs. | 🛠️ Personalizing Your Content Bot The workflow is highly adaptable to your personal brand and platform preferences: Tweak the AI Prompt & Behavior: Where: In the AI Agent node, within the System Message. Options: Change the tone (casual, professional, humorous) and the level of detail required for the prompt generation or the social media captions. Change Gemini Model or Image Options: Where: In the Generate an image node. Options: Swap the model or adjust image options like Aspect Ratio or Style based on Gemini's API capabilities. Modify Which Platforms You Post To: Where: In the Blotato nodes: Create instagram Post, Create x post, Create FB post. Options: Disable or delete branches for unused platforms, or add new platforms supported by Blotato.