Academy
⌘K
Getting Started
  • Platform Overview
  • AWS Marketplace Setup
  • Quickstart Guide
Connections
  • Overview
Workflow Builder
  • Overview
  • Nodes Catalog
Helix AI Assistant
  • Overview
Mapping Engine
  • Overview
Workflow Library
  • Overview
  • HL7
  • FHIR
  • Insurance
  • Agentic
  • Mapping
Security & Infrastructure
  • Architecture
  • HIPAA Compliance
  • Performance & Scalability
← Back to ConnectHealth
Get Started
Back to Nodes
AWS1 input → 2 outputs

SQS Receive

payload.queueUrl (string)payload.maxMes… (number)payload.waitTi… (number)payload.visibi… (number)AWSSQS ReceiveOutput 1payload.count (number)payload.messages (array)sqs.operation (string)Output 2payload.success (boolean)payload.error (string)payload.errorT… (string)Data flowProperty

Receives one or more messages from an AWS SQS queue, with optional long-polling and optional auto-delete on receipt.

Inputs

payload.queueUrl string
Overrides the Queue URL set in the node config.
payload.maxMessages number
Max number of messages to receive (1–10). Overrides node config.
payload.waitTimeSeconds number
Long-poll wait time in seconds (0–20). Overrides node config.
payload.visibilityTimeout number
Visibility timeout in seconds for received messages. Overrides node config.
payload.autoDeleteOnReceipt boolean
Overrides the node's Auto-delete on Receipt setting.

Outputs

Output 1 — Messages
payload.count number
Number of messages received (always ≥ 1 — when the queue is empty the node emits nothing rather than a count: 0 message).
payload.messages array
One entry per message: messageId, body (JSON-parsed when possible, otherwise the raw string), attributes (SQS system attributes), messageAttributes (custom attributes). When Auto-delete on Receipt is off, each entry also includes receiptHandle and queueUrl so it can be piped straight into an SQS Delete node.
sqs.operation string
"receive"
sqs.queueUrl string
The queue that was polled.
sqs.count number
Same as payload.count.
sqs.autoDeleted boolean
Whether messages were auto-deleted after receipt.
Output 2 — Error
payload.error string
Error message from AWS.
payload.errorType string
Human-readable error category (e.g. Queue Not Found, Auth Error).
payload.solution string
Suggested fix for the error.
payload.awsCode string
Raw AWS error code.

ReceiptHandle Passthrough → SQS Delete

SQS does not remove a message when it's received — it only becomes invisible for the duration of the Visibility Timeout. To permanently remove a message you must delete it using its ReceiptHandle.

Leave Auto-delete on Receipt unchecked (the default) to keep control over when a message is deleted: each message in payload.messages[] carries its own receiptHandle and queueUrl. Wire this node's output into an SQS Delete node after your processing logic completes successfully, so a message is only deleted once it has been handled — if processing fails, the message becomes visible again after the timeout and can be retried or routed to a dead-letter queue.

Check Auto-delete on Receipt only when losing a message on a downstream failure is acceptable (e.g. best-effort notifications).

Built-in Polling (cron)

Enable built-in polling to have the node poll the queue on its own fixed interval — no upstream trigger message is required. While polling is on, the node's input port is removed so it can only be driven by its own timer. Each cycle runs after the previous one finishes (cycles never overlap), then waits Poll Interval seconds before the next. Combine with a non-zero Wait Time (long-poll) so each cycle waits efficiently for messages and minimizes empty receives / API cost.

Auto-delete applies in polling mode too: with Auto-delete on Receipt on, each received message is deleted immediately (sqs.deleted reports how many); with it off, wire the output into an SQS Delete node using the passed-through receiptHandle.

How to Use

  1. Select an AWS config node (or create one with your AWS credentials/region).
  2. Enter the Queue URL.
  3. Optionally set Max Messages (1–10) and a Wait Time for long-polling to reduce empty responses and API calls.
  4. Decide on Auto-delete on Receipt — leave unchecked to wire a downstream SQS Delete node using the passed-through receiptHandle.
  5. Wire the output: Output 1 = messages (check msg.payload.count), Output 2 = AWS error.

ConnectHealth Example

Poll a queue for pending EHR sync jobs, process each, then delete on success:

// Node config:
Queue URL:    https://sqs.us-east-1.amazonaws.com/123456789012/ehr-sync-jobs
Max Messages: 5
Wait Time:    10
Auto-delete:  off

// Output 1 (count > 0):
msg.payload = {
  count: 2,
  messages: [
    {
      messageId: "a1b2c3",
      body: { patientRef: "epic-A-123", action: "sync" },
      attributes: { SentTimestamp: "1714000000000" },
      messageAttributes: {},
      receiptHandle: "AQEB...",
      queueUrl: "https://sqs.us-east-1.amazonaws.com/123456789012/ehr-sync-jobs"
    },
    ...
  ]
}

// Downstream: after processing succeeds, feed each message into
// ec-sqs-delete using its receiptHandle + queueUrl.

Best Practices

  • Use a non-zero Wait Time (long-polling) to reduce empty receives and API cost.
  • Keep Auto-delete on Receipt off for anything where processing can fail — delete only after successful handling, via SQS Delete.
  • Set Visibility Timeout to comfortably exceed your expected processing time to avoid duplicate delivery.
  • Never log payload.messages[].body or messageAttributes — they may contain PHI. Log messageId and counts only.