Good day i am struggling to get my workflow working between twilio and N8n please can sumone assist me in what i am doing wrong i am getting this error and this is what i want
OVERVIEW (what weβre building)
Customer β WhatsApp β Menu β Sub-menu β Data capture β Confirmation
WORKFLOW STRUCTURE (IMPORTANT)
In n8n we will use:
- Webhook (already working
) - Set node (extract message)
- Switch node (menu logic)
- Multiple reply nodes (Twilio HTTP)
- State tracking (VERY IMPORTANT)
CRITICAL DESIGN DECISION
WhatsApp is NOT like a form
You must track conversation step-by-step
We will store:
User β current step
STEP 1: MAIN MENU RESPONSE
When ANY message comes in:
Reply:
Welcome to Konica Minolta Centrale ![]()
How can we assist you?
Sales
Support
Accounts
STEP 2: HANDLE MENU (Switch node)
Use:
Switch on {{$json[βBodyβ]}}
CASE β1β β SALES
Reply:
Sales Department:
Promotions
New Sale
Upgrade
CASE β2β β SUPPORT
Reply:
Support:
Toner
Service
CASE β3β β ACCOUNTS
Reply:
Accounts:
Please provide:
- Serial Number
- Contact Number
- Email Address
Do you need:
Invoice
Statement
STEP 3: SALES FLOW
If user selects β1β (Promotions)
Send IMAGE (important)
Use Twilio HTTP node:
Add field:
MediaUrl = your-image-link.com
I can generate flyer for you if needed
If β2β (New Sale)
Ask:
Please provide:
- Name
- Surname
- Company Name
- Address
- Contact Number
- Email Address
Then reply:
Thank you. A sales representative will contact you shortly.
If β3β (Upgrade)
Ask:
Please provide:
- Serial Number
- Contact Number
- Email Address
Then reply:
Thank you. A sales representative will contact you shortly.
STEP 4: SUPPORT FLOW
If β1β Toner
Ask:
Please provide:
- Serial Number
- Meter Reading (B/W and Colour if available)
Then ask:
Please provide: - Contact Number
- Email Address
If β2β Service
Ask:
Please provide:
- Serial Number
- Issue Description
- Contact Number
- Email Address
STEP 5: ACCOUNTS FLOW
Ask:
Please provide:
- Serial Number
- Contact Number
- Email Address
And select:
Invoice
Statement
Then reply:
Accounts department will contact you shortly.
IMPORTANT (WITHOUT THIS IT BREAKS)
You MUST track user state.
Example:
User State
079xxxx sales_menu
079xxxx waiting_for_details
HOW TO STORE STATE (simple)
Use:
n8n Data Store node
Store:
{
βphoneβ: β{{$json[βFromβ]}}β,
βstepβ: βsales_new_saleβ please help me !!!

