Blog

The lead machine: automated Instagram DMs from a comment keyword, run from Claude

Post something useful, ask people to comment a keyword, and every commenter gets the link in their DMs. Then have Claude review the week bluntly. The whole loop on Instagram, Facebook and X with Hermoso.

You've seen these posts. "Comment GUIDE and I'll send it to you." Hundreds of people comment, and somehow every one of them gets a DM within seconds. It works because it asks for almost nothing: one word, typed where the person already is.

The people pulling this off aren't up at 2am typing DMs. They have a rule doing it. And lately, the smartest ones have their AI running the whole loop: making the freebie, posting it, sending the DMs and telling them every Monday what flopped. Here's how to build that loop with Hermoso and Claude (or ChatGPT, or whichever AI you use).

The loop in one picture

  1. Make something worth commenting for. A checklist, a template, a short guide.
  2. Post it with a clear ask: comment a keyword to get it.
  3. A rule DMs everyone who comments the keyword, with a button to the resource.
  4. Log who it reached in a Google Sheet.
  5. Review the week bluntly, then make the next post better.

Hermoso handles every step, and your AI drives it through one connection. If you haven't connected yet, connect your accounts once and come back. It takes about five minutes.

Where it works (and where it doesn't)

  • Instagram: a keyword comment on one post, your next post or any post gets a private reply in DMs. DMs, story replies and ig.me links can trigger it too. Free, no credits.
  • Facebook: a keyword comment on a Page post or an ad gets a reply in Messenger. Free, no credits.
  • X: a keyword mention or reply gets a public reply with the link. X only allows an automated DM after the person has messaged you first, and X charges per API call, so X rules use credits.
  • LinkedIn: not this one. LinkedIn keeps its messaging API to a small set of approved partners, and Hermoso isn't one of them, so nothing can send LinkedIn DMs for you here. You can still post to LinkedIn and reply to comments on your company Page from your AI. If you want leads from LinkedIn, a LinkedIn lead gen form ad does the job, and Hermoso reads those leads with list_linkedin_leads.
The rule editor in the app: test a sample comment and the preview shows the exact DM the person would get. Testing never sends anything.

Step 1: make the freebie

It has to be specific and genuinely useful. "Our tips" won't get comments. "The 7 settings I change on every new Shopify store" will.

Ask your AI to make it with Hermoso. A swipeable carousel works on Instagram, or a one-page guide saved as a Google Doc if you've connected Drive:

Prompt to copy

"Using Hermoso, write a one-page guide called '7 candle care mistakes that waste half your jar'. Save it as a Google Doc. Then make a 5-slide Instagram carousel teasing the first three mistakes, in our brand, with the last slide saying: comment GUIDE and I'll DM you the rest."

Your AI writes the guide, Hermoso saves it to your Drive with create_doc, and the carousel comes out in your brand's colours and fonts. Share the Doc (or host the guide on your site) so you have a link to send.

Step 2: set up the DM rule, in practice mode first

Prompt to copy

"Create an Instagram DM automation on my next Reel: anyone who comments GUIDE gets a DM saying 'Here's the candle care guide you asked for!' with a 'Get the guide' button linking to [your link]. Reply publicly with 'Sent it to your DMs!' Put it in practice mode for now, then test it with the comment 'guide please'."

Behind the scenes that's save_dm_automation with dryRun on, followed by test_dm_automation. Practice mode logs what it would have sent and sends nothing, so you can watch a few real comments roll in and check the wording before anyone gets a message. When it looks right: "Switch the GUIDE automation to live."

A few things it handles for you. Each person gets one DM per post, even if they comment GUIDE three times. Capitals and accents don't matter. And anyone who replies STOP is opted out.

Want the same on Facebook? "Do the same on my Facebook Page, for any post or ad." That's one more rule, sent through Messenger.

Step 3: post it

Prompt to copy

"Schedule the carousel to Instagram for Thursday at 9am, and post a version to Facebook at the same time. Write a caption that ends with: comment GUIDE and I'll send it to you."

That's schedule_post. Since the rule is set to your next post, it attaches itself to this one the moment it goes live. Posting and scheduling cost no credits.

The Hermoso Automations page with three DM automations: a live Instagram comment-to-DM rule with 214 sent, a Facebook rule in practice mode with 17 practice sends, and a live X mention rule
Each rule shows what it sent, what it skipped (repeat comments from the same person) and anything that failed. Demo brand data.

Step 4: keep a lead list

Every send is logged with the person's handle and what they wrote. Ask for it whenever you like:

Prompt to copy

"List everyone the GUIDE automation sent to this week and add them to a Google Sheet called 'Guide leads' with the date, channel, handle and their comment. Skip anyone already on the sheet."

That's list_dm_automations for the send log, then create_sheet and append_to_sheet. A handle isn't an email address, so if you want emails, make the guide page ask for one. Then it's a real list you can follow up with.

Step 5: the blunt Monday review

This is the part that turns a lucky post into a machine. Once a week, ask for the truth:

Prompt to copy

"Review last week, and be blunt. For each DM automation: how many people it reached, how many it skipped, anything that failed. Then tell me which of my posts underperformed and why, which hooks are working on Instagram, and the one change I should make to next week's post. Don't soften it."

Your AI pulls the automation stats, runs post_performance to see which hooks and subjects are pulling ahead on each channel, and diagnose_posts to say what's wrong with a given post: not enough people saw it (a hook problem), people saw it and scrolled past (a retention problem), or they watched and still didn't act (an offer problem).

Two honest things about the review. It never compares channels against each other, because an Instagram view and an X impression aren't the same unit. And it won't hand you a confident verdict from three posts; below five measured posts on a channel, it tells you it doesn't know yet. A post less than a day old is "too early", never a flop.

Run it every week

Once it's going, the whole loop is two messages a week:

  • Monday: "Do the blunt review, then plan this week's freebie post and set up its automation in practice mode."
  • Wednesday: "Looks good, switch it to live and schedule the post for Thursday 9am."

For the rule builder, the templates and every trigger type, see Instagram DM automation. To fill the rest of the calendar around your lead posts, there's the social media scheduler and how to plan a month of posts in one sitting.

Questions people ask

How do I automatically DM people who comment on my Instagram post?

Connect Instagram to Hermoso, then create a DM automation: pick the post (one post, your next post or any post), the keyword, and the message with an optional link button. Everyone who comments the keyword gets the DM, once per post. You can set it up in the app or ask Claude or ChatGPT to do it with Hermoso.

Is comment-to-DM automation free?

On Instagram and Facebook, yes: automated replies cost no credits. X automations use credits because X charges for every mention, reply or DM it delivers and sends.

Can Hermoso send LinkedIn DMs?

No. LinkedIn keeps its messaging API to a small set of approved partners, so Hermoso cannot send LinkedIn messages. It can post to LinkedIn, reply to comments on your company Page and read leads from LinkedIn lead gen form ads.

Can I test an automation without messaging real people?

Yes. Practice mode logs what the rule would send and sends nothing, and the test tool checks any sample comment against the rule and shows the exact DM. Switch it to live when you're happy.

What if someone comments the keyword twice?

They get one DM per post. Repeat comments from the same person are counted as skipped, and anyone who replies STOP is opted out.

Can Claude review how my posts performed?

Yes. Through Hermoso, Claude can read each automation's sends and failures, see which hooks and subjects work on each channel, and diagnose individual posts as a hook, retention or offer problem. It waits for at least five measured posts on a channel before giving a verdict.