I shipped Auto DM replies in XreplyAI this week. Here's how it works under the hood, and why bringing it to Instagram and LinkedIn is a much harder problem.
The X implementation
The core loop is straightforward: poll for new followers, diff against a snapshot, send DMs to net-new ones. The details that matter:
First run snapshots up to 1,000 existing followers so you don't blast your whole audience on day one
Each subsequent cycle polls the 100 most recent followers and compares against the snapshot
Rate-limited to 15 DMs per cycle — Twitter's DM rate limits are easy to hit if you're not careful
Template supports a {name} placeholder; everything else is plain text (500 char limit)
All sends logged with status: pending / sent / failed
The tricky edge: if a user has 50,000 followers, the snapshot only captures 1,000. Anyone outside that window who was already following before first run could theoretically get a DM.…