1. Teach your bot
Add trigger rules. When an incoming message contains the trigger phrase, the bot replies with your response. Rules are checked top to bottom.
Both a trigger and a reply are required.
2. Test it in the simulator
Text your bot below exactly like iMessage. Matched rules reply instantly; with AI on, everything else gets a smart answer.
My Bot
3. Connect it to real iMessage
The honest path. iMessage only runs on Apple hardware, so a signed-in Mac acts as the relay between your bot logic and blue bubbles.
- Get a Mac relayAny always-on Mac (or a Mac mini in a closet) signed into your Apple ID in the Messages app becomes the bridge.
- Install a relay serverOpen-source projects such as BlueBubbles run a local server on the Mac that exposes incoming and outgoing Messages over a private HTTP API and webhooks.
- Wire in this configExport your rules JSON above. A small script subscribes to the relay webhook, runs each incoming text through these rules, and posts the reply back.
- Go live safelyStart with a test contact, add rate limits, and never auto-reply to verification codes or unknown senders.
Why not a direct connection? Apple provides no public server-side iMessage API and blocks third-party clients, so any product claiming pure cloud iMessage sending is either using a Mac farm or spoofing. The Mac-relay approach keeps everything on your own Apple ID and hardware. Alternative: the same rules JSON works unchanged with SMS providers like Twilio if a phone-number bot is enough.