> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Private reply to Instagram comment

> Sends one private Instagram direct message to the author of a comment.

`metaAds.privateReplyToInstagramComment` sends one private Instagram direct message to the person who wrote a comment on the account's media.

```ts automations/meta-ads-private-reply-to-instagram-comment.automation.ts theme={null}
import { automation, onDashboardRun } from "automate.ax"
import { metaAds } from "automate.ax/meta-ads"

export default automation("Private reply to Instagram comment", () => {
  onDashboardRun({ title: "Private reply to Instagram comment" })
  metaAds.privateReplyToInstagramComment({
    commentId: "comment-id",
    instagramAccountId: "instagram-account-id",
    text: "Thanks for asking! Here are our hours and location.",
  })
})
```

Find `instagramAccountId` with [List Instagram accounts](https://docs.automate.ax/reference/integrations/meta-ads/actions/list-instagram-accounts.md). Meta allows one private reply per comment, within 7 days of the comment; for live video, only during the broadcast. The message lands in the person's inbox if they follow the account and in Message Requests otherwise. Automate.ax sends through the Facebook Page linked to the Instagram account. `text` must be under 1,000 bytes. Optional second argument `{ account }` selects a static project account binding.

Returns `recipientId`, the person's IGSID, and `messageId`. Private replies aren't replay-safe. Meta documents conflicting requirements for this call, so the action requests the stricter set: `instagram_basic`, `instagram_manage_comments`, `instagram_manage_messages`, `pages_messaging`, `pages_read_engagement`, and `pages_show_list`. Meta's Instagram Messaging documentation also lists the Human Agent feature as a requirement for the Meta app.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.