n8n is an open-source workflow automation tool that lets you connect apps and automate tasks using a visual editor. By combining n8n with Zeeg's Public API, you can build automated workflows that respond to real-world events—such as triggering an AI outbound call the moment a new contact request lands in your inbox. This tutorial walks through a complete example: receiving a contact request by email and automatically having a Zeeg AI Agent call the prospect to qualify them and schedule an appointment.
This workflow requires a paid Zeeg subscription (Professional or above) as well as a n8n subscription. The Zeeg AI Agent feature has its own pricing based on the number of phone numbers configured, total calls made, and minutes used. To set up your AI Agent and get more information, please contact our support team.
Before you start
Make sure you have the following in place before building the workflow:
A Zeeg account with a paid subscription
At least one AI Agent enabled in your Zeeg account
An n8n account (cloud or self-hosted)
A Gmail account connected to n8n
Step 1: Set up your AI Agent in Zeeg
Before configuring n8n, you need to create and publish an AI Agent in Zeeg. This is the agent that will handle outbound calls once the workflow is triggered.
1. Go to the AI Agents section in your Zeeg dashboard. If you haven’t talked to our support team yet, please book a call via the Book a call button.
2. When everything’s set up, click + Create New.
3. Give it a title and click Create.
4. Assign or purchase a phone number for the agent.
5. Select your preferred language and voice, and optionally configure an email notification.
6. Write a greeting for the outbound call—this is what the AI Agent will say when the prospect picks up.
7. Select a default prompt. For this use case, choose Scheduling assistant.
8. Click Next and connect the agent to an existing scheduling page. Any questions attached to that scheduling page will be asked by the agent during the call.
9. Click Publish to enable the agent.
Step 2: Connect n8n with Gmail
1. Log in to your n8n account.
2. At the dashboard, click on the Gmail icon to connect your Gmail account.
3. Sign in with Google and authorize n8n to act on your behalf.
4. Once authorization is complete, you will be redirected back to the n8n dashboard.
Step 3: Create a new workflow
1. From the n8n dashboard, click Start from scratch.
2. In the workflow editor, click Add first step and search for the Gmail trigger that listens to incoming messages.
3. Set the polling frequency (for example, every 5 minutes).
4. Add a filter to target the right type of message—this works similarly to Gmail search filters.
5. Click Fetch Test Event until you see the expected message appear in the right-hand panel.
Step 4: Process the data
1. Add a processor node: Go back to the main workflow editor and add a processor after your Gmail trigger. You can choose between Edit Fields for straightforward field mapping, or the Information Extractor if your data is more complex and benefits from AI-assisted parsing. The goal is to format the output as a JSON payload that matches what the Zeeg API expects.
2. Map the fields using regular expressions: A simple field mapping is usually sufficient. In this example, we use regular expressions to extract the contact's name, email address, and phone number from the incoming email.
Following is an example of the regular expressions used and the payload we want for the API Call.
Regular expressions
// First name
{{ $json.From.split('<')[0].trim().split(/\s+/).slice(0, -1).join(' ') }}
// Last name
{{ $json.From.split('<')[0].trim().split(/\s+/).slice(-1)[0] }}
// Email address
{{ $json.From.match(/<([^>]+)>/)[1] }}
// Phone number (from email body)
{{ $json.snippet.match(/(?:\+|00|0)\d{6,}/)[0] }}
Expected payload
{
"phoneNumber": "+4915XXXX896",
"fullName": "Fabian Reese",
"email": "fabian.reese@mail.com",
"additionalData": "Callback to interested customer",
"scheduledTime": "2026-03-09 19:30:00"
}
Step 5: Create an API token in Zeeg
To allow n8n to communicate with the Zeeg API, you need to generate an access token in your Zeeg account.
1. In your Zeeg dashboard, go to Settings and select Access Token from the menu.
2. Click + Create API token.
3. Give the token a descriptive name and assign it the Outbound calls / write permission.
4. Confirm the creation and copy the token—store it somewhere safe, as you will need it in the next step.
Step 6: Make the API call to Zeeg
The final step in n8n is to send an HTTP request to the Zeeg API to trigger the outbound call.
1. Add an HTTP Request node to your workflow.
2. Set the method to POST. Use the following endpoint, replacing :agentUuid with the Agent ID you noted in Step 1:
https://api.zeeg.me/v1/agents/:agentUuid/outbound-calls
4. Under Authentication, select Bearer Auth and paste the API token you created in Zeeg.
5. Add the following headers:
Accept: application/json
Content-Type: application/json
6. Set the request body to use the JSON payload from the previous step.
7. Click Execute step to test the call. A successful response confirms the setup is working.
Once everything is working, save your workflow and give it a name.
What happens when the workflow runs
Once the workflow is active, here is the end-to-end flow for every new contact request received in Gmail:
The AI Agent places the call — The agent introduces itself using the greeting you configured. If the prospect is available to talk, the agent asks qualifying questions and books an appointment directly.
The call is logged — Once the call ends, it will be logged in your Zeeg account. If you have transcription enabled in the privacy settings of your AI Agent, a full transcription will also
3. The appointment is created — The meeting is automatically added to your Zeeg calendar. You can review the appointment details and add any additional information about the new lead in Zeeg CRM.
FAQ
Do I need coding experience to set this up? Basic familiarity with JSON and regular expressions is helpful for the data processing step, but n8n's visual editor means you don't need to write any backend code.
Can I use a different email provider instead of Gmail? The workflow in this tutorial uses Gmail, but n8n supports many other email providers. The core logic—extracting contact data and calling the Zeeg API—remains the same regardless of which email trigger you use.
What happens if the phone number cannot be parsed from the email? If the regular expression does not find a phone number in the email body, the workflow step will fail. Consider adding an error handler in n8n to catch these cases and route them for manual review.
Can I trigger outbound calls from sources other than email? Yes. Any n8n trigger that can produce the required payload (phone number, name, email) can be used—such as a form submission, a CRM event, or a Slack message.
