{
  "name": "01 · Typeform → 3 Design Options + Client Portal",
  "nodes": [
    {
      "name": "Typeform Submission",
      "type": "n8n-nodes-base.typeformTrigger",
      "typeVersion": 1.1,
      "position": [
        0,
        224
      ],
      "parameters": {
        "formId": ""
      },
      "webhookId": "3036f685-cf41-4b06-8a4b-d4ad93899d64"
    },
    {
      "name": "Plan 3 Website Designs",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 3.1,
      "position": [
        224,
        224
      ],
      "parameters": {
        "promptType": "define",
        "hasOutputParser": true,
        "text": "=Generate THREE distinct website creation prompts.\n\nLead: {{ $json.full_name }}\nBusiness: {{ $json.business_name }} — {{ $json.business_description }}\nPreferences: {{ $json.preferences }}\n\nReturn JSON with items array of 3 prompts, each 600+ chars. Variants: Modern Minimalist, Bold Editorial, Warm & Artisan.",
        "options": {
          "systemMessage": "Senior website art director. Generate 3 production-ready prompts."
        }
      }
    },
    {
      "name": "OpenAI",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.3,
      "position": [
        240,
        448
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "Yuica5wlzDrhFTNk",
          "name": "OpenAi account"
        }
      }
    },
    {
      "name": "Parse 3 Prompts",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "typeVersion": 1.3,
      "position": [
        368,
        448
      ],
      "parameters": {
        "jsonSchemaExample": "{\"items\":[{\"prompt\":\"...\"},{\"prompt\":\"...\"},{\"prompt\":\"...\"}]}"
      }
    },
    {
      "name": "Persist Lead + Plan",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        576,
        224
      ],
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "1",
              "name": "items",
              "value": "={{ JSON.stringify($json.output.items) }}",
              "type": "string"
            },
            {
              "id": "2",
              "name": "lead_email",
              "value": "={{ $(\"Typeform Submission\").first().json.email }}",
              "type": "string"
            },
            {
              "id": "3",
              "name": "lead_name",
              "value": "={{ $(\"Typeform Submission\").first().json.full_name }}",
              "type": "string"
            },
            {
              "id": "4",
              "name": "business_name",
              "value": "={{ $(\"Typeform Submission\").first().json.business_name }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      }
    },
    {
      "name": "Batch Create 3 Websites",
      "type": "n8n-nodes-lindo.lindo",
      "typeVersion": 1,
      "position": [
        800,
        224
      ],
      "parameters": {
        "resource": "website",
        "operation": "batchCreate",
        "items": "={{ $json.items }}"
      },
      "credentials": {
        "lindoApi": {
          "id": "EZiHryOUuVuxcDYQ",
          "name": "Lindo account"
        }
      }
    },
    {
      "name": "Persist Workflow IDs",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1024,
        224
      ],
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "5",
              "name": "workflow_ids",
              "value": "={{ JSON.stringify(($json.items||[]).filter(i=>i.success).map(i=>i.workflow_id)) }}",
              "type": "string"
            },
            {
              "id": "6",
              "name": "lead_email",
              "value": "={{ $(\"Persist Lead + Plan\").first().json.lead_email }}",
              "type": "string"
            },
            {
              "id": "7",
              "name": "lead_name",
              "value": "={{ $(\"Persist Lead + Plan\").first().json.lead_name }}",
              "type": "string"
            },
            {
              "id": "8",
              "name": "business_name",
              "value": "={{ $(\"Persist Lead + Plan\").first().json.business_name }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      }
    },
    {
      "name": "Batch Check Status",
      "type": "n8n-nodes-lindo.lindo",
      "typeVersion": 1,
      "position": [
        1248,
        224
      ],
      "parameters": {
        "resource": "workflow",
        "operation": "batchCheckWebsite",
        "workflowIds": "={{ $(\"Persist Workflow IDs\").first().json.workflow_ids }}"
      },
      "credentials": {
        "lindoApi": {
          "id": "EZiHryOUuVuxcDYQ",
          "name": "Lindo account"
        }
      }
    },
    {
      "name": "Carry Forward",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1472,
        160
      ],
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "9",
              "name": "done",
              "value": "={{ $json.done }}",
              "type": "boolean"
            },
            {
              "id": "10",
              "name": "status",
              "value": "={{ $json.status }}",
              "type": "string"
            },
            {
              "id": "11",
              "name": "message",
              "value": "={{ $json.message }}",
              "type": "string"
            },
            {
              "id": "12",
              "name": "items",
              "value": "={{ JSON.stringify($json.items||[]) }}",
              "type": "string"
            },
            {
              "id": "13",
              "name": "lead_email",
              "value": "={{ $(\"Persist Workflow IDs\").first().json.lead_email }}",
              "type": "string"
            },
            {
              "id": "14",
              "name": "lead_name",
              "value": "={{ $(\"Persist Workflow IDs\").first().json.lead_name }}",
              "type": "string"
            },
            {
              "id": "15",
              "name": "business_name",
              "value": "={{ $(\"Persist Workflow IDs\").first().json.business_name }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      }
    },
    {
      "name": "All Done?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.3,
      "position": [
        1696,
        160
      ],
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 3
          },
          "conditions": [
            {
              "id": "d",
              "leftValue": "={{ $json.done }}",
              "rightValue": true,
              "operator": {
                "type": "boolean",
                "operation": "equals",
                "name": "filter.operator.equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      }
    },
    {
      "name": "Create Client",
      "type": "n8n-nodes-lindo.lindo",
      "typeVersion": 1,
      "position": [
        1920,
        112
      ],
      "parameters": {
        "resource": "client",
        "operation": "create",
        "email": "={{ $json.lead_email }}",
        "name": "={{ $json.lead_name }}"
      },
      "credentials": {
        "lindoApi": {
          "id": "EZiHryOUuVuxcDYQ",
          "name": "Lindo account"
        }
      }
    },
    {
      "name": "Assign Website",
      "type": "n8n-nodes-lindo.lindo",
      "typeVersion": 1,
      "position": [
        2144,
        112
      ],
      "parameters": {
        "resource": "client",
        "operation": "assignWebsite",
        "websiteId": "={{ JSON.parse($(\"Carry Forward\").first().json.items)[0].result.website_id }}",
        "clientId": "={{ $json.client_id }}"
      },
      "credentials": {
        "lindoApi": {
          "id": "EZiHryOUuVuxcDYQ",
          "name": "Lindo account"
        }
      }
    },
    {
      "name": "Generate Magic Link",
      "type": "n8n-nodes-lindo.lindo",
      "typeVersion": 1,
      "position": [
        2368,
        112
      ],
      "parameters": {
        "resource": "client",
        "operation": "generateMagicLink",
        "clientId": "={{ $(\"Create Client\").first().json.client_id }}"
      },
      "credentials": {
        "lindoApi": {
          "id": "EZiHryOUuVuxcDYQ",
          "name": "Lindo account"
        }
      }
    },
    {
      "name": "Send Welcome Email",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 3.1,
      "position": [
        2592,
        112
      ],
      "parameters": {
        "promptType": "define",
        "text": "=Send welcome email with 3 website URLs.\n\nLead: {{ $(\"Carry Forward\").first().json.lead_name }} ({{ $(\"Carry Forward\").first().json.lead_email }})\nBusiness: {{ $(\"Carry Forward\").first().json.business_name }}\nMagic Link: {{ $(\"Generate Magic Link\").first().json.magic_link }}\nWebsites: {{ $(\"Carry Forward\").first().json.items }}\n\nGreet by name, present each site, include magic link, sign off from Lindo AI. Send via Emailr.",
        "options": {
          "systemMessage": "Welcome email with 3 website variants + portal link. Send via Emailr."
        }
      }
    },
    {
      "name": "OpenAI Email",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.3,
      "position": [
        2608,
        336
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "Yuica5wlzDrhFTNk",
          "name": "OpenAi account"
        }
      }
    },
    {
      "name": "Emailr",
      "type": "n8n-nodes-emailr.emailrTool",
      "typeVersion": 1,
      "position": [
        2736,
        336
      ],
      "parameters": {
        "from": "lindo.ai <sales@lindo.ai>",
        "to": "={{ $fromAI('To','') }}",
        "subject": "={{ $fromAI('Subject','') }}",
        "html": "=",
        "text": "={{ $fromAI('Text_Body','','string') }}"
      },
      "credentials": {
        "emailrApi": {
          "id": "1QJ6NqiurNRi9d4C",
          "name": "Emailr account"
        }
      }
    },
    {
      "name": "Slack Notification",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.4,
      "position": [
        2944,
        112
      ],
      "parameters": {
        "resource": "message",
        "operation": "post",
        "channel": "#new-leads",
        "text": "=🌐 3 designs for {{ $(\"Carry Forward\").first().json.lead_name }}. Email sent."
      },
      "webhookId": "d7718597-c3e4-4f27-ac2f-c11b80b3a887",
      "credentials": {
        "slackApi": {
          "id": "sXUjiMVMx3RPbSTG",
          "name": "Slack account"
        }
      }
    },
    {
      "name": "Wait 60s",
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        1920,
        320
      ],
      "parameters": {
        "amount": 60
      },
      "webhookId": "65eda2d8-6f90-4287-bed2-0e9b62947a2a"
    },
    {
      "name": "Sticky Note 306cc2de",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1472,
        496
      ],
      "parameters": {
        "content": "### Typeform → 3 Design Options + Client Portal\n\nProspect submits Typeform brief → AI generates 3 distinct website designs → Lindo batch-creates all 3 → polls until complete → creates client + assigns site + magic link → sends welcome email with all URLs.\n\n### How it works\n1. Typeform triggers with lead details\n2. AI (gpt-4o) generates 3 website prompts\n3. Lindo batch-creates 3 websites\n4. Polls every 60s until done\n5. Creates client → assigns site → magic link\n6. AI sends welcome email via Emailr\n7. Posts to Slack\n\n### Setup\n1. Install n8n-nodes-lindo\n2. Add: Lindo API key, OpenAI, Typeform, Emailr, Slack\n3. Set Typeform form ID\n\n### Customization\n- Swap trigger (webhook, Calendly, Sheets)\n- Change design count in AI prompt\n- Replace Emailr with Gmail",
        "color": 2,
        "width": 588,
        "height": 200
      }
    },
    {
      "name": "Sticky Note 21b8a00c",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1472,
        496
      ],
      "parameters": {
        "content": "## 1. AI Planning\nGenerates 3 distinct prompts.",
        "color": 1,
        "width": 556,
        "height": 200
      }
    },
    {
      "name": "Sticky Note 3873f862",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1472,
        496
      ],
      "parameters": {
        "content": "## 2. Batch Create & Poll\nCreates websites, waits for completion.",
        "color": 1,
        "width": 748,
        "height": 200
      }
    },
    {
      "name": "Sticky Note 72e1be23",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1472,
        496
      ],
      "parameters": {
        "content": "## 3. Client Setup & Email\nClient record, magic link, welcome email, Slack.",
        "color": 1,
        "width": 1196,
        "height": 200
      }
    }
  ],
  "connections": {
    "Typeform Submission": {
      "main": [
        [
          {
            "node": "Plan 3 Website Designs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Plan 3 Website Designs": {
      "main": [
        [
          {
            "node": "Persist Lead + Plan",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI": {
      "ai_languageModel": [
        [
          {
            "node": "Plan 3 Website Designs",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Parse 3 Prompts": {
      "ai_outputParser": [
        [
          {
            "node": "Plan 3 Website Designs",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Persist Lead + Plan": {
      "main": [
        [
          {
            "node": "Batch Create 3 Websites",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Batch Create 3 Websites": {
      "main": [
        [
          {
            "node": "Persist Workflow IDs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Persist Workflow IDs": {
      "main": [
        [
          {
            "node": "Batch Check Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Batch Check Status": {
      "main": [
        [
          {
            "node": "Carry Forward",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Carry Forward": {
      "main": [
        [
          {
            "node": "All Done?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "All Done?": {
      "main": [
        [
          {
            "node": "Create Client",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait 60s",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Client": {
      "main": [
        [
          {
            "node": "Assign Website",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Assign Website": {
      "main": [
        [
          {
            "node": "Generate Magic Link",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Magic Link": {
      "main": [
        [
          {
            "node": "Send Welcome Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Welcome Email": {
      "main": [
        [
          {
            "node": "Slack Notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Email": {
      "ai_languageModel": [
        [
          {
            "node": "Send Welcome Email",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Emailr": {
      "ai_tool": [
        [
          {
            "node": "Send Welcome Email",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Wait 60s": {
      "main": [
        [
          {
            "node": "Batch Check Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "templateCredsSetupCompleted": false
  }
}