Voice AI Order Confirmation Agent with Timezone Scheduling - n8n Workflow

Use this advanced n8n workflow template to automate e-commerce order confirmation calls using VAPI Voice AI. Features include customer timezone awareness, call scheduling, and AI-powered transcript analysis. Deploy this n8n automation today.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • E-commerce store owners and operations managers needing to reduce order verification fraud.

  • Developers building conversational AI applications who require sophisticated scheduling logic.

  • Businesses that require time-zone compliant customer outreach.

  • Users looking for advanced n8n templates that combine code scripting, external APIs, and asynchronous webhook handling.

Overview

Manually calling every customer to confirm an order is time-consuming and prone to human error. Furthermore, calling a customer at an inappropriate local time can damage brand perception. This powerful n8n workflow solves both problems by creating a fully automated, timezone-aware Voice AI agent.

When a new order is received, the n8n node first checks the customer's location to determine their local time. If they are within defined business hours (10 AM to 3 PM local time, Monday to Friday), an immediate VAPI call is initiated. If they are outside of these hours, the order is scheduled in Airtable for a later retry, ensuring the customer is never called too early or too late. The subsequent VAPI webhook handler processes the call results, using a custom n8n node to analyze the transcript sentiment (confirmed, needs review, no answer) before updating the final order status and triggering necessary follow-up alerts via email. This robust n8n automation guarantees compliance and efficiency.

How it Works

This n8n workflow operates via three main branches, ensuring reliability and asynchronous handling:

1. New Order Trigger (Immediate Processing)


  1. Order Webhook: The n8n trigger receives a new order payload (usually from an e-commerce platform like Shopify or WooCommerce) via a POST request.

  2. Validate Order Data: An if n8n node checks if a phone number exists and the order status is 'pendingconfirmation'.

  3. Check Timezone & Calling Hours: A custom code n8n node determines the customer's local timezone based on address data or phone prefix. It then checks if the customer is within the designated calling window.

  4. Can Call Now?: If the answer is yes, the flow proceeds to Format Order Data to configure the AI system message (including time-based greetings like 'Good morning').

  5. Initiate VAPI Call: An HTTP Request n8n node sends the fully configured request to the VAPI API to start the call.

  6. Update Order Status: The order is marked as 'calling' in Airtable, and the initial webhook receives a success response.

  7. Scheduling (If Cannot Call): If the check fails, the Schedule Call for Later Airtable n8n node updates the record with the calculated nextcalltime, and a scheduled response is returned to the triggering system.

2. Scheduled Retry Trigger


  1. Scheduled Call Checker: A Schedule n8n trigger runs every 15 minutes.

  2. Get Scheduled Calls: This Airtable n8n node queries the database for any orders whose nextcalltime has passed.

  3. Increment Call Attempts: The record is updated, and the flow loops back to the Check Timezone & Calling Hours node, attempting the call again.

3. VAPI Callback (Asynchronous Results)


  1. VAPI Webhook Handler: A dedicated n8n trigger receives the call-end event from VAPI.

  2. Process Call Results: A custom code n8n node performs sentiment and content analysis on the call transcript, calculating a confidence score and identifying key issues (e.g., address change, cancellation request).

  3. Update Final Status: The Airtable n8n node saves the final call status, transcript, and duration.

  4. Check if Followup Needed: If the status is 'confirmed', the customer receives a Send Confirmation Email. If the status is 'needsreview' or 'no_answer', a Send Follow-up Alert email is immediately sent to the internal support team for manual intervention.

Installation Guide

To install this robust n8n workflow, follow these steps:


  1. Import the n8n Workflow: Copy the provided JSON and import it directly into your n8n instance using the 'New' -> 'Import from JSON' function.

  2. Configure Credentials: You will need to set up credentials for the following services:

HTTP Header Auth: Used for VAPI. Set the header name to Authorization and the value to Bearer YOURVAPIAPIKEY. You will also need to configure the VAPI phone number ID as a workflow variable (VAPIPHONENUMBERID).
Airtable: Set up credentials linking to your Airtable base where order data is stored (ensure the tables and column names match the workflow's requirements, specifically for updating status and scheduling).
* SMTP: Configure your email service (e.g., Gmail, SendGrid) credentials to enable the Send Confirmation Email and Send Follow-up Alert nodes.

  1. Set Up Webhooks: After activating the n8n workflow, note the URL endpoints generated for the Order Webhook (e.g., /webhook/order-confirmation) and the VAPI Webhook Handler (e.g., /webhook/vapi-webhook). Configure your e-commerce platform and VAPI console to send events to these respective n8n trigger endpoints.

Node Details

Order Webhook (n8n trigger): Starts the n8n workflow upon receiving a new order payload, listening for POST requests at the /order-confirmation path.
Check Timezone & Calling Hours (Code n8n node): Essential logic for determining customer timezone and calculating if the call is appropriate based on local time. Also calculates the optimal future call time if rescheduling is necessary.
Format Order Data (Code n8n node): Dynamically constructs the comprehensive VAPI assistant configuration, including the AI's system message, role, personalized time-based greeting, and detailed order summary for the AI to read.
Initiate VAPI Call (HTTP Request n8n node): Handles the secure API interaction with VAPI, sending the required payload and authentication tokens to start the voice conversation.
Scheduled Call Checker (Schedule n8n trigger): A time-based n8n trigger that runs every 15 minutes to initiate retry attempts for orders previously deemed out-of-hours.
Get Scheduled Calls (Airtable n8n node): Queries the Airtable database to retrieve orders that are 'scheduled' and whose nextcalltime has been reached, ensuring strict adherence to the defined schedule.
VAPI Webhook Handler (n8n trigger): An asynchronous n8n node that waits for the final status update (call transcript, duration, and cost) from the VAPI service after the call has concluded.
Process Call Results (Code n8n node): Analyzes the raw call transcript using custom JavaScript logic to score positive and negative keywords, determining the final confirmation status (e.g., 'confirmed', 'needsreview') and setting the requiresfollowup flag.
Update Final Status (Airtable n8n node): Updates the master order record with the results of the AI analysis, including the transcript and confidence score.
Check if Followup Needed (If n8n node): Directs the flow either to send an internal alert (if issues were detected) or to send the final customer confirmation email (if the order was successfully confirmed).

Related n8n Workflows

Free

Nodes: 8 Nodes
Updated: December 26 2025
View all
Created by
Adnan Azhar
Adnan Azhar

Featured*