iMessage by Photon Trigger icon

iMessage by Photon Trigger

Triggers on real-time iMessage events via the Photon Webhook service

iMessage by Photon Trigger

AI-generated

Summary

Starts a workflow when the Photon webhook service posts selected iMessage events (messages, chats, groups, FaceTime, Find My, scheduled messages, server updates) to the node's webhook URL. It optionally verifies the HMAC signature and filters by chat and by sender.

Inputs

  • Events (required) — Multi-select of event types to react to. Defaults to New Message. Choose All Events (*) to accept every type. Events not selected are silently dropped.
  • Signing Secret — Secret from webhook.photon.codes. If set, requests must carry x-photon-signature and x-photon-timestamp headers. The node checks an HMAC-SHA256 of v0:{timestamp}:{rawBody}. If blank, no verification is done.
  • Options > Filter by Chat GUID — Only fire for events in this chat, e.g. iMessage;-;+1234567890. The node takes the address (third segment) and matches it as a substring of the event's chat GUIDs or cacheRoomnames. Blank means all chats.
  • Options > Ignore Own Messages — Defaults to true. Skips events whose data.isFromMe is true. Set to false to also trigger on messages you sent.
  • Webhook URL (setup) — Not a field you fill in. Copy the node's Webhook URL into webhook.photon.codes. The node's POST webhook is registered automatically. The node also declares a required photonIMessageApi credential.

Output shape

One item per accepted event, with json fields: event, guid, text, sender (handle address), chatGuid (first chat's GUID), dateCreated, isFromMe, hasAttachments (boolean), and rawData (the full event data payload). Missing values become null, and isFromMe defaults to false.

Failed signature checks and missing-event payloads return a plain-text response ('Missing signature headers', 'Invalid signature', 'Missing event field') and do not start the workflow. Events that are filtered out (unselected type, own message, chat mismatch) are dropped without a workflow run. Own-message and chat filtering rely on message-style fields (isFromMe, chats, cacheRoomnames). Non-message events, such as server events, may not have them. Note that an active chat filter will drop events that lack chat data.

Examples

Example 1: Auto-reply bot for incoming texts

Events: New Message; Signing Secret set; Ignore Own Messages left on. Connect an iMessage send node after the trigger and use {{$json.sender}} and {{$json.text}}.

Example 2: Monitor one group chat for membership changes

Events: Participant Added, Participant Removed, Participant Left; Options > Filter by Chat GUID set to the group's GUID.

Example 3: Log all activity for auditing

Events: All Events; Ignore Own Messages off; store rawData in a database.

Links

Discussion