Skip to main content
Community template Uses AILead NurturingAI Chatbot

Automated law firm lead management & scheduling with AI, Jotform & Calendar - n8n workflow template

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 their data, and sends them an initial…

Template by iamvaar · Original listing (opens in a new tab)

Starts on
Form submission
Nodes
14 nodes
Level
Intermediate
Setup
About 37 min

Workflow preview

How this workflow runs

  1. 1

    JotForm Trigger

    Starts the workflow when the Jot Form event occurs.

  2. 2

    WhatsApp Trigger

    Starts the workflow when the Whats App event occurs.

  3. 3

    Google Gemini Chat Model

    Provides Google Gemini as the chat model for the AI steps.

  4. 4

    GET MANY EVENTS OF DAY THE USER ASKED

    Lets the AI agent read or create Google Calendar events as a tool.

  5. 5

    Create an event

    Lets the AI agent read or create Google Calendar events as a tool.

  6. 6

    Google Gemini Chat Model1

    Provides Google Gemini as the chat model for the AI steps.

  7. 7

    Postgres Chat Memory

    Gives the AI agent conversational memory.

  8. 8

    Know about the user enquiry

    Lets the AI agent read from or write to Google Sheets as a callable tool.

  9. 9

    Append or update row in sheet

    Reads from or writes rows to a Google Sheets spreadsheet.

  10. 10

    If

    Branches the workflow based on a true/false condition.

Creator's notes and setup

Written by iamvaar for the original listing.

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 their data, and sends them an initial welcome message on WhatsApp.
  2. Appointment Scheduling: Activates when the client replies on WhatsApp, allowing an AI agent to chat with them to schedule a consultation.

Here’s a detailed breakdown of the prerequisites and each node.


Prerequisites

Before building this workflow, you'll need accounts and some setup for each of the following services:

JotForm

  • JotForm Account: You need an active JotForm account.
  • A Published Form: Create a form with the exact fields used in the workflow: Full Name, Email Address, Phone Number, I am a..., Legal Service of Interest, Brief Message, and How Did You Hear About Us?.
  • API Credentials: Generate API keys from your JotForm account settings to connect it with n8n.

Google

  • Google Account: To use Google Sheets and Google Calendar.
  • Google Sheet: Create a new sheet named "Law Client Enquiries". The first row must have these exact headers: Full Name, Email Address, Phone Number, client type, Legal Service of Interest, Brief Message, How Did You Hear About Us?.
  • Google Calendar: An active calendar to manage appointments.
  • Google Cloud Project:
    • Service Account Credentials (for Sheets): In the Google Cloud Console, create a service account, generate JSON key credentials, and enable the Google Sheets API. You must then share your Google Sheet with the service account's email address (e.g., ``).
    • OAuth Credentials (for Calendar): Create OAuth 2.0 Client ID credentials to allow n8n to access your calendar on your behalf. You'll need to enable the Google Calendar API.
    • Gemini API Key: Enable the Vertex AI API in your Google Cloud project and generate an API key to use the Google Gemini models.

WhatsApp

  • Meta Business Account: Required to use the WhatsApp Business Platform.
  • WhatsApp Business Platform Account: You need to set up a business account and connect a phone number to it. This is different from the regular WhatsApp or WhatsApp Business app.
  • API Credentials: Get the necessary access tokens and IDs from your Meta for Developers dashboard to connect your business number to n8n.

PostgreSQL Database

  • A running PostgreSQL instance: This can be hosted anywhere (e.g., AWS, DigitalOcean, Supabase). The AI agent needs it to store and retrieve conversation history.
  • Database Credentials: You'll need the host, port, user, password, and database name to connect n8n to it.

Node-by-Node Explanation

The workflow is divided into two distinct logical flows.

Flow 1: New Client Intake from JotForm

This part triggers when a new client submits your form.

  1. JotForm Trigger

    • What it does: This is the starting point. It automatically runs the workflow whenever a new submission is received for the specified JotForm (Form ID: 252801824783057).
    • Prerequisites: A JotForm account and a created form.
  2. Append or update row in sheet (Google Sheets)

    • What it does: It takes the data from the JotForm submission and adds it to your "Law Client Enquiries" Google Sheet.
    • How it works: It uses the 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.
    • Prerequisites: A Google Sheet with the correct headers, shared with your service account.
  3. AI Agent

    • What it does: This node crafts the initial welcome message to be sent to the client.
    • How it works: It uses a detailed prompt that defines a persona ("Alex," a legal intake assistant) and instructs the AI to generate a professional WhatsApp message. It dynamically inserts the client's name and service of interest from the Google Sheet data into the prompt.
    • Connected Node: It's powered by the Google Gemini Chat Model.
  4. Send message (WhatsApp)

    • What it does: It sends the message generated by the AI Agent to the client.
    • How it works: It takes the client's phone number from the data (Phone Number column) and the AI-generated text (output from the AI Agent node) to send the message via the WhatsApp Business API.
    • Prerequisites: A configured WhatsApp Business Platform account.

Flow 2: AI-Powered Scheduling via WhatsApp

This part triggers when the client replies to the initial message.

  1. WhatsApp Trigger

    • What it does: This node listens for incoming messages on your business's WhatsApp number. When a client replies, it starts this part of the workflow.
    • Prerequisites: A configured WhatsApp Business Platform account.
  2. If node

    • What it does: It acts as a simple filter. It checks if the incoming message text is empty. If it is (e.g., a status update), the workflow stops. If it contains text, it proceeds to the AI agent.
  3. AI Agent1

    • What it does: This is the main conversational brain for scheduling. It handles the back-and-forth chat with the client.
    • How it works: Its prompt is highly detailed, instructing it to act as "Alex" and follow a strict procedure for scheduling. It has access to several "tools" to perform actions.
    • Connected Nodes:
      • 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.
      • Tools: Know about the user enquiry, GET MANY EVENTS..., and Create an event.
  4. 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.
  5. Send message1 (WhatsApp)

    • What it does: Sends the AI's response back to the client. This could be a confirmation that the meeting is booked, a question asking for their email, or a suggestion for a different time if the requested slot is busy.
    • How it works: It sends the output text from AI Agent1 to the client's WhatsApp ID, continuing the conversation.

n8n nodes used (8 types)

What every node does (14)
  • 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.

FAQ

Automated law firm lead management & scheduling with AI, Jotform & Calendar: questions

How do I import the "Automated law firm lead management & scheduling with AI, Jotform & Calendar" workflow into n8n?

Copy the workflow JSON from this page, open the n8n editor, click on an empty canvas and paste with Ctrl+V (Cmd+V on macOS). You can also download the .json file and choose Import from File in the workflow menu. Save the workflow, then attach credentials before activating it.

Which nodes and credentials does "Automated law firm lead management & scheduling with AI, Jotform & Calendar" use?

It uses Google Sheets, If, Jot Form Trigger, Whats App, Agent and Whats App Trigger, plus 2 more. Any node that connects to an external service needs your own credential — open each node after import and select or create one. Trigger, logic and transformation nodes usually need no credentials.

Can it run on n8n Cloud and on self-hosted n8n?

The workflow format is the same on both. If a node appears as unknown or outdated after import, update n8n to a recent version or, on self-hosted instances, install the required community node package. Features such as $env access are available on self-hosted instances only.

How can I customise "Automated law firm lead management & scheduling with AI, Jotform & Calendar"?

Start by changing the trigger (schedule, webhook or app event) and the destination nodes to match your stack — it is listed under Lead Nurturing, AI Chatbot. Edit prompts, field mappings and filters in the relevant nodes, use expressions like {{ $json.field }} to map data, and test with a manual execution before activating.

n8n is a trademark of n8n GmbH. AltFTool is not affiliated with, endorsed by or sponsored by n8n. Community templates are credited to their creators and link to the original listing; AltFTool originals are written and tested by the AltFTool team.

About this page

Free n8n workflow templates to copy and import

The AltFTool n8n library collects free n8n workflow templates for AI agents, Gmail, Google Sheets, Telegram and other apps. Each workflow page shows a preview, the list of nodes and the credentials it needs, and lets you copy or download the JSON to import into your own n8n.

Search the templates by app or task, or browse them by category and by node. The Workflow Inspector checks any workflow JSON for triggers, credentials and hardcoded keys before you share it, and the expressions cheat sheet gives copy-paste n8n expression examples. AltFTool is not affiliated with n8n.

People also search for

  • n8n workflow templates
  • n8n templates
  • n8n automation examples
  • n8n json workflows
  • n8n nodes
  • free n8n workflow templates
  • n8n ai agent template
  • n8n expressions cheat sheet