Process multiple requests in FIFO using OpenAI Batch API and Supabase/Postgres

Go to Workflow
1 views
Built by Teng Wei Herr Teng Wei Herr
Created on February 06, 2026

Description

How it works
You provide a list of prompts and a system instruction, the workflow batches them into a single OpenAI Batch API request.
The batch job is tracked in a Supabase openai_batches table.
A cron job polls OpenAI every 5 minutes, and once the batch completes, the results are decoded and stored back in Supabase.
Set up steps
Create the openai_batches table in Supabase. Schema is in the yellow sticky note.
Add your OpenAI and Supabase/Postgres credentials to the workflow.
Replace the mock data with your actual prompts and you're ready to go!

This workflow was created by Teng Wei Herr and shared publicly on the n8n community template library. n8nFind indexes it for discovery — the workflow remains the property of its original creator.

Nodes Used (4)

Code
n8n-nodes-base.code
HTTP Request
n8n-nodes-base.httpRequest
Postgres
n8n-nodes-base.postgres
Supabase
n8n-nodes-base.supabase