Mailgun
Instead of following these steps manually, you can use the AI Credential Assistant — describe what you want to connect and the AI will walk you through the setup step by step, tailored to your account.
Overview
Connect your Mailgun account to Nirvai to automate email sending, manage campaigns, and track email delivery.
Supported Authentication Methods
- API Key - With region and domain configuration
Prerequisites
- A Mailgun account
- A verified sending domain
- API Key from Mailgun dashboard
Setup Instructions
API Key Configuration
- Log in to your Mailgun Dashboard
- Go to Settings > API Keys (or API Security)
- Copy your Private API key (or create a new one)
- Note your verified sending domain (e.g.,
mg.yourdomain.com) - Identify your API region:
- US Region:
api.mailgun.net(default) - EU Region:
api.eu.mailgun.net
- US Region:
- In Nirvai, enter:
- API Key: Your Mailgun Private API key
- API Region: Select US or EU based on your account
- Email Sending Domain: Your verified domain
Creating an API Key
If you need a new API key:
- Go to Settings > API Keys
- Click Create API Key
- Add a description (e.g., "Nirvai Integration")
- Select key type and permissions
- Copy the key immediately
Configuration Fields
| Field | Description | Example |
|---|---|---|
| API Key | Mailgun Private API key | key-xxxxx... |
| API Region | US or EU region | api.mailgun.net |
| Email Domain | Verified sending domain | mg.yourdomain.com |
Region Selection
Your Mailgun account is tied to a specific region:
- US Region:
api.mailgun.net- Most common - EU Region:
api.eu.mailgun.net- For EU data residency
Check your dashboard URL to identify your region:
- US:
app.mailgun.com - EU:
app.eu.mailgun.com
Available Operations
With Mailgun credentials, you can:
- Send transactional emails
- Manage mailing lists
- Track email delivery
- Handle bounces and complaints
- Access sending statistics
- Validate email addresses
Troubleshooting
Common Issues
- 401 Unauthorized: API key is invalid. Double-check the key.
- 403 Forbidden: Domain not verified or key lacks permissions.
- Domain Error: Ensure you're using a verified sending domain.
- Region Mismatch: Using US key with EU endpoint or vice versa.
Domain Verification
Your sending domain must be verified:
- Go to Sending > Domains
- Select your domain
- Follow DNS verification steps
- Wait for verification (can take 24-48 hours)
Sandbox Domain
For testing, Mailgun provides a sandbox domain:
- Limited to 5 authorized recipients
- Good for development and testing
- Not suitable for production
Key Types
Mailgun has different key types:
- Private API Key: Full access (use this)
- Domain Sending Key: Limited to specific domain
- Validations API Key: Only for email validation
Related Resources
Adapted from n8n documentation for Nirvai platform
Next Steps
Use the AI Tool Creator to turn this credential into agent-callable tools. Describe what your agent should be able to do and the AI investigates the API, configures the endpoints, and gives you a reviewable toolkit before saving anything.