Claim Task
AI-generatedSummary
Claim the next available unclaimed task message from a specified channel by attempting to claim the first unclaimed message in that channel.
Inputs
- Channel (required) — The name or ID of the channel from which to claim the task.
- Actor — The worker identity used to claim the task, which is resolved and created if new, scoped to your API key. Defaults to 'n8n-worker'.
Output shape
a single JSON object representing the claimed message or null if no unclaimed messages are available.
The operation fetches up to 20 unclaimed messages from the specified channel and attempts to claim the first available one using the Actor identity. If a race condition occurs (another agent already claimed a message), it continues trying the next. If no unclaimed message is available, returns { claimed: null, note: 'no unclaimed messages available' }.
Examples
Example 1: Claiming a task from a backchannel claimable channel
Set the 'Channel' to the target channel name or ID, and optionally specify an 'Actor' to identify this workflow claiming the task. The output provides the claimed message's details or a note if none available.