Structured AI Prompt Generation Tool using Gemini - n8n Workflow

Generate professional, structured AI prompts using a custom web form and Google Gemini. This powerful n8n workflow template provides instant, copy-ready results for prompt engineers.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Prompt Engineers seeking quick, standardized prompt creation.
Content creators needing high-quality AI prompts without manual formatting.
Businesses looking to deploy internal prompt generation tools using an n8n workflow.
Anyone wanting to explore advanced AI automation using n8n templates and custom web UIs.

Overview

This powerful n8n workflow template solves the problem of needing structured, high-quality prompts for Large Language Models (LLMs) without manual formatting. By offering a clean web interface via an n8n trigger (the Form Trigger node), users can simply describe their goal and select desired structural components (like system roles, examples, or input placeholders).

The automation leverages the power of Gemini 2.5 Flash, coordinated by a LangChain n8n node, to transform vague input into a precise, XML-tagged prompt ready for immediate use in any AI system. This n8n workflow streamlines the complex process of prompt engineering, delivering a beautifully rendered output page where the user can instantly copy the final, optimized prompt.

How it Works

The entire process begins when a user interacts with the 'Prompt Request' n8n trigger, which is an n8n Form Trigger node, by filling out the web form.


  1. Input Capture: The user describes the required prompt and selects optional sections (System Instructions, Examples, Inputs) using the multi-select dropdown.

  2. Dynamic Generation: The input is passed to the 'Generate Prompt' n8n node (an LLM Chain node). This crucial n8n node dynamically constructs a meta-prompt, embedding the user's request and conditional structural tags based on the selected sections.

  3. LLM Execution: The constructed prompt is sent to the 'Gemini 2.5 Flash' n8n node, which uses the Gemini 2.5 Flash model at temperature 0 to ensure deterministic, structured generation.

  4. Redirection: The resulting prompt text is received by the 'Go to Site' n8n node, which initiates a redirect to a dedicated results page. The generated prompt is URL-encoded and passed as a query parameter.

  5. Webpage Display: The 'Get Prompt Webpage' n8n trigger captures this redirected request. The subsequent 'Display Webpage' n8n node sends a custom HTML response, featuring a dark-themed code block and JavaScript for safe display and one-click copying of the final, structured AI prompt.

Installation Guide


  1. Importing the n8n Workflow: Copy the provided JSON data. Navigate to your n8n instance, click "Workflows," and use the "Import from JSON" option to paste the code.

  2. Credential Setup: Open the 'Gemini 2.5 Flash' n8n node. Ensure you have an active Google Palm API credential configured (this credential supports Gemini models). If not, create a new one using your Google AI API key.

  3. Activate: Toggle the workflow to 'Active' to make the public web form n8n trigger available.

  4. Access: Copy the Public URL from the 'Prompt Request' n8n node to access the AI Prompt Maker form.

Node Details

Prompt Request (Form Trigger): The initiating n8n trigger. It hosts a fully styled web form that collects the user's requirements and section preferences. This custom n8n node ensures the workflow is easily accessible via a browser URL.
Generate Prompt (LLM Chain): This LangChain n8n node handles the complex orchestration. It uses dynamic expressions to build the comprehensive meta-prompt based on user inputs before calling the language model, guaranteeing a highly structured final prompt.
Gemini 2.5 Flash (Google Gemini Chat): The primary processing n8n node. It executes the meta-prompt using the fast and capable models/gemini-2.5-flash model, ensuring the structured output is precise by setting the temperature to 0.
Go to Site (Form Node): Used for flow control. It uses the redirect response mode to smoothly transition the user from the form submission to the final prompt display page, passing the newly created prompt as a URL parameter in the process.
Get Prompt Webpage (Webhook): An intermediary n8n trigger that catches the redirect request and extracts the generated prompt from the URL query parameters.
Display Webpage (Respond to Webhook): The final n8n node. It generates a sophisticated custom HTML page with embedded CSS and JavaScript. It safely displays the generated AI prompt in a copy-friendly code block, providing the best possible user experience for this n8n workflow.

Related n8n Workflows

Free

Nodes: 7 Nodes
Updated: December 26 2025
View all
Created by

Innovative builder with a passion for crafting automation solutions that solve real-world challenges. From streamlining workflows to driving efficiency, my work empowers teams and individuals to achieve more with less effort. Experienced in developing scalable tools and strategies that deliver results with n8n, supabase and cline.

Featured*