Messaging service

iMessage

The iMessage integration connects iMessage through a self-hosted relay (e.g. BlueBubbles) — send messages, receive inbound messages forwarded to your own webhook, and expose relay reachability.

iMessage is one of the Messaging service integrations. It has a Dreambase webhook and an inbound route:

POST/imessage/webhook
Dreambase lifecycle — challenge, deployment, health, metrics, functions
POST/imessage/incoming
Inbound messages from the relay

What it does

On DEPLOYMENT_CREATED the service checks that the relay is reachable and publishes the connection details — relayUrl, relayToken, forwardUrl, and an incomingWebhookUrl— as outputs. Point your relay's inbound webhook at the incomingWebhookUrl to receive messages.

Relay contract

The integration expects a relay exposing POST {relayUrl}/send with a { to, text } body and GET {relayUrl}/health. BlueBubbles is a common choice; adapt the paths if your relay differs.

Inputs

FieldRequiredDescription
relayUrlyesBase URL of your iMessage relay.
forwardUrlyesWhere inbound messages are forwarded.
relayTokennoBearer token for the relay, if it requires auth. Supports {{env.MY_SECRET}}.
forwardSecretnoBearer token sent on forwarded requests so your endpoint can verify the source.

Outputs

  • relayUrl, relayToken — for other services to send with.
  • forwardUrl — the inbound target.
  • incomingWebhookUrl — configure your relay to POST inbound messages here.

Functions

  • sendMessage — send an iMessage via the relay (to, text).

Metrics

On METRIC_UPDATE the service reports relay_up (1 if the relay is reachable, 0 otherwise). Health checks probe GET {relayUrl}/health.

Events it handles

  • WEBHOOK_CHALLENGE — verify the webhook endpoint.
  • HEALTH_CHECK — probe the relay's /health.
  • METRIC_UPDATE — report relay reachability.
  • DEPLOYMENT_CREATED — check the relay and publish outputs.
  • DEPLOYMENT_DELETED — stop tracking the connection.
  • FUNCTION_CALL — run a named function.