Mailgun connector
Set up the Mailgun connector in Kaivo: authentication, configuration, the 2 BigQuery tables it syncs, and answers to common questions.
Mailgun connector pricing, tier and credits on kaivo.ioKaivo is a fully managed data platform that syncs your Mailgun data into a Google BigQuery warehouse and keeps it up to date automatically. There is no pipeline to build and no infrastructure to run, so you can spend your time analysing your survey and email data instead of moving it.
What is the Mailgun connector
Section titled “What is the Mailgun connector”Sync your Mailgun delivery data into BigQuery with Kaivo to monitor deliverability and engagement across your sending domains.
| Category | Surveys & Email |
|---|---|
| Authentication | API key |
| Setup | Self-service |
Getting started with the Mailgun connector
Section titled “Getting started with the Mailgun connector”- Sign up for Kaivo and create a workspace.
- Connect your Mailgun account.
- Choose which tables to sync.
- Wait for the initial sync to finish.
- Query your data in BigQuery or your favourite AI or BI tool.
Authenticating Mailgun
Section titled “Authenticating Mailgun”Authenticate with your Private API Key.
| Field | Description |
|---|---|
| Private API Key | |
| Primary account API key to access your Mailgun data. |
|
Configuring the Mailgun connector
Section titled “Configuring the Mailgun connector”When you set up the connector, you provide:
| Field | Description |
|---|---|
| Domain Region Code | |
| Domain region code. ‘EU’ or ‘US’ are possible values. The default is ‘US’. |
| | Start Date |
Any data before this date will not be fetched.
|
Tables and columns synced from Mailgun
Section titled “Tables and columns synced from Mailgun”Kaivo syncs 2 tables from Mailgun into a dedicated dataset in your BigQuery warehouse. Click any table to see its columns and types.
domains (19 columns)
| Column | Type | Description |
|---|---|---|
_kaivo_id |
STRING |
Primary key that uniquely identifies the row. Auto-generated by Kaivo. |
type |
STRING |
Type of the domain (e.g., custom, sandbox). |
created_at |
STRING |
The date and time when the domain was created. |
dkim_key_size |
INT64 |
The size of the DKIM key associated with the domain. |
force_dkim_authority |
BOOL |
Indicates whether DKIM authority needs to be enforced. |
id |
STRING |
The unique identifier for the domain. |
is_disabled |
BOOL |
Specifies if the domain is disabled. |
name |
STRING |
The name of the domain. |
pool |
STRING |
The pool to which the domain belongs. |
require_tls |
BOOL |
Specifies if TLS is required for emails sent from this domain. |
skip_verification |
BOOL |
Indicates whether email verification should be skipped. |
smtp_login |
STRING |
SMTP login credentials for the domain. |
smtp_password |
STRING |
SMTP password associated with the domain. |
spam_action |
STRING |
Action to take for emails marked as spam. |
state |
STRING |
The current state of the domain. |
web_prefix |
STRING |
Prefix for webhooks related to the domain. |
web_scheme |
STRING |
The scheme for webhook URLs (e.g., https). |
wildcard |
BOOL |
Indicates if the domain allows wildcard addresses. |
_kaivo_extracted_at |
TIMESTAMP |
Timestamp that shows when the row was extracted. Auto-generated by Kaivo. |
Subtable: domains__ips
Section titled “Subtable: domains__ips”| Column | Type | Description |
|---|---|---|
_kaivo_parent_id |
STRING |
Foreign key referencing _kaivo_id in the parent table. Auto-generated by Kaivo. |
_kaivo_id |
STRING |
Primary key that uniquely identifies the row. Auto-generated by Kaivo. |
value |
STRING |
IP address |
_kaivo_extracted_at |
TIMESTAMP |
Timestamp that shows when the row was extracted. Auto-generated by Kaivo. |
events (48 columns)
| Column | Type | Description |
|---|---|---|
_kaivo_id |
STRING |
Primary key that uniquely identifies the row. Auto-generated by Kaivo. |
client_info__client_name |
STRING |
Name of the client device |
client_info__client_os |
STRING |
Operating system of the client device |
client_info__client_type |
STRING |
Type of the client device |
client_info__device_type |
STRING |
Type of the device (e.g., desktop, mobile) |
client_info__user_agent |
STRING |
User agent string of the client device |
delivery_status__attempt_no |
FLOAT64 |
Number of delivery attempts |
delivery_status__certificate_verified |
BOOL |
Whether the certificate is verified |
delivery_status__code |
STRING |
Delivery status code |
delivery_status__description |
STRING |
Description of the delivery status |
delivery_status__message |
STRING |
Delivery message |
delivery_status__mx_host |
STRING |
MX host information |
delivery_status__retry_seconds |
FLOAT64 |
Number of seconds before retrying delivery |
delivery_status__session_seconds |
FLOAT64 |
Duration of the delivery session in seconds |
delivery_status__tls |
BOOL |
TLS information |
delivery_status__utf8 |
BOOL |
Whether UTF-8 encoding is used |
envelop__sender |
STRING |
Email address of the sender |
envelop__sending_ip |
STRING |
IP address used for sending |
envelop__targets |
STRING |
List of target email addresses |
envelop__transport |
STRING |
Transport information |
event |
STRING |
Type of event (e.g., opened, clicked) |
flags__is_authenticated |
BOOL |
Whether the email is authenticated |
flags__is_delayed_bounce |
BOOL |
Flag for delayed bounce |
flags__is_routed |
BOOL |
Flag for routed email |
flags__is_system_test |
BOOL |
Flag for system test email |
flags__is_test_mode |
BOOL |
Flag for test mode email |
geolocation__city |
STRING |
City of the recipient |
geolocation__country |
STRING |
Country of the recipient |
geolocation__region |
STRING |
Region of the recipient |
id |
STRING |
ID of the email event |
ip |
STRING |
IP address of the recipient |
log_level |
STRING |
Log level information |
message__headers__from |
STRING |
Sender’s email address |
message__headers__message_id |
STRING |
Message ID of the email |
message__headers__subject |
STRING |
Subject of the email |
message__headers__to |
STRING |
Recipient’s email address |
message__size |
FLOAT64 |
Size of the email message |
method |
STRING |
Method used for the event (e.g., POST, GET) |
storage__key |
STRING |
Key identifier for storage |
storage__url |
STRING |
URL for accessing stored email |
reason |
STRING |
Reason for the event |
reject__description |
STRING |
Description of rejection |
reject__reason |
STRING |
Reason for rejection |
recipient |
STRING |
Email address of the recipient |
recipient_domain |
STRING |
Recipient’s domain name |
severity |
STRING |
Severity of the event |
timestamp |
FLOAT64 |
Timestamp of the event |
_kaivo_extracted_at |
TIMESTAMP |
Timestamp that shows when the row was extracted. Auto-generated by Kaivo. |
Subtable: events__campaigns
Section titled “Subtable: events__campaigns”| Column | Type | Description |
|---|---|---|
_kaivo_parent_id |
STRING |
Foreign key referencing _kaivo_id in the parent table. Auto-generated by Kaivo. |
_kaivo_id |
STRING |
Primary key that uniquely identifies the row. Auto-generated by Kaivo. |
value |
JSON |
|
_kaivo_extracted_at |
TIMESTAMP |
Timestamp that shows when the row was extracted. Auto-generated by Kaivo. |
Subtable: events__message__attachments
Section titled “Subtable: events__message__attachments”| Column | Type | Description |
|---|---|---|
_kaivo_parent_id |
STRING |
Foreign key referencing _kaivo_id in the parent table. Auto-generated by Kaivo. |
_kaivo_id |
STRING |
Primary key that uniquely identifies the row. Auto-generated by Kaivo. |
value |
JSON |
|
_kaivo_extracted_at |
TIMESTAMP |
Timestamp that shows when the row was extracted. Auto-generated by Kaivo. |
Subtable: events__message__recipients
Section titled “Subtable: events__message__recipients”| Column | Type | Description |
|---|---|---|
_kaivo_parent_id |
STRING |
Foreign key referencing _kaivo_id in the parent table. Auto-generated by Kaivo. |
_kaivo_id |
STRING |
Primary key that uniquely identifies the row. Auto-generated by Kaivo. |
value |
STRING |
|
_kaivo_extracted_at |
TIMESTAMP |
Timestamp that shows when the row was extracted. Auto-generated by Kaivo. |
Subtable: events__routes
Section titled “Subtable: events__routes”| Column | Type | Description |
|---|---|---|
_kaivo_parent_id |
STRING |
Foreign key referencing _kaivo_id in the parent table. Auto-generated by Kaivo. |
_kaivo_id |
STRING |
Primary key that uniquely identifies the row. Auto-generated by Kaivo. |
expression |
STRING |
Expression used for routing |
id |
STRING |
ID of the route |
match__recipient |
STRING |
Recipient email address |
_kaivo_extracted_at |
TIMESTAMP |
Timestamp that shows when the row was extracted. Auto-generated by Kaivo. |
Subtable: events__tags
Section titled “Subtable: events__tags”| Column | Type | Description |
|---|---|---|
_kaivo_parent_id |
STRING |
Foreign key referencing _kaivo_id in the parent table. Auto-generated by Kaivo. |
_kaivo_id |
STRING |
Primary key that uniquely identifies the row. Auto-generated by Kaivo. |
value |
STRING |
|
_kaivo_extracted_at |
TIMESTAMP |
Timestamp that shows when the row was extracted. Auto-generated by Kaivo. |
How the Mailgun sync works
Section titled “How the Mailgun sync works”After the first load, Kaivo keeps your BigQuery warehouse up to date for you. Where Mailgun supports it, each sync pulls only new and changed records so it stays fast; otherwise it refreshes the whole table. Every record keeps its original ID, so you won’t get duplicate rows.
Frequently asked questions
Section titled “Frequently asked questions”How long does the initial sync take for Mailgun?
Section titled “How long does the initial sync take for Mailgun?”It depends on how much history is in your Mailgun account. Most initial syncs finish within minutes, while large accounts can take a few hours. After that, syncs only fetch new and changed records, so they’re much faster.
Can I sync only some tables or columns?
Section titled “Can I sync only some tables or columns?”Yes. You pick which tables to sync when you set up the connection and can change the selection later. Tables you don’t select are never copied to your warehouse.
What happens when Mailgun’s schema changes?
Section titled “What happens when Mailgun’s schema changes?”New fields are never added automatically. You choose which fields to sync, so data you haven’t selected (sensitive personal data, for example) never lands in your warehouse. When a new field appears, it becomes available for you to add. What happens to removed or renamed fields depends on a table’s sync mode: full-refresh tables always match what’s currently in Mailgun, so dropped fields disappear, while incremental tables keep their existing columns and history, so an old field stays and newly added fields fill in over time.
How do I handle GDPR or data deletion requests?
Section titled “How do I handle GDPR or data deletion requests?”Your data lives in your own Kaivo-managed BigQuery warehouse, so the most direct option is to delete or anonymise specific records right in BigQuery. If you delete data in Mailgun instead, full-refresh tables drop it on the next sync, while incremental tables keep it, so you would remove the row in BigQuery or ask us to run a full refresh. To remove everything, delete the Mailgun connector in Kaivo and all of its synced data is deleted with it.
Common use cases for Mailgun data
Section titled “Common use cases for Mailgun data”Deliverability monitoring
Section titled “Deliverability monitoring”Use the delivery_status code and description in events to track delivered, bounced, and failed messages with reasons.
Engagement tracking
Section titled “Engagement tracking”Use client_info in events to measure opens and clicks by device and client.
Domain reporting
Section titled “Domain reporting”Join domains with events to compare deliverability across sending domains.
Product context
Section titled “Product context”Combine Mailgun events with your product data to connect sends to user actions.
Use Mailgun data in your AI and BI tools
Section titled “Use Mailgun data in your AI and BI tools”Once Mailgun data lands in your Kaivo-managed BigQuery warehouse, you can explore it with AI tools or any BI tool that connects to BigQuery. Here’s how the most common destinations work with Mailgun data.
Claude
Section titled “Claude”Use Kaivo’s MCP server to give Claude secure, workspace-scoped access to your data. Setup guide →
Power BI
Section titled “Power BI”Microsoft’s BI tool with a native BigQuery connector. Supports direct query and scheduled refresh. Setup guide →
Data Studio
Section titled “Data Studio”Free Google BI tool with native BigQuery support. One-click connection to your Kaivo warehouse; great for SMB teams on Google Workspace. Setup guide →
Tableau
Section titled “Tableau”The premium analytics standard, with native BigQuery integration. Setup guide →
Google Sheets
Section titled “Google Sheets”Use Connected Sheets to query BigQuery directly from a spreadsheet, with no SQL. Setup guide →
Connect via Power Query’s BigQuery connector. Setup guide →
Metabase
Section titled “Metabase”Open-source BI tool with strong BigQuery support. Setup guide →
See our pricing page for Mailgun connector pricing and plan details.