Integration Guide

How to Set Up Custom Email Alerts for InstantDM (Step-by-Step Guide)

Learn how to send custom email notifications when Instagram DM leads are captured via InstantDM. Step-by-step guide using SMTP, SendGrid, and automation platforms.

Meta Business Partner
30,000+ creators
$9.99/mo flat

Email alerts are the simplest way to get notified when something happens on your Instagram automations. This guide shows you how to send custom email notifications when leads are captured, comments are posted, or DMs are received - using SMTP, SendGrid, or automation platforms.


Why Set Up Email Alerts?

  • Universal - everyone checks email; no new apps to install
  • Customizable - format the email exactly how you want
  • Archivable - email creates a searchable record of all Instagram activity
  • Filterable - use email rules to sort alerts by type, priority, or campaign
  • Free - most methods cost nothing or very little

Common Use Cases

  • Get an email when someone completes a lead capture flow
  • Send a daily digest of Instagram activity
  • Alert specific team members based on lead interest
  • Forward lead data to an email address that feeds into your CRM
  • Get notified of comments containing specific keywords

What You'll Need

Requirement Details
InstantDM account Trendsetter, Trendsetter Pro, or any Multi plan
InstantDM API key Found at Settings → API in your InstantDM dashboard
Email sending method SMTP, SendGrid, SES, or automation platform

Method 1: Via Make.com (Easiest)

Step 1: Set Up the Webhook

Follow Steps 1-4 in the Make.com integration guide.

Step 2: Add an Email Module

  1. After the webhook trigger, add a Filter: event equals flow_completed.
  2. Click "+" and search for Email or Gmail.
  3. Select Send an Email.
  4. Connect your email account.

Step 3: Configure the Email

Field Value
To you@yourdomain.com
Subject 🎯 New Instagram Lead: {{data.response_variables.full_name}}
Body See template below

Email body:

New lead from Instagram!

Name: {{data.response_variables.full_name}}
Email: {{data.response_variables.email}}
Phone: {{data.response_variables.phone}}
Interest: {{data.response_variables.interest}}
Instagram: @{{data.username}}
Flow: {{data.flow_name}}
Time: {{timestamp}}

---
Sent by InstantDM via Make.com

Step 4: Test and Activate

  1. Run once, trigger a test event, verify the email arrives.
  2. Activate the scenario.

Method 2: Via SendGrid API

SendGrid offers 100 free emails/day - plenty for lead alerts.

Step 1: Get a SendGrid API Key

  1. Sign up at sendgrid.com.
  2. Go to Settings → API Keys → Create API Key.
  3. Give it "Mail Send" permission.
  4. Copy the key.

Step 2: Build a Webhook Receiver

const express = require('express');
const app = express();
app.use(express.json());

const SENDGRID_API_KEY = process.env.SENDGRID_API_KEY;
const ALERT_EMAIL = 'you@yourdomain.com';
const FROM_EMAIL = 'alerts@yourdomain.com';

app.post('/instantdm-webhook', async (req, res) => {
  const { event, timestamp, data } = req.body;
  
  if (event !== 'flow_completed') {
    return res.status(200).json({ status: 'skipped' });
  }
  
  const name = data.response_variables?.full_name || data.username;
  const email = data.response_variables?.email || 'N/A';
  const phone = data.response_variables?.phone || 'N/A';
  const interest = data.response_variables?.interest || 'N/A';
  
  const htmlBody = `
    <h2>🎯 New Instagram Lead</h2>
    <table style="border-collapse: collapse; width: 100%; max-width: 500px;">
      <tr><td style="padding: 8px; border: 1px solid #ddd;"><strong>Name</strong></td><td style="padding: 8px; border: 1px solid #ddd;">${name}</td></tr>
      <tr><td style="padding: 8px; border: 1px solid #ddd;"><strong>Email</strong></td><td style="padding: 8px; border: 1px solid #ddd;"><a href="mailto:${email}">${email}</a></td></tr>
      <tr><td style="padding: 8px; border: 1px solid #ddd;"><strong>Phone</strong></td><td style="padding: 8px; border: 1px solid #ddd;">${phone}</td></tr>
      <tr><td style="padding: 8px; border: 1px solid #ddd;"><strong>Interest</strong></td><td style="padding: 8px; border: 1px solid #ddd;">${interest}</td></tr>
      <tr><td style="padding: 8px; border: 1px solid #ddd;"><strong>Instagram</strong></td><td style="padding: 8px; border: 1px solid #ddd;"><a href="https://instagram.com/${data.username}">@${data.username}</a></td></tr>
      <tr><td style="padding: 8px; border: 1px solid #ddd;"><strong>Flow</strong></td><td style="padding: 8px; border: 1px solid #ddd;">${data.flow_name}</td></tr>
      <tr><td style="padding: 8px; border: 1px solid #ddd;"><strong>Time</strong></td><td style="padding: 8px; border: 1px solid #ddd;">${new Date(timestamp).toLocaleString()}</td></tr>
    </table>
  `;
  
  try {
    const response = await fetch('https://api.sendgrid.com/v3/mail/send', {
      method: 'POST',
      headers: {
        'Authorization': `Bearer ${SENDGRID_API_KEY}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        personalizations: [{ to: [{ email: ALERT_EMAIL }] }],
        from: { email: FROM_EMAIL, name: 'InstantDM Alerts' },
        subject: `🎯 New Instagram Lead: ${name}`,
        content: [
          { type: 'text/html', value: htmlBody },
        ],
      }),
    });
    
    res.status(200).json({ status: response.status === 202 ? 'sent' : 'error' });
  } catch (error) {
    res.status(500).json({ status: 'error', message: error.message });
  }
});

app.listen(3000);

Method 3: Via SMTP (Nodemailer)

Use any SMTP server (Gmail, Outlook, your own mail server).

const express = require('express');
const nodemailer = require('nodemailer');
const app = express();
app.use(express.json());

const transporter = nodemailer.createTransport({
  host: 'smtp.gmail.com',
  port: 587,
  secure: false,
  auth: {
    user: process.env.SMTP_USER,
    pass: process.env.SMTP_PASS, // Use an App Password for Gmail
  },
});

app.post('/instantdm-webhook', async (req, res) => {
  const { event, timestamp, data } = req.body;
  
  if (event !== 'flow_completed') {
    return res.status(200).json({ status: 'skipped' });
  }
  
  const name = data.response_variables?.full_name || data.username;
  
  try {
    await transporter.sendMail({
      from: '"InstantDM Alerts" <alerts@yourdomain.com>',
      to: 'you@yourdomain.com',
      subject: `🎯 New Instagram Lead: ${name}`,
      text: [
        `New lead from Instagram!`,
        ``,
        `Name: ${name}`,
        `Email: ${data.response_variables?.email || 'N/A'}`,
        `Phone: ${data.response_variables?.phone || 'N/A'}`,
        `Interest: ${data.response_variables?.interest || 'N/A'}`,
        `Instagram: @${data.username}`,
        `Flow: ${data.flow_name}`,
        `Time: ${new Date(timestamp).toLocaleString()}`,
      ].join('\n'),
    });
    
    res.status(200).json({ status: 'sent' });
  } catch (error) {
    res.status(500).json({ status: 'error', message: error.message });
  }
});

app.listen(3000);

Gmail note: Use an App Password instead of your regular password. Enable 2FA first.


Routing Alerts to Different Recipients

Send different events to different people:

const ALERT_ROUTING = {
  flow_completed: ['sales@yourcompany.com', 'manager@yourcompany.com'],
  comment: ['social@yourcompany.com'],
  dm_received: ['support@yourcompany.com'],
};

app.post('/instantdm-webhook', async (req, res) => {
  const { event } = req.body;
  const recipients = ALERT_ROUTING[event] || ['default@yourcompany.com'];
  
  // Send to all recipients
  for (const email of recipients) {
    await sendAlert(email, req.body);
  }
  
  res.status(200).json({ status: 'sent', recipients: recipients.length });
});

Daily Digest (Alternative to Real-Time)

Instead of an email per event, send a daily summary:

  1. Store events in a database or file throughout the day.
  2. Use a cron job (or scheduled Make.com scenario) to compile and send a digest.
  3. Include counts, top leads, and notable activity.

In Make.com:

  1. Use a Scheduled trigger (daily at 9 AM).
  2. Query your data store or Google Sheet for the day's events.
  3. Compile into a single email.

Troubleshooting

Issue Solution
Email not arriving Check spam/junk folder. Verify the from address is authorized (SPF/DKIM for custom domains).
Gmail blocking sends Use an App Password, not your regular password. Enable "Less secure apps" or use OAuth2.
SendGrid returning 403 Verify your API key has "Mail Send" permission. Check that your sender identity is verified.
Emails going to spam Set up SPF, DKIM, and DMARC records for your sending domain. Use a consistent from address.
Too many emails Add filters to only alert on important events. Consider a daily digest instead of real-time alerts.
HTML not rendering Some email clients strip HTML. Always include a plain text fallback.

Frequently Asked Questions

Which email method should I use?

  • Make.com/Zapier: Easiest, no code required. Best for non-developers.
  • SendGrid: Best for production use. Reliable delivery, analytics, and 100 free emails/day.
  • SMTP/Nodemailer: Best if you already have an SMTP server. No additional service needed.

Can I send alerts to multiple email addresses?

Yes. In Make.com, add multiple email addresses separated by commas. In code, loop through an array of recipients.

How do I avoid email fatigue?

Filter events to only the important ones (e.g., only flow_completed, not every comment). Use a daily digest for lower-priority events. Set up email rules to organize alerts into folders.

Can I use Amazon SES instead of SendGrid?

Yes. Amazon SES is even cheaper ($0.10 per 1,000 emails). Replace the SendGrid API call with the SES SDK. The webhook receiver logic stays the same.


What's Next

Ready to Automate Your Instagram DMs?

Join 30,000+ creators and brands using InstantDM today.

Start Your Free Trial

No credit card required. Setup in under 15 minutes.