0% found this document useful (0 votes)
34 views4 pages

N8N Workflow Help

The document outlines the setup process for a system that integrates Twilio for call handling, OpenAI Whisper for transcription, GPT-4 for smart conversation, ElevenLabs for audio synthesis, and Supabase for audio response hosting. It includes instructions for replacing placeholders, setting up a Supabase upload endpoint, and configuring Twilio webhooks. Additionally, it provides options for local testing using ngrok and deployment suggestions for the full stack on various platforms.

Uploaded by

daakbox2025
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views4 pages

N8N Workflow Help

The document outlines the setup process for a system that integrates Twilio for call handling, OpenAI Whisper for transcription, GPT-4 for smart conversation, ElevenLabs for audio synthesis, and Supabase for audio response hosting. It includes instructions for replacing placeholders, setting up a Supabase upload endpoint, and configuring Twilio webhooks. Additionally, it provides options for local testing using ngrok and deployment suggestions for the full stack on various platforms.

Uploaded by

daakbox2025
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

🔧 Includes:

●​ Inbound & outbound call flow via Twilio​

●​ Real-time transcription via OpenAI Whisper​

●​ Smart conversation via GPT-4​

●​ Audio synthesis using ElevenLabs​

●​ Response audio hosting via Supabase (placeholder upload endpoint)​

📄 What to Do Next:
1.​ Replace placeholders like:​

○​ https://yourdomain.com/...​

○​ https://your-supabase-upload-url.com/upload​

○​ {{OPENAI_API_KEY}}, {{ELEVENLABS_API_KEY}}, etc.​

2.​ Point your Twilio webhook to:​

https://yourdomain.com/n8n/webhook/twilio/inbound​

Use ngrok or your public n8n domain for testing.​

✅ 1.
Supabase Upload Endpoint
You’ll upload the ElevenLabs audio (binary buffer) to a Supabase storage bucket.

📦 Prerequisites
●​ A Supabase project​
●​ A bucket named audio-responses​

●​ A service_role key with storage write permission​

📘
Node.js (Express) – /upload Route
// supabase-upload.js
const express = require('express');
const { createClient } = require('@supabase/supabase-js');
const multer = require('multer');
const cors = require('cors');
const fs = require('fs');

const app = express();


app.use(cors());
const upload = multer({ dest: 'tmp/' });

const supabase = createClient(


'https://your-project.supabase.co',
'supabase-service-role-key'
);

app.post('/upload', upload.single('data'), async (req, res) => {


const { path: tempPath, originalname } = req.file;

const buffer = fs.readFileSync(tempPath);


const fileName = `response-${Date.now()}-${originalname}`;

const { data, error } = await supabase.storage


.from('audio-responses')
.upload(fileName, buffer, {
contentType: 'audio/mpeg',
upsert: true
});

fs.unlinkSync(tempPath);

if (error) return res.status(500).json({ error });


const publicUrl =
`https://your-project.supabase.co/storage/v1/object/public/audio-responses/${fileName}`;
res.json({ url: publicUrl });
});

app.listen(5000, () => console.log('Supabase upload API running on port 5000'));

🟢 This endpoint receives multipart/form-data from n8n and returns a public MP3 URL.
📸 2.
Twilio Console Setup – Screenshot Guide
Go to:

Twilio Console → Phone Numbers

🧩 Steps:
1.​ Choose your active Twilio number​

2.​ Scroll to “Voice & Fax”​

3.​ In “A CALL COMES IN”, set:​

○​ Webhook: https://yourdomain.com/n8n/webhook/twilio/inbound​

○​ HTTP POST​

4.​ Save​

👉 Here’s an illustrative screenshot (mockup):


┌────────────────────────────────────────────┐
│ PHONE NUMBER SETTINGS │
├────────────────────────────────────────────┤
│ Voice & Fax │
│ │
│ A CALL COMES IN: │
│ Webhook: [ https://yourdomain.com/n8n/... ]│
│ Method: [ POST ] │
└────────────────────────────────────────────┘
🌐 3.
Hosted Testing Sandbox Options
🔄 Option 1: Use
ngrok

for Local Testing


ngrok http 3000 # for your n8n or upload server​
​Update webhook to:
https://abc123.ngrok.io/n8n/webhook/twilio/inbound​

🚀 Option 2: Deploy Full Stack on:


●​ 🔹 Supabase (backend storage + auth)​


●​ 🔹 Railway.app / Render / Vercel (Express API)​
●​ 🔹 n8n Cloud or self-hosted on DigitalOcean/AWS​

You might also like