Overview
The AWS SQS Trigger node listens for new messages in an AWS Simple Queue Service (SQS) queue and triggers workflows when messages are received. It periodically polls the specified SQS queue at a user-defined interval, retrieves available messages, and optionally deletes them after processing. This node is ideal for integrating n8n with systems that use SQS for asynchronous messaging, such as microservices architectures, event-driven applications, or serverless workflows.
Practical examples:
- Automatically process orders placed in an e-commerce system by listening to an order queue.
- Trigger downstream data processing when new log entries arrive in a logging queue.
- Integrate with AWS Lambda or other services that push events to SQS.
Properties
| Name | Type | Meaning |
|---|---|---|
| Queue Name or ID | options | The SQS queue to receive messages from. You can select from a list of queues or specify a queue URL/ID using an expression. |
| Interval | number | How often (in combination with Unit) the queue should be checked for new messages. Must be at least 1. |
| Unit | options | The time unit for the interval value. Options: Seconds, Minutes, Hours. |
| Options | collection | Additional settings: - Delete Messages (boolean): Whether to delete messages after receiving them. - Visibility Timeout (number): Duration (in seconds) that received messages are hidden from subsequent requests. - Max Number Of Messages (number): Maximum number of messages to return per poll. |
Output
- The node outputs one item per message received from the SQS queue.
- Each output item has a
jsonfield containing the full SQS message object, which typically includes:MessageId: Unique identifier for the message.ReceiptHandle: Identifier used for deleting the message.MD5OfBody: MD5 hash of the message body.Body: The actual content of the message.Attributesand/orMessageAttributes: Any additional metadata sent with the message.
Example output:
{
"MessageId": "12345",
"ReceiptHandle": "AQEB...",
"MD5OfBody": "e99a18c428cb38d5f260853678922e03",
"Body": "{\"orderId\": \"abc123\", \"status\": \"new\"}",
"Attributes": { ... },
"MessageAttributes": { ... }
}
- If multiple messages are received, each will be emitted as a separate item.
- No binary data is produced by this node.
Dependencies
- AWS Account: Requires valid AWS credentials configured in n8n (via the "aws" credential type).
- SQS Queue: The specified queue must exist and the credentials must have permission to read (and optionally delete) messages.
- n8n Configuration: No special environment variables required beyond standard AWS credential setup.
Troubleshooting
Common issues:
- Invalid Queue URL/ID: If the queue parameter is incorrect, the node may fail to connect or retrieve messages.
- Insufficient Permissions: If the AWS credentials lack permissions for
sqs:ReceiveMessageorsqs:DeleteMessage, errors will occur. - Interval Too Low or High: Setting the interval below 1 or above the maximum allowed (due to JavaScript timer limits) will cause errors.
Error messages:
"The interval has to be set to at least 1 or higher!"
Resolution: Set the Interval property to 1 or greater."The interval value is too large."
Resolution: Reduce the interval value so that the polling frequency is within supported limits.NodeApiError / NodeOperationError:
These indicate issues with AWS API calls (e.g., network problems, invalid credentials, or misconfigured parameters). Check your AWS credentials, queue name/URL, and network connectivity.