Youtube Explanation: [ ) This n8n workflow is designed to automate the initial intake and scheduling for a law firm. It's split into two main parts: 1. New Inquiry Handling: Kicks off when a potential client fills out a JotForm, saves thei…
Download this n8n workflow template and start using it instantly.
Youtube Explanation: [ )
This n8n workflow is designed to automate the initial intake and scheduling for a law firm. It's split into two main parts:
Here’s a detailed breakdown of the prerequisites and each node.
Before building this workflow, you'll need accounts and some setup for each of the following services:
Full Name, Email Address, Phone Number, I am a..., Legal Service of Interest, Brief Message, and How Did You Hear About Us?.Full Name, Email Address, Phone Number, client type, Legal Service of Interest, Brief Message, How Did You Hear About Us?.The workflow is divided into two distinct logical flows.
This part triggers when a new client submits your form.
JotForm Trigger
Form ID: 252801824783057).Append or update row in sheet (Google Sheets)
appendOrUpdate operation. It tries to find a row where the "Email Address" column matches the email from the form. If it finds a match, it updates that row; otherwise, it appends a new row at the bottom.AI Agent
Google Gemini Chat Model.Send message (WhatsApp)
AI Agent to the client.Phone Number column) and the AI-generated text (output from the AI Agent node) to send the message via the WhatsApp Business API.This part triggers when the client replies to the initial message.
WhatsApp Trigger
If node
AI Agent1
Google Gemini Chat Model1: The language model that does the thinking.Postgres Chat Memory: Remembers the conversation history with a specific user (keyed by their WhatsApp ID), so the user doesn't have to repeat themselves.Know about the user enquiry, GET MANY EVENTS..., and Create an event.AI Agent Tools (What the AI can do)
Know about the user enquiry (Google Sheets Tool): When the AI needs to know who it's talking to, it uses this tool. It takes the user's phone number and looks up their original enquiry details in the "Law Client Enquiries" sheet.GET MANY EVENTS... (Google Calendar Tool): When a client suggests a date, the AI uses this tool to check your Google Calendar for any existing events on that day to see if you're free.Create an event (Google Calendar Tool): Once a time is agreed upon, the AI uses this tool to create the event in your Google Calendar, adding the client as an attendee.Send message1 (WhatsApp)
output text from AI Agent1 to the client's WhatsApp ID, continuing the conversation.JotForm Trigger (Jot Form Trigger): Starts the workflow when the Jot Form event occurs.
Append or update row in sheet (Google Sheets): Reads from or writes rows to a Google Sheets spreadsheet.
AI Agent (Agent): The AI agent that orchestrates the workflow — it reasons over the input and decides which tools to call.
Google Gemini Chat Model (LLM Chat Google Gemini): Provides Google Gemini as the chat model for the AI steps.
WhatsApp Trigger (Whats App Trigger): Starts the workflow when the Whats App event occurs.
If (If): Branches the workflow based on a true/false condition.
GET MANY EVENTS OF DAY THE USER ASKED (Google Calendar Tool): Lets the AI agent read or create Google Calendar events as a tool.
Create an event (Google Calendar Tool): Lets the AI agent read or create Google Calendar events as a tool.
Google Gemini Chat Model1 (LLM Chat Google Gemini): Provides Google Gemini as the chat model for the AI steps.
AI Agent1 (Agent): The AI agent that orchestrates the workflow — it reasons over the input and decides which tools to call.
Postgres Chat Memory (Memory Postgres Chat): Gives the AI agent conversational memory.
Know about the user enquiry (Google Sheets Tool): Lets the AI agent read from or write to Google Sheets as a callable tool.
Send message (Whats App): Sends or receives WhatsApp messages.
Send message1 (Whats App): Sends or receives WhatsApp messages.
AI-Enriched Cold Outreach: Research → Draft → QA → Write-back ============================================================ What this template does ----------------------- Automates cold email drafting from a lead list by: 1. Enriching each lead with LinkedIn profile, LinkedIn company, and Crunchbase data 2. Generating a personalized subject + body with Gemini 3. Auto-reviewing with a Judge agent and writing back only APPROVED drafts to your Data Table Highlights ----------- Hands-off enrichment via RapidAPI; raw JSON stored back on each row Two-agent pattern: Creative Outreach Agent (draft) + Outreach Email Judge (QA) Structured outputs guaranteed by LangChain Structured Output Parsers Data Table–native: reads “unprocessed” rows, writes results to the same row Async polling with Wait nodes for scraper task results How it works (flow) ------------------- 1. Trigger: Manual (replace with Cron if needed) 2. Fetch leads: Data Table “Get row(s)” filters rows where email_subject is empty (pending) 3. Loop: Split in Batches iterates rows 4. Enrichment (runs in parallel): LinkedIn profile: HTTP (company_url) → Wait → Results → Data Table update → linkedin_profile_scrape LinkedIn company: HTTP (company_url) → Wait → Results → Data Table update → linkedin_company_scrape Crunchbase company: HTTP (url_search) → Wait → Results → Data Table update → crunchbase_company_scrape (All calls use host cold-outreach-enrichment-scraper with a RapidAPI key.) 5. Draft (Gemini): “Agent One” composes a concise, personalized email using row fields + enrichment + ABOUT ME block. Structured Output Parser enforces: ``json { "email_subject": "text", "email_content": "text" } ` 6. Prep for QA: “Email Context” maps email_subject, email_content, and email for the judge. 7. QA (Judge): “Judge Agent” returns APPROVED or REVISE (brief feedback allowed). 8. Route: If APPROVED → Data Table “Update row(s)” writes email_subject + email_body (a.k.a. email_content) back to the row. If REVISE → Skipped; loop continues. Required setup --------------- Data Table: “email_linkedin_list” (or your own) with at least: email, First_name, Last_name, Title, Location, Company_Name, Company_site, Linkedin_URL, company_linkedin (if used), Crunchbase_URL, email_subject, email_body, linkedin_profile_scrape, linkedin_company_scrape, crunchbase_company_scrape (string fields for JSON). Credentials: RapidAPI key for cold-outreach-enrichment-scraper (store securely as credential, not hardcoded) Google Gemini (PaLM) API configured in the Google Gemini Chat Model node ABOUT ME block: Replace the sample persona (James / CEO / Company Sample / AI Automations) with your own. Nodes used ----------- Data Table HTTP Request: AI Agent: Google Gemini Chat Model Split in Batches: Main Loop Set: RapidAPI-Key Customization ideas ------------------- Process flags: Add email_generated_at or processed` boolean to prevent reprocessing. Human-in-the-loop: Send drafts to Slack/Email for spot check before write-back. Delivery: After approval, optionally email the draft to the sender for review. Quotas & costs --------------- RapidAPI: Multiple calls per row (three tasks + result polls). Gemini: Token usage for generator + judge per row. Tune batch size and schedule accordingly. Privacy & compliance -------------------- You are scraping and storing person/company data. Ensure lawful basis, respect ToS, and minimize stored data.
Description: Automate your entire supplier negotiation process with this AI-driven workflow that intelligently drafts, refines, and sends negotiation emails . Using advanced LLM reasoning and multi-angle strategies , it generates high-converting negotiation messages tailored to each supplier scenario. The workflow tracks replies, sends smart follow-ups , and logs outcomes automatically for full visibility. Perfect for procurement teams looking to reduce costs and eliminate manual back-and-forth communication . What This Template Does: Triggers when a new supplier entry is added to Google Sheets. Validates and structures supplier, product, and pricing data. Generates 3 AI-powered negotiation email drafts using different strategies. Selects the best-performing draft based on scoring logic. Refines the draft using AI self-critique for better tone and clarity. Sends the final negotiation email to the supplier via Gmail. Waits 24 hours and checks for supplier replies automatically. Detects whether a reply is received and routes the workflow accordingly. Sends an optimized follow-up email if no response is received. Logs negotiation details and outcomes in Notion. Updates Google Sheets with final status, pricing, and savings. Notifies the procurement team via Slack with results or retry alerts. Key Benefits: Fully autonomous negotiation process with zero manual effort AI-optimized messaging increases chances of better pricing Smart follow-ups ensure no supplier opportunity is missed Centralized tracking across Sheets, Notion, and Slack Data-driven decision making with scoring and insights Scalable procurement operations for high-volume supplier outreach Features: Google Sheets trigger-based workflow AI-powered negotiation using GPT-4o (multi-angle + self-critique) Automated email sending and reply detection via Gmail Intelligent retry logic using DPO-style optimization Notion logging for audit trails and reporting Slack alerts for real-time team notifications Built-in validation and structured data processing Requirements: Google Sheets account (for supplier data tracking) Gmail account (for sending and receiving emails) OpenAI API key (for AI-generated negotiation logic) Notion account (for logging negotiation outcomes) Slack account (for team notifications) Target Audience: Procurement and sourcing teams E-commerce and retail businesses managing suppliers Startups scaling vendor negotiations Automation agencies building AI-driven business workflows
How it works This template launches your very first AI Agent —an AI-powered chatbot that can do more than just talk— it can take action using tools. Think of an AI Agent as a smart assistant, and the tools are the apps on its phone. By connecting it to other nodes, you give your agent the ability to interact with real-world data and services, like checking the weather, fetching news, or even sending emails on your behalf. This workflow is designed to be the perfect starting point: The Chat Interface: A Chat Trigger node provides a simple, clean interface for you to talk to your agent. The Brains: The AI Agent node receives your messages, intelligently decides which tool to use (if any), and formulates a helpful response. Its personality and instructions are fully customizable in the "System Message". The Language Model: It uses Google Gemini to power its reasoning and conversation skills. The Tools: It comes pre-equipped with two tools to demonstrate its capabilities: 1. Get Weather: Fetches real-time weather forecasts. 2. Get News: Reads any RSS feed to get the latest headlines. The Memory: A Conversation Memory node allows the agent to remember the last few messages, enabling natural, follow-up conversations. Set up steps Setup time: ~2 minutes You only need one thing to get started: a free Google AI API key. 1. Get Your Google AI API Key: Visit Google AI Studio at aistudio.google.com/app/apikey. Click "Create API key in new project" and copy the key that appears. 2. Add Your Credential in n8n: On the workflow canvas, go to the Connect your model (Google Gemini) node. Click the Credential dropdown and select + Create New Credential. Paste your API key into the API Key field and click Save. 3. Start Chatting! Go to the Example Chat node. Click the "Open Chat" button in its parameter panel. Try asking it one of the example questions, like: "What's the weather in Paris?" or "Get me the latest tech news."* That's it! You now have a fully functional AI Agent. Try adding more tools (like Gmail or Google Calendar) to make it even more powerful.
How it works This template is a complete, hands-on tutorial that lets you build and interact with your very first AI Agent. Think of an AI Agent as a standard AI chatbot with superpowers. The agent doesn't just talk; it can use tools to perform actions and find information in real-time. This workflow is designed to show you exactly how that works. 1. The Chat Interface (Chat Trigger): This is your window to the agent. It's a fully styled, public-facing chat window where you can have a conversation. 2. The Brain (AI Agent Node): This is the core of the operation. It takes your message, understands your intent, and intelligently decides which "superpower" (or tool) it needs to use to answer your request. The agent's personality and instructions are defined in its extensive system prompt. 3. The Tools (Tool Nodes): These are the agent's superpowers. We've included a variety of useful and fun tools to showcase its capabilities: Get a random joke. Search Wikipedia for a summary of any topic. Calculate a future date. Generate a secure password. Calculate a monthly loan payment. Fetch the latest articles from the n8n blog. 4. The Memory (Memory Node): This gives the agent a short-term memory, allowing it to remember the last few messages in your conversation for better context. When you send a message, the agent's brain analyzes it, picks the right tool for the job, executes it, and then formulates a helpful response based on the tool's output. Set up steps Setup time: ~3 minutes This template is nearly ready to go out of the box. You just need to provide the AI's "brain." 1. Configure Credentials: This workflow requires an API key for an AI model. Make sure you have credentials set up in your n8n instance for either Google AI (Gemini) or OpenAI. 2. Choose Your AI Brain (LLM): By default, the workflow uses the Google Gemini node. If you have Google AI credentials, you're all set! If you prefer to use OpenAI, simply disable the Gemini node and enable the OpenAI node. You only need one active LLM node. Make sure it is connected to the Agent parent node. 3. Explore the Tools: Take a moment to look at the different tool nodes connected to the Your First AI Agent node. This is where the agent gets its abilities! You can add, remove, or modify these to create your own custom agent. 4. Activate and Test! Activate the workflow. Open the public URL for the Example Chat Window node (you can copy it from the node's panel). Start chatting! Try asking it things like: "Tell me a joke." "What is n8n?" "Generate a 16-character password for me." "What are the latest posts on the n8n blog?" "What is the monthly payment for a $300,000 loan at 5% interest over 30 years?"