Saltar al contenido

Generador de Prompts para IA con Gemini

Permite a usuarios generar prompts estructurados para modelos de lenguaje (LLMs) usando Google Gemini. El workflow recoge los requisitos del prompt vía un formulario web, lo genera y muestra en una página interactiva para copiar.

AI 17 nodos 7 tipos conectado
Cargando workflow...

Nodos

LmChatGoogleGemini FormTrigger ChainLlm Form Webhook RespondToWebhook StickyNote

Herramientas

Google Gemini

Detalles

ID
5289
Nodos
17
Conex.
Tipos
7

Pertenece a:

¿Qué hace este workflow?

Este workflow permite a cualquier usuario crear prompts altamente estructurados para modelos de lenguaje como Google Gemini, partiendo de requisitos definidos en un simple formulario web. Facilita la estandarización y calidad de las instrucciones enviadas a la IA, asegurando respuestas más precisas y relevantes. Una vez generado, el prompt se presenta en una página interactiva, listo para copiar y usar en cualquier aplicación de Gemini. Ideal para equipos que buscan optimizar su uso de la inteligencia artificial, reduciendo el tiempo de preparación de consultas y minimizando la necesidad de rehacer prompts por falta de claridad. Mejora la productividad al estandarizar la creación de inputs para IA, ahorrando tiempo y mejorando la calidad de las interacciones.

¿Cómo funciona?

Este workflow usa 17 nodos conectados con 7 tipos diferentes: LmChatGoogleGemini, FormTrigger, ChainLlm, Form, Webhook y 2 más. La estructura está totalmente conectada — listo para importar.

¿Lo quieres en tu empresa?

Lo implementamos por ti end-to-end: integración, deploy, mantenimiento y soporte. Consultoría B2B con Genai Sapiens.

Hablemos de tu proyecto

¿Quieres aprender a hacerlo?

Sprints de 30 días con companion IA + comunidad. Aprende n8n, automatización y agentes IA desde cero o nivel avanzado.

Ver formación Momentum

Workflows similares

\n\n \n\n\n"},"typeVersion":1.1},{"id":"29733433-2142-4177-9f5f-9a05de1c5436","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-2180,-440],"parameters":{"color":6,"width":760,"content":"## Workflow Overview\nThis n8n workflow provides a user-friendly web interface to generate structured prompts for Large Language Models (LLMs) using Google Gemini. Users can describe their desired prompt, specify which sections (e.g., System Instructions, Examples, Inputs) they want included, and the workflow will leverage AI to create a well-formatted prompt. The generated prompt is then displayed on a dedicated webpage, ready to be copied."},"typeVersion":1},{"id":"bbbb0e8a-ccc4-469e-bb54-e7f1d298071f","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[-1380,-440],"parameters":{"color":7,"width":500,"height":640,"content":"### 1. Prompt Request (Form Trigger)\n* **Purpose:** Serves as the public-facing entry point for the workflow. It presents a customizable web form to collect user requirements for the AI prompt.\n* **Configuration:**\n * **Form Title:** \"AI Prompt Maker\"\n * **Form Description:** \"Let AI create your perfect prompt..\"\n * **Form Fields:**\n * \"What prompt do you want ?\": A required textarea for the user to describe the prompt's goal, context, input format, and examples.\n * \"Select Sections\": A multi-select dropdown allowing users to choose whether to include \"System Instructions\", \"Examples\", and \"Inputs\" sections in the generated prompt.\n * **Webhook Path:** `/prompt-maker`\n * **Custom CSS:** Includes extensive CSS to style the form for a modern and cherent appearance with the webage.\n* **Logic:** Upon form submission, it captures the user's input and passes it to the next node for prompt generation."},"typeVersion":1},{"id":"aa874d0f-3551-48f3-9926-ae556d2c2c73","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[-860,-300],"parameters":{"color":7,"width":620,"height":500,"content":"### 2. Generate Prompt (LLM Chain)\n* **Purpose:** This node acts as the orchestrator for the prompt generation. It constructs a meta-prompt based on user selections and sends it to the connected LLM.\n* **Configuration:**\n * **Text:** Uses the user's input from the \"What prompt do you want ?\" field.\n * **Messages:** Contains a system message that instructs the LLM (Gemini) to act as an expert prompt generator. This message dynamically includes placeholders for , , and based on the user's \"Select Sections\" choices. The core structure includes , , and .\n* **Logic:** It dynamically builds the prompt for the LLM, ensuring the generated output adheres to a specific, structured format (e.g., using XML-like tags for sections)."},"typeVersion":1},{"id":"d153908d-ac4c-4af1-ba29-ac468142aece","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[-740,220],"parameters":{"color":7,"width":400,"height":380,"content":"### 3. Gemini 2.5 Flash (Google Gemini Chat)\n* **Purpose:** This is the Large Language Model (LLM) that performs the actual prompt generation.\n* **Configuration:**\n * **Model Name:** `models/gemini-2.5-flash` (a fast and cost-effective model, but smart enough to build prompts).\n * **Temperature:** `0` (ensures deterministic and consistent output, ideal for structured generation).\n* **Logic:** Receives the meta-prompt from \"Generate Prompt\" and returns the newly created, structured AI prompt."},"typeVersion":1},{"id":"88ca6809-5621-48c8-ba70-171508137a1c","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[-220,-300],"parameters":{"color":7,"width":480,"height":500,"content":"### 4. Go to Site (Form)\n* **Purpose:** After the prompt is generated, this node redirects the user's browser to a new URL where the generated prompt will be displayed.\n* **Configuration:**\n * **Respond With:** `redirect`\n * **Redirect URL:** Dynamically constructed using n8n environment variables (`WEBHOOK_URL`, `N8N_ENDPOINT_WEBHOOK`) and the URL-encoded generated prompt (`$json.text.urlEncode()`). This URL points to the \"Get Prompt Webpage\" webhook.\n* **Logic:** Ensures a seamless transition from the form submission to the prompt display page.\n"},"typeVersion":1},{"id":"0fddd040-5e20-4bb0-be61-ac4cf8772548","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","position":[-1380,640],"parameters":{"color":7,"width":520,"height":560,"content":"### 5. Get Prompt Webpage (Webhook)\n* **Purpose:** This webhook serves as the target for the redirect from \"Go to Site\". It receives the generated prompt as a URL query parameter.\n* **Configuration:**\n * **Path:** `/prompt/result`\n * **Response Mode:** `Using Respond to Webhook Node` (delegates the response generation to the next node).\n* **Logic:** Listens for incoming requests to the `/prompt/result` path and extracts the `prompt` query parameter."},"typeVersion":1},{"id":"19ce7d51-ad08-491e-bb1a-4ad7d4348130","name":"Sticky Note6","type":"n8n-nodes-base.stickyNote","position":[-840,640],"parameters":{"color":7,"width":600,"height":560,"content":"### 6. Display Webpage (Respond to Webhook)\n* **Purpose:** Renders a custom HTML page to beautifully display the generated prompt and provide a \"copy to clipboard\" functionality.\n* **Configuration:**\n * **Respond With:** `text`\n * **Response Body:** Contains a complete HTML document with embedded CSS for styling and JavaScript for handling the prompt display and copy functionality.\n * **Content-Type Header:** `text/html; charset=UTF-8`\n* **Logic:**\n * The HTML page is designed with a dark theme and a code block (
) to present the prompt.\n    *   A JavaScript snippet safely embeds the received prompt (from `$json.query.prompt`) into a variable using `JSON.stringify()` to handle special characters.\n    *   Another JavaScript snippet then populates the  block with the prompt using `textContent` (to display it literally, including angle brackets) and implements the copy-to-clipboard feature."},"typeVersion":1},{"id":"f21a289d-1665-4888-9a4c-9c59d390375c","name":"Sticky Note7","type":"n8n-nodes-base.stickyNote","position":[-2180,-260],"parameters":{"color":5,"width":760,"height":680,"content":"## Required Credentials\n*   **Google Palm API:** This workflow requires an n8n credential for the Google Palm API (which supports Gemini models) to connect to the Google Gemini service. The example credential name is \"IA2S\".\n\n## Setup & Configuration\n\n1.  **Import the Workflow:**\n    *   Copy the provided workflow JSON.\n    *   In your n8n instance, go to \"Workflows\" and click \"New\".\n    *   Click the \"Import from JSON\" button and paste the JSON.\n\n2.  **Configure Google Palm API Credential:**\n    *   Ensure you have an active Google Gemini API credential configured in n8n.\n    *   If not, open the \"Gemini 2.5 Flash\" node, click \"New Credential\", and follow the instructions to set it up (you'll need an API key from Google AI Studio).\n\n3.  **Environment Variables (Optional but Recommended):**\n    *   This workflow uses `WEBHOOK_URL` and `N8N_ENDPOINT_WEBHOOK` environment variables for constructing the redirect URL. They will be in red, but this is normal.\n    *   `WEBHOOK_URL`: This is usually automatically set by n8n to your instance's base URL.\n    *   `N8N_ENDPOINT_WEBHOOK`: If your n8n instance is behind a reverse proxy or has a custom webhook path (e.g., `https://yourdomain.com/custom-path`), you might need to set this environment variable in your n8n configuration. By default, n8n's webhook path is `webhook`.\n\n4.  **Activate the Workflow:**\n    *   After importing and configuring credentials, activate the workflow by toggling the \"Active\" switch in the top right corner of the workflow editor (To make the webhook accessible)."},"typeVersion":1},{"id":"dc720dcd-784e-4368-9b11-f2115deaf215","name":"Sticky Note8","type":"n8n-nodes-base.stickyNote","position":[-2180,440],"parameters":{"color":4,"width":760,"height":500,"content":"## Usage\n\n1.  **Access the Prompt Maker Form:**\n    *   Once the workflow is active, navigate to the \"Prompt Request\" node.\n    *   Copy the \"Public URL\" displayed in the node's settings (e.g., `https://YOUR_N8N_URL/form/prompt-maker`).\n    *   Open this URL in your web browser.\n\n2.  **Fill Out the Form:**\n    *   Enter a detailed description of the prompt you want to create in the \"What prompt do you want ?\" textarea.\n    *   Select the desired sections (System Instructions, Examples, Inputs) using the \"Select Sections\" options.\n\n3.  **Generate and View Prompt:**\n    *   Click the \"Create Prompt\" button.\n    *   The workflow will execute, generate the prompt, and redirect your browser to a new page displaying the generated prompt.\n\n4.  **Copy the Prompt:**\n    *   On the prompt display page, click the \"Copy\" button to copy the entire generated prompt to your clipboard."},"typeVersion":1},{"id":"7cd9e2ea-5e68-4b1d-a5b1-da17bb1063d8","name":"Sticky Note9","type":"n8n-nodes-base.stickyNote","position":[-2180,960],"parameters":{"color":3,"width":760,"height":520,"content":"## Troubleshooting\n\n*   **Form Not Loading (404 Error):**\n    *   Ensure the workflow is active.\n    *   Verify the \"Public URL\" for the \"Prompt Request\" node is correct and accessible.\n    *   Check your n8n instance's `N8N_ENDPOINT_WEBHOOK` environment variable if you are using a custom webhook path or reverse proxy.\n*   **Prompt Generation Fails (LLM Error):**\n    *   Check the n8n execution logs for the \"Generate Prompt\" and \"Gemini 2.5 Flash\" nodes.\n    *   Verify your Google Palm API credential is valid and has sufficient permissions.\n    *   Ensure your Google Gemini API key is correctly configured and not expired.\n    *   Check for API rate limits on the Google Gemini side.\n*   **Redirect Not Working / Blank Page:**\n    *   Confirm the workflow is active.\n    *   Verify that the `WEBHOOK_URL` and `N8N_ENDPOINT_WEBHOOK` environment variables are correctly set in your n8n instance. The redirect URL must be valid and point back to your n8n instance.\n    *   Check the execution logs for the \"Go to Site\" and \"Get Prompt Webpage\" nodes for any errors.\n*   **Prompt Not Displaying Correctly on Page:**\n    *   While unlikely due to the `JSON.stringify` and `textContent` usage, very unusual characters in the generated prompt might cause rendering issues.\n    *   Ensure your browser's JavaScript is enabled."},"typeVersion":1},{"id":"c3a2c66f-b065-4992-a902-c6b6e86f609d","name":"Sticky Note10","type":"n8n-nodes-base.stickyNote","position":[-200,400],"parameters":{"width":540,"height":800,"content":"## Was this helpful? Let me know!\n\nI really hope this template helped you create amazing AI prompts. Your feedback is incredibly valuable and helps me create better resources for the n8n community.\n\n### **Share Your Thoughts & Ideas**\n\nWhether you have a suggestion, found a typo, or just want to say thanks, I'd love to hear from you!\nHere's a simple n8n form built for this purpose:\n\n#### ➡️ **[Click here to give feedback](https://api.ia2s.app/form/templates/feedback?template=AI%20Prompt%20Maker)**\n\n### **Ready to Build Something Great?**\n\nIf you're looking to take your n8n skills or business automation to the next level, I can help.\n\n**🎓 n8n Coaching:** Want to become an n8n pro? I offer one-on-one coaching sessions to help you master workflows, tackle specific problems, and build with confidence.\n#### ➡️ **[Book a Coaching Session](https://api.ia2s.app/form/templates/coaching?template=AI%20Prompt%20Maker)**\n\n**💼 n8n Consulting:** Have a complex project, an integration challenge, or need a custom workflow built for your business? Let's work together to create a powerful automation solution.\n#### ➡️ **[Inquire About Consulting Services](https://api.ia2s.app/form/templates/consulting?template=AI%20Prompt%20Maker)**\n\n---\n\nHappy Automating!\nLucas Peyrin"},"typeVersion":1}],"pinData":{"Generate Prompt":[{"text":"\n\nSay \"Hello, World!\".\n\n\n\nThis is a basic test to ensure the model is functioning and can produce a simple output.\n\n\n\nHello, World!\n\n"}]},"connections":{"Prompt Request":{"main":[[{"node":"Generate Prompt","type":"main","index":0}]]},"Generate Prompt":{"main":[[{"node":"Go to Site","type":"main","index":0}]]},"Gemini 2.5 Flash":{"ai_languageModel":[[{"node":"Generate Prompt","type":"ai_languageModel","index":0}]]},"Get Prompt Webpage":{"main":[[{"node":"Display Webpage","type":"main","index":0}]]}}}