Skip to main content

SendGrid Integration

Send WiFi welcome emails, credential delivery, and guest notifications through SendGrid's email platform with customizable templates and delivery tracking.

Overview

The SendGrid integration enables:

  • Welcome emails after WiFi signup
  • Credential delivery via email
  • Marketing emails to WiFi guests
  • Transactional notifications (expiry warnings, etc.)

Prerequisites

  • IronWifi account with captive portal
  • SendGrid account (sendgrid.com)
  • Verified sender domain or email

SendGrid Setup

Create API Key

  1. Log in to SendGrid
  2. Go to Settings > API Keys
  3. Click Create API Key
  4. Name: "IronWifi Integration"
  5. Select permissions:
    • Mail Send: Full Access
    • Marketing: Full Access (optional)
  6. Copy the API key (shown only once)

Verify Sender

  1. Go to Settings > Sender Authentication
  2. Either:
    • Domain Authentication: Verify your domain (recommended)
    • Single Sender: Verify a single email address
  3. Follow verification steps

IronWifi Configuration

Step 1: Add SendGrid Provider

  1. Log in to IronWifi Console
  2. Navigate to Networks > Captive Portals
  3. Select your captive portal
  4. Go to Integrations
  5. Click Add Integration > SendGrid

Step 2: Configure API

Enter SendGrid details:

  • API Key: Your SendGrid API key
  • From Email: Verified sender email
  • From Name: Display name (e.g., "Guest WiFi")

Step 3: Configure Email Templates

Welcome Email:

Subject: Welcome to {{network_name}}!

Hi {{name}},

Your WiFi access is ready.

Network: {{ssid}}
{{#if password}}Password: {{password}}{{/if}}

Enjoy your visit!

Credential Email:

Subject: Your WiFi Credentials

Hello {{name}},

Here are your WiFi login details:

Username: {{username}}
Password: {{password}}

Valid until: {{expiry}}

Email Types

Transactional Emails

Automated emails triggered by events:

EventEmail
Guest SignupWelcome email
Account CreatedCredentials email
Session ExpiringWarning email
Password ResetReset link email

Marketing Emails

Opt-in marketing communications:

  • Promotional offers
  • Newsletter signups
  • Return visit incentives
  • Event announcements

Template Configuration

Available Variables

Use these in email templates:

VariableDescription
{{name}}Guest name
{{email}}Guest email
{{username}}WiFi username
{{password}}WiFi password
{{ssid}}Network name
{{location}}WiFi location
{{expiry}}Access expiration
{{duration}}Access duration
{{network_name}}Network display name

Dynamic Content

Use conditionals in templates:

{{#if password}}
<p>Your password: <strong>{{password}}</strong></p>
{{else}}
<p>No password required - use your email to login.</p>
{{/if}}

SendGrid Templates

Use SendGrid Dynamic Templates

  1. In SendGrid, go to Email API > Dynamic Templates
  2. Create new template
  3. Design your email
  4. Note the Template ID
  5. In IronWifi, select SendGrid template option
  6. Enter the Template ID

Template Data

IronWifi sends data to SendGrid templates:

{
"name": "John Doe",
"email": "john@example.com",
"ssid": "Guest-WiFi",
"location": "Main Lobby",
"expiry": "2024-12-31"
}

Deliverability

Best Practices

  1. Authenticate domain - Set up SPF, DKIM, DMARC
  2. Warm up IP - Gradually increase sending volume
  3. Clean list - Remove bounced emails
  4. Monitor reputation - Check SendGrid analytics

Monitoring

Track email performance in SendGrid:

  • Delivery rate
  • Open rate
  • Click rate
  • Bounce rate
  • Spam complaints

Advanced Configuration

Categories and Tags

Organize emails with categories:

Category: wifi-welcome
Category: wifi-credentials
Category: wifi-marketing

Click Tracking

Enable click tracking for analytics:

  1. In SendGrid settings, enable click tracking
  2. Track links clicked in welcome emails
  3. Measure engagement

Unsubscribe Management

Configure unsubscribe handling:

  1. Enable SendGrid unsubscribe groups
  2. Add unsubscribe link to marketing emails
  3. Respect unsubscribe preferences

Troubleshooting

Emails Not Sending

  1. Verify API key is correct
  2. Check sender is verified
  3. Review SendGrid activity feed
  4. Check for blocked emails

Emails Going to Spam

  1. Authenticate your domain
  2. Check content for spam triggers
  3. Review sender reputation
  4. Warm up sending gradually

Template Errors

  1. Verify variable names match
  2. Check template syntax
  3. Test with SendGrid preview
  4. Review error logs

Compliance

GDPR

  1. Collect consent for marketing emails
  2. Include unsubscribe option
  3. Honor data deletion requests
  4. Document consent

CAN-SPAM

  1. Include physical address
  2. Clear unsubscribe mechanism
  3. Accurate sender information
  4. No misleading subject lines

Best Practices

  1. Keep emails simple - Clear, concise content
  2. Mobile-friendly - Responsive design
  3. Test thoroughly - Preview before sending
  4. Monitor metrics - Track and improve
  5. Segment audiences - Relevant content