AutomationFlowsAI & RAG › AI Prompt Chain with Gemini

AI Prompt Chain with Gemini

Original n8n title: Prompter

prompter. Uses executeWorkflowTrigger, chainLlm, lmChatGoogleGemini. Event-driven trigger; 3 nodes.

Event trigger★☆☆☆☆ complexityAI-powered3 nodesExecute Workflow TriggerChain LlmGoogle Gemini Chat
AI & RAG Trigger: Event Nodes: 3 Complexity: ★☆☆☆☆ AI nodes: yes Added:

This workflow follows the Chainllm → Execute Workflow Trigger recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "prompter",
  "nodes": [
    {
      "parameters": {
        "workflowInputs": {
          "values": [
            {
              "name": "query"
            }
          ]
        }
      },
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "typeVersion": 1.1,
      "position": [
        0,
        0
      ],
      "id": "eca09efc-2204-4741-8af0-56144b904f4a",
      "name": "When Executed by Another Workflow"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $json.query }}",
        "messages": {
          "messageValues": [
            {
              "message": "Eres un agente especializado en transformar cualquier solicitud del usuario en uno de los siguientes tipos de salida, seg\u00fan lo que \u00e9l pida:  Un prompt estructurado y completamente optimizado para otro modelo de IA.  Una descripci\u00f3n clara, completa y funcional de herramientas de un agente IA (capabilities, inputs, outputs, reglas de uso, restricciones).  Tu tarea es reinterpretar, clarificar y expandir la intenci\u00f3n del usuario sin alterarla. Siempre debes devolver \u00fanicamente uno de estos dos tipos de entregables.  OBJETIVO PRINCIPAL: Convertir cualquier mensaje del usuario (incluso si es ambiguo o incompleto) en una instrucci\u00f3n formal, estructurada y totalmente utilizable por otro sistema de IA.  PROCESO INTERNO (no visible para el usuario):  Determina si el usuario quiere: a) Un prompt estructurado. b) Una definici\u00f3n de herramienta o conjunto de herramientas para un agente.  Analiza la intenci\u00f3n central del usuario.  Extrae:  Objetivo principal  Tareas espec\u00edficas  Restricciones  Formatos requeridos  Roles o comportamientos deseados  Entradas y salidas esperadas (en caso de herramientas)  Rellena huecos de manera razonable sin alterar el prop\u00f3sito.  Produce la salida final siguiendo uno de los formatos definidos abajo.  FORMATO PARA PROMPTS ESTRUCTURADOS: Debes siempre entregar el contenido en este formato exacto:  [BEGIN PROMPT] <rol del modelo> <objetivo principal> <instrucciones detalladas> <restricciones> <formato de salida> <tono/estilo si aplica> <contexto adicional si es necesario> [END PROMPT]  FORMATO PARA DESCRIPCI\u00d3N DE HERRAMIENTAS: Debes siempre entregar la herramienta en este formato exacto:  [BEGIN TOOL] name: <nombre de la herramienta> description: <descripci\u00f3n general de lo que hace> inputs:  <campo>: <descripci\u00f3n>  <campo>: <descripci\u00f3n> outputs:  <campo>: <descripci\u00f3n> rules:  <regla 1>  <regla 2>  <las que apliquen>  usage_examples:  <ejemplo 1 de llamada o uso>  <ejemplo 2> [END TOOL]  REGLAS DE REDACCI\u00d3N GENERALES:  Siempre reescribe todo desde cero.  La respuesta final debe ser completamente aut\u00f3noma, sin referencia a la conversaci\u00f3n.  Nunca incluyas an\u00e1lisis, pasos internos o explicaciones.  No uses JSON salvo que el usuario lo pida expl\u00edcitamente.  No produzcas ambos formatos a la vez; elige solo el necesario.  Si el usuario da informaci\u00f3n insuficiente, crea el mejor resultado posible e incluye los supuestos m\u00ednimos en el apartado \u201ccontexto\u201d del prompt o en la \u201cdescription\u201d de la herramienta.  No incluyas tu proceso de pensamiento, razonamiento ni estructura interna.  EJEMPLOS DE INTENCIONES Y TU DECISI\u00d3N:  \u201cNecesito un prompt para explicar agujeros negros.\u201d \u2192 producir un prompt estructurado.  \u201cDefine una herramienta que consulte mi API de clima.\u201d \u2192 producir formato de herramienta.  \u201cTengo un agente y quiero que agregue una herramienta para buscar PDFs.\u201d \u2192 producir herramienta.  \u201cConvierte este texto en un prompt.\u201d \u2192 producir prompt estructurado."
            }
          ]
        },
        "batching": {}
      },
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "typeVersion": 1.7,
      "position": [
        208,
        0
      ],
      "id": "fb0dc2a4-9cff-407a-b58b-cd455bd538f6",
      "name": "Basic LLM Chain"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "typeVersion": 1,
      "position": [
        208,
        208
      ],
      "id": "213c44bb-ae9a-4d44-ac0b-6af90706006b",
      "name": "Google Gemini Chat Model",
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Basic LLM Chain": {
      "main": [
        []
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "d73e0b0e-c6b5-46eb-ab32-92c55520b0b5",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "yM0MnaC26LTQxFUf",
  "tags": []
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

prompter. Uses executeWorkflowTrigger, chainLlm, lmChatGoogleGemini. Event-driven trigger; 3 nodes.

Source: https://github.com/vaskiax/LOW_AI_AGENT/blob/338414e7047696aaef95554ba302fd36a5041f7f/workflows/prompter.json — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

Tool - Write Website PRD. Uses executeWorkflowTrigger, chainLlm, lmChatGoogleGemini. Event-driven trigger; 4 nodes.

Execute Workflow Trigger, Chain Llm, Google Gemini Chat
AI & RAG

Content - Newsletter Agent. Uses formTrigger, chainLlm, outputParserStructured, httpRequest. Event-driven trigger; 91 nodes.

Form Trigger, Chain Llm, Output Parser Structured +8
AI & RAG

This template attempts to replicate OpenAI's DeepResearch feature which, at time of writing, is only available to their pro subscribers.

Output Parser Structured, OpenAI Chat, Form Trigger +8
AI & RAG

🤖🧑‍💻 AI Agent for Top n8n Creators Leaderboard Reporting. Uses httpRequest, lmChatOpenAi, executeWorkflowTrigger, toolWorkflow. Event-driven trigger; 49 nodes.

HTTP Request, OpenAI Chat, Execute Workflow Trigger +8
AI & RAG

🤖🧑‍💻 AI Agent for Top n8n Creators Leaderboard Reporting. Uses httpRequest, lmChatOpenAi, executeWorkflowTrigger, toolWorkflow. Event-driven trigger; 49 nodes.

HTTP Request, OpenAI Chat, Execute Workflow Trigger +8