Overview
This node sends messages to an Amazon Web Services (AWS) Simple Queue Service (SQS) queue. It is useful for integrating workflows with AWS SQS, enabling asynchronous message processing, decoupling microservices, or buffering tasks for later processing.
Common scenarios include:
- Sending event notifications or logs to an SQS queue.
- Offloading time-consuming tasks by pushing messages to a queue for background workers.
- Integrating n8n workflows with other AWS services that consume SQS messages.
For example, you can configure the node to send the incoming JSON data directly as the message body, or specify a custom message string. You can also add message attributes, delay delivery, and support FIFO queues with group and deduplication IDs.
Properties
| Name | Meaning |
|---|---|
| Queue | Select the target AWS SQS queue URL to which the message will be sent. The list is dynamically loaded from your AWS account. |
| Send Input Data | Boolean flag to decide whether to send the node's input JSON data as the message body. If false, the "Message Body" property is used instead. |
| Message Body | The content of the message to send if "Send Input Data" is false. This is a plain string. |
| Message Group ID | For FIFO queues, this specifies the message group ID, which is required to ensure ordered processing within the group. |
| Message Deduplication ID | For FIFO queues, this optional ID helps avoid duplicate messages. If not provided, the current timestamp is used by default. Content-based deduplication can make this optional. |
| Additional Options | A collection of optional settings: |
| - Message Attributes | Key-value pairs of message attributes to send along with the message. Each attribute has a name, data type (String, Number, Binary), and value. |
| - Delay Seconds | Number of seconds (0-900) to delay the message delivery. |
Output
The node outputs an array of JSON objects, one per input item, each containing:
MessageId: The unique identifier assigned by AWS SQS to the sent message.MD5OfMessageBody: MD5 hash of the message body for integrity verification.SequenceNumber(optional): Present if the queue is FIFO, indicating the sequence number of the message.
If sending fails for any item and "Continue On Fail" is enabled, the output for that item contains an error field with the error message.
No binary data is output by this node.
Dependencies
- Requires valid AWS credentials with permissions to access SQS queues.
- AWS region must be specified in the credentials.
- The node uses the official AWS SDK for JavaScript v3 (
@aws-sdk/client-sqs). - The node dynamically loads available SQS queues from the AWS account for selection.
Troubleshooting
- Error loading queues: If the node cannot load queues, check that the AWS credentials are correct and have permission to list SQS queues.
- Missing required parameters: Ensure the queue URL is selected and message body or input data is provided.
- FIFO queue errors: For FIFO queues,
MessageGroupIdis required. Omitting it will cause errors. - Deduplication issues: If using deduplication IDs, ensure they are unique or enable content-based deduplication on the queue.
- DelaySeconds out of range: Must be between 0 and 900 seconds.
- AWS API errors: Network issues, invalid credentials, or insufficient permissions will cause errors. Review error messages for details.
- To handle errors gracefully, enable "Continue On Fail" in the node settings.