by Max
N8N Automated Twitter Reply Bot Workflow For latest version, check: dziura.online/automation Latest documentation can be find here You must have Apify community node installed before pasting the JSON to your workflow. Overview This n8n workflow creates an intelligent Twitter/X reply bot that automatically scrapes tweets based on keywords or communities, analyzes them using AI, generates contextually appropriate replies, and posts them while avoiding duplicates. The bot operates on a schedule with intelligent timing and retry mechanisms. Key Features Automated tweet scraping** from Twitter/X using Apify actors AI-powered reply generation** using LLM (Large Language Model) Duplicate prevention** via MongoDB storage Smart scheduling** with timezone awareness and natural posting patterns Retry mechanism** with failure tracking Telegram notifications** for status updates Manual trigger** option via Telegram command Required Credentials & Setup 1\. Telegram Bot Create a bot via @BotFather on Telegram Get your Telegram chat ID to receive status messages Credential needed**: Telegram account (Bot token) 2\. MongoDB Database Set up a MongoDB database to store replied tweets and prevent duplicates Create a collection (default name: collection\_name) Credential needed**: MongoDB account (Connection string) Tutorial**: MongoDB Connection Guide 3\. Apify Account Sign up at Apify.com Primary actors used**: Search Actor: api-ninja/x-twitter-advanced-search - For keyword-based tweet scraping (ID: 0oVSlMlAX47R2EyoP) Community Actor: api-ninja/x-twitter-community-search-post-scraper - For community-based tweet scraping (ID: upbwCMnBATzmzcaNu) Credential needed**: Apify account (API token) 4\. OpenRouter (LLM Provider) Sign up at OpenRouter.ai Used for AI-powered tweet analysis and reply generation Model used**: x-ai/grok-3 (configurable) Credential needed**: OpenRouter account (API key) 5\. Twitter/X API Set up developer account at developer.x.com Note**: Free tier limited to ~17 posts per day Credential needed**: X account (OAuth2 credentials) Workflow Components Trigger Nodes 1\. Schedule Trigger Purpose**: Runs automatically every 20 minutes Smart timing**: Only active between 7 AM - 11:59 PM (configurable timezone) Randomization**: Built-in probability control (~28% execution chance) to mimic natural posting patterns 2\. Manual Trigger Purpose**: Manual execution for testing 3\. Telegram Trigger Purpose**: Manual execution via /reply command in Telegram Usage**: Send /reply to your bot to trigger the workflow manually Data Processing Flow 1\. MongoDB Query (Find documents) Purpose**: Retrieves previously replied tweet IDs to avoid duplicates Collection**: collection\_name (configure to match your setup) Projection**: Only fetches tweet\_id field for efficiency 2\. Data Aggregation (Aggregate1) Purpose**: Consolidates tweet IDs into a single array for filtering 3\. Keyword/Community Selection (Keyword/Community List) Purpose**: Defines search terms and communities Configuration**: Edit the JSON to include your keywords and Twitter community IDs Format:{ "keyword\_community\_list": \[ "SaaS", "Entrepreneur", "1488663855127535616" // Community ID (19-digit number) \], "failure": 0 } 4\. Random Selection (Randomized community, keyword) Purpose**: Randomly selects one item from the list to ensure variety 5\. Routing Logic (If4) Purpose**: Determines whether to use Community search or Keyword search Logic**: Uses regex to detect 19-digit community IDs vs keywords Tweet Scraping (Apify Actors) Community Search Actor Actor**: api-ninja/x-twitter-community-search-post-scraper Purpose**: Scrapes tweets from specific Twitter communities Configuration:{ "communityIds": \["COMMUNITY\_ID"\], "numberOfTweets": 40 } Search Actor Actor**: api-ninja/x-twitter-advanced-search Purpose**: Scrapes tweets based on keywords Configuration:{ "contentLanguage": "en", "engagementMinLikes": 10, "engagementMinReplies": 5, "numberOfTweets": 20, "query": "KEYWORD", "timeWithinTime": "2d", "tweetTypes": \["original"\], "usersBlueVerifiedOnly": true } Filtering System (Community filter) The workflow applies multiple filters to ensure high-quality replies: Text length**: >60 characters (substantial content) Follower count**: >100 followers (audience reach) Engagement**: >10 likes, >3 replies (proven engagement) Language**: English only Views**: >100 views (visibility) Duplicate check**: Not previously replied to Recency**: Within 2 days (configurable in actor settings) AI-Powered Reply Generation LLM Chain (Basic LLM Chain) Purpose**: Analyzes filtered tweets and generates contextually appropriate replies Model**: Grok-3 via OpenRouter (configurable) Features**: Engagement potential scoring User authority analysis Timing optimization Multiple reply styles (witty, informative, supportive, etc.) <100 character limit for optimal engagement Output Parser (Structured Output Parser) Purpose**: Ensures consistent JSON output format Schema:{ "selected\_tweet\_id": "tweet\_id\_here", "screen\_name": "author\_screen\_name", "reply": "generated\_reply\_here" } Posting & Notification System Twitter Posting (Create Tweet) Purpose**: Posts the generated reply as a Twitter response Error handling**: Catches API limitations and rate limits Status Notifications Success**: Notifies via Telegram with tweet link and reply text Failure**: Notifies about API limitations or errors Format**: HTML-formatted messages with clickable links Database Storage (Insert documents) Purpose**: Saves successful replies to prevent future duplicates Fields stored**: tweet\_id, screen\_name, reply, tweet\_url, timestamp Retry Mechanism The workflow includes intelligent retry logic: Failure Counter (If5, Increment Failure Counter1) Logic**: If no suitable tweets found, increment failure counter Retry limit**: Maximum 3 retries with different random keywords Wait time**: 3-second delay between retries Final Failure Notification Trigger**: After 4 failed attempts Action**: Sends Telegram notification about unsuccessful search Recovery**: Manual retry available via /reply command Configuration Guide Essential Settings to Modify MongoDB Collection Name: Update collection\_name in MongoDB nodes Telegram Chat ID: Replace 11111111111 with your actual chat ID Keywords/Communities: Edit the list in Keyword/Community List node Timezone: Update timezone in Code node (currently set to Europe/Kyiv) Actor Selection: Enable only one actor (Community OR Search) based on your needs Filter Customization Adjust filters in Community filter node based on your requirements: Minimum engagement thresholds Text length requirements Time windows Language preferences LLM Customization Modify the AI prompt in Basic LLM Chain to: Change reply style and tone Adjust engagement criteria Modify scoring algorithms Set different character limits Usage Tips Start small: Begin with a few high-quality keywords/communities Monitor performance: Use Telegram notifications to track success rates Adjust filters: Fine-tune based on the quality of generated replies Respect limits: Twitter's free tier allows ~17 posts/day Test manually: Use /reply command for testing before scheduling Troubleshooting Common Issues No tweets found: Adjust filter criteria or check keywords API rate limits: Reduce posting frequency or upgrade Twitter API plan MongoDB connection: Verify connection string and collection name Apify quota: Monitor Apify usage limits LLM failures: Check OpenRouter credits and model availability Best Practices Monitor your bot's replies for quality and appropriateness Regularly update keywords to stay relevant Keep an eye on engagement metrics Adjust timing based on your audience's activity patterns Maintain a balanced posting frequency to avoid appearing spammy Documentation Links Full Documentation**: Google Doc Guide Latest Version**: dziura.online/automation MongoDB Setup Tutorial**: YouTube Guide This workflow provides a comprehensive solution for automated, intelligent Twitter engagement while maintaining quality and avoiding spam-like behavior.
by Halfbit 🚀
AI-Powered Invoice Processing: from Email to Database & Chat Notifications Automatically process PDF invoices directly from your email inbox. This workflow uses AI to extract key data, saves it to a PostgreSQL database, and instantly notifies you about the new document in your preferred chat application. The workflow listens for new emails, fetches PDF attachments, and then passes their content to a Large Language Model (LLM) for intelligent recognition and data extraction. Finally, the information is securely archived in the database, and a summary of the invoice is sent as a notification. > 📝 This workflow is highly customizable. > It uses PostgreSQL, OpenAI (GPT), and Discord by default, but you can easily swap these components. > Feel free to use a different database like MySQL or Airtable, another AI model provider, or send notifications to Slack, MS Teams, or any other chat platform. > ⚠️ Note: If the workflow fails to extract data correctly from invoices issued by certain companies, you may need to adjust the prompt used in the Basic LLM Chain node to improve parsing accuracy. Use Case Automating accounts payable for small businesses and freelancers Centralizing financial documents without manual data entry Creating a searchable database of all incoming invoices Receiving real-time notifications for new financial commitments Features 📧 Email Trigger (IMAP):** Monitors a dedicated email inbox for new messages with attachments 📄 PDF Filtering:** Automatically identifies and processes only PDF attachments 🤖 AI-Powered Data Extraction:** Uses an LLM (e.g., GPT-4o-mini) to extract invoice number, buyer/seller details, amounts, currency, and due dates ⚙️ Structured Data Output:** Converts AI output to standardized JSON 🔍 Database Write Logic:** Prevents duplicates by checking invoice/company combo 🗄️ PostgreSQL Integration:** Stores extracted data into company and invoice tables 💬 Chat Notifications:** Sends invoice summary as message to a designated channel Setup Instructions ⚠️ API Access & Costs To use the AI extraction feature, you need an API key from a provider like OpenAI. Most providers charge for access to language models. You'll likely need a billing account. 1. PostgreSQL Database Configuration Ensure your database has the following tables: -- Table for companies (invoice issuers) CREATE TABLE company ( id SERIAL PRIMARY KEY, tax_number VARCHAR(255) UNIQUE NOT NULL, name VARCHAR(255), address TEXT, created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP ); -- Table for invoices CREATE TABLE invoice ( id SERIAL PRIMARY KEY, company_id INTEGER REFERENCES company(id), invoice_number VARCHAR(255) NOT NULL, -- Add other fields: total_to_pay, currency, due_date created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP, UNIQUE(company_id, invoice_number) ); Then, in n8n, create a credential for your PostgreSQL DB. 2. Email (IMAP) Configuration In n8n, add credentials for the email account that receives invoices: IMAP host IMAP port Username Password 3. AI Provider Configuration Log in to OpenAI (or similar provider) Generate API key In n8n, create credentials and paste the key 4. Chat Notification (Discord) Go to Discord > Server Settings > Integrations > Webhooks > New Webhook Select channel Copy Webhook URL In n8n, paste URL into the Discord node Placeholders and Fields to Fill | Placeholder | Description | Example | |---------------------------|-------------------------------------------|------------------------------------------| | YOUR_EMAIL_CREDENTIALS | Your IMAP email account in n8n | My Invoice Mailbox | | YOUR_OPENAI_CREDENTIALS | API credentials for AI model | My OpenAI Key | | YOUR_POSTGRES_CREDENTIALS| Your PostgreSQL DB credentials in n8n | My Production DB | | YOUR_DISCORD_WEBHOOK | Webhook URL for your chat system | https://discord.com/api/webhooks/... | Testing the Workflow Send a test invoice to the inbox as a PDF attachment Run the workflow manually in n8n and check if the IMAP node fetches the message Verify AI Extraction – inspect the LLM output (e.g., GPT node) and confirm structured JSON Check the DB – ensure new rows appear in company and invoice Check the chat – verify the invoice summary appears in the chosen channel Customization Tips Change the DB:** Use MySQL, Airtable, or Google Sheets instead of PostgreSQL Other notifications:** Swap Discord for Slack, MS Teams, Telegram, etc. Expand AI logic:** Extract line items, prices, etc. by customizing the prompt Add payment logic:** Allow marking invoices as paid via emoji or a separate webhook
by Robert Breen
Chat to write or reword a blog post. The workflow stores each result in Google Sheets and uses a sub-workflow “Google tool” to count rows per session (your running context). If a session exceeds a row threshold, the flow can branch (e.g., stop or notify). ⚙️ Setup Instructions 1️⃣ Set Up OpenAI Connection Go to OpenAI Platform Navigate to OpenAI Billing Add funds to your billing account Copy your API key into the OpenAI credentials in n8n 2️⃣ Prepare Your Google Sheet Connect your Data in Google Sheets Use this format: Sample Sheet Row 1 = column names (e.g., session, Rows, output) Data in rows 2–100 (or more if you prefer) In n8n, use Google Sheets OAuth2 → pick your Spreadsheet and Worksheet (Optional) You can adapt this to Airtable, Notion, or a Database 🧠 How It Works Chat Trigger**: Provide a topic (write) or paste existing text (reword). Code Node (“Choose to Write or Edit Blog”)**: Builds a system_prompt + user_prompt Instructs the agent to call the Google tool (sub-workflow) with only the sessionid to count existing rows. Tool Workflow (“google”)**: Fetches rows from the sheet → filters by session → summarizes row count. Agent (“Blog Writer & Editor”)**: Returns structured JSON (items/rows, session, blog body). Store (Google Sheets)**: Appends { session, Rows, output } to the sheet. If Node**: Example rule: Rows > 3 → branch/limit/notify as needed. 💬 Example Prompts “Write a 600-word blog about n8n agents with 3 bullet takeaways. Session: abc123.” “Reword this post into a concise LinkedIn article. Session: launchQ3:\n<your text here>” “Draft a blog intro and 5 SEO headlines on marketing automation. Session: mkt-01.” 📬 Contact Need help tailoring this to Airtable/Notion/DB, or adding auto-publishing? 📧 rbreen@ynteractive.com 🔗 Robert Breen 🌐 ynteractive.com
by Don Jayamaha Jr
Instantly fetch real-time Bitget spot market data directly in Telegram! This workflow integrates the Bitget REST v2 API with Telegram (plus optional AI-powered formatting) to deliver the latest crypto price, order book, candles, and recent trades. Perfect for crypto traders, analysts, and investors who need reliable market data at their fingertips—no API key required.  Sign-up for Bitget for 6,200 USDT in rewards to trade: Collect Now How It Works A Telegram bot listens for user requests (e.g., BTCUSDT). The workflow connects to Bitget public endpoints to fetch: Ticker (latest price & 24h stats) Order book depth (top bids/asks) Recent trades (price, side, volume, timestamp) Candlestick data (1m, 15m, 1h, 4h, 1d) Historical candles (optional, for backfill before endTime) A Calculator node derives useful metrics like mid-price and spread. A Think node reshapes raw JSON into Telegram-ready text. A splitter ensures reports over 4000 characters are chunked safely. The final market insights are delivered instantly back to Telegram. What You Can Do with This Agent ✅ Track live prices & 24h stats for any Bitget spot pair. ✅ Monitor order book liquidity and spreads in real-time. ✅ Analyze candlesticks across multiple timeframes. ✅ Review recent trades to see execution flow. ✅ Fetch historical candles for extended market context. ✅ Receive clean, structured reports with optional AI-enhanced formatting. Set Up Steps Create a Telegram Bot Use @BotFather to generate a bot token. Configure in n8n Import Bitget AI Agent v1.02.json into your n8n instance. Add your Telegram credentials (bot token + your Telegram ID in the User Authentication node). Add an OpenAI key if you want AI-powered formatting. (Optional) Add an *Bitget api key** . Deploy and Test Send BTCUSDT to your bot. Get live Bitget spot data instantly in Telegram! 🚀 Unlock powerful, real-time Bitget insights in Telegram—zero setup, zero API keys required! 📺 Setup Video Tutorial Watch the full setup guide on YouTube: 🧾 Licensing & Attribution © 2025 Treasurium Capital Limited Company Architecture, prompts, and trade report structure are IP-protected. No unauthorized rebranding permitted. 🔗 For support: Don Jayamaha – LinkedIn
by Rodrigue Gbadou
How it works Smart influencer discovery**: Automatically finds and qualifies influencers based on your criteria and target audience Automated outreach**: Sends personalized collaboration proposals with dynamic pricing and campaign details Campaign management**: Tracks deliverables, deadlines, and performance metrics in real-time ROI optimization**: Analyzes campaign performance and recommends budget allocation improvements Set up steps Social media APIs**: Connect Instagram, TikTok, YouTube APIs for influencer data collection Influencer databases**: Integrate with platforms like Upfluence, AspireIQ, or Grin Email automation**: Configure your email service for outreach campaigns Analytics tools**: Connect Google Analytics, social media insights for performance tracking Contract management**: Set up digital signature integration for collaboration agreements Payment systems**: Configure PayPal, Stripe for automated influencer payments Key Features 🎯 Smart matching**: AI-powered influencer discovery based on audience overlap and engagement quality 📊 Performance prediction**: Estimates campaign ROI before launch using historical data ⚡ Automated outreach**: Personalized email sequences with dynamic pricing calculations 📈 Real-time tracking**: Live dashboard showing campaign progress and key metrics 💰 Budget optimization**: Automatic budget reallocation based on performance data 🔄 Relationship management**: Long-term influencer relationship tracking and nurturing 📱 Multi-platform support**: Manages campaigns across Instagram, TikTok, YouTube simultaneously 🎨 Content approval**: Automated content review and approval workflows Campaign types supported Product launches**: Coordinated influencer campaigns for new product introductions Brand awareness**: Large-scale campaigns focused on reach and brand recognition Seasonal campaigns**: Holiday and event-specific influencer activations User-generated content**: Campaigns focused on authentic customer testimonials Event promotion**: Influencer partnerships for webinars, conferences, and live events Influencer qualification criteria Audience alignment**: Demographic and interest matching with your target market Engagement quality**: Authentic engagement rates and comment sentiment analysis Content quality**: Visual consistency and brand alignment assessment Collaboration history**: Previous brand partnerships and performance data Reach vs. engagement**: Optimal balance between follower count and engagement rates Performance metrics tracked Reach and impressions**: Total audience exposure across all platforms Engagement rates**: Likes, comments, shares, and saves per post Click-through rates**: Traffic driven to your website or landing pages Conversion tracking**: Sales and leads generated from influencer content Brand mention sentiment**: Positive vs. negative sentiment analysis Cost per engagement**: Efficiency metrics for budget optimization Automation features Influencer scoring**: Automatic ranking based on your custom criteria Outreach sequences**: Multi-touch email campaigns with follow-up automation Content reminders**: Automated deadline tracking and reminder notifications Performance alerts**: Real-time notifications for campaign milestones Payment processing**: Automatic invoice generation and payment scheduling Reporting automation**: Weekly and monthly performance reports This workflow revolutionizes influencer marketing by automating the entire process from discovery to payment, while providing data-driven insights for continuous optimization.
by Shadrack
Streamline your recruitment process with AI-powered resume analysis that goes beyond keyword matching. Overview This workflow revolutionizes hiring by using specialized AI agents to intelligently analyze resumes for different positions. Unlike traditional ATS systems that rely on keyword matching, this solution provides deep, contextual analysis of candidate qualifications and automatically manages the entire screening process from application to response. How it works Application Submission - Candidates complete a form with personal details, select their desired position (ICT, Customer Care, Accounting, or HR), and upload their resume Secure Storage - Resumes are automatically saved to Google Drive for permanent record-keeping Intelligent Routing - A switch node classifies applications by position and routes them to specialized AI agents AI Analysis - Position-specific agents (each with customized prompts and guardrails) extract text from PDFs and rate candidates on a 1-10 scale with detailed commentary CRM Integration - All data (timestamp, candidate info, position, score, AI comments, resume link) flows into Google Sheets for easy tracking Automated Response - A secondary workflow sends interview invitations to high-scoring candidates (7-10) and professional rejection emails to others (below 7) Key Benefits ✅ Contextual Analysis - AI understands skills and experience, not just keywords ✅ Faster Hiring - Close applications once you have enough qualified candidates ✅ No Expertise Required - HR teams don't need technical knowledge in every field ✅ Fully Automated - From submission to interview invitation without manual intervention ✅ Customizable - Adjust AI prompts and scoring criteria for each position ✅ Transparent - All AI reasoning is logged for review Set up steps Time to set up: ~30-45 minutes Prerequisites: n8n instance (cloud or self-hosted) Google Drive account Google Sheets account AI provider credentials (OpenAI, Anthropic, or compatible API) Email service (Gmail, SMTP, or other n8n-supported service) Quick Setup: Import the workflow into your n8n instance Connect your Google Drive and Google Sheets accounts Configure your AI provider credentials in the agent nodes Customize AI prompts for each position in the respective agent nodes (detailed instructions in sticky notes) Set up your email service credentials Customize email templates for invitations and rejections Test with sample resumes for each position Deploy your application form and share the link Detailed configuration instructions are included in sticky notes within the workflow. Use Cases Startups scaling their team quickly HR departments handling high application volumes Agencies managing recruitment for multiple clients Companies hiring for specialized technical roles Customization Options Adjust scoring thresholds for each position Modify AI evaluation criteria via prompts Add additional positions with dedicated agents Integrate with your existing HRIS or ATS Add SMS notifications for candidates Note: This workflow includes two separate flows - the main screening workflow and an automated response workflow. Both are included in the download.
by Adem Tasin
🧩 Description A customized n8n workflow inspired by the Lead Generation Agent template. It automates B2B lead scraping via Apify, extracts contact emails with AI, sends cold emails via Gmail, and logs every interaction in Google Sheets with Telegram alerts for live monitoring. 🧠 How It Works This workflow automates the entire B2B lead generation and outreach process from data collection to email delivery. Once you enter your search keyword and location, the system scrapes business details using Apify, filters valid websites, and extracts email addresses with AI. Each lead is then enriched and logged in Google Sheets. The workflow automatically composes a personalized cold email based on your preferred tone (friendly, simple, or professional) and sends it through Gmail with short delays between each message to avoid spam filters. You’ll also receive Telegram notifications to monitor progress and any leads that fail to send. ⚙️ Setup Steps Clone the workflow into your n8n instance. Add your API credentials: Apify API Token OpenAI (or Gemini) API Key Google Sheets & Gmail account connections Telegram Bot Token + Chat ID (optional) Open the Form node or Manual Trigger, and set your search criteria (e.g., “marketing agencies in London”). Configure your Google Sheet — make sure the columns match the node mapping. Adjust the AI prompt in the OpenAI node if you want a different tone or style for your emails. Run the workflow manually to test one or two leads first. Once confirmed, activate scheduling or keep it manual for on-demand lead generation. 🚀 Try It Out! Experience how AI and automation can take over your lead generation workflow. Just enter a business type and location, and watch as the system finds potential clients, extracts contact details, crafts a personalized cold email, and sends it — all without manual effort. Perfect for freelancers, agencies, or anyone looking to automate their B2B outreach process.
by Ajay Yadav
Lead Qualification & Follow‑up (Gemini) Automate lead intake, AI qualification, and next‑step outreach. Qualified leads get a scheduled meeting, Zoom details, an email confirmation, CRM update, and Mailchimp enrollment. Not‑qualified leads receive a follow‑up sequence, CRM update, and a 30‑day reminder. What this workflow does AI qualifies leads as QUALIFIED or NOT QUALIFIED using Google Gemini. Supports two triggers: Webhook (wordpress-form) or n8n Form Trigger. QUALIFIED branch: AI phone call via VAPI Schedules Google Calendar event Creates Zoom meeting Sends confirmation email via Gmail Adds to Mailchimp audience Updates contact in HubSpot NOT QUALIFIED branch: AI phone call via VAPI Adds to Mailchimp audience Sends follow‑up email via Gmail Updates contact in HubSpot Creates 30‑day follow‑up calendar event Apps and credentials required Google Gemini (PaLM/Gemini API) Gmail HubSpot Zoom Google Calendar VAPI (for AI phone calls) Mailchimp Environment variables MAILCHIMP_LIST_ID_QUALIFIED=your_mailchimp_list_id_for_qualified MAILCHIMP_LIST_ID_FOLLOWUP=your_mailchimp_list_id_for_followup Triggers supported Webhook: path wordpress-form (POST) Form Trigger: built‑in n8n form Use only one in production. Keep the other disabled. Expected input (fields) name: string email: string message: string If using Webhook, send a JSON body with the fields above. Setup Connect credentials: Google Gemini (model: models/gemini-2.5-flash) Gmail HubSpot (OAuth) Zoom Google Calendar (select the target calendar) VAPI (HTTP header auth: Bearer token) Set env vars: MAILCHIMP_LIST_ID_QUALIFIED MAILCHIMP_LIST_ID_FOLLOWUP Choose your trigger: Webhook: enable and use the provided URL for wordpress-form Form Trigger: enable and publish the form Review timing: adjust Wait nodes for your timezone and SLA. Personalize messaging: edit Gmail subjects/bodies and Zoom topic. CRM and lists: confirm HubSpot properties and Mailchimp list IDs. How it works (at a glance) Intake → AI classifies (QUALIFIED / NOT QUALIFIED) QUALIFIED: VAPI call → Schedule Calendar → Create Zoom → Add to Mailchimp (qualified) → Gmail confirmation → HubSpot update NOT QUALIFIED: VAPI call → Add to Mailchimp (follow‑up) → Gmail follow‑up → HubSpot update → 30‑day calendar event Test the workflow (before going live) Submit a test via your chosen trigger with name, email, message. Confirm AI decision at the “Lead Decision” node. If QUALIFIED: VAPI call executed Calendar event created Zoom meeting created (join URL available) Mailchimp enrollment (qualified list) Gmail confirmation sent HubSpot contact created/updated If NOT QUALIFIED: VAPI call executed Mailchimp enrollment (follow‑up list) Gmail follow‑up sent HubSpot updated 30‑day calendar reminder created Open any failing HTTP nodes and review response codes/messages. Go‑live checklist All credentials connected (no warnings) MAILCHIMP_LIST_ID_QUALIFIED and MAILCHIMP_LIST_ID_FOLLOWUP set Timezone and delays validated Email copy approved Only one trigger enabled Final end‑to‑end test passed Toggle workflow Active Customization ideas Add a Slack or Microsoft Teams notification on QUALIFIED Enrich leads (Clearbit, ZoomInfo, etc.) before AI decision Swap Mailchimp for your ESP (Klaviyo, SendGrid Marketing) Add a second‑chance branch for ambiguous AI classifications Localize email copy by country or language Troubleshooting Webhook receives no data: ensure external form POSTs JSON to the n8n URL and network rules allow it. AI decision empty/garbled: verify Gemini credentials/model ID and input fields. Mailchimp errors: verify List IDs and that email is valid. Gmail send fails: check OAuth scopes and daily limits. Zoom/Calendar issues: re‑connect OAuth; verify calendar access. HubSpot errors: confirm OAuth scopes and property mappings. Security and scopes Gmail: send email Google Calendar: create events Zoom: create meetings HubSpot: read/write contacts Mailchimp: list membership VAPI: authenticated HTTP requests Gemini: model inference Use least‑privilege for each integration. Limits and notes Gmail and Mailchimp rate limits may apply during spikes. Zoom and Google Calendar API quotas apply for frequent scheduling. VAPI call timeouts are 30s by default; adjust as needed. Changelog 2025‑09‑15: Initial public template with dual triggers, Gemini qualification, VAPI calls, scheduling, Mailchimp, Gmail, and HubSpot updates.
by Punit
HubSpot Customer Onboarding Automation Overview Streamline your customer onboarding process with this intelligent automation that triggers when new contacts are created in HubSpot. The workflow automatically sends personalized welcome emails, schedules onboarding calls, and assigns customer success managers - ensuring every new customer receives immediate attention and proper support. What This Workflow Does Core Features Real-time Contact Detection**: Monitors HubSpot for new contact creation events via webhooks Intelligent Email Generation**: Uses AI to create personalized welcome emails based on contact information Automated Calendar Scheduling**: Finds available time slots and schedules onboarding calls with new contacts Smart CSM Assignment**: Automatically assigns contacts to appropriate customer success managers Multi-channel Communication**: Sends HTML-formatted emails with professional styling Calendar Integration**: Full Google Calendar management with attendee invitations Business Value Instant Response**: New customers receive immediate welcome communication Personalization at Scale**: Each email is uniquely crafted based on contact details and company information Process Consistency**: Ensures every new contact follows the same high-quality onboarding process Resource Optimization**: Automatically schedules meetings in available time slots Customer Experience**: Professional, timely communication builds trust from day one Prerequisites Required Accounts & Credentials HubSpot Account with Developer API access for webhooks HubSpot Pro/Enterprise for OAuth2 API access OpenAI API access for AI-powered email generation Google Calendar account for meeting scheduling Gmail account for email delivery Public-facing n8n instance or n8n Cloud for webhook reception Technical Requirements HubSpot webhook subscription capabilities Google Workspace or personal Google account OpenAI API with GPT-4o access n8n instance with LangChain nodes package installed Setup Instructions Step 1: HubSpot Developer Setup Create HubSpot Developer Account: Go to HubSpot Developer Portal Create or access your developer account Navigate to Apps section Create Webhook Subscription: In HubSpot Developer Portal: Apps > Create App Configure webhook subscription for contact.creation events Set webhook URL to your n8n webhook endpoint Note the App ID and Developer API key Add HubSpot Developer Credentials: In n8n: Settings > Credentials > "HubSpot Developer API" Enter Developer API key and App ID Step 2: HubSpot OAuth2 Configuration Create OAuth2 App: In HubSpot Developer Portal: Create OAuth2 app Add required scopes: contacts.read contacts.write crm.objects.owners.read Add HubSpot OAuth2 Credentials: In n8n: Settings > Credentials > "HubSpot OAuth2 API" Complete OAuth authorization flow Step 3: OpenAI Configuration Get OpenAI API Key: Visit OpenAI Platform Create API key with GPT-4o model access Add OpenAI Credentials: In n8n: Settings > Credentials > "OpenAI API" Enter your API key Step 4: Google Calendar Setup Enable Google Calendar API: Go to Google Cloud Console Enable Google Calendar API Create OAuth2 credentials Add Google Calendar Credentials: In n8n: Settings > Credentials > "Google Calendar OAuth2 API" Complete OAuth authorization flow Step 5: Gmail Configuration Enable Gmail API: In Google Cloud Console: Enable Gmail API Use same OAuth2 credentials as Calendar Add Gmail Credentials: In n8n: Settings > Credentials > "Gmail OAuth2" Complete OAuth authorization Step 6: Customize Company Information Update "Enter your company data here" Node: company_name: "Your Company Name" sender_name: "Your Name" sender_email: "your-email@company.com" company_activity: "Your company description" Important: The sender_email must match your HubSpot user email and Google account email Step 7: Configure Calendar Settings Update Calendar Agent Tool: Verify calendar ID matches your Google Calendar Ensure proper timezone settings Test calendar access permissions Configuration Details Webhook Event Handling The workflow processes HubSpot webhook events: Event Type**: contact.creation Data Processing**: Extracts contact ID and subscription type Validation**: Ensures event is contact creation before proceeding AI Email Generation System The email generation process uses: Model**: GPT-4o-mini for cost-effective, high-quality content Structured Output**: JSON format with subject and body fields Personalization Variables**: Contact name, email, company information Template Consistency**: Maintains professional tone and branding Calendar Management Features The calendar agent provides: Event Creation**: With and without attendees Event Retrieval**: Find available time slots Event Updates**: Modify existing appointments Event Deletion**: Remove canceled meetings Smart Scheduling**: Automatically finds next available slot Contact Assignment Logic The CSM assignment process: Owner Lookup**: Retrieves all HubSpot owners Sender Matching**: Finds owner matching the configured sender email Contact Assignment**: Updates contact record with owner ID Usage Instructions Automatic Operation Activate Workflow: Toggle workflow to "Active" status Webhook automatically registers with HubSpot Test with New Contact: Create test contact in HubSpot Monitor n8n execution log Verify email delivery and calendar event creation Monitor Performance: Check HubSpot webhook delivery logs Review email delivery success rates Validate calendar event creation Manual Testing Create Test Contact: Add new contact in HubSpot with complete information Ensure contact has valid email address Monitor workflow execution Validate Outputs: Email: Check recipient inbox for welcome email Calendar: Verify meeting invitation sent and accepted HubSpot: Confirm contact owner assignment Logs: Review n8n execution for any errors Expected Outputs Personalized Welcome Email AI-generated email featuring: Subject Line**: Customized based on company and contact information Personalized Greeting**: Uses contact's first name and relevant details Company Introduction**: Includes sender name, company name, and business description Meeting Notification**: Mentions upcoming scheduled onboarding call Professional Formatting**: HTML-styled for professional appearance Scheduled Onboarding Call Google Calendar event with: Title**: Descriptive meeting title including contact name Attendees**: New contact automatically invited Timing**: Next available 1-hour slot in sender's calendar Location**: Virtual meeting details (if configured) Description**: Meeting purpose and agenda HubSpot Contact Updates Automated contact management: Owner Assignment**: Contact assigned to appropriate CSM Activity Logging**: Webhook event recorded in contact timeline Data Enrichment**: Additional contact information if available Calendar Tool Responses Structured responses from calendar operations: Success Confirmations**: Meeting created successfully Error Handling**: Clear error messages for failed operations Event Details**: Complete information about created/modified events Troubleshooting Common Issues HubSpot Webhook Not Triggering Cause: Webhook subscription not properly configured or n8n endpoint not accessible Solutions: Verify n8n webhook URL is publicly accessible Check HubSpot webhook subscription settings Confirm webhook is active in HubSpot Developer Portal Test webhook delivery using HubSpot's testing tools Contact Information Not Retrieved Cause: Insufficient HubSpot API permissions or invalid contact ID Solutions: Verify HubSpot OAuth2 scopes include contact read permissions Check contact ID extraction from webhook payload Ensure contact exists and is accessible via API Test contact retrieval manually Email Generation Failed Cause: OpenAI API issues or insufficient token limits Solutions: Check OpenAI API key validity and usage limits Verify GPT-4o model access permissions Review prompt complexity and token requirements Test AI generation with simpler prompts Calendar Event Creation Failed Cause: Google Calendar permissions or invalid calendar ID Solutions: Verify Google Calendar OAuth2 permissions Check calendar ID configuration matches sender email Ensure calendar is accessible and not restricted Test calendar operations manually Gmail Delivery Problems Cause: Authentication issues or email formatting problems Solutions: Check Gmail OAuth2 token validity Verify sender email matches authenticated account Review HTML formatting for email compatibility Test email delivery with simple text format Performance Optimization High Contact Volume Implement rate limiting for API calls Add error retry mechanisms with exponential backoff Monitor token usage and API quotas Consider batch processing for multiple contacts Large Calendar Schedules Optimize calendar queries with specific date ranges Implement caching for frequently accessed calendar data Add timeout handling for slow calendar operations Consider pagination for large event lists Customization Examples Different CRM Systems Replace HubSpot with alternative CRMs: Salesforce**: Use Salesforce webhook and contact management Pipedrive**: Implement Pipedrive person creation triggers Zoho CRM**: Configure Zoho webhook subscriptions Airtable**: Use Airtable as simple CRM with webhooks Alternative Email Providers Replace Gmail with other email services: SendGrid**: Use SendGrid for transactional emails Mailgun**: Implement Mailgun email delivery Microsoft Outlook**: Use Outlook for business email AWS SES**: Configure Amazon Simple Email Service Enhanced Email Content Improve email personalization: Company Research**: Add web scraping for company information Industry-Specific Templates**: Different emails for different industries Multi-language Support**: Detect contact language and localize content Dynamic Content**: Include relevant resources based on contact properties Advanced Calendar Features Extend calendar functionality: Buffer Time**: Automatically add buffer between meetings Meeting Types**: Different durations for different contact types Timezone Handling**: Automatic timezone detection and conversion Recurring Meetings**: Schedule follow-up meetings automatically Workflow Branching Add conditional logic: Contact Source**: Different flows for different lead sources Company Size**: Tailored onboarding for enterprise vs SMB Geographic Routing**: Regional CSM assignment Product Interest**: Specialized onboarding based on product selection Security Considerations API Security Store all credentials securely in n8n credential system Use OAuth2 authentication where available Regularly rotate API keys and refresh tokens Monitor API usage for unauthorized access Data Privacy Ensure compliance with data protection regulations (GDPR, CCPA) Implement data retention policies for contact information Consider data encryption for sensitive customer data Document data flows for privacy audits Webhook Security Implement webhook signature verification where supported Use HTTPS endpoints for all webhook URLs Monitor webhook delivery logs for suspicious activity Consider IP whitelisting for webhook sources Integration Considerations HubSpot Best Practices Rate Limiting**: Respect HubSpot API rate limits Error Handling**: Implement proper error responses for webhooks Data Sync**: Ensure data consistency between systems Backup Procedures**: Regular backup of workflow configurations Email Deliverability Authentication**: Implement SPF, DKIM, and DMARC records Content Quality**: Avoid spam triggers in email content List Management**: Respect unsubscribe requests Monitoring**: Track email delivery and engagement metrics Business Process Integration Sales Handoff Lead Qualification**: Integrate with lead scoring systems Sales Notification**: Alert sales team of high-value prospects CRM Updates**: Sync onboarding status with sales pipeline Activity Tracking**: Log all onboarding activities in CRM Customer Success Workflows Milestone Tracking**: Monitor onboarding progress Health Scoring**: Assess customer engagement levels Escalation Procedures**: Flag at-risk customers for intervention Success Metrics**: Track onboarding completion rates Support and Maintenance Regular Maintenance Monitor webhook delivery success rates Review email open and response rates Update AI prompts based on feedback Audit calendar scheduling efficiency Performance Monitoring Track workflow execution times and success rates Monitor API usage and costs across all services Review customer feedback on onboarding experience Analyze conversion rates from onboarding to activation Updates and Improvements Stay updated with API changes from integrated services Test workflow compatibility with platform updates Implement customer feedback and feature requests Document all customizations for team reference Cost Optimization API Usage Management Monitor OpenAI token consumption patterns Optimize prompts for efficiency and effectiveness Track Google API usage for calendar and email operations Implement usage alerts and budgets Alternative Approaches Consider using local AI models for email generation Implement template-based emails for cost reduction Use free tiers where available and appropriate Regular cost-benefit analysis of integrated services License and Attribution This workflow template is provided under MIT license. Calendar agent implementation inspired by Nate Herk's YouTube channel. Attribution to original creators appreciated when sharing or modifying. Users are responsible for compliance with all integrated services' terms of service and data handling requirements. Support Contact For customizations, troubleshooting, or additional workflow development: Email**: punit@geekfleet.dev Creator Profile**: n8n Creator Profile Specializations**: n8n, Make, LangChain, and LangGraph workflow development
by Roshan Ramani
AI Powered All Purpose Appointment System via JotForm What This Workflow Does This template automates the entire appointment request lifecycle using AI. When someone submits an appointment request through JotForm, the system automatically sends details for approval, generates personalized confirmation or rejection emails using OpenAI, and maintains records—all without manual intervention. 👉 Get JotForm here Whether you're running a clinic, consulting business, training center, or any service-based operation, this workflow eliminates repetitive email writing and ensures consistent, professional communication. It's fully customizable to work with any appointment form structure. Who's It For Service providers (consultants, trainers, coaches) Healthcare professionals Educational institutions Salon and wellness businesses Event coordinators Any business handling appointment requests at scale How It Works Form Submission – Appointment request arrives via JotForm Data Extraction – System pulls name, email, phone, date, time, and visit type Approval Request – Details are sent to Telegram for review and approval AI Email Generation – OpenAI creates personalized confirmation or rejection email based on approval status Smart Routing – If approved: records in Google Sheets and sends confirmation. If rejected: removes from system and sends reschedule notice Automated Follow-up – Requester receives professional email instantly Getting Started (Quick Setup) Step 1: Choose Your JotForm Select any existing appointment form or create a new one in JotForm The workflow works with any form structure Step 2: Map Your Form Fields Identify the field names in your JotForm (name, email, phone, appointment date, time, etc.) Update the "Parse: Extract Appointment Details" node with your exact field names This ensures the workflow reads data correctly from your specific form Step 3: Follow Full Setup Steps Connect JotForm – Copy the Form ID and API Key Configure Google Sheets – Create a sheet for appointment records and copy the spreadsheet ID Setup Telegram – Create a bot via BotFather for approval notifications Add OpenAI Credentials – Generate an API key at platform.openai.com Authorize Gmail – Enable Gmail API in Google Cloud Console Why This Is Customizable The workflow is built to be flexible from the start. Whether your form collects appointment type, service category, special requests, or any other field, you can easily map those fields into the flow. Just identify what data your form collects and tell the workflow where to find it. Requirements JotForm account with an appointment form Google Sheets for record keeping Telegram account and bot (for approvals) OpenAI API key (paid account recommended) Gmail account for sending emails n8n instance (self-hosted or cloud) How to Customize Change Approval Channel** – Replace Telegram with Slack, Discord, or email by swapping the notification node Modify Email Templates** – Edit the AI prompt in "Generate: Appointment Response Email" to match your tone and branding Add More Fields** – Update the Set node to capture additional information from your JotForm like appointment type, service category, or special requests Adjust Routing Logic** – Modify the conditional node to add approval stages or auto-confirm certain appointment types Connect CRM** – Add steps to automatically create contacts in HubSpot, Pipedrive, or Salesforce Enable Reminders** – Use Gmail or SMS nodes to send appointment reminders 24 hours before scheduled time Extend Data Collection** – Map any custom fields from your JotForm by updating the extraction node to include them
by Ramon David
This workflow manages subscription billing reminders and data updates via Telegram. It runs daily at 8:00 AM to check for upcoming due subscriptions, formats relevant information, and sends reminders to users. It also processes user messages for subscription management—adding, updating, or retrieving billing info—using AI-powered natural language understanding. Main outcomes include automated subscription tracking, timely reminders, and conversational interaction through Telegram, reducing manual tracking efforts and improving billing accuracy. Automation Benefits Time & Cost Savings Manual Process: Several hours/week spent managing subscriptions and reminders manually. Automated Process: Workflow completes checks, reminders, and data updates in under a minute. Time Savings: Saves approximately 5 hours weekly, translating to significant productivity gains and cost reduction. ROI: Automation pays for itself within the first month due to saved labor. Error Reduction: Minimized manual entry errors, ensuring accurate billing records and timely reminders. Business Impact Solves the problem of manual subscription tracking and reminders. Scales effortlessly as subscription list grows. Opens new opportunities for proactive customer engagement, personalized messaging, and integrated billing insights. Setup Guide Prerequisites Google Sheets account with subscription data sheet. OpenAI API key with access to GPT-4. Telegram bot token with messaging permissions. Email SMTP setup if email reminders are used. API Configuration Google Sheets: Generate OAuth2 credentials, enable Sheets API, and authorize access. OpenAI: Create API key, set model to GPT-4, and test connectivity. Telegram: Create bot via BotFather, retrieve token, and set webhook URL. Webhook URL: Use the provided URL in the Telegram bot settings. Node-by-Node Setup OpenAI Chat Model: Enter API credentials, select GPT-4 model. Google Sheets: Input spreadsheet ID, sheet name, and ensure correct permissions. Telegram Nodes: Insert chat ID, message parsing, and response formatting. Schedule Trigger: Confirm cron expression for daily execution. For AI nodes, test with sample messages to verify formatting and extraction. Testing & Validation Run workflow manually. Confirm data is retrieved, processed, and responses sent. Verify subscription updates in Google Sheets. Check Telegram chats for correct message flow. N8N Documentation References Google Sheets Node OpenAI Node Telegram Node Schedule Trigger Maintenance & Troubleshooting Regular Maintenance (Monthly) Check API credentials and renew tokens if expired. Monitor workflow logs for errors. Review Google Sheets data for consistency. Update API keys when new versions or permissions are granted. Verify currency conversion accuracy periodically. Common Issues & Solutions Workflow not triggering: check schedule settings and webhook URLs. Data not updating: verify Google Sheets credentials and permissions. Incorrect responses: test AI prompt inputs and outputs. API failures: regenerate API keys or check quota limits. Reconfigure nodes if external API changes. Monitoring & Alerts Set up email or Slack alerts for failures. Regularly review execution logs. Track key metrics like successful runs, error rates, and response times. Support & Escalation Check n8n logs first for errors. Export workflow for support if needed. Use n8n community forums for common issues. Contact API providers for account-specific problems. Emergency procedures: restart workflow, regenerate tokens. Updates & Improvements Review workflow performance quarterly. Optimize AI prompts for better accuracy. Backup workflow configurations before major changes. Incorporate user feedback for feature enhancements.
by Zain Khan
Automated Support Prioritization and AI Task Creation This n8n workflow instantly captures support issues submitted via Jotform and efficiently routes them to the appropriate team and logging system based on the severity level defined by the customer. It then uses an AI Agent (Google Gemini) to transform the raw customer data into a clear, concise, and actionable task for the development team. Workflow Overview Ingestion & Logging: A new support ticket is received via Jotform and immediately logged into a Google Sheet as a central record. Priority Assessment & Routing: An If node checks the reported issue Severity. High/Medium Severity: The ticket details are instantly sent to a dedicated Slack channel for immediate team attention. Low Severity: The ticket details are sent via Gmail (acting as an internal email notification) to a support inbox, allowing for less immediate handling. AI Processing: An AI Agent summarizes the raw feedback into a clear, professional task description. Task Creation: The AI-generated task is automatically created in ClickUp for the development team to manage. Requirements To implement and run this automated support workflow, the following accounts and credentials are required: 1. Service Credentials Jotform API Key:* For the *Jotform Trigger** to receive real-time form submissions. Google Sheets OAuth2/API Key:** To write data to the designated sheet. Slack OAuth2/API Key:** To post messages to the target Slack channel. Gmail OAuth2/API Key:** To send internal email notifications. Google Gemini API Key:* To power the *AI Agent** for task summarization. ClickUp API Key:** To create tasks in the target workspace. Sign up for n8n using: https://n8n.partnerlinks.io/pe6gzwqi3rqw 2. External Configurations Jotform Setup:* A form configured with fields for Name, Email, Issue, Description, and the crucial *Severity** field. Sign up for Jotform using: https://www.jotform.com/?partner=zainurrehman ClickUp Setup:* The specific *Team, Space, Folder, and List IDs* must be configured in the *Create a task** node to ensure tickets are created in the correct project board.