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

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

Ready for 3.0

by Teng Wei Herr · 121 views · created 2026-02-06 · Engineering, AI Summarization

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This workflow has 16 nodes and runs manually, when you click “Execute workflow” (plus 1 other trigger). Along the way it connects Supabase and Postgres. It also calls api.openai.com over HTTP.

How it runs

Trigger: Manually, when you click “Execute workflow” (plus 1 other trigger).

  1. Convert to batch requests in .jsonl (Code): runs custom JavaScript code
  2. Get the earliest uncompleted batch (Postgres): select
  3. Call Files API (HTTP Request): calls api.openai.com (POST)
  4. Call Batch API to retrieve batch object (HTTP Request): calls an HTTP API
  5. Call Batch API (HTTP Request): calls api.openai.com (POST)
  6. If: checks a condition and branches into true / false
  7. Create a row in batch table (Supabase): uses Supabase
  8. Download .jsonl result (HTTP Request): calls an HTTP API
  9. Update status (Supabase): update
  10. .jsonl to base (Extract from File): extracts data from a file (binary to propery)

…plus 2 more steps. See the full node list below.

Services it uses

SupabasePostgres

HTTP calls to: api.openai.com

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (9)

From the author

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 openaibatches table. A cron job polls OpenAI every 5 minutes, and once the batch…

Excerpt from Teng Wei Herr's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.