Send a ChatGPT email reply and save responses to Google Sheets
This workflow sends a OpenAI GPT reply when an email is received from specific email recipients. It then saves the initial email and the GPT response to an automatically generated Google spreadsheet. Subsequent GPT responses will be added to the same spreadsheet. Additionally, when feedback is given for any of the GPT responses, it will be recorded to the spreasheet, which can then be used later to fine-tune the GPT model. Prerequisites OpenAI credentials Google credentials How it works This workflow is essentially a two-in-one workflow. It triggers off from two different nodes and have very different functionality from each trigger. The flow triggered from On email received node is as follows: Triggers off on the On email received node. Extract the email body from the email. Generate a response from the email body using the OpenAI node. Reply to the email sender using the Send reply to recipient node. A feedback link is also included in the email body which will trigger the On feedback given node. This is used to fine-tune the GPT model. Save the email body and OpenAI response to a Google Sheet. If a sheet does not exist, it will be created. The flow triggered from On feedback given node is as follows: Triggers off when a feedback link is clicked in the emailed GPT response. The feedback, either positive or negative, for that specific GPT response is then recorded to the Google Sheet.
Send bulk WhatsApp messages from Google Sheets using Rapiwa API
Bulk WhatsApp Campaign Automation with Rapiwa API (Unofficial Integration) Who’s it for This n8n workflow lets you send bulk WhatsApp messages using your own number through Rapiwa API, avoiding the high cost and limitations of the official WhatsApp API. It integrates seamlessly with Google Sheets, where you can manage your contacts and messages with ease. Ideal for easy-to-maintain bulk messaging solution using their own personal or business WhatsApp number. This solution is perfect for small businesses, marketers, or teams looking for a cost-effective way to manage WhatsApp communication at scale. How it Works / What It Does Reads data from a Google Sheet where the Status column is marked as "pending". Cleans each phone number (removes special characters, spaces, etc.). Verifies if the number is a valid WhatsApp user using the Rapiwa API. If valid: Sends the message via Rapiwa. Updates Status = sent and Verification = verified. If invalid: Skips message sending. Updates Status = not sent and Verification = unverified. Waits for a few seconds (rate-limiting). Loops through the next item. The entire process is triggered automatically every 5 minutes. --- How to Set Up Duplicate the Sample Sheet: Use this format. Fill Contacts: Add columns like WhatsApp No, Name, Message, Image URL, and set Status = pending. Connect Google Sheets: Authenticate and link Google Sheets node inside n8n. Subscribe to Rapiwa: Go to Rapiwa.com and get your API key. Paste API Key: Use the HTTP Bearer token credential in n8n. Activate the Workflow: Let n8n take care of the automation. --- Requirements Google Sheets API credentials Configured Google Sheet (template linked above) WhatsApp (Personal or Business) n8n instance with credentials setup --- How to Customize the Workflow Add delay between messages: Use the Wait node to introduce pauses (e.g., 5–10 seconds). Change message format: Modify the HTTP Request node to send media or templates. Personalize content: Include dynamic fields like Name, Image URL, etc. Error handling: Add IF or SET nodes to capture failed attempts, retry, or log errors. --- Workflow Highlights Triggered every 5 minutes using the Schedule Trigger node. Filters messages with Status = pending. Cleans numbers and verifies WhatsApp existence before sending. Sends WhatsApp messages via Rapiwa (Unofficial API). Updates Google Sheets to mark Status = sent or not sent and Verification = verified/unverified. Wait node prevents rapid-fire sending that could lead to being flagged by WhatsApp. --- Setup in n8n Connect Google Sheets Add a Google Sheets node Authenticate using your Google account Select the document and worksheet Use filter: Status = pending Loop Through Rows Use SplitInBatches or a Code node to process rows in small chunks (e.g., 5 rows) Add a Wait node to delay 5 seconds between messages Send Message via HTTP Node How the "Send Message Using Rapiwa" Node Sends Messages This node makes an HTTP POST request to the Rapiwa API endpoint: https://app.rapiwa.com/api/send-message It uses Bearer Token Authentication with your Rapiwa API key. When this node runs, it sends a WhatsApp message to the specified number with the given text and optional image. The Rapiwa API handles message delivery using your own WhatsApp number connected to their service. JSON Body: { "number": "{{ $json['WhatsApp No'] }}", "message": "{{ $json['Message'] }}" } --- Sample Google Sheet Structure A Google Sheet formatted like this sample | SL | WhatsApp No | Name | Message | Image URL | Verification | Status | |----|----------------|------------------------|----------------------|---------------------------------------------------------------------------|--------------|---------| | 1 | 8801322827799 | SpaGreen Creative | This is Test Message | https://spagreen.sgp1.cdn.digitaloceanspaces.com/... | verified | sent | | 2 | 8801725402187 | Abdul Mannan Zinnat | This is Test Message | https://spagreen.sgp1.cdn.digitaloceanspaces.com/... | verified | sent | --- Tips Modify the Limit node to increase/decrease messages per cycle. Adjust the Wait node to control how fast messages are sent (e.g., 5–10s delay). Make sure WhatsApp numbers are properly formatted (e.g., 8801XXXXXXXXX, no +, no spaces). Store your Rapiwa API key securely using n8n credentials. Use publicly accessible image URLs if sending images. Always mark processed messages as "sent" to avoid duplicates. Use the Error workflow in n8n to catch failed sends for retry. Test with a small batch before going full-scale. Schedule the Trigger node for every 5 minutes to keep automation running. --- Useful Links Dashboard: https://app.rapiwa.com Official Website: https://rapiwa.com Documentation: https://docs.rapiwa.com Support & Community Need help setting up or customizing the workflow? Reach out here: WhatsApp: Chat with Support Discord: Join SpaGreen Server Facebook Group: SpaGreen Community Website: SpaGreen Creative Envato: SpaGreen Portfolio
Ai-powered lead research & qualification using Relevance AI
Lead Qualification & Smart Outreach — Automated Scoring System Automate your lead intake, scoring, and outreach pipeline. This workflow collects leads from forms, enriches and scores them using Relevance AI, routes them by quality, and triggers the right follow-up — all without manual busywork. --- 🚀 What it Does Collects leads from your forms in real-time. Enriches each lead (individual + company) for better context. Scores leads automatically using Relevance AI templates. Routes leads into HOT / WARM / COLD tiers for prioritization. Drafts or sends personalized outreach emails for each tier. Logs all leads and outcomes into your CRM or Google Sheets. Notifies your team (e.g., via Slack) when a hot lead arrives. --- 🧩 Why Use It Save time: stop manually sorting through raw leads. Focus on the best opportunities: route only top leads to your sales team. Personalized outreach: automated but tailored by lead quality. Scalable & repeatable: works for startups, agencies, or larger teams. Adaptable: swap CRMs, forms, or email providers easily. --- 🔧 Prerequisites & Setup Before importing or running the workflow, set up these connections: Relevance AI Clone the tools (Resources provided in the workflow) for lead scoring and company scoring, and copy your API key into the HTTP Request nodes. Form Intake Use n8n’s built-in form trigger or connect Typeform, Tally, HubSpot Forms, or any webhook-based intake. CRM or Database Start with Google Sheets (included in the sample workflow) or connect HubSpot, Salesforce, Pipedrive, Zoho, Airtable, Notion, or any SQL/NoSQL DB. Email Provider Use Gmail (included), or swap in Outlook, HubSpot Email, SendGrid, Mailgun, etc. Team Notifications (Optional) Configure Slack (or other tools) for instant alerts on hot leads. --- ⚙️ How It Works (Simplified Flow) Lead Intake: Collects leads from your form or CRM. Lead Enrichment: Uses Relevance AI to score: Individual Fit: role, expertise, influence. Company Fit: size, industry, market relevance. Scoring & Insights: Combines both into a final lead score with labels and notes. Routing: Splits leads into HOT / WARM / COLD tiers. Outreach: HOT → drafts a review-ready email for your team. WARM / COLD → auto-sends appropriate follow-up emails. Logging & Alerts: Saves structured data to your CRM or sheet and notifies your team of hot leads. --- 🙋♂️ Who is This For Startups & SaaS teams that need to prioritize a flood of inbound leads. Agencies & consultancies qualifying prospects from ads or webinars. Small sales teams that want to spend time only on the best leads. Freelancers or solopreneurs who want a lightweight but effective qualification process. Automation newbies who want a production-ready system to sell for 1k-3k --- 💡 Why It Stands Out Real intelligence: uses data-driven Relevance AI scoring rather than static rules. Action-oriented: routes and triggers the right next step immediately. Personalized yet scalable: adapts outreach to each lead tier. Flexible integrations: works with most popular CRMs, forms, and email tools. --- 🔥 Best Practices & Tips Adjust the weighting of individual vs. company scores in your Relevance AI template (default: 40% vs 60%). Tune Router thresholds (e.g., HOT ≥ 80, WARM 60-79, COLD < 60) to match your sales goals. Add a human approval step for high-value deals. Expand with enrichment APIs (e.g., Clearbit, Apollo) for richer lead data. Keep all API keys private and out of screenshots or repos. --- 🎉 With this workflow, Sales teams can focus on building relationships — while the system qualifies and organizes leads automatically OR You can sell to sales teams for ~3k --- Note: Demo data is pinned in some nodes to help you understand what the data looks like. Make sure to unpin those nodes when using for production.
Automate email responses with GPT-4o-mini and human review in Gmail
This n8n template demonstrates a “Human-in-the-Loop” workflow where AI automatically drafts replies to inbound emails, which are then reviewed and approved by a human before being sent. This powerful pattern ensures both the efficiency of AI and the quality assurance of human oversight. Use cases are many: Streamline sales inquiry responses, manage first-level customer support, handle initial recruitment communications, or any business process that requires personalized yet consistent email replies. Good to know At the time of writing, the cost per execution depends on your OpenAI API usage. This workflow uses a cost-effective model like gpt-4o-mini. See OpenAI Pricing for updated info. The AI’s knowledge base and persona are fully customizable within the Basic LLM Chain node’s prompt. How it works The Gmail Trigger node starts the workflow whenever a new email arrives in the specified inbox. The Classify Potential Leads node uses AI to determine if the incoming email is a potential lead. If not, the workflow stops. The Basic LLM Chain, powered by an OpenAI Chat Model, generates a draft reply based on a detailed system prompt and your internal knowledge base. A Structured Output Parser is crucially used to force the AI’s output into a reliable JSON format ({"subject": "...", "body": "..."}), preventing errors in subsequent steps. The Send for Review Gmail node sends the AI-generated draft to a human reviewer and pauses the workflow, waiting for a reply. The IF node checks the reviewer’s reply for approval keywords (e.g., “approve”, “承認”). If approved, the ✅ Send to Customer Gmail node sends the final email to the original customer. If not approved, the reviewer’s feedback is treated as a revision request, and the workflow loops back to the Basic LLM Chain to generate a new draft incorporating the feedback. How to use Gmail Trigger node: Configure with your own Gmail account credentials. Send for Review node: Replace the placeholder email reviewer@example.com with the actual reviewer's email address. IF node: You can customize the approval keywords to match your team’s vocabulary. OpenAI Nodes: Ensure your OpenAI credentials are set up. You can select a different model if needed, but the prompt is optimized for models like GPT-4o mini. Requirements An OpenAI account for the LLM. A Gmail account for receiving customer emails and for the review process. Customising this workflow By modifying the prompt and knowledge base in the Basic LLM Chain, you can adapt this agent for various departments, such as technical support, HR, or public relations. The approval channel is not limited to Gmail. You can easily replace the review nodes with Slack or Microsoft Teams nodes to fit your internal communication tools.