AWS SQS Trigger icon

AWS SQS Trigger

Consume queue messages from AWS SQS

Overview

This node triggers workflows by consuming messages from an AWS SQS (Simple Queue Service) queue at specified intervals. It is useful for automating processes that depend on messages arriving in an SQS queue, such as processing tasks, notifications, or data pipelines. For example, it can be used to automatically process orders placed in an e-commerce system or handle asynchronous job requests.

Use Case Examples

  1. Polling an SQS queue every 5 minutes to process incoming order messages.
  2. Listening to a queue for task messages and triggering workflows to handle each task automatically.

Properties

Name Meaning
Queue Name or ID The specific AWS SQS queue to monitor for messages. Can be selected from a list or specified by ID.
Interval The frequency at which the queue is checked for new messages, specified as a number.
Unit The unit of time for the interval value (seconds, minutes, or hours).
Options Additional settings for message retrieval and processing.

Output

JSON

  • json - The JSON object representing each received message from the SQS queue.

Dependencies

  • Requires AWS credentials for authentication to access the SQS service.

Troubleshooting

  • Ensure the AWS credentials provided have permissions to access the specified SQS queue.
  • The 'Visibility Timeout' must be between 0 and 43200 seconds; otherwise, an error is thrown.
  • The 'Max Number Of Messages' must be between 1 and 10; otherwise, an error is thrown.
  • The 'Wait Time Seconds' must be between 0 and 20; otherwise, an error is thrown.
  • The interval must be at least 1 (in the specified unit); setting it lower will cause an error.
  • If the interval value is too large (exceeding JavaScript's maximum timeout), an error is thrown.

Links

  • AWS SQS ReceiveMessage API - Official AWS documentation for the ReceiveMessage API used to retrieve messages from SQS.
  • n8n Expressions - Documentation on how to use expressions in n8n to dynamically specify parameters like queue ID.

Discussion