n8n allows you to connect thousands of apps and services to create sophisticated workflows.
You can easily connect to our powerful communications platform using the HTTP Request node.
This article provides a comprehensive, step-by-step guide to setting up TNZ's SMS, Email, and Voice APIs within your n8n workflows.
Prerequisites: Enabling Your API Access
Before you can configure your n8n workflow, you need to generate an Auth Token from your TNZ Dashboard. This token acts as a secure, private key that authenticates your API calls.
Step 1: Log into Your TNZ Dashboard and Access API Settings
-
Log in to your TNZ Account at https://my.tnz.co.nz.
-
From the menu, navigate to Users.
- Click on an existing user, or create a new one.
Step 2: Enable API and Generate an Auth Token
- Toggle 'Enable API' to Yes (if not already enabled).
-
Click 'Enable' next to 'Auth Token'.
-
Click 'Create Auth Token' and confirm the action.
-
'Copy' your newly created Auth Token. Keep this token secure, it is a secret credential.
Triggering an SMS, Email or Voice
Since the TNZ API is a RESTful API that works over HTTP, you will use n8n's HTTP Request node to connect.
To configure the n8n Workflow:
-
Log in to your n8n instance or cloud account and open your Workflow, or create a new one.
-
Ensure your workflow has a Trigger node (the workflow's first step).
-
Click the '+' icon and search for the HTTP Request node.
- Configure these variables:
- Method = POST
- URL =
- For SMS, use: https://api.tnz.co.nz/api/v3.00/sms
- For Voice, use: https://api.tnz.co.nz/api/v3.00/tts
- For Email, use: https://api.tnz.co.nz/api/v3.00/email
- Authentication = None
- Send Headers = Yes
- Header Name = Authorization
- Header Value = Basic [Your-auth-token-here]
- Send Body = Yes
- Body Content Type = JSON
- Specify Body = Using JSON
- JSON =
(Replace these values as appropriate)

Customising the message:
Each message type (SMS, Email, Voice) has unique variables you can include to customise your message.
For example, in an Email you can customise the EmailSubject, FromEmail, CCEmail, and in a Voice call you can customise the Caller ID, Voice that is used, etc.
Refer to the TNZ REST API Documentation for all available parameters.
Tip: You can copy the cURL samples from the TNZ API documentation directly into n8n:

Webhook Callbacks:
When configuring your message, you may wish to receive a callback when the message delivery completes, or if an SMS Reply is detected.
Set these values:
"NotificationType": "Webhook",
"WebhookCallbackURL": "Your n8n Webhook URL"
Example:
(Replace these values as appropriate)
Capturing Inbound SMS Messages
When TNZ receives an SMS message, it can webhook the data to your n8n Workflow.
To configure the n8n Workflow:
-
Log in to your n8n instance or cloud account and open your Workflow, or create a new one.
- Click the '+' icon and search for the Webhook node.
- Configure these variables:
- Method = POST
- Path = [leave default]
- Authentication = None
- Respond = Immediately
- Note the Test and Production URLs.

To activate the webhook:
Now that your n8n Workflow's Webhook URL is set up, you need to advise TNZ to use it.
When sending an outbound message from n8n, you may specify the URL in the "WebhookCallbackURL" body parameter.
Your user in the TNZ Dashboard can also have a default Webhook URL configured.
Follow the Configuring Webhooks and API Notifications for full instructions.
Reporting on Activity
After your n8n workflow executes the API call, you can review the status and details of the sent messages directly in the TNZ Dashboard:
-
Log in to the TNZ Dashboard.
-
Select 'View Messages' from the menu.
-
Select 'Detailed Messages Sent' to view comprehensive delivery and usage reports for all messages sent via the API (including those from n8n).
This detailed log allows you to monitor delivery status, costs, and any replies received from your customers.