🔓 Unlock all 10,000+ workflows & prompts free Join Newsletter →
✅ Full access unlocked — explore all 10,000 AI workflow and prompt templates Browse Templates →
Home n8n Workflow
January 22, 2026

Supabase + Gmail: appointments handled end to end

Lisa Granqvist Partner Workflow Automation Expert

Appointments fall apart in the gaps. One request comes in through a form, another via chat, someone reschedules by email, and suddenly you’re hunting through tabs trying to figure out what’s real.

This hits ops managers and admin teams hardest, but founders feel it too. Supabase Gmail automation turns booking, rescheduling, and cancellations into one clean system, with confirmations sent automatically.

Below you’ll see exactly how the workflow runs, what it fixes, and what you need to put it in place without turning this into a technical project.

How This Automation Works

The full n8n workflow, from trigger to final output:

n8n Workflow Template: Supabase + Gmail: appointments handled end to end

The Problem: Appointment changes create quiet chaos

Booking is rarely the hard part. It’s everything after. Someone asks to move an appointment, the old slot doesn’t get freed, and your “availability” becomes fiction. Or a cancellation comes in, but nobody updates the record, so the next person gets offered a time that’s actually open. Then you spend your morning replying to “just checking if we’re still on” messages instead of doing real work. The worst part is the mental load: you can’t trust your schedule, so you double-check everything.

The friction compounds. Here’s where it usually breaks down.

  • Reschedules get handled in different channels, so the database and the inbox drift out of sync.
  • People forget to “free” the old slot, which quietly creates double bookings later in the week.
  • Teams lose time answering basic questions like “what classes am I enrolled in?” because there’s no consistent self-serve response.
  • Manual updates lead to messy records, so reporting becomes guesswork and follow-ups get missed.

The Solution: One webhook that handles every appointment action

This n8n workflow gives you a single endpoint (a webhook) that can accept booking requests, reschedule requests, cancellations, and “tell me my info” lookups. When a request hits the webhook, the workflow reads the incoming JSON, figures out which action you want, and then does the right thing in Supabase. That includes checking the right tables, updating rows, removing or restoring availability slots, and returning a structured JSON response so your form, site, or chat tool can show a clear message. After the action is confirmed, the workflow can also send an email through Gmail so the person gets a confirmation without your team touching the inbox.

The workflow starts when your app sends a POST request to the webhook. From there, it routes by action (set appointment, reschedule, cancel, get list, get user info), uses an AI agent to interpret and format the request cleanly, and updates Supabase. Finally, it returns the response to the requester and triggers Gmail only when an email should be sent.

What You Get: Automation vs. Results

Example: What This Looks Like

Say you handle 20 appointment changes a week (new bookings, reschedules, cancellations). Manually, each one usually takes about 10 minutes to check availability, update a sheet or database, and send a confirmation email, so that’s roughly 3 hours weekly. With this workflow, the requester triggers the webhook in under a minute, n8n updates Supabase automatically, and Gmail sends the message without your team writing it. You still spot-check exceptions, but the routine stuff largely disappears.

What You’ll Need

  • n8n instance (try n8n Cloud free)
  • Self-hosting option if you prefer (Hostinger works well)
  • Supabase to store interviewers, enrollers, and slots.
  • Gmail to send booking, reschedule, and cancellation emails.
  • Supabase API key (get it from your Supabase project settings).

Skill level: Intermediate. You’ll paste credentials, map a few fields, and confirm your Supabase tables match what the workflow expects.

Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).

How It Works

A request hits your webhook. Your form, chat widget, internal tool, or simple script sends a POST request with fields like name, preferred date, and the action type (book, reschedule, cancel, or info request).

The workflow prepares the action context. n8n sets up prompts and routes the request through a switch, which means the “reschedule” logic doesn’t get mixed up with “new booking” logic. Small detail. Big reliability improvement.

Supabase gets updated safely. Depending on the action, the workflow retrieves available interviewers, removes a slot, creates or modifies an enroller record, or deletes a record and restores availability. AI agents are used to keep responses consistent and to reduce edge-case confusion in the incoming payload.

Responses and emails go out. The workflow returns a structured JSON response to the requester, then checks if an email should be sent. If the email is missing, it cleanly bypasses Gmail instead of failing the whole run.

You can easily modify the action names and the table names based on your needs. See the full implementation guide below for customization options.

Step-by-Step Implementation Guide

Step 1: Configure the Webhook Trigger

Set up the inbound webhook that starts the workflow and accepts appointment actions.

  1. Add or open Incoming Webhook Trigger.
  2. Set HTTP Method to POST.
  3. Set Path to 46161ac6-9838-4b3d-ad4a-c8d62362a656.
  4. Set Response Mode to responseNode so response nodes can return the payload.
Tip: The webhook expects body.name to route actions (e.g., set_appointment, reschedule, cancel, get_list, get_user_info).

Step 2: Connect Supabase and Data Tools

Supabase tools are used by the AI assistants to read and modify interviewer, enroller, and class records.

  1. Open each Supabase tool node and confirm the table and operation settings.
  2. In Retrieve Interviewers, set Table to Unitek_interviewers and Operation to getAll.
  3. In Create Enroller Entry, verify fields map from webhook args such as {{ $('Incoming Webhook Trigger').item.json.body.args.name }} and {{ $('Incoming Webhook Trigger').item.json.body.args.email }}.
  4. In Modify Enroller Record, keep the filter on nationality id using {{ $json.body.args.nationality_number }}.
  5. In Retrieve Class Records and Retrieve Enroller Record, keep the filters on {{ $('Incoming Webhook Trigger').item.json.body.args.nationality_number }}.
  6. Credential Required: Connect your supabaseApi credentials to all Supabase tool nodes (13 nodes total handle interviewers, enrollers, and class records).
⚠️ Common Pitfall: Supabase tool nodes are used as AI tools. Ensure the credentials are set directly on each tool node before testing, or the AI agent will fail tool calls.

Step 3: Configure Prompt Preparation and Routing

The workflow builds dynamic prompts and routes to the correct assistant based on the incoming action name.

  1. Open Prepare Action Prompts and keep the assignments that build the prompt strings from webhook args, such as {{ $json.body.args.name }} and {{ $json.body.args.nationality_number }}.
  2. Open Route by Action and confirm each rule uses {{ $('Incoming Webhook Trigger').item.json.body.name }} to match values like set_appointment, reschedule, cancel, get_list, and get_user_info.
  3. Verify the execution flow: Incoming Webhook TriggerPrepare Action PromptsRoute by Action.

Step 4: Set Up AI Assistants and Chat Models

Each action routes to a dedicated AI agent, and each agent is connected to its own chat model.

  1. In Schedule Interview Agent, set Text to {{ $('Prepare Action Prompts').item.json.set_appointment }}\n/no_think.
  2. In Reschedule Assistant, set Text to {{ $('Prepare Action Prompts').item.json.reschedule }}\n/no_think.
  3. In Cancellation Assistant, set Text to {{ $('Prepare Action Prompts').item.json.cancel }}\n/no_think.
  4. In Class List Assistant, set Text to {{ $('Prepare Action Prompts').item.json.get_list }}\n/no_think.
  5. In Enroller Info Assistant, set Text to {{ $('Prepare Action Prompts').item.json.get_user_info }}\n/no_think.
  6. Connect each AI agent to its chat model: Primary Chat ModelSchedule Interview Agent, Reschedule Chat ModelReschedule Assistant, Cancellation Chat ModelCancellation Assistant, Class List Chat ModelClass List Assistant, and Enroller Info Chat ModelEnroller Info Assistant.
⚠️ Common Pitfall: The Supabase tool nodes (e.g., Retrieve Interviewers, Create Enroller Entry, Modify Enroller Record) are AI tools linked to the agents. Credentials must be added on the tool nodes, not the agent nodes.

Step 5: Configure Response and Email Checks

Each assistant response is returned to the webhook, then validated for email presence with conditional checks.

  1. Confirm Schedule Interview Agent outputs to Return Booking Response, which then goes to Check Booking Email.
  2. Confirm Reschedule Assistant outputs to Return Reschedule Response, then Check Reschedule Email.
  3. Confirm Cancellation Assistant outputs to Return Cancellation Response, then Check Cancellation Email.
  4. Ensure Check Booking Email, Check Reschedule Email, and Check Cancellation Email use {{ $('Incoming Webhook Trigger').item.json.body.args.email }} with the exists operator.
  5. Keep the no-op branches for missing or existing email: Bypass Existing Email, Bypass Missing Email, Bypass Resched Email Exists, Bypass Resched No Email, Bypass Cancel Email Exists, Bypass Cancel No Email.
Tip: There is no parallel execution in this workflow. Each route executes sequentially from Route by Action through the assistant and response nodes.

Step 6: Configure Output Responses

Each route returns output to the webhook using response nodes.

  1. In Return Booking Response, set Respond With to allIncomingItems.
  2. In Return Reschedule Response, set Respond With to allIncomingItems.
  3. In Return Cancellation Response, set Respond With to allIncomingItems.
  4. Leave Return Class List Response and Return Enroller Info Response with default options, as they already return the assistant output.

Step 7: Test & Activate Your Workflow

Validate each action type and confirm that the correct assistant path and response behavior are triggered.

  1. Use Execute Workflow and send a test POST to Incoming Webhook Trigger with body.name set to set_appointment, reschedule, cancel, get_list, or get_user_info.
  2. Confirm the execution path follows Prepare Action PromptsRoute by Action → the appropriate assistant and response node.
  3. Verify successful runs return data in the webhook response (for example, a JSON payload from Return Booking Response or Return Class List Response).
  4. If email is missing, verify the flow ends at the correct no-op node (e.g., Bypass Missing Email).
  5. When testing is complete, switch the workflow to Active to enable production use.
🔒

Unlock Full Step-by-Step Guide

Get the complete implementation guide + downloadable template

Common Gotchas

  • Supabase credentials can expire or need specific permissions. If things break, check your Supabase API key and project role policies first.
  • If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
  • Default prompts in AI nodes are generic. Add your brand voice early or you’ll be editing outputs forever.

Frequently Asked Questions

How long does it take to set up this Supabase Gmail automation?

About 45 minutes if your Supabase tables and Gmail account are ready.

Do I need coding skills to automate Supabase Gmail automation?

No. You will connect Supabase and Gmail, then map the incoming fields to what your tables expect.

Is n8n free to use for this Supabase Gmail automation workflow?

Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in AI usage costs if you keep the agent/chat model nodes enabled.

Where can I host n8n to run this automation?

Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.

Can I customize this Supabase Gmail automation workflow for interview scheduling vs. class enrollment?

Yes, and it’s mostly table and field mapping. You can swap the table names used by the Supabase steps that retrieve interviewers, create enroller entries, and modify or remove records, then adjust the “action” values in the request routing so your app sends the right intent. Common tweaks include adding a new action (like “confirm attendance”), changing how availability is stored (slots table vs. JSON column), and expanding the returned JSON so your frontend can show richer messages.

Why is my Supabase connection failing in this workflow?

Usually it’s an API key issue or Row Level Security blocking access. Regenerate the key, confirm the correct project URL, then check the table policies for the exact operations this workflow performs (select, insert, update, delete). If it fails only during busy periods, you may also be hitting rate limits or sending malformed JSON that routes to the wrong action.

How many appointment requests can this Supabase Gmail automation handle?

A few thousand requests per month is realistic for most small teams, and it scales further if you self-host on a decent VPS.

Is this Supabase Gmail automation better than using Zapier or Make?

Often, yes, because this isn’t just a 2-step “when X then Y” zap. You have multiple actions (book, reschedule, cancel, lookups) sharing one endpoint, plus branching logic and database updates that need to happen in the right order. n8n handles that kind of routing cleanly, and self-hosting removes the fear of hitting task limits when volume spikes. Zapier or Make can still work if your process is very simple and you don’t mind splitting each action into separate scenarios. If you’re unsure, Talk to an automation expert and you’ll get a straight recommendation.

Once this is running, appointment updates stop being a daily fire drill. The workflow handles the repetitive stuff so your team can trust the schedule again.

Need Help Setting This Up?

Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.

Lisa Granqvist

Workflow Automation Expert

Expert in workflow automation and no-code tools.

×

Use template

Get instant access to this n8n workflow Json file

💬
Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Launch login modal Launch register modal