Package Information
Available Nodes
Documentation
n8n-nodes-supabase-queue-trigger

This is an n8n community node that lets you trigger workflows based on messages in Supabase Queues.
Supabase Queues is a Postgres-native durable Message Queue system with guaranteed delivery built on the pgmq database extension. This node provides polling-based triggers to monitor queue messages and start workflows automatically.
n8n is a fair-code licensed workflow automation platform.
Installation
Operations
Credentials
Compatibility
Usage
Resources
Installation
Follow the installation guide in the n8n community nodes documentation.
Operations
The Supabase Queue Trigger node supports the following operations:
- Read (Peek): Read messages from the queue without removing them. Messages become temporarily invisible to other consumers during the visibility timeout period.
- Pop (Consume): Read and remove messages from the queue permanently.
Credentials
You need to configure Supabase Queue API credentials:
Prerequisites
- A Supabase project with Queues enabled
- Enable the pgmq extension in your database
- Optionally expose the pgmq_public schema via PostgREST for client-side access
Authentication Setup
- Go to your Supabase project settings
- Navigate to API settings
- Copy your project URL and service role key
- In n8n, create new "Supabase Queue API" credentials:
- Supabase URL: Your project URL (e.g.,
https://your-project.supabase.co) - Service Role Key: Your service role secret key
- Anon Key: (Optional) Anonymous key for client-side operations
- Supabase URL: Your project URL (e.g.,
Queue Setup
Ensure your Supabase project has queues properly configured:
-- Enable the pgmq extension
CREATE EXTENSION IF NOT EXISTS pgmq;
-- Create a queue
SELECT pgmq.create('my-queue');
-- Add a test message
SELECT pgmq.send('my-queue', '{"type": "test", "data": "Hello World"}');
Compatibility
- Minimum n8n version: 0.198.0
- Supabase Postgres version: 15.6.1.143 or later (required for pgmq extension)
- Tested with n8n version: 1.0.0+
Usage
Basic Setup
- Add the "Supabase Queue Trigger" node to your workflow
- Configure your Supabase Queue API credentials
- Set the queue name you want to monitor
- Choose the operation (Read or Pop)
- Configure polling settings
- Activate the workflow
Configuration Options
Queue Name: The name of the Supabase queue to monitor (must match exactly)
Queue Operation:
- Read: Messages remain in queue but become temporarily invisible
- Pop: Messages are removed from queue after being read
Messages Per Poll: Number of messages to fetch per poll (1-100)
Visibility Timeout: Time in seconds messages stay invisible after being read (Read operation only)
Advanced Options
Message Filtering: Filter messages based on JSON properties
- Property: JSON path (e.g.,
message.type,message.priority) - Value: Value to match
Archive Messages: Automatically archive messages after processing (Pop operation only)
Example Message Structure
Messages returned by the trigger have this structure:
{
"id": 123,
"enqueued_at": "2025-01-20T10:30:00Z",
"vt": "2025-01-20T10:31:00Z",
"read_ct": 1,
"message": {
"type": "email",
"recipient": "user@example.com",
"subject": "Welcome!"
},
"queue_name": "email-queue",
"operation": "pop",
"raw": { /* complete original message object */ }
}
Sample Workflow
Here's a basic workflow that processes email queue messages:
Supabase Queue Trigger (email-queue) → HTTP Request (send email) → Set Node (log result)
Troubleshooting
Common Issues
"Queue not found" error:
- Verify the queue name matches exactly
- Ensure the queue exists in your database
- Check if pgmq extension is enabled
Authentication errors:
- Verify your Supabase URL and service role key
- Ensure the service role has necessary permissions
- Check if API is accessible from your n8n instance
No messages received:
- Verify there are messages in the queue
- Check message filters if configured
- Ensure polling is not too frequent (messages might be in visibility timeout)
Performance Considerations
- Set appropriate polling intervals to balance responsiveness and database load
- Use message filtering to reduce unnecessary processing
- Consider using "Pop" operation for high-throughput scenarios
- Monitor your database performance with queue operations
Resources
- Supabase Queues Documentation
- pgmq Extension Documentation
- n8n Community Nodes Documentation
- n8n Trigger Node Development
Contributing
Issues and feature requests are welcome! Please check the issues page before submitting.
License
MIT License - see LICENSE file for details.