Skip to main content

Confirm restaurant orders by phone with Supabase, Claude and Twilio

Workflow preview

Workflow preview
100%
Confirm restaurant orders by phone with Supabase, Claude and Twilio preview
Open on n8n.io

1. Workflow Overview

Quick Overview This workflow triggers from a Supabase Database Webhook when a new order is inserted, generates a short order confirmation script with Anthropic Claude, calls the customer via Twilio...

Best for

  • Lead Nurturing automation workflows
  • AI Chatbot automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.webhook, n8n-nodes-base.code, n8n-nodes-base.if, n8n-nodes-base.respondtowebhook, n8n-nodes-base.httprequest, n8n-nodes-base.errortrigger

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Aumadi Technologies.

Original n8n.io source

1.1 Workflow description

Title
Confirm restaurant orders by phone with Supabase, Claude and Twilio
Workflow name
Confirm restaurant orders by phone with Supabase, Claude and Twilio

Quick Overview

This workflow triggers from a Supabase Database Webhook when a new order is inserted, generates a short order-confirmation script with Anthropic Claude, calls the customer via Twilio, and streams live voice audio generated by ElevenLabs back to Twilio without storing an audio file.

How it works

  1. Receives a webhook request from Supabase for a new row inserted in the notifications or orders table and extracts the orderId.
  2. Skips processing if the payload is not a new order (or has no order id), and otherwise inserts a row into Supabase order_call_logs to claim the order and prevent duplicate calls.
  3. Fetches the order, restaurant, items, and customer language from Supabase and prepares a call context including a normalized E.164 phone number.
  4. Sends the call context to Anthropic Claude to generate a short confirmation script and saves the script plus call metadata back to order_call_logs.
  5. Places an outbound call with Twilio that instructs Twilio to play audio from an n8n webhook URL and returns a JSON response indicating the call was initiated.
  6. When Twilio requests the audio URL, the workflow loads the saved script from Supabase, generates an MP3 on the fly with ElevenLabs Text-to-Speech, and streams the binary audio response directly back to Twilio.
  7. When Twilio posts the final call status callback, the workflow maps the outcome and updates the matching order_call_logs row in Supabase with the final status, pickup flag, and Call SID.

Setup

  1. Create n8n credentials for Supabase API (project URL as host and a service role key), Anthropic API (header auth x-api-key), ElevenLabs (header auth xi-api-key), and Twilio (basic auth using Account SID and Auth Token).
  2. In Supabase, create the order_call_logs table with a unique constraint on order_id, and ensure the workflow can read notifications, orders, order_items, restaurants, and customers.
  3. Replace YOUR_PROJECT.supabase.co, YOUR_TWILIO_ACCOUNT_SID, YOUR_TWILIO_PHONE_NUMBER, YOUR_N8N_TUNNEL_URL, and the ElevenLabs voice ID in the ElevenLabs Text-to-Speech request URL.
  4. Configure a Supabase Database Webhook on notifications (or orders) for the Insert event to POST to https://YOUR_N8N_TUNNEL_URL/webhook/order-confirmation-call, and ensure the Twilio <Play> and StatusCallback URLs are publicly reachable.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - 🎥 Demo Video

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 2 - 📘 Overview

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 3 - 🔧 Setup

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 4 - 📥 New Notification

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 2

Block 5 - Parse Notification

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 6 - Is a new order?

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 7 - Skip (not new_order)

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1.1

Block 8 - Claim Order (insert log)

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 9 - Skip (already called)

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1.1

Block 10 - Fetch Order Details

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 11 - Build Call Context

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 12 - 🧠 Claude: Write Script

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 13 - Extract Script

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 14 - Log: status = calling (save script)

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 15 - ☎️ Twilio: Place Call

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 16 - 200 Call Initiated

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1.1

Block 17 - 📗 Main flow notes

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 18 - 🔊 Twilio Fetches Audio

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 2

Block 19 - Get Saved Script

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 20 - Prepare Text

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 21 - 🗣️ ElevenLabs: Text → Audio

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 22 - Stream MP3 to Twilio

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1.1

Block 23 - 📒 Audio notes

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 24 - 📞 Twilio Status Callback

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 2

Showing the first 24 of 31 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Confirm restaurant orders by phone with Supabase, Claude and Twilio
Complexity advanced
Nodes 31
Categories Lead Nurturing, AI Chatbot
Author Aumadi Technologies
Published 10 Jun 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/16247/16247.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Confirm restaurant orders by phone with Supabase, Claude and Twilio do?

Quick Overview This workflow triggers from a Supabase Database Webhook when a new order is inserted, generates a short order confirmation script with Anthropic Claude, calls the customer via Twilio...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Lead Nurturing, AI Chatbot use case.