Split test different agent prompts with Supabase and OpenAI
Split Test Agent Prompts with Supabase and OpenAI Use Case Oftentimes, it's useful to test different settings for a large language model in production against various metrics. Split testing is a good method for doing this. What it Does This workflow randomly assigns chat sessions to one of two prompts, the baseline and the alternative. The agent will use the same prompt for all interactions in that chat session. How it Works When messages arrive, a table containing information regarding session ID and which prompt to use is checked to see if the chat already exists If it does not, the session ID is added to the table and a prompt is randomly assigned These values are then used to generate a response Setup Create a table in Supabase called splittestsessions. It needs to have the following columns: sessionid (text) and showalternative (bool) Add your Supabase, OpenAI, and PostgreSQL credentials Modify the Define Path Values node to set the baseline and alternative prompt values. Activate the workflow and test by sending messages through n8n's inbuilt chat Experiment with different chat sessions to test see both prompts in action Next Steps Modify the workflow to test different LLM settings such as temperature Add a method to measure the efficacy of the two alternative prompts
Automate business partner outreach with Google Maps, GPT-4 & WhatsApp
Automate Outreach Prospect automates finding, enriching, and messaging potential partners (like restaurants, malls, and bars) using Apify Google Maps scraping, Perplexity enrichment, OpenAI LLMs, Google Sheets, Pinecone knowledge, and WhatsApp sending via GOWA. It turns a manual, slow outreach funnel into a repeatable pipeline so your team spends time closing deals instead of copy-pasting contact details. β οΈ Important Disclaimer This workflow uses community nodes for WhatsApp functionality: GOWA WhatsApp HTTP API π‘ Why Use Automate Outreach Prospect? Faster prospecting: Scrape up to 150 leads per search (jumlah leads = 150) and queue them for outreach in minutes, cutting manual research time from days to hours. Fixes the busywork: Automatically enrich missing contact data and only send messages to records with phone numbers, so you stop chasing dead leads. Measurable lift: Enrich in batches (enrichment batch size = 20), improving outbound readiness and increasing contactable leads per campaign by dozens each run. Better conversions with context: Use a searchable company knowledge base (Pinecone + LlamaIndex) so replies are handled with context β less robotic, more relevant. Yes, your bot can sound like a helpful human (minus the coffee breath). β‘ Perfect For Sales Ops: Teams that need to scale partner outreach without hiring a mini-empire of SDRs. Growth Marketers: People who want repeatable local outreach campaigns (mall, restaurant, bar categories). Small Biz Owners: Quick way to build partnership lists and automate first outreach without becoming a spreadsheet hermit. π§ How It Works β± Trigger Manual scrape start or scheduled jobs: Daily Outbound Schedule, Schedule Outbound message, or Knowledge Base Updated Trigger. π Process Apify Google Maps Scraper gathers business listings (location, phone, socials). Results are fetched and saved to Google Sheets (Raw Data). Unenriched records are split and enriched via Perplexity, then saved back. π€ Smart Logic OpenAI LLM creates personalized initial messages, and a Reply Handler AI Agent, uses Pinecone/knowledge embeddings to interpret replies and decide next actions (save PICs, request meeting, send proposal). π Output Outbound messages are sent over WhatsApp using GOWA nodes (typing indicators, simulated typing delays, read receipts) and replies are handled & stored; qualified PIC contacts are appended to a Leads sheet. π Storage Google Sheets is the central datastore (Raw Data, Leads Collected). Knowledge base lives in Google Drive and Pinecone (n8n-recharge, namespace CompanyKnowledgeBased). Conversation memory stored in Postgres/Neon. π Quick Setup Import Workflow: Import JSON file to your n8n instances Add Credentials: Google Sheets OAuth2 Google Drive OAuth2 Apify API token OpenAI API Perplexity API Pinecone API Cohere API LlamaIndex Cloud key GOWA (WhatsApp) credentials WAHA webhook (optional) PostgreSQL/Neon Customize Parameters: Scraping parameters (Location Category, lokasi, jumlah leads, minimum Stars, Skip Closed Place) Message templates/time greetings Enrichment batch size Update Configuration: Google Drive doc ID Google Sheets ID Apify actor config Pinecone index name Pinecone namespaces LlamaIndex endpoints (if used) Test Setup: Run a manual scrape with a real location and send a single outbound message to verify WhatsApp delivery and reply handling. π§© Required Services Active n8n instances Google Sheets & Google Drive accounts (OAuth2) Apify account & actor access (Google Maps Scraper) OpenAI API key (for LLMs & embeddings) Perplexity API key (enrichment) Pinecone account (vector index n8n-recharge) Cohere API (reranker, optional) LlamaIndex Cloud (optional document parsing) GOWA / WA WhatsApp setup (or WAHA alternative) PostgreSQL/Neon for conversation memory π§ Workflow Nodes Triggers & Scheduling Incoming message Manual Trigger - Start Scraping Daily Outbound Schedule Schedule Outbound message Knowledge Base Updated Trigger Data Collection & Processing Configure Scraping Parameters Execute Google Maps Scraper Fetch Scraped Business Data Save Raw Business Leads Get Unenriched Records Limit Enrichment Batch Size Split Records for Processing Data Enrichment Business Data Enrichment Parse Enrichment Response Save Enriched Business Data Outbound Messaging Get Outbound Candidates Limit Outbound Batch Size Validate Phone Number Exists Prepare Outbound Session Data Outbound Message Generator Outbound Message LLM Format Outbound Message Data WhatsApp Communication Show Typing Indicator - Outbound Simulate Typing Delay - Outbound Send Outbound WhatsApp Message Mark as Contacted Extract WhatsApp Session Data Reply Handling Reply Handler AI Agent Reply Handler LLM Format Reply Message Data Show Typing Indicator - Reply Simulate Typing Delay - Reply Send WhatsApp Reply Save Lead Contact Information Knowledge Management Store Knowledge Embeddings Query Knowledge Base Reply Conversation Memory Outbound Conversation Memory Made by: Khaisa Studio Need custom work? Contact Me
Automate funding insights with Crunchbase, Google Sheets & Airtable
How it works This workflow runs daily to collect the latest funding round data from Crunchbase. It retrieves up to 100 recent funding events, including company, investors, funding amount, and industry details. The data is cleaned and filtered to only include rounds announced in the last 30 days. Finally, the results are saved into both Google Sheets for reporting and Airtable for structured database management. Step-by-step Trigger & Data Fetching Schedule Trigger node β Runs the workflow once a day. HTTP Request node β Calls the Crunchbase API to fetch the latest 100 funding rounds with relevant details. Data Processing Code node β Parses the raw API response into clean fields such as company name, funding type, funding amount, investors, industry, and Crunchbase URL. Filter node β Keeps only funding rounds from the last 30 days to ensure the dataset remains fresh and relevant. Storage & Outputs Google Sheets node β Appends or updates the filtered funding records in a Google Sheet for easy sharing and reporting. Airtable node β Stores the same records in Airtable for more structured, database-style organization and management. Why use this? Automates daily collection of startup funding data from Crunchbase. Keeps only the most recent and relevant records for faster insights. Ensures data is consistently stored in both Google Sheets and Airtable. Supports reporting, collaboration, and database management in one flow.