Generate and evaluate AI prompts with Gemini, OpenRouter, Groq, Cohere and Supabase
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 Receives a POST webhook request containing a JSON body with a goal value. Sends the goal to three parallel prompt-engineering agents backed by Google Gemini, OpenRouter, and Groq to generate creative, marketing, and technical prompt candidates. Combines the three generated prompt candidates into a single structured payload. Uses a Cohere-powered evaluator to compare the candidates and return the best prompt (and a reason) as JSON. Responds to the webhook caller with the evaluator output. Creates a new row in a Supabase prompts table, saving the original goal and the selected best prompt.
Setup Add credentials for Google Gemini (PaLM), OpenRouter, Groq, and Cohere so the agents and evaluator can run. Add your Supabase API credentials and ensure a prompts table exists with fields/columns for goal and best_prompt. Copy the production webhook URL and send POST requests with { "goal": "..." } from your client or source app.
Related Templates
Restore your workflows from GitHub
This workflow restores all n8n instance workflows from GitHub backups using the n8n API node. It complements the Backup ...
Build a Restaurant Voice Assistant with VAPI and PostgreSQL for Bookings & Orders
This n8n template demonstrates how to create a comprehensive voice-powered restaurant assistant that handles table reser...
Extract Named Entities from Web Pages with Google Natural Language API
Who is this for? Content strategists analyzing web page semantic content SEO professionals conducting entity-based anal...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments