# Auto-DM

> Send a direct message to everyone who reposts or replies to a post, for a few days after it goes out.

Auto-DM turns a post into an offer: "Repost this and reply 'guide', and I'll send you the PDF." For a few days after
the post publishes, Orbitwrite messages everyone who does what you asked.

It works on **Bluesky** and **Mastodon**. X is built and waiting on X's approval of direct-message access.

## Set it up on a post

In the composer, open the channel's auto-engagement options and turn on **Auto-DM**.

1. Write the message. You can use these variables:
   | Variable       | Becomes                        |
   | -------------- | ------------------------------ |
   | `{first_name}` | Their first name, such as John |
   | `{name}`       | Their full display name        |
   | `{username}`   | Their handle, such as @john    |
   | `{action}`     | What they did: repost or reply |
   | `{post_url}`   | A link to your post            |
2. Choose the trigger: a **repost** (a boost, on Mastodon), a **reply**, or both. With both, choose whether people must
   do **all** of them or **any** one.
3. Optionally, require the reply to contain a **keyword**, and require people to **follow** the sending account.
4. Choose how long it runs after the post publishes: 1 to 7 days, 4 by default.

The campaign starts when the post publishes. To start one on a post that's already published, use the
[CLI](https://orbitwrite.com/docs/developers/cli) (`orbitwrite autodm start`), the [SDK](https://orbitwrite.com/docs/developers/sdk) or an AI agent over [MCP](https://orbitwrite.com/docs/developers/mcp).

## Say so in the post

Tell people what engaging gets them ("reply 'guide' and I'll DM you the link"). The composer reminds you if the post
doesn't mention a DM or message. People who weren't expecting a message are more likely to report it.

## What to expect

|                             | Bluesky                                                                              | Mastodon                                                    |
| --------------------------- | ------------------------------------------------------------------------------------ | ----------------------------------------------------------- |
| Message length              | 1,000 characters                                                                     | 400 characters (a Mastodon DM is a post that mentions them) |
| Messages a day, per account | 250                                                                                  | 250                                                         |
| People who don't follow you | Bluesky refuses DMs from accounts they don't follow, unless they've opened their DMs | Delivered, but Mastodon may filter it into their requests   |

- **Nobody is messaged twice**, however many times they reply.
- A message that fails, usually because the person doesn't accept DMs, isn't retried.
- Someone who did part of what you asked is remembered, and messaged once they do the rest, as long as the campaign is
  still running.

## Manage a running campaign

The post's Auto-DM card shows how many people have been messaged, are waiting, or failed. **Pause** stops sending for
now, **Resume** picks it back up, and **Stop** ends it for good. You can edit the message or the rule while it runs.

Members can add Auto-DM to a post. Starting one on a live post needs permission to publish, and pausing, editing or
stopping one is for managers, admins and owners.

## Bluesky channels connected before Auto-DM

Bluesky asks for a separate permission to send DMs. A Bluesky channel connected before Auto-DM existed shows that it
needs reconnecting; reconnect it once from **Settings → Channels** and it's ready.
