Templates / Route LLM requests with Anthropic, OpenAI, Gemini, Postgres, and Slack

Route LLM requests with Anthropic, OpenAI, Gemini, Postgres, and Slack

Ready for 3.0

by Oneclick AI Squad ✓ · 1 views · created 2026-10-01 · 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 27 nodes and runs manually, when you click “Execute workflow” (plus 1 other trigger). Along the way it connects Postgres and Slack. It also calls api.anthropic.com and api.openai.com over HTTP.

How it runs

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

  1. Set - Fallback Config (Edit Fields (Set)): sets 14 fields: providerOrder, anthropicModel, openaiModel…
  2. JS - Normalize Request (Code): runs custom JavaScript code
  3. Postgres: run a query
  4. JS - Build Provider Chain (Code): runs custom JavaScript code
  5. JS - Select Provider (Code): runs custom JavaScript code
  6. Switch: routes items into 3 branches
  7. HTTP Request: calls api.anthropic.com (POST)
  8. HTTP Request: calls api.openai.com (POST)
  9. HTTP Request: calls an HTTP API (POST)
  10. JS - Normalize & Validate (Code): runs custom JavaScript code

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

Services it uses

PostgresSlack

HTTP calls to: api.anthropic.com, 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 (11)

From the author

Quick overview This workflow exposes a POST webhook that sends a prompt through a resilient LLM fallback chain (Anthropic, OpenAI, then Google Gemini), validates outputs against deterministic rules/JSON schema, logs all attempts to Postgres with a circuit…

Excerpt from Oneclick AI Squad'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.