Integration Guide

How to Connect InstantDM with Discord (Step-by-Step Guide)

Learn how to send Discord notifications when Instagram DM leads are captured via InstantDM. Step-by-step guide for setting up Discord webhook alerts for Instagram activity.

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

Discord webhooks let you send formatted messages to any Discord channel. Connecting InstantDM to Discord gives your team instant notifications when someone comments on your post, completes a DM flow, or sends a message - all without leaving Discord.


Why Use Discord with InstantDM?

  • Zero cost - Discord webhooks are completely free
  • Instant alerts - notifications appear in real-time
  • Rich embeds - formatted messages with colors, fields, and links
  • Channel routing - send different events to different channels
  • Team visibility - everyone in the channel sees new leads and activity
  • No third-party platform needed - works with a simple webhook URL, no Make.com or Zapier required

Common Use Cases

  • Get notified when someone completes a lead capture flow
  • Alert your team when a high-value comment is posted
  • Log all Instagram DM activity in a dedicated channel
  • Route different event types to different channels
  • Create a real-time Instagram activity feed for your team

What You'll Need

Requirement Details
InstantDM account Trendsetter, Trendsetter Pro, or any Multi plan
Discord server With permission to manage webhooks
InstantDM API key Found at Settings → API in your InstantDM dashboard

Method 1: Direct Webhook (Simplest)

This method uses a small middleware to convert InstantDM webhooks to Discord's format.

Step 1: Create a Discord Webhook

  1. Open your Discord server.
  2. Go to the channel where you want notifications (e.g., #instagram-leads).
  3. Click the gear iconIntegrationsWebhooks.
  4. Click New Webhook.
  5. Name it InstantDM and optionally set an avatar.
  6. Click Copy Webhook URL.

Step 2: Build a Webhook Relay

Since InstantDM's webhook format differs from Discord's, you need a small relay:

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

const DISCORD_WEBHOOK_URL = process.env.DISCORD_WEBHOOK_URL;

const EVENT_COLORS = {
  flow_completed: 0x00ff00,  // Green
  comment: 0x3498db,         // Blue
  dm_received: 0x9b59b6,     // Purple
  postback: 0xf39c12,        // Orange
  question_answered: 0x1abc9c, // Teal
};

app.post('/instantdm-webhook', async (req, res) => {
  const { event, timestamp, data } = req.body;
  
  const embed = {
    title: formatEventTitle(event),
    color: EVENT_COLORS[event] || 0x95a5a6,
    fields: buildFields(event, data),
    timestamp: timestamp,
    footer: { text: 'InstantDM' },
  };
  
  try {
    await fetch(DISCORD_WEBHOOK_URL, {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({
        username: 'InstantDM',
        embeds: [embed],
      }),
    });
    
    res.status(200).json({ status: 'sent' });
  } catch (error) {
    res.status(500).json({ status: 'error', message: error.message });
  }
});

function formatEventTitle(event) {
  const titles = {
    flow_completed: '🎯 Flow Completed',
    comment: '💬 New Comment',
    dm_received: '📩 DM Received',
    postback: '🔘 Button Clicked',
    question_answered: '✅ Question Answered',
  };
  return titles[event] || `📌 ${event}`;
}

function buildFields(event, data) {
  const fields = [
    { name: 'Instagram', value: `@${data.username}`, inline: true },
  ];
  
  switch (event) {
    case 'flow_completed':
      fields.push(
        { name: 'Flow', value: data.flow_name || 'N/A', inline: true },
        { name: 'Email', value: data.response_variables?.email || 'N/A', inline: true },
        { name: 'Phone', value: data.response_variables?.phone || 'N/A', inline: true },
        { name: 'Name', value: data.response_variables?.full_name || 'N/A', inline: true },
        { name: 'Interest', value: data.response_variables?.interest || 'N/A', inline: true },
      );
      break;
    case 'comment':
      fields.push(
        { name: 'Comment', value: data.comment_text || 'N/A', inline: false },
        { name: 'Post', value: data.post_url ? `[View Post](${data.post_url})` : 'N/A', inline: true },
      );
      break;
    case 'dm_received':
      fields.push(
        { name: 'Message', value: data.message_text || 'N/A', inline: false },
      );
      break;
  }
  
  return fields;
}

app.listen(3000);

Step 3: Configure InstantDM

  1. Deploy the relay to a public URL.
  2. In InstantDM Settings → API, paste the relay URL.
  3. Select all events you want to forward.
  4. Save.

Method 2: Via Make.com

Step 1: Set Up the Webhook

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

Step 2: Add a Discord Module

  1. After the webhook trigger, add Discord → Send a Message via Webhook.
  2. Paste your Discord webhook URL.
  3. Configure the message:

Simple text message:

🎯 **New Instagram Lead!**
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}}

Step 3: Test and Activate

  1. Run once in Make.com.
  2. Trigger a test event.
  3. Check your Discord channel.
  4. Activate the scenario.

Method 3: Via Zapier

  1. Set up a webhook trigger per the Zapier guide.
  2. Add Discord → Send Channel Message (requires Discord bot) or use Webhooks by Zapier → POST to send to the Discord webhook URL.
  3. Format the message and activate.

Channel Routing

Send different events to different Discord channels:

Multiple Webhooks

Create separate Discord webhooks for each channel:

  • #instagram-leads - flow_completed events
  • #instagram-comments - comment events
  • #instagram-dms - dm_received events

In Your Relay

const WEBHOOKS = {
  flow_completed: process.env.DISCORD_LEADS_WEBHOOK,
  comment: process.env.DISCORD_COMMENTS_WEBHOOK,
  dm_received: process.env.DISCORD_DMS_WEBHOOK,
};

app.post('/instantdm-webhook', async (req, res) => {
  const { event } = req.body;
  const webhookUrl = WEBHOOKS[event] || WEBHOOKS.flow_completed;
  // ... send to the appropriate channel
});

Rich Embed Examples

Lead Capture Embed

{
  "username": "InstantDM",
  "embeds": [{
    "title": "🎯 New Instagram Lead",
    "color": 65280,
    "fields": [
      { "name": "Name", "value": "John Doe", "inline": true },
      { "name": "Email", "value": "john@example.com", "inline": true },
      { "name": "Phone", "value": "+1234567890", "inline": true },
      { "name": "Interest", "value": "Premium Plan", "inline": true },
      { "name": "Flow", "value": "Lead Capture Flow", "inline": true },
      { "name": "Instagram", "value": "@johndoe", "inline": true }
    ],
    "timestamp": "2025-01-15T10:30:00Z",
    "footer": { "text": "InstantDM" }
  }]
}

Comment Alert Embed

{
  "username": "InstantDM",
  "embeds": [{
    "title": "💬 New Instagram Comment",
    "color": 3447003,
    "description": "I want pricing info!",
    "fields": [
      { "name": "User", "value": "@janedoe", "inline": true },
      { "name": "Post", "value": "[View Post](https://instagram.com/p/ABC123)", "inline": true }
    ],
    "timestamp": "2025-01-15T10:32:00Z"
  }]
}

Troubleshooting

Issue Solution
No message in Discord Verify the webhook URL is correct. Test it with a simple curl command. Check that the relay is running and publicly accessible.
Embed not rendering Ensure the JSON structure matches Discord's embed format. Color must be a decimal number, not hex string.
Rate limited (429) Discord webhooks have a rate limit of 30 messages per minute per channel. If you're sending too many events, batch them or filter to important events only.
Webhook URL invalid Discord webhook URLs start with https://discord.com/api/webhooks/. If it doesn't, recreate the webhook.
Message too long Discord messages have a 2000 character limit. Embeds have a 6000 character total limit. Truncate long content.

Frequently Asked Questions

Do I need a Discord bot for this?

No. Discord webhooks work without a bot. You just need the webhook URL from your channel settings. A bot is only needed if you want to receive commands or interact with messages.

Can I mention roles or users in the notification?

Yes. Use Discord mention syntax in the message content: <@USER_ID> for users, <@&ROLE_ID> for roles. You'll need to enable "Mention everyone, here, and all roles" in the webhook settings.

How many notifications can I send?

Discord webhooks support up to 30 messages per minute per channel. For high-volume accounts, filter to only important events (like flow_completed) or batch notifications.

Can I use Discord threads?

Yes, with the thread_id parameter in the webhook URL: WEBHOOK_URL?thread_id=THREAD_ID. This keeps notifications organized in a thread instead of flooding the main channel.


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.