Templates / Generate and evaluate AI prompts with Gemini, OpenRouter, Groq, Cohere and Supabase

Generate and evaluate AI prompts with Gemini, OpenRouter, Groq, Cohere and Supabase

Ready for 3.0

by Kanishka Shrivastava ✓ · 3,508 views · created 2026-06-02 · 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.

Rarely used nodes in this template: @n8n/n8n-nodes-langchain.lmChatCohere

Nodes used (10)

Google Gemini Chat ModelOpenRouter Chat ModelGroq Chat ModelSupabaseAI Agent

What it does

Quick overview This workflow receives a goal via webhook, generates three prompt candidates using Google Gemini, OpenRouter, and Groq, has Cohere evaluate and select the best prompt, then returns the result to the caller and stores the goal and winning prompt in Supabase. How it works 1. Receives a POST webhook request containing a JSON body with a goal value. 2. Sends the goal to three parallel prompt-engineering agents backed by Google Gemini, OpenRouter, and Groq to generate creative, marketing, and technical prompt candidates. 3. Combines the three generated prompt candidates into a single structured payload. 4. Uses a Cohere-powered evaluator to compare the candidates and return the best prompt (and a reason) as JSON. 5. Responds to the webhook caller with the evaluator output. 6. Creates a new row in a Supabase prompts table, saving the original goal and the selected best prompt. Setup 1. Add credentials for Google Gemini (PaLM), OpenRouter, Groq, and Cohere so the agents and evaluator can run. 2. Add your Supabase API credentials and ensure a prompts table exists with fields/columns for goal and bestprompt. 3. Copy the production webhook URL and send POST requests with { "goal": "..." } from your client or source app.

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.