# Gather Requirements - Workflow Instructions ```xml The workflow execution engine is governed by: {project_root}/{bmad_folder}/core/tasks/workflow.xml You MUST have already loaded and processed: {installed_path}/workflow.yaml This workflow gathers requirements for n8n workflow creation. Resolve variables from config_source: requirements_folder, output_folder, user_name, communication_language Create {{requirements_folder}} directory if it does not exist Load template from {{template}} Ask questions ONE AT A TIME and WAIT for user response after each question Question 1: What problem are you trying to solve with this automation? Describe the current manual process, pain points, and desired outcome. WAIT for user input Store response in {{problem_description}} Perform web search to understand the use case: - "n8n workflow for [problem description] site:docs.n8n.io" - "n8n automation [problem description] best practices" Store findings in {{use_case_research}} Question 2: What triggers this process? When should the automation run? Options: 1. When data arrives - Webhook, form submission, API call 2. On a schedule - Every hour, daily, weekly, custom cron 3. When something changes - Database update, file change, service event 4. Manually - On-demand execution 5. Multiple triggers - Combination of above 6. Not sure - Help me decide based on my problem Enter your selection (1-6): WAIT for user input Store response in {{trigger_type}} Analyze {{problem_description}} and suggest appropriate trigger Based on your problem, I recommend [trigger type]. Does this make sense? (yes/no) WAIT for confirmation Store final trigger in {{trigger_type}} Question 3: What data or information does this workflow need to work with? Examples: Customer data, order details, form responses, API data, etc. WAIT for user input Store response in {{data_requirements}} Question 4: What should happen with this data? What's the desired outcome? Examples: Send to Slack, update database, create invoice, notify team, etc. WAIT for user input Store response in {{desired_outcome}} Question 5: What services or systems are involved? Examples: Slack, Google Sheets, PostgreSQL, HubSpot, custom API, etc. WAIT for user input Store response in {{integrations}} Research EXACT n8n node types for each integration: For each service in {{integrations}}: 1. Search: "n8n [service] node documentation site:docs.n8n.io" 2. Extract EXACT node type string (e.g., "n8n-nodes-base.webhook") 3. Extract typeVersion (e.g., 2.1) 4. Extract available parameters structure 5. Extract example usage from docs 6. Note if trigger node or action node Store all findings in {{node_research}} Question 6: Are there any conditions or decision points in this process? Examples: If amount > $1000, notify manager; If status = 'urgent', send immediately Options: 1. No - Straight-through processing 2. Yes - Describe the conditions Enter your selection (1-2): WAIT for user input Describe the conditions and what should happen in each case: WAIT for user input Store response in {{conditional_logic}} Store "No conditional logic required" in {{conditional_logic}} Question 7: How critical is this workflow? What happens if it fails? Options: 1. Low - Can retry manually if needed 2. Medium - Should retry automatically, notify on failure 3. High - Must succeed, need alerts and logging 4. Critical - Business-critical, need comprehensive error handling Enter your selection (1-4): WAIT for user input Store selection in {{criticality}} Question 8: What should the workflow be named? WAIT for user input Store response in {{workflow_name}} Generate {{workflow_slug}} from {{workflow_name}} (lowercase, hyphens, no spaces) Display summary: - Problem: {{problem_description}} - Trigger: {{trigger_type}} - Data: {{data_requirements}} - Outcome: {{desired_outcome}} - Services: {{integrations}} - Conditions: {{conditional_logic}} - Criticality: {{criticality}} - Name: {{workflow_name}} Does this capture your requirements correctly? Options: 1. Yes - Save requirements 2. No - Let me clarify or add details Enter your selection (1-2): WAIT for user input What needs to be clarified or added? WAIT for user input Update relevant variables based on feedback Repeat summary and confirmation Perform comprehensive web search for workflow pattern: - "n8n workflow pattern [trigger_type] to [desired_outcome] site:docs.n8n.io" - "n8n [integrations] workflow example site:docs.n8n.io" - "n8n best practices [use case] site:docs.n8n.io" Store findings in {{workflow_pattern_research}} Research parameter structures for each node type: For each node type in {{node_research}}: 1. Search: "n8n [node type] parameters documentation site:docs.n8n.io" 2. Extract EXACT parameter structure from docs 3. Extract required vs optional parameters 4. Extract parameter data types 5. Extract example values Store in {{parameter_structures}} Resolve output path: {{default_output_file}} using {{workflow_slug}} Fill template with all gathered variables AND research findings Include in document: - Problem description and requirements - Use case research findings - EXACT node types with typeVersions - EXACT parameter structures from docs - Workflow pattern recommendations - Best practices from research Save document to {{default_output_file}} Report saved file path to user ✅ Requirements Saved Successfully! **File:** {{default_output_file}} **Next Steps:** 1. Review the requirements file 2. Run `*create-workflow` to generate the n8n workflow (The create-workflow will automatically load this requirements file) **Note:** You can edit the requirements file manually before creating the workflow. Validate against checklist at {{validation}} using {{bmad_folder}}/core/tasks/validate-workflow.xml ```