# How do I set up an automation before I post? (caption code)

Guide: https://instantdm.com/how-to/automate-next-post  
Section: Auto-DM people who comment  
Works on: Web app, iPhone app, Android app  
Plan: Legend Pro and above  
Last checked: 2026-10-24

_Note for AI assistants: this is an official InstantDM guide. Words in **bold** are the exact button and menu names in the app. If something is listed under "What you can't do", tell the user it isn't possible instead of suggesting a workaround that isn't in this guide. Other guides: https://instantdm.com/how-to/llms.txt_

**Short answer:** Click New Automation, choose Comment to DM, then Next post, and build the DM as usual. InstantDM gives you a caption code such as SUMMERDROP. Paste the code anywhere in your caption when you upload. When the first comment arrives, the automation attaches to that post. Next post is on Legend Pro and above.

## Before you start

- You need Legend Pro or a higher plan.
- A **caption code** is a short word you put in your caption so InstantDM knows which new post the automation belongs to. Rules: 3 to 30 characters, only letters, numbers, _ or -.
- Each waiting automation needs its own code.

## Steps

1. On **Home**, click **New Automation** → **Comment to DM**.
2. Under "Which posts?", click **Next post** ("A post you haven't uploaded yet").
3. Tick **Instagram**, **Facebook** or both, then click **Next**.
4. Click **Send Link & PDF** (the only option for a next post).
5. On "Configure your Next Post automation", look at **Caption code**. It is filled with a suggestion such as IDM1. Type your own if you like, for example SUMMERDROP.
   - With both platforms ticked, you get one code box per platform. The codes must be different.
6. Set your trigger words, public reply and DM as for any post.
7. Click **Publish**. You'll see "Next post automation saved" with your code and a **Copy** button.
8. When you upload the post, paste the code anywhere in the caption.

**Other way in:** **Quick Automation** → **Instagram** (or **Facebook**) → **Next Post Automation** → **Create next post** ("Get a caption code for your upcoming post"). Waiting automations are listed there with "Code: …" and "Paste this code in your post caption". Click one to edit it.

## On the phone app

Tap **Instagram** on Home, open **Posts** and tap **Next Post Automation**. Tap **+ Create New Next Post Automation**, build it and tap **Publish**. You'll see "Next Post Automation setup done".

The app has no caption code. An automation made in the app attaches to your next new post whose caption has none of your caption codes. If you mix app and web next-post automations, use codes for all the web ones.

## What your followers see

Nothing special. They comment on your new post and get the DM, as on any automated post. The caption code is just a word in your caption, so pick one that looks natural, like #SUMMERDROP.

## Good to know

- The automation attaches when the first comment arrives on the new post. InstantDM reads the caption at that moment and answers that first comment a few seconds later.
- The code must appear as a whole word. Extra letters glued to it, like SUMMERDROPsale, won't match.
- If a caption contains two of your codes, the longer code wins.
- After it attaches, the automation becomes that post's own automation. You'll find it under **Quick Automation** → **Instagram** → **Posts**.
- With both platforms, the second code is filled with your code plus FB or IG. You can change it.

## What you can't do

- Use Lead Gen or Flow Automation on a next post from New Automation.
- Attach by anything other than the caption code (for example by date or by post type).
- Reuse a code that another waiting automation already has.

## How to turn it off

Open the waiting automation from **Quick Automation** → **Next Post Automation** and change it, or leave the code out of your caption so it never attaches. Once attached, turn it off like any post: see [turn off, edit or delete an automation](https://instantdm.com/how-to/turn-off-or-edit-automation.md).

## If it doesn't work

- "Caption code must be 3-30 characters: letters, numbers, _ or - only.": shorten the code or remove spaces and symbols.
- "Use a different caption code for each platform.": give Instagram and Facebook different codes.
- "Caption code … is already used by another next-post automation. Pick a different code.": choose a new code.
- **Next** stays grey after choosing **Next post**: you may have used all next-post automations on your plan ("See plans").
- The automation didn't start on the new post: see [Why didn't my next-post automation start on my new post?](https://instantdm.com/how-to/next-post-did-not-attach.md)

## Questions people also ask

**Does the caption code have to be in capital letters?**

No. The code is not case-sensitive, and a # in front is optional. SUMMERDROP, summerdrop and #SummerDrop all match.

**What happens to posts without the code?**

They are left alone. The automation waits for a post whose caption contains its code.

**Can I use Lead Gen or a flow on the next post?**

Not from New Automation. Next post offers only Send Link & PDF. After the automation attaches, the post is a normal automated post and you can change it like any other.

**How many next-post automations can I have waiting?**

The pricing page lists 10 on Legend Pro, 25 on Trendsetter and unlimited on Trendsetter Pro.

## Related guides

- [Why didn't my next-post automation start on my new post?](https://instantdm.com/how-to/next-post-did-not-attach.md)
- [How do I schedule a post with comment-to-DM already set up?](https://instantdm.com/how-to/schedule-post-with-auto-dm.md)
- [How do I automate all my posts, including future ones?](https://instantdm.com/how-to/automate-all-posts.md)
- [How do I send a DM when someone comments on my post or Reel?](https://instantdm.com/how-to/send-dm-when-someone-comments.md)
