Actions22
- Chat Actions
- Contact Actions
- Handle Actions
- Message Actions
- Poll Actions
- Scheduled Message Actions
Message → Get Messages
AI-generatedSummary
Retrieves messages from a single iMessage chat via the Photon server's message query API, returning one n8n item per message, with optional date-range filtering and sort order.
Inputs
- Chat GUID (required) — Chat identifier, e.g. iMessage;-;+1234567890 for a DM or iMessage;+;chat123456 for a group. A bare phone/email, or a service prefix other than iMessage, is also accepted. The node tries iMessage;/any; variants (and the bare value) until one returns messages.
- Return All — If on, requests up to 1000 messages (a fixed cap, not true pagination). If off, the Limit applies.
- Limit — Maximum number of messages to return (min 1, default 50). Shown only when Return All is off.
- Additional Fields: After — Only return messages sent after this date/time (converted to a timestamp).
- Additional Fields: Before — Only return messages sent before this date/time.
- Additional Fields: Sort — Newest First (DESC, default) or Oldest First (ASC).
Output shape
A list of items, one per message, each containing the raw message object from the Photon server. The query also requests related chat, handle (sender) and attachment data. Items are paired to the input item that produced them.
If no messages match, no items are output for that input. Return All is capped at 1000. The message GUIDs and attachment GUIDs in the output can feed React to Message, Edit/Unsend Message, Download Attachment, and poll operations. On error the node throws, or with Continue On Fail outputs an item with an error message.
Examples
Example 1: Fetch the 20 most recent messages from a DM
Chat GUID = iMessage;-;+15551234567, Return All off, Limit = 20, Sort = Newest First
Example 2: Pull a chat's history for the last week in chronological order
Chat GUID of the group, Return All on, After = 7 days ago (expression), Sort = Oldest First