How-To Guide

InstantDM Complete How-To Guide - Part 2: Post Automation & Flow Editor

This is Part 2 of the InstantDM Complete How-To Guide. For account setup, navigation, and basic automation tools, read Part 1 first.

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

This is Part 2 of the InstantDM Complete How-To Guide. For account setup, navigation, and basic automation tools, read Part 1 first.


9. Post Automation (Comment-to-DM)

Post Automation is one of InstantDM's most powerful features. It lets you set up automations on specific Instagram posts so that when someone comments a trigger word, they automatically receive a DM, a comment reply, or both.

What Is Post Automation?

Post Automation turns your Instagram posts and Reels into lead generation machines. When someone comments a keyword like "info" or "link" on your post, InstantDM can:

  • Send them a private DM with your content, links, or product info
  • Reply to their comment publicly (e.g., "Check your DMs! ✅")
  • Hide or delete the comment after processing
  • Gate the content behind a follow requirement

Setting Up Automation on a Specific Post or Reel

  1. Navigate to the Instagram DM section in the sidebar.
  2. You'll see a list of your recent Instagram posts and Reels (pulled from the Instagram API).
  3. Click on the post you want to automate. This opens the Post Automation configuration panel.
  4. Alternatively, click "Automate" or "Manage" next to any post in the list.

Trigger Words Configuration

In the Post Automation panel, configure your trigger words:

  1. Find the Trigger Words input field.
  2. Enter keywords separated by commas. Example: link, info, price, send, DM
  3. When someone comments any of these words on this specific post, the automation fires.
  4. Matching is case-insensitive - "LINK", "Link", and "link" all match.

Auto-Reply to Comments

When enabled, InstantDM will reply to the comment publicly. Configure:

  1. Toggle Reply Comments to ON.
  2. Add one or more reply texts. InstantDM rotates through them to avoid looking robotic.
    • Example replies: "Thanks for your comment ❤️, check your DM!", "Sent ✅", "Check DM 📧"
  3. InstantDM picks a random reply from your list each time, so the same person doesn't see the same response twice.

DM Reply Configuration (Text, Buttons, Images, Audio)

This is the core feature. When someone comments a trigger word:

  1. InstantDM sends them a private DM with your configured message.
  2. The DM can include:
Message Type Description
Text Plain text message with emoji, links, and line breaks
Buttons Card with title, description, and up to 3 tappable buttons (web links or postback actions)
Image A photo sent as a bubble in the DM conversation
Audio A voice note sent as a playable message
  1. The user sees the DM in their Instagram inbox within seconds.

Welcome Message with Follow Gate

The Welcome Message creates a clickable CTA button in the DM thread:

  1. Title - The headline text (e.g., "Thanks for your interest!")
  2. Description - Supporting text (e.g., "I'll help you get the info you need")
  3. Button Text - The CTA button label (e.g., "Get Started", "Send me the link")

When the user taps the button, the next step of your automation fires.

Followers-Only Mode

Toggle Followers Only to restrict automation to users who follow your account:

  • ON - Only followers receive the auto-DM. Non-followers see a message asking them to follow first.
  • OFF - Everyone who comments a trigger word gets the DM, regardless of follow status.

Ask Follow feature: When enabled and a non-follower triggers the automation:

  1. They receive a message like: "Hmm, looks like you haven't followed me. Follow me and click the button below."
  2. A button appears: "I Followed You"
  3. After they follow and click the button, the automation continues and sends them the content.

This is useful for growing your follower count while automating.

Auto-Hide and Auto-Delete Comments

Control what happens to comments after they trigger automation:

Feature What It Does
Auto-Hide Hides the comment from public view after the automation fires. The commenter can still see it, but others cannot. Useful for keeping your comment section clean.
Auto-Delete Permanently deletes the comment after the automation fires. More aggressive than hiding.

For both features, you can configure specific trigger words that activate the hide/delete behavior.

Story Reply Automation

You can also automate responses to Instagram Story replies:

  1. In the Post Automation panel (or Flow Editor), select Story Reply as a trigger type.
  2. Configure whether to respond to all stories or only specific stories.
  3. Set trigger words - or use Automate All to respond to every story reply.
  4. When someone replies to your Story with a matching keyword, they receive your automated DM.

Post Shared to DM Automation

Available on Trendsetter plans and above. When someone shares your post via DM to another user, this trigger fires and sends the sharer an automated message.

This is powerful for viral content - when your post gets shared, you can automatically engage with the person who shared it.

Boosted Reels Automation

Available on Trendsetter and above, and all Multi plans. When you boost a Reel as an ad, comments on the boosted Reel can still trigger your automation. This lets you capture leads from paid promotion alongside organic engagement.

Next Post Automation

Next Post Automation lets you pre-configure automation that will automatically apply to your next published post:

  1. Set up trigger words, DM replies, and comment replies in advance.
  2. When you publish your next Instagram post, the automation activates automatically.
  3. Available on all paid plans (Legend Pro gets 10 Next Post automations; higher plans get more).

This saves time if you post frequently and want the same automation on every new post.

Testing Your Automation

  1. After configuring your post automation, make sure it's toggled ON.
  2. Open Instagram on a different account (not the one connected to InstantDM).
  3. Navigate to the post you automated.
  4. Leave a comment containing one of your trigger words (e.g., "info").
  5. Within seconds, you should receive:
    • A public comment reply (if enabled)
    • A private DM with your configured message
  6. If nothing happens, check the Dashboard → Recent Automation Log for error messages.

10. Flow Editor Deep Dive

The Flow Editor is InstantDM's most powerful automation tool. It's a visual, node-based canvas where you build conversation flows by dragging, dropping, and connecting blocks.

The Visual Canvas (React Flow)

The canvas is powered by React Flow (@xyflow/react). Each element of your automation - triggers, messages, questions, AI replies, conditions - is represented as a node (a card on the canvas). Nodes are connected by edges (lines with arrows showing the direction of flow).

Basic canvas controls:

Action How To
Pan Click and drag on empty canvas space to move around
Zoom Scroll to zoom in/out, or use pinch gestures on trackpad
Select node Click on any node to select it. A blue border appears
Move node Click and drag a node to reposition it on the canvas
Connect nodes Drag from a source handle (right side of a node) to a target handle (left side of another node)
Delete edge Click on an edge to select it, then press Delete/Backspace

Understanding the Trigger Node (All 4 Trigger Types)

The Trigger Node is the entry point of every flow. It defines what activates your automation. You must have at least one trigger configured before you can publish.

Click the Trigger Node on the canvas, then click "Configure Trigger" to open the trigger settings panel.

1. DM Reply Trigger

Activates when a user sends you a Direct Message.

Setting Description
Enabled Toggle ON to activate this trigger type
Trigger Words Keywords that activate the flow, separated by commas (e.g., interested, info, price). Case-insensitive.
Automate All When ON, the flow fires on every incoming DM, regardless of keywords.
One-Time Only When ON, each user can only trigger this flow once. Prevents repeated triggers from the same person.

2. Story Reply Trigger

Activates when someone replies to one of your Instagram Stories.

Setting Description
Enabled Toggle ON to activate
Trigger Words Keywords in the story reply that activate the flow
Automate All Respond to every story reply regardless of keywords
All Stories When ON, watches all your stories. When OFF, you select specific stories.
Selected Posts If All Stories is OFF, choose which specific stories to watch

3. Comment Reply Trigger

Activates when someone comments on one of your Instagram posts.

Setting Description
Enabled Toggle ON to activate
Trigger Words Keywords in the comment that activate the flow
Automate All Respond to every comment regardless of keywords
All Posts When ON, watches comments on all your posts. When OFF, you select specific posts.
Selected Posts If All Posts is OFF, choose which specific posts to watch

4. Welcome Message Trigger

Creates a clickable CTA button that appears in the DM thread. When the user taps the button, the flow starts.

Setting Description
Title Headline text shown above the button (e.g., "Thanks for your interest!")
Description Supporting text (e.g., "Tap below to get started")
Button The CTA button label (e.g., "Get Started")

Multiple triggers on one flow: You can enable all four trigger types simultaneously on a single Trigger Node. The flow activates if any enabled trigger matches. This is powerful for creating a single automation that captures leads from multiple entry points.

Handle Types and Edge Connections

Every node has handles - small circles on the edges of the node card:

  • Target handle (left side) - Where incoming connections arrive.
  • Source handle (right side) - Where outgoing connections leave.

To connect two nodes:

  1. Hover over the source handle of Node A (right side). Your cursor changes to a crosshair.
  2. Click and drag from the source handle to the target handle of Node B (left side).
  3. Release. An edge (arrow line) appears connecting the two nodes.

The flow follows the direction of the arrows: left to right, from trigger to final message.

Trigger Node has three output handles:

Handle Position Purpose
Top handle Top of node Input handle for chaining flows (when another flow triggers this one)
Right handle Right side Primary output - connects to the first node in your flow
Bottom handle Bottom of node Welcome message output - connects to the path that fires when the welcome button is tapped

Adding Nodes from the Toolbar

The toolbar at the top of the Flow Editor contains buttons to add new nodes:

Node Type What It Does
Trigger The entry point - defines what activates the flow
Message Reply Sends content (text, images, audio, buttons, carousels)
Question Asks the user a question and captures their response
AI Reply Generates AI-powered responses using OpenAI or Claude
Followers Only Conditional gate - checks if user follows your account
Tag Contact Tags the user for segmentation
Trigger Flow Chains to another flow
Delay Adds a timed pause between messages

Click any button in the toolbar to add that node to the canvas. It appears at a default position, and you can drag it wherever you want.


11. Flow Editor Nodes

Message Reply Node

The Message Reply Node sends content to the user. It supports multiple message types within a single node, delivered in sequence.

Text Messages: Enter your text in the message field. Supports emoji, line breaks, and URLs (which become tappable links in Instagram DMs).

Hey! Thanks for reaching out 🎉

Here's what we offer:
• Product A  -  $29/month
• Product B  -  $49/month
• Product C  -  $99/month

Which one interests you?

Image Messages: Send a photo in the DM conversation. Provide a publicly accessible image URL (HTTPS required). Supported formats: JPG, PNG, GIF, WebP.

Audio / Voice Notes: Send a voice note. Provide a publicly accessible audio URL. Supported formats: OGG, WAV, MP3.

Video Messages: Send a video file. Provide a publicly accessible video URL. Supported formats: MP4.

Button Templates: Display a card with a title, optional description, optional thumbnail image, and up to 3 buttons.

Each button has:

  • Title - The button label (e.g., "Visit Website", "Product A - $99")
  • Type - Either web_url (opens a link) or postback (triggers a flow continuation)
  • URL - For web_url buttons, the link to open

Postback buttons are special - when the user taps one, it triggers the next step in your flow. Each postback button becomes a source handle on the node, so you can connect different buttons to different paths (branching).

Smart Replies (Quick Reply Buttons): Smart replies appear as tappable suggestion chips below your message. Unlike button templates, smart replies disappear after the user taps one.

Message: "What are you interested in?"
Smart Replies: ["Pricing", "Features", "Demo"]

Each smart reply becomes a source handle on the Message Reply node. Connect each one to a different path to create branching logic based on the user's choice.

Delays: Add a timed pause between messages within a Message Reply node.

Duration Type Code Example
Seconds s 3 seconds (simulates typing)
Minutes m 5 minutes (drip sequence)
Hours h 2 hours (follow-up reminder)

Tip: Add a 2 - 5 second delay between messages to simulate natural typing speed. This feels more human and reduces the chance of Instagram flagging your account.

Follow-Up Messages (Timeout-Based): Each message can have a follow-up duration. If the user doesn't respond within the specified time, a follow-up path activates. The follow-up creates a special purple source handle on the node. Connect it to the node you want to fire after the timeout.

Question Node

The Question Node asks the user a question and captures their response with built-in validation. This is how you collect leads, gather data, and build interactive conversations.

Question Types:

Type Validation Use Case Example Question
name Text format Full name collection "What's your full name?"
email Email format (must contain @) Lead email capture "What's your email address?"
phone Phone number format Contact number "What's your phone number?"
address Free text Shipping/billing address "What's your delivery address?"
text No validation Open-ended responses "Tell me about your project"
number Numeric only Quantities, budgets "What's your monthly budget?"
date Date format Scheduling, appointments "When would you like to meet?"
bool Yes/No only Decision trees "Would you like free shipping?"
rating 1 - 5 scale Feedback, satisfaction "Rate your experience (1-5)"

Custom Variables: Each question stores the user's response in a custom variable. You define the variable name (e.g., user_name, user_email, budget). Later in the flow, you can reference these variables in message text:

"Thanks {user_name}! We'll send the details to {user_email}."

Variables persist throughout the entire flow, so a question asked in step 2 can be referenced in step 10.

Skip Option: Enable the Skip option to let users skip a question without answering:

  1. Toggle Enable Skip to ON.
  2. Set the Skip Text - the button label (e.g., "Skip", "I'll answer later").
  3. When the user taps Skip, the flow continues to the next node without storing a response.

Retry Attempts and Wrong Input Messages:

  • Retry Attempts - How many times to re-ask before giving up (default: 3).
  • Wrong Input Message - The message shown when validation fails (e.g., "Please enter a valid email address").

Example: If you ask for an email and the user types "hello", InstantDM replies with your wrong input message and re-asks. After 3 failed attempts, the flow moves on.

Bool Questions for Yes/No Routing: Bool questions create two output paths:

  • Yes path - Fires when the user responds "Yes"
  • No path - Fires when the user responds "No"

This is the simplest way to create branching logic in your flow.

Followers Only Gate

The Followers Only node checks whether the user follows your Instagram account. It creates two output paths:

Path When It Fires
Follower path User follows your account → continue to next node
Non-follower path User does not follow → show a message asking them to follow

Configure the non-follower message:

  • Title - "Follow to unlock" (or your custom text)
  • Description - "Please follow our account to access this content"
  • Button - "Follow Now"

This is commonly used to gate premium content behind a follow requirement.

Tag Contact Node

The Tag Contact node labels the user for segmentation. Tags are stored and can be used for filtering contacts and conditional routing in other flows.

Configuration:

  • Action - add_tag
  • Tag Name - Your label (e.g., qualified-lead, pricing-inquiry, high-intent)
  • Tag Category - Optional grouping (e.g., lead_status, interest)

Place Tag Contact nodes at key points in your flow to track which path each user took.

Trigger Flow Node

The Trigger Flow node lets you chain flows together. When the user reaches this node, it starts a completely different flow.

This is useful for:

  • Keeping individual flows focused and manageable
  • Reusing common sub-flows (e.g., an email capture flow used by multiple parent flows)
  • Creating modular automation architectures

AI Reply Node

The AI Reply Node brings conversational AI into your flows. Instead of pre-written responses, the AI generates contextual, natural replies based on your configuration. See Section 13 for full AI Reply configuration details.

Delete Node

The Delete Node removes a node from the canvas. Select any node and press Delete/Backspace, or use the delete option in the node's context menu.


12. Flow Editor Operations

Saving Drafts (Auto-Save to Firebase)

Every change you make in the Flow Editor is automatically saved as a draft to Firebase Firestore. You don't need to manually save while working. If you close the browser and come back later, your draft will be exactly where you left it.

Publishing Flows (Validation Checks)

Before a flow can go live, InstantDM runs validation:

Check Requirement
Flow name Must be set (not "Un-named")
Trigger node At least one trigger must be configured and enabled
AI API key If the flow contains an AI Reply node, the corresponding API key must be present in Settings
No orphaned edges All edges must connect to existing nodes

If any check fails, you'll see an error notification explaining what needs to be fixed.

Save Draft vs. Publish:

Action What It Does
Save Draft Saves the current state to Firebase Firestore. The flow is NOT live - it won't respond to any triggers. Use this while you're still building.
Publish Validates the flow, then syncs it to the live system. The flow starts responding to triggers immediately.

Undo/Redo

  • Undo - Press Ctrl+Z (Windows) or Cmd+Z (Mac) to undo the last action.
  • Redo - Press Ctrl+Shift+Z or Cmd+Shift+Z to redo.

Works for adding nodes, deleting nodes, moving nodes, creating edges, and deleting edges.

Sharing Flows (Download, Share Link)

You can share a flow with others via a shared link:

  1. In the Automation List, click the Share icon on any published flow.
  2. A shareable URL is generated (e.g., /shared-flow/{flowId}).
  3. Anyone with the link can view the flow structure (but not edit or publish it to their account).

Duplicating Flows

  1. Go to the Automation List page.
  2. Find the flow you want to duplicate.
  3. Click the Duplicate icon (copy icon).
  4. A new draft is created with all the same nodes, edges, and configuration.
  5. Edit the duplicate as needed and publish.

Troubleshooting Failed Flows

"Flow failed to publish - trigger node required"

  • Add a Trigger Node to your canvas and configure at least one trigger type.

"AI node requires API key"

  • Go to Settings → AI Configuration and enter your API key for the provider used in your AI node.

"Flow name required"

  • Click on the flow name at the top of the editor and give it a descriptive name.

After 2 consecutive publish failures: InstantDM suggests duplicating the flow and re-publishing. Click Duplicate to create a copy, then try publishing the copy.

Templates: Pre-Built Flow Templates

InstantDM provides pre-built flow templates for common use cases. When creating a new flow, you can start from a template instead of a blank canvas. Templates include pre-configured nodes and edges that you can customize to fit your needs.

Integrations Popup (Webhook Toggle Per Flow)

Click the Integrations button in the Flow Editor toolbar to see available integrations:

Integration Status Description
Webhook Available Toggle ON/OFF to control whether events from this flow are sent to your configured webhook URL
ConvertKit Coming Soon Sync leads directly to ConvertKit email lists
Mailchimp Coming Soon Sync leads directly to Mailchimp audiences

Each flow has a webhook toggle that controls whether events from this flow are sent to your configured webhook URL:

  • ON - Events from this flow (comments, DMs, question answers, flow completions) are sent to your webhook.
  • OFF - Events from this flow are not sent to webhooks, even if webhooks are configured globally.

You can also toggle this in the Automation List next to each flow.


13. AI Reply Configuration

The AI Reply Node (aiReplyNode) brings conversational AI into your flows. Instead of pre-written responses, the AI generates contextual, natural replies based on your configuration.

Supported Providers and Models

Provider Available Models API Key Setting
Claude (Anthropic) Claude Opus, Claude Sonnet, Claude Haiku (multiple versions) anthropic key in Settings → AI Configuration
OpenAI GPT-4o, GPT-4o Mini, GPT-4, GPT-3.5 Turbo (multiple versions) openai key in Settings → AI Configuration

API Key Setup in Settings → AI Configuration

Before publishing a flow with an AI node, you must add your API key:

  1. Go to Settings (sidebar) → AI Configuration tab.
  2. Enter your OpenAI API key (get one at platform.openai.com) and/or your Anthropic API key (get one at console.anthropic.com).
  3. Click Save.

If you try to publish a flow with an AI node but haven't added the corresponding API key, you'll get an error: "AI node requires API key."

Guided Mode vs. Custom Mode

Guided Mode - Structured fields that help you configure the AI without writing a full prompt:

Field Description Example
Business Description What your business does "We sell handmade jewelry on Instagram"
Offer Current promotion or offer "20% off all items this week"
Voice & Tone How the AI should sound "Friendly, knowledgeable, casual"
CTA What action you want users to take "Visit our website or DM us to order"
Qualification Flow Questions the AI should ask to qualify leads "Ask about style preference, budget, and occasion"

InstantDM combines these fields into a system prompt behind the scenes.

Custom Mode - Full prompt control. Write your own system prompt:

You are a friendly sales assistant for a handmade jewelry brand.
Your goal is to help customers find the perfect piece.
Always ask about the occasion, their style preference, and budget.
If they seem interested, share the link: https://yoursite.com/shop
Keep responses under 3 sentences. Use emoji sparingly.

Click "See Examples" to load sample prompts for common use cases (E-commerce Store, Fitness Coach, Real Estate Agent, etc.).

Output Format

Format Description
Rich Text (recommended) Supports buttons, quick replies, and formatted messages alongside AI text
Plain Text Text-only AI responses with no interactive elements

Advanced Settings

Setting Description Default
Reply Mode Single sends one message per turn. Multi splits long responses into shorter messages. Single
Max Messages Maximum messages per AI turn (for Multi mode) 3
Max Tokens Maximum response length in tokens 1024
Recent Chat Limit How many recent messages to include as context 50

Testing AI Responses

  1. Add an AI Reply Node to your flow and configure it.
  2. Connect it after a trigger or question node.
  3. Click Save Draft.
  4. Send a test DM from another account to trigger the flow.
  5. Review the AI's response for accuracy, tone, and helpfulness.
  6. Adjust your prompt fields and retest until you're satisfied.

Best Practices for AI Prompts

  • Be specific about your business - The more context you give the AI, the better its responses.
  • Set clear boundaries - Tell the AI what topics to avoid and when to hand off to a human.
  • Keep responses short - Instagram DMs are a casual medium. Long paragraphs feel unnatural. Aim for 1 - 3 sentences per message.
  • Include your CTA - Always tell the AI what action you want users to take (visit a link, book a call, reply with their email).
  • Test with real scenarios - Send test messages that mimic what your actual audience would say.
  • Use Multi reply mode - For longer responses, Multi mode splits them into shorter messages that feel more conversational.

Summary: Key Takeaways from Part 2

  • Post Automation turns post comments into private DM conversations with trigger words, auto-replies, welcome messages, and follow gates.
  • Story reply, post shared to DM, boosted reels, and next post triggers extend automation beyond regular posts.
  • Auto-hide and auto-delete keep your comment section clean after automation fires.
  • The Flow Editor is a visual node-and-edge canvas where triggers start flows, messages deliver content, and logic nodes create branching paths.
  • Four trigger types (DM Reply, Story Reply, Comment Reply, Welcome Message) can coexist on a single Trigger Node.
  • Message Reply nodes support text, images, audio, video, buttons, product carousels, smart replies, delays, and follow-up timeouts.
  • Question nodes capture data with built-in validation (name, email, phone, etc.) and store responses in custom variables.
  • Conditional logic includes Followers Only gates, smart reply branching, bool question branching, Tag Contact for segmentation, and Trigger Flow for chaining.
  • AI Reply nodes support OpenAI and Claude with guided or custom prompts, configurable response behavior, and multiple output formats.
  • Publishing validates triggers, flow names, and AI keys before going live. Drafts auto-save to Firestore.
  • Per-flow webhook toggles control which flows send events to your external integrations.

Continue to Part 3 for Shopify integration, Facebook & Messenger automation, API & Webhooks, team management, referral program, settings, plans & pricing, analytics, safety, and troubleshooting.

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.