How to Add a Discount Code to an Instagram Auto DM
To send a discount code in an Instagram DM automatically, set a keyword on your post, write the code into the DM alongside your checkout link, and turn the automation on. When someone comments the keyword, the code lands in their inbox in about a second. The Viralyze app lets you add an auto-pause rule as well, so a "first 50 only" offer actually stops at 50.
The code itself is just text in the message. What makes it work is pairing it with the right link and the right limit.
Why send a discount code by DM instead of in the caption?
A code in the caption is visible to everyone and gets copied around. A code in a DM feels earned, because the person had to comment to get it, and it starts a private conversation you can follow up.
It also gives you data. Each DM sent is a lead with a source tag, and the link click shows who moved from code to checkout.
How do I set it up step by step?
1. Open Viralyze and create a new automation on the post that announces the offer. 2. Add the keyword, for example OFFER, plus a variant like DISCOUNT. 3. Write the DM: a one-line thank you, the code, and your checkout page. 4. Optionally turn on the follow-gate so new visitors follow before the code is sent. 5. Set an auto-pause: after N DMs for a limited offer, or on a date for a weekend sale. 6. Test "offer" and "Offer pls" in the live tester, then go live.
Keep the DM short. The code should be easy to copy on a phone screen.
A sample discount DM you can adapt
Picture a skincare brand running a weekend sale on a vitamin C serum.
"Hi! Here is your weekend code: GLOW15 for 15% off the serum. Use it at checkout here: [your product page]. Valid till Sunday midnight."
Viralyze adds AI variations so each person's message reads slightly differently, which stops the thread from looking copy-pasted when several buyers compare notes. The code stays the same in every variation; only the wording around it shifts.
Where does the discount actually get applied?
Inside your checkout. If you sell through the Viralyze shop, the DM carries your product checkout page, and customers pay by UPI, card or net banking with 0% platform fee. The code you promise in the DM must match a promo code set up on that product.
If you sell elsewhere, paste that store's product link and make sure the code is live there before the automation starts. Nothing is worse than a DM promising a code the checkout rejects.
Can I limit how many people get the code?
Yes, and you should for anything positioned as scarce. The auto-pause rule stops the automation after a set number of DMs, so if you say "first 100 commenters", set the limit to 100.
For time-boxed sales, use the date option instead: start on Friday 6 PM, auto-pause Sunday 11:59 PM. Once paused, late commenters get no DM, and you can update the public reply to say the sale has ended.
Frequently asked questions
**Can I send different codes for different keywords?** Yes. Put BUNDLE and SINGLE on the same post, each with its own DM and code, and the app routes by keyword.
**Will the same person get the code twice?** Each comment can receive one private reply under Instagram's rules, so a second comment on a different post could trigger again; keep the offer on one post if that matters.
**Does the DM count toward a plan limit?** No. Both Viralyze plans include unlimited Instagram Auto-DMs with flat pricing, so a busy sale does not change your bill.
Start your 7-day free trial of Viralyze, no card needed, and run your next offer as a keyword instead of a caption.