AutomationFlowsGeneral › Generate Prds and Test Scenarios with Gpt/claude and PDF Export

Generate Prds and Test Scenarios with Gpt/claude and PDF Export

ByAlok Kumar @alokkumar on n8n.io

This workflow generates a Product Requirements Document (PRD) and test scenarios from structured form inputs. It uses OpenRouter LLMs (GPT/Claude) for natural language generation and APITemplate.io for PDF export.

Event trigger★★★★☆ complexityAI-powered9 nodesOpenRouter ChatChain LlmForm TriggerApi Template IoForm
General Trigger: Event Nodes: 9 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #8073 — we link there as the canonical source.

This workflow follows the Chainllm → Form 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
{
  "id": "Dg9akaNziOBwgNu0",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "PRD_Testcase",
  "tags": [],
  "nodes": [
    {
      "id": "7aa1d0eb-a145-4713-b12c-72d757924ef1",
      "name": "OpenRouter Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        0,
        64
      ],
      "parameters": {
        "model": "openai/gpt-4",
        "options": {}
      },
      "credentials": {
        "openRouterApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "450b4fb9-26b5-4622-94ca-ca41761137b6",
      "name": "OpenRouter Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        448,
        48
      ],
      "parameters": {
        "model": "anthropic/claude-3.7-sonnet",
        "options": {}
      },
      "credentials": {
        "openRouterApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "bc40e4ea-8bdd-4a60-88c9-aa4167640f08",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -816,
        -368
      ],
      "parameters": {
        "width": 480,
        "height": 944,
        "content": "### \ud83d\udcd2 Generate **Product Requirements Document (PRD)** and **test scenarios** form input to PDF with OpenRouter and APITemplate.io\n\nThis workflow generates a **Product Requirements Document (PRD)** and **test scenarios** from structured form inputs. It uses **OpenRouter LLMs (GPT/Claude)** for natural language generation and **APITemplate.io** for PDF export.  \n\n## Who\u2019s it for\nThis template is designed for **product managers, business analysts, QA teams, and startup founders** who need to quickly create **Product Requirement Documents (PRDs)** and **test cases** from structured inputs.  \n\n## How it works\n1. A **Form Trigger** collects key product details (name, overview, audience, goals, requirements).  \n2. The **LLM Chain (OpenRouter GPT/Claude)** generates a professional, structured **PRD in Markdown format**.  \n3. A second **LLM Chain** creates **test scenarios and Gherkin-style test cases** based on the PRD.  \n4. Data is cleaned and merged using a **Set node**.  \n5. The workflow sends the formatted document to **APITemplate.io** to generate a polished **PDF**.  \n6. Finally, the workflow returns the PDF via a **Form Completion node** for easy download.  \n \n\n## \u26a1 Requirements\n- OpenRouter API Key (or any LLM)\n- APITemplate.io account  \n\n## \ud83c\udfaf Use cases\n- Rapid PRD drafting for startups.  \n- QA teams generating **test scenarios** automatically.  \n- Standardized documentation workflows.  \n\n\ud83d\udc49 Customize by editing prompts, PDF templates, or extending with integrations (Slack, Notion, Confluence).  \n"
      },
      "typeVersion": 1
    },
    {
      "id": "4c5c5daa-2ec9-451e-a827-b1d4cb21aecf",
      "name": "PRD LLM Chain",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        0,
        -192
      ],
      "parameters": {
        "text": "=Product Name - {{ $json['Product Name'] || 'Not Available'}}\nProduct Overview  - {{ $json['Product Overview'] || 'Not Available' }}\nTarget Audience - {{ $json['Target Audience'] || 'Not Available' }}\nGoal & Objective - {{ $json['Goals & Objectives'] || 'Not Available' }}\nFunctional Requirements - {{ $json['Functional Requirements'] || 'Not Available' }}\nDate: {{ $json.submittedAt.split(\"T\")[0] }}\nCreated By - {{ $json['Created By'] || 'Not Available' }}",
        "batching": {},
        "messages": {
          "messageValues": [
            {
              "message": "=You are an expert product manager and technical writer.  \nYour task is to generate a clear, structured **Product Requirements Document (PRD)** in **Markdown format**.  \nThe PRD should be professional, concise, and easy to share with engineers, designers, and stakeholders.  \n\nUse Information provided by User prompt to Understand the requirement and try to go deep in filing all section.\n\n### Formatting Rules\n- Use proper Markdown headers (`#`, `##`, `###`) for sections.  \n- Use bullet points or numbered lists where appropriate.  \n- Keep language clear and action-oriented.  \n- Do not include explanations of what a PRD is.\n\n### PRD Template\n# Product Requirements Document (PRD)\n\n## 1. Overview\n- **Project Name:** \n- **Document Owner:** (leave blank if not provided)\n- **Last Updated:** (user created date provided by user)\n\n## 2. Problem Statement\n\n## 3. Goals\n\n## 4. Non-Goals\n- (list if provided, else mark as \u201cN/A\u201d)\n\n## 5. Target Audience / Users\n  - Pain Points Solved:\n\n## 6. Key Features / Requirements\n  -Primary Users:\n  -Secondary Users:\n  - (expand if needed)\n\n## 7. Key Features\n(expand if missing)\n\n## 8. Functional Requirements\n(expand if missing)\n\n## 8. Technical Constraints\n(expand if missing)\n\n## 9. Success Metrics\n- (expand if missing)\n\n## 10. Risks & Assumptions\n\n---\n"
            }
          ]
        },
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "b6f3b365-d277-4917-bb39-6c44a3c9d29b",
      "name": "Test Case LLM Chain",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        448,
        -192
      ],
      "parameters": {
        "text": "={{ $json.text }}",
        "batching": {},
        "messages": {
          "messageValues": [
            {
              "message": "Using the user input PRD document create Test scenario and test case in gherkin language. "
            }
          ]
        },
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "dba5e475-96b8-4505-96bb-ec736af91aa9",
      "name": "Get User Input",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -288,
        -192
      ],
      "parameters": {
        "options": {
          "appendAttribution": false
        },
        "formTitle": "Technical Document Requirement",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Product Name",
              "placeholder": "Fitness Guru"
            },
            {
              "fieldType": "textarea",
              "fieldLabel": "Product Overview",
              "placeholder": "An app that helps gym-goers track workouts, find classes, and stay motivated",
              "requiredField": true
            },
            {
              "fieldLabel": "Target Audience",
              "placeholder": "gym members, personal trainers, gym owners"
            },
            {
              "fieldLabel": "Goals & Objectives",
              "placeholder": "Increase gym member engagement, streamline trainer-client interaction"
            },
            {
              "fieldLabel": "Functional Requirements",
              "placeholder": "Workout logging \u2192 select exercise \u2192 enter sets/reps \u2192 save \u2192 progress updates on dashboard."
            }
          ]
        },
        "responseMode": "lastNode"
      },
      "typeVersion": 2.2
    },
    {
      "id": "df78c5c0-2394-4fc4-b04b-da34bd07b7db",
      "name": "Merge PRD and Test Case",
      "type": "n8n-nodes-base.set",
      "position": [
        832,
        -192
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "afee93c8-7b59-40b8-975a-55e4a3c9d35a",
              "name": "text",
              "type": "string",
              "value": "={{ $('PRD LLM Chain').item.json.text }}\n{{ $json.text }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "2352e0ea-0f51-4b62-9dd1-b7af7a2a1628",
      "name": "Create Document in PDF",
      "type": "n8n-nodes-base.apiTemplateIo",
      "position": [
        1040,
        -192
      ],
      "parameters": {
        "options": {
          "fileName": "PRD_abc.pdf"
        },
        "download": true,
        "resource": "pdf",
        "propertiesUi": {
          "propertyValues": [
            {
              "key": "markdown",
              "value": "={{ $json.text }}"
            }
          ]
        },
        "pdfTemplateId": "=e1277b23d41c334e"
      },
      "credentials": {
        "apiTemplateIoApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "c1b7dcee-035e-46f3-8cfc-985cc7920839",
      "name": "Let User Download",
      "type": "n8n-nodes-base.form",
      "position": [
        1280,
        -192
      ],
      "parameters": {
        "options": {},
        "operation": "completion",
        "respondWith": "returnBinary",
        "completionTitle": "PRD Document is ready",
        "completionMessage": "Process completed file will be downloaded! ",
        "inputDataFieldName": "=data"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "a11c8289-d0f2-430d-995b-004ea59f10d9",
  "connections": {
    "PRD LLM Chain": {
      "main": [
        [
          {
            "node": "Test Case LLM Chain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get User Input": {
      "main": [
        [
          {
            "node": "PRD LLM Chain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Let User Download": {
      "main": [
        []
      ]
    },
    "Test Case LLM Chain": {
      "main": [
        [
          {
            "node": "Merge PRD and Test Case",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "PRD LLM Chain",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Create Document in PDF": {
      "main": [
        [
          {
            "node": "Let User Download",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Test Case LLM Chain",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Merge PRD and Test Case": {
      "main": [
        [
          {
            "node": "Create Document in PDF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

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

This workflow generates a Product Requirements Document (PRD) and test scenarios from structured form inputs. It uses OpenRouter LLMs (GPT/Claude) for natural language generation and APITemplate.io for PDF export.

Source: https://n8n.io/workflows/8073/ — original creator credit. Request a take-down →

More General workflows → · Browse all categories →

Related workflows

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

General

This workflow uses AI to automatically generate clear and descriptive names for every node in your n8n workflows. It analyzes each node's type, parameters, and connections to create meaningful names,

n8n, Chain Llm, Output Parser Structured +4
General

Image to license plate number. Uses chainLlm, form, lmChatOpenRouter, formTrigger. Event-driven trigger; 5 nodes.

Chain Llm, Form, OpenRouter Chat +1
General

This is a simplistic demo workflow showing how to extract a license plate number from an image of a car submitted via a form – or in more general terms showcasing how you can: use a form trigger to up

Chain Llm, Form, OpenRouter Chat +1
General

High-Level Service Page SEO Blueprint Report. Uses formTrigger, splitInBatches, httpRequest, lmChatGoogleGemini. Event-driven trigger; 33 nodes.

Form Trigger, HTTP Request, Google Gemini Chat +1
General

CV Tailor + Cover Letter (easybits). Uses formTrigger, googleSheets, @easybits/n8n-nodes-extractor, googleGemini. Event-driven trigger; 25 nodes.

Form Trigger, Google Sheets, @Easybits/N8N Nodes Extractor +3