{
  "id": "lrM_ven9n7wWOC3Az_3yl",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Create a business model canvas with Gemini infographic output",
  "tags": [],
  "nodes": [
    {
      "id": "9848acd0-f2bc-4a25-a075-3bf0d15a5e26",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -640,
        -208
      ],
      "parameters": {
        "options": {
          "ignoreBots": true,
          "buttonLabel": "Next"
        },
        "formTitle": "Business Model Canvas Interview",
        "formFields": {
          "values": [
            {
              "html": "<h2>Phase 1: Grasping the Core (Most Important)</h2>\n\n",
              "fieldType": "html"
            },
            {
              "fieldName": "Identifying Your Target Customer",
              "fieldType": "textarea",
              "fieldLabel": "=Who will be your customer?",
              "placeholder": "=Working mothers in their 30s, owners of small-to-medium manufacturing companies in rural areas, office workers looking to start a side business, etc.",
              "requiredField": true
            },
            {
              "fieldName": "Clarifying Their Challenges and Pain Points",
              "fieldType": "textarea",
              "fieldLabel": "What problems are they facing? What frustrations or dissatisfactions do they have?",
              "requiredField": true
            },
            {
              "fieldName": "Current Coping Methods",
              "fieldType": "textarea",
              "fieldLabel": "How are they currently dealing with these problems?",
              "placeholder": "Just putting up with it, using other services, trying to handle it themselves, etc.",
              "requiredField": true
            },
            {
              "fieldName": "Value Proposition (Transformation & Benefits)",
              "fieldType": "textarea",
              "fieldLabel": "How will their life or work change after using your service? How do you want them to feel?",
              "placeholder": "Feel relieved by having more free time, gain confidence as sales grow, etc.",
              "requiredField": true
            },
            {
              "fieldName": "Your Strengths and Motivation",
              "fieldType": "textarea",
              "fieldLabel": "Why are \"you\" the one to run this business? Tell us about your unique strengths or what inspired you\u2014your past experience, certifications, skills, or personal story.",
              "requiredField": true
            }
          ]
        },
        "formDescription": "The purpose of this form is to help you structure your business ideas and visualize them as a one-page blueprint called the Business Model Canvas."
      },
      "typeVersion": 2.5
    },
    {
      "id": "6213250e-fb8a-4b19-840f-8f2b6567ebec",
      "name": "Form4",
      "type": "n8n-nodes-base.form",
      "position": [
        -128,
        -208
      ],
      "parameters": {
        "options": {
          "formTitle": "Phase 4: Money Flow"
        },
        "formFields": {
          "values": [
            {
              "fieldName": "Revenue Model",
              "fieldType": "checkbox",
              "fieldLabel": "How will you earn money? (Select all that apply)",
              "fieldOptions": {
                "values": [
                  {
                    "option": "Product/service sales (one-time payment)"
                  },
                  {
                    "option": "Monthly or annual subscription"
                  },
                  {
                    "option": "Performance-based fees or commissions"
                  },
                  {
                    "option": "Advertising revenue"
                  },
                  {
                    "option": "Other"
                  }
                ]
              },
              "requiredField": true
            },
            {
              "fieldName": "How to Grow Revenue",
              "fieldType": "checkbox",
              "fieldLabel": "If you were to increase revenue, which would you focus on?",
              "fieldOptions": {
                "values": [
                  {
                    "option": " Increasing the number of customers"
                  },
                  {
                    "option": "Raising the price (by providing higher value)"
                  },
                  {
                    "option": "Increasing purchase frequency (encouraging repeat business)"
                  }
                ]
              },
              "requiredField": true
            },
            {
              "fieldName": "Price Range",
              "fieldType": "textarea",
              "fieldLabel": "What price range are you considering for your product or service?",
              "placeholder": "\u00a55,000/month, \u00a530,000 per session, \u00a5500,000 annual contract, etc.",
              "requiredField": true
            },
            {
              "fieldName": "Cost Structure",
              "fieldType": "textarea",
              "fieldLabel": "What are the main costs involved in this business?",
              "placeholder": "- Fixed costs (recurring monthly): e.g., rent, software subscriptions, personnel expenses\n- Variable costs (based on sales volume): e.g., purchasing, outsourcing, shipping\n- Initial investment: e.g., equipment purchase, website development",
              "requiredField": true
            }
          ]
        }
      },
      "typeVersion": 2.5
    },
    {
      "id": "f11be9cf-59d9-44be-aafd-be88a5a7cc09",
      "name": "Form3",
      "type": "n8n-nodes-base.form",
      "position": [
        -304,
        -208
      ],
      "parameters": {
        "options": {
          "formTitle": "Phase 3: Means of Delivery (Internal Environment)"
        },
        "formFields": {
          "values": [
            {
              "fieldName": "Essential Activities",
              "fieldType": "textarea",
              "fieldLabel": "Essential Activities What are the things you absolutely must do to run this business?",
              "placeholder": "Creating products, providing consultations, publishing content, sourcing materials, etc.",
              "requiredField": true
            },
            {
              "fieldName": "Resources You Can Leverage",
              "fieldType": "checkbox",
              "fieldLabel": "Resources You Can Leverage What do you currently have that can be used for this business?",
              "fieldOptions": {
                "values": [
                  {
                    "option": "Skills or knowledge (e.g., programming, customer service experience)"
                  },
                  {
                    "option": "Certifications (e.g., certified management consultant, licensed cook)"
                  },
                  {
                    "option": "Connections or networks"
                  },
                  {
                    "option": "Equipment or tools"
                  },
                  {
                    "option": "Other"
                  }
                ]
              },
              "requiredField": true
            },
            {
              "fieldName": "What's Missing / Collaborators Needed",
              "fieldType": "textarea",
              "fieldLabel": "What do you lack to start this business? Will you need help from others to fill the gaps?",
              "placeholder": "Someone with web expertise, suppliers, outsourcing partners, etc."
            }
          ]
        }
      },
      "typeVersion": 2.5
    },
    {
      "id": "be62ad1e-0f2f-42d3-8bea-bfb60cae4be6",
      "name": "Form2",
      "type": "n8n-nodes-base.form",
      "position": [
        -464,
        -208
      ],
      "parameters": {
        "options": {
          "formTitle": "Phase 2: Customer Touchpoints (External Environment)",
          "buttonLabel": "Next"
        },
        "formFields": {
          "values": [
            {
              "fieldName": "Where They Gather Information",
              "fieldType": "textarea",
              "fieldLabel": "Where do your customers typically look for information?",
              "placeholder": "Instagram, Google search, referrals from acquaintances, industry trade shows, etc.",
              "requiredField": true
            },
            {
              "fieldName": "How They Discover You",
              "fieldType": "textarea",
              "fieldLabel": "How will people learn about your service? Imagine the first \"encounter.\"",
              "placeholder": "Social media posts, advertising, referrals, hosting seminars, etc.",
              "requiredField": true
            },
            {
              "fieldName": "Where They Purchase or Sign Up",
              "fieldType": "textarea",
              "fieldLabel": "Where will customers apply or make a purchase?",
              "placeholder": "Website, physical store, in-person meetings, phone, etc.",
              "requiredField": true
            },
            {
              "fieldName": "Type of Customer Relationship",
              "fieldType": "checkbox",
              "fieldLabel": "What kind of relationship do you want to build with your customers?",
              "fieldOptions": {
                "values": [
                  {
                    "option": "One-time transaction (single purchase)"
                  },
                  {
                    "option": "Ongoing relationship (subscription, retainer contract, etc.)"
                  },
                  {
                    "option": "Community-based relationship (membership, fan club, etc.)"
                  },
                  {
                    "option": "Self-service (customers use it on their own)"
                  },
                  {
                    "option": "Other"
                  }
                ]
              },
              "requiredField": true
            },
            {
              "fieldName": "Repeat and Referral Mechanisms",
              "fieldType": "textarea",
              "fieldLabel": "Do you have any systems in place to encourage customers to come back or refer others? (It's okay if you don't\u2014just share if you do.)"
            }
          ]
        }
      },
      "typeVersion": 2.5
    },
    {
      "id": "1f2bf44c-68c0-4d55-a8c3-6190ef074863",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -688,
        -352
      ],
      "parameters": {
        "color": 7,
        "width": 672,
        "height": 400,
        "content": "## Step1 - Collect business idea details\n4-page form collecting business idea details\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "344e972f-9317-4367-82f9-8d80ea1c2af6",
      "name": "AWS Bedrock Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAwsBedrock",
      "position": [
        240,
        -32
      ],
      "parameters": {
        "model": "jp.anthropic.claude-sonnet-4-5-20250929-v1:0",
        "options": {},
        "modelSource": "inferenceProfile"
      },
      "credentials": {
        "aws": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "7b4547c8-4b91-4c52-abbe-a7575cf17cc4",
      "name": "Generate an image",
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "position": [
        880,
        -48
      ],
      "parameters": {
        "prompt": "=## Business Model Canvas text\n{{ $json.canvas }}\n\n## Visual Output Request\n\nBased on the organized Business Model Canvas text above, generate a professional **infographic image**.\n\n**\u3010Required 9 Elements\u3011**\nThe image MUST include all 9 Business Model Canvas elements:\n1. Key Partners (KP)\n2. Key Activities (KA)\n3. Key Resources (KR)\n4. Value Propositions (VP)\n5. Customer Relationships (CR)\n6. Channels (CH)\n7. Customer Segments (CS)\n8. Cost Structure (CS)\n9. Revenue Streams (RS)\n\n**\u3010Visual Style & Format Specifications\u3011**\n1. **Layout Rigidity**: Strictly adhere to the standard Business Model Canvas 9-block grid layout:\n   - Left column: Key Partners\n   - Center-left column (split): Key Activities (top), Key Resources (bottom)\n   - Center column: Value Propositions\n   - Center-right column (split): Customer Relationships (top), Channels (bottom)\n   - Right column: Customer Segments\n   - Bottom-left: Cost Structure\n   - Bottom-right: Revenue Streams\n\n2. **Aesthetic Style**: Emulate a clean, professional, digital infographic design, similar to high-quality BMC templates used in corporate presentations.\n\n3. **Visual Elements**:\n   * Include minimalist, relevant **icons** next to each block title to enhance visual clarity\n   * Use professional header colors for each block's title area (e.g., muted blues or greys as accents against a white background)\n   * Ensure the dividing lines between blocks are sharp and clear\n\n4. **Text Rendering & Placement**:\n   * Render the summarized key points legibly *within* their corresponding block boundaries\n   * **Crucial**: Text must be high-contrast and must not overflow or overlap with borders\n   * Do not overcrowd the blocks; use bullet points for readability\n\n**\u3010Output Goal\u3011**\nA single, high-resolution image that visualizes the entire business model at a glance, with all 9 elements clearly visible and properly positioned.",
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "models/gemini-3-pro-image-preview",
          "cachedResultName": "models/gemini-3-pro-image-preview (Nano Banana Pro)"
        },
        "options": {},
        "resource": "image"
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "5b69b60e-9f4d-4d64-8561-2fad996af8a1",
      "name": "If_is_error",
      "type": "n8n-nodes-base.if",
      "position": [
        720,
        -208
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "398a0f2d-491b-4d56-ac92-80c30220a9ca",
              "operator": {
                "type": "boolean",
                "operation": "equals"
              },
              "leftValue": "={{ $json.isError }}",
              "rightValue": true
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "5233c1b5-0f5f-4512-b603-497813c40e41",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        16,
        -352
      ],
      "parameters": {
        "color": 7,
        "width": 672,
        "height": 464,
        "content": "## Step2 - Structure responses into Business Model Canvas\nFormats input and generates 9 canvas elements using AI.\n(Format \u2192 AI generation \u2192 Validate output format for error handling)\n\n\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "c5d07994-9696-4789-9c97-82ef9f1ecba8",
      "name": "Format Interview Responses",
      "type": "n8n-nodes-base.code",
      "position": [
        64,
        -208
      ],
      "parameters": {
        "jsCode": "const phase1 = $('On form submission').item.json;\nconst phase2 = $('Form2').item.json;\nconst phase3 = $('Form3').item.json;\nconst phase4 = $('Form4').item.json;\n\nconst allData = { ...phase1, ...phase2, ...phase3, ...phase4 };\n\nconst formatted = [\n  { phase: \"Grasping the Core (Most Important)\", data: Object.entries(phase1) },\n  { phase: \"Customer Touchpoints (External Environment)\", data: Object.entries(phase2) },\n  { phase: \"Means of Delivery (Internal Environment)\", data: Object.entries(phase3) },\n  { phase: \"Money Flow\", data: Object.entries(phase4) },\n];\n\nreturn [{ json: { allData, formatted } }];"
      },
      "typeVersion": 2
    },
    {
      "id": "d0eaf334-6238-4e0b-a368-bb10d871040c",
      "name": "AI Canvas Generator",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        240,
        -208
      ],
      "parameters": {
        "text": "=user's answers:\n\n{{ \n$json.formatted\n  .map(phase => \n    `## ${phase.phase}\\n\\n` + \n    phase.data\n      .filter(([q]) => !['submittedAt', 'formMode'].includes(q))\n      .map(([q, a]) => `Q: ${q}\\nA: ${a}`)\n      .join('\\n\\n')\n  )\n  .join('\\n\\n---\\n\\n') \n}}\n",
        "options": {
          "systemMessage": "=You are an expert business consultant. Based on the user's answers regarding their business idea, your task is to organize and create the 9 elements of the Business Model Canvas.\n\n## Step 1: Validation (REQUIRED)\n\nBefore generating the Business Model Canvas, you MUST validate the user's answers:\n\n### Validation Criteria\n1. **Relevance Check**: Answers must be related to business/service concepts\n2. **Completeness Check**: Key questions (Customer, Value Proposition, Revenue) must have meaningful answers\n3. **Coherence Check**: Answers should be logically consistent with each other\n\n### Invalid Answer Examples\n- Random text, gibberish, or test data (e.g., \"asdf\", \"test\", \"xxx\")\n- Completely unrelated content (e.g., recipes, song lyrics, jokes)\n- Contradictory information that cannot form a coherent business model\n- Answers that are too vague to extract any business insight (e.g., \"something\", \"anything\")\n\n### Validation Result\n\nIf answers are INVALID, respond ONLY with this JSON format and nothing else:\n```json\n{\n  \"status\": \"ERROR\",\n  \"reason\": \"Brief explanation of what was wrong\",\n  \"message\": \"We were unable to create a Business Model Canvas from your responses. Please provide specific information about your business idea and try again.\"\n}\n```\n\nIf answers are VALID, proceed to Step 2.\n\n---\n\n## Step 2: Generate Business Model Canvas\n\nOnly proceed here if validation passed.\n\n### Rules for Elaboration\nDo not simply transcribe the user's answers. Instead, slightly flesh out the content based on the following perspectives:\n\n1. **Concretize**:\n   - If there are vague expressions, infer from the context and add specific details.\n   - *Example:* Change \"SNS\" to specific platforms like \"Instagram\" or \"X\" based on the target audience.\n\n2. **Complement**:\n   - Add elements that are clearly necessary from the context, even if not explicitly stated in the answers.\n   - *Example:* Organize Channels into the flow of \"Awareness -> Purchase -> Delivery\".\n\n3. **Constraints**:\n   - Do not interpret in a way that deviates from the user's intent.\n   - Do not over-expand the content (keep additions light and relevant).\n   - If you add parts based on speculation, mark them as \"(Assumed)\" if necessary.\n\n### Output Format\n\nExtract and organize the information into the following 9 elements:\n\n**\u3010Customer Segments (CS)\u3011**\n* Who are we creating value for?\n\n**\u3010Value Propositions (VP)\u3011**\n* What problems are we solving? What value do we deliver to the customer?\n\n**\u3010Channels (CH)\u3011**\n* How do we reach the customer? (Organize by Awareness -> Purchase -> Delivery)\n\n**\u3010Customer Relationships (CR)\u3011**\n* What type of relationship do we establish with the customer?\n\n**\u3010Revenue Streams (RS)\u3011**\n* How does the business generate income?\n\n**\u3010Key Resources (KR)\u3011**\n* What key assets are required? (Skills, qualifications, equipment, etc.)\n\n**\u3010Key Activities (KA)\u3011**\n* What key activities are necessary to deliver the Value Propositions?\n\n**\u3010Key Partners (KP)\u3011**\n* Who are the external partners or suppliers?\n\n**\u3010Cost Structure (CS)\u3011**\n* What are the major costs involved? (Fixed costs, variable costs, initial investment)"
        },
        "promptType": "define"
      },
      "typeVersion": 3.1
    },
    {
      "id": "be1a3b10-6239-4d7d-a014-44961c2b4c8a",
      "name": "Validate Canvas Output",
      "type": "n8n-nodes-base.code",
      "position": [
        528,
        -208
      ],
      "parameters": {
        "jsCode": "const output = $('AI Canvas Generator').item.json.output;\n\nif (output.includes('\"status\": \"ERROR\"') || output.includes('\"status\":\"ERROR\"')) {\n  const errorMatch = output.match(/\"message\":\\s*\"([^\"]+)\"/);\n  const errorMessage = errorMatch ? errorMatch[1] : 'There was an issue with your input. Please start again from the beginning.';\n  \n  return [{\n    json: {\n      isError: true,\n      errorMessage\n    }\n  }];\n}\n\nreturn [{\n  json: {\n    isError: false,\n    canvas: output\n  }\n}];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "b3d1aac3-93f4-4c77-be72-ceaefbdfc661",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        704,
        -352
      ],
      "parameters": {
        "color": 7,
        "width": 560,
        "height": 464,
        "content": "## Step3 - Generate infographic with Gemini\nChecks validation result, then generates canvas image or displays error message\n"
      },
      "typeVersion": 1
    },
    {
      "id": "29cc87bf-51a1-42e5-9f82-9c475acac715",
      "name": "Error End",
      "type": "n8n-nodes-base.form",
      "position": [
        1040,
        -224
      ],
      "parameters": {
        "options": {},
        "operation": "completion",
        "completionTitle": "Thank you",
        "completionMessage": "=<h2>Generated Business Model Canvas</h2>\n\n{{ $json.errorMessage }}\n\n"
      },
      "typeVersion": 2.5
    },
    {
      "id": "2fa37ef3-e0fe-4fce-87e6-32e6879e1c2d",
      "name": "Completed",
      "type": "n8n-nodes-base.form",
      "position": [
        1040,
        -48
      ],
      "parameters": {
        "options": {},
        "operation": "completion",
        "respondWith": "returnBinary",
        "completionTitle": "Thank you",
        "completionMessage": "=<h2>Generated Business Model Canvas</h2>\n\n<p>You can view it from the link below.</p>\n\n<a href=\"/rest/binary-data?id={{ encodeURIComponent($('Generate an image').first().binary.data.id) }}&action=view&fileName={{ $('Generate an image').first().binary.data.fileName }}&mimeType={{ encodeURIComponent($('Generate an image').first().binary.data.mimeType) }}\" target=\"_blank\">Business Model Canvas is here.</a>"
      },
      "typeVersion": 2.5
    },
    {
      "id": "11539dc1-5189-4b2e-a05f-4f73a23e0b5d",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -704,
        -912
      ],
      "parameters": {
        "width": 768,
        "height": 512,
        "content": "# Main\n\n## How it works\nTransform your business idea into a professional Business Model Canvas infographic.\n\n1. User fills out a form with business idea details (value proposition, customers, channels, etc.)\n2. AI node structures the responses into the 9 Business Model Canvas elements\n3. Gemini generates a professional infographic image from the structured canvas\n\nThe form is split into 4 sections: core value, customer touchpoints, delivery methods, and financials.\n\n## Setup steps\n1. Connect your accounts:\n    - AWS Bedrock, OpenAI, Anthropic, Azure OpenAI, Google Vertex AI, or Ollama (for canvas generation)\n    - Google Gemini API (for image generation)\n2. Set your LLM credentials in the \"AWS Bedrock Chat Model\" node (or replace with your preferred provider).\n3. Set your Gemini API credentials in the \"Generate an image\" node.\n4. Activate the workflow and share the production URL with users."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "availableInMCP": false,
    "executionOrder": "v1"
  },
  "versionId": "f3082a5b-d96d-4cce-8b87-1f8d62ff2cc3",
  "connections": {
    "Form2": {
      "main": [
        [
          {
            "node": "Form3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Form3": {
      "main": [
        [
          {
            "node": "Form4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Form4": {
      "main": [
        [
          {
            "node": "Format Interview Responses",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Completed": {
      "main": [
        []
      ]
    },
    "If_is_error": {
      "main": [
        [
          {
            "node": "Error End",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Generate an image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate an image": {
      "main": [
        [
          {
            "node": "Completed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Form2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Canvas Generator": {
      "main": [
        [
          {
            "node": "Validate Canvas Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AWS Bedrock Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Canvas Generator",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Validate Canvas Output": {
      "main": [
        [
          {
            "node": "If_is_error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Interview Responses": {
      "main": [
        [
          {
            "node": "AI Canvas Generator",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}