Detailed guide on how to use the feature Text to Speech (TTS)of Alohub on n8n — make outbound calls and read text content to customers using natural voice.
Requirements:Node has been installed
n8n-nodes-alohuband API Key credential has been set up. See Installation guideif not done yet.
Text to Speech (TTS) is a feature that allows the Alohub system to make outbound calls to customer phone numbers, then automatically read the text contentyou provide in a natural voice. Suitable for scenarios:
Sending OTP via voice(Voice OTP) — more secure than SMS
Appointment, order, transaction notifications
Payment reminders, service renewals
Emergency notifications for customers
Drag the Alohubnode into the workflow canvas
Select Credential: Alohub account created
Select Resource: Voice
Select Operation: Text to Speech
Fill in the parameters below
Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| string | Yes |
| Phone number receiving the call |
| string | Yes |
| Text content to be read aloud when the call connects |
Note:The system automatically generates
transactionIda unique identifier for each call for tracking and reconciliation. You do not need to enter it manually.
Concise: 1-2 sentences, under 200 characters to avoid customers hanging up midway
Clearly read numbers: separate numbers with spaces — for example 4 8 2 6 1 5instead of 482615to ensure clarity in each digit
Avoid special characters: omit emojis, special characters, hard-to-read abbreviations
Repeat important information: for OTP, read it twice for customers to take note
https://xapi.alohub.vn/v1/voice/text-to-speechThe node will call this endpoint with the body as follows:
{
"phone": "0912345678",
"otp": "Mã xác nhận của bạn là 482615",
"transactionId": "ah_n8n_a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}On success:
{
"success": true,
"httpStatus": 200,
"transactionId": "ah_n8n_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"resource": "voice",
"operation": "textToSpeech",
"timestamp": "2026-04-15T09:00:00.000Z",
"error_code": "SUCCESS",
"error_message": "SUCCESS"
}On error:
{
"success": false,
"httpStatus": 200,
"transactionId": "ah_n8n_...",
"error_code": "0",
"error_message": "HỆ THỐNG OUTBOUND GẶP SỰ CỐ",
"errorCode": "0",
"errorMessage": "HỆ THỐNG OUTBOUND GẶP SỰ CỐ"
}[Webhook Trigger] → [Code: Generate OTP] → [Alohub: Voice > Text to Speech]
Phone Number: {{ $json.phone }}
Text Content: Mã OTP của bạn là {{ $json.otp }}[Schedule Trigger 8AM] → [Google Sheets: Get Appointments] → [Alohub: Voice > Text to Speech]
Phone Number: {{ $json.customer_phone }}
Text Content: Xin chào {{ $json.name }},
lịch hẹn của bạn lúc {{ $json.time }}
ngày hôm nay.[Webhook: New Order] → [Alohub: Voice > Text to Speech]
Phone Number: {{ $json.customer_phone }}
Text Content: Đơn hàng số {{ $json.order_id }}
đã được xác nhận. Cảm ơn quý khách.Text to Speech can be used as a tool for AI Agent — AI will generate content and call to read to customers based on the conversation context.
Drag the When chat message received→ connect to AI Agent
Add Chat Model(OpenAI / Claude / Gemini)
Add Tool: select Alohub Tool
Configure Alohub Tool:
Field | Value | Explanation |
|---|---|---|
Resource |
| — |
Operation |
| — |
Phone Number |
| AI automatically extracts from the chat message |
Text Content |
| AI automatically generates appropriate content |
# Người dùng gõ:
"Gọi cho khách 0912345678 thông báo đơn hàng đã giao thành công"
# AI Agent tự động:
# 1. Nhận diện cần gọi Voice > Text to Speech
# 2. Trích xuất phoneNumber = "0912345678"
# 3. Sinh nội dung: "Xin chào, đơn hàng của quý khách đã được giao thành công."
# 4. Gọi Alohub Tool → thực hiện cuộc gọi + đọc nội dung
# 5. Trả kết quả cho người dùngError code | Message | Cause | How to handle |
|---|---|---|---|
| Outbound system encountered an issue | The PBX system is temporarily unavailable | Contact Alohub support |
| Authorization failed | Invalid API Key | Check Credential again |
| Bad request | Missing required fields or incorrect format | Check phone, text content |
Tip:Enable Continue On Errorin the node's Settings so that the workflow continues to run even if the call fails — the output will contain all error information for processing or retrying later.
Contact Alohubfor technical support