{
  "name": "03 · Calendly Booking → Pre-Built Demo Site",
  "nodes": [
    {
      "name": "Calendly Booking",
      "type": "n8n-nodes-base.calendlyTrigger",
      "typeVersion": 1,
      "position": [
        0,
        224
      ],
      "parameters": {
        "events": [
          "invitee.created"
        ]
      },
      "webhookId": "dfa96faf-89f3-4a7a-a743-9c9416f4d5d0"
    },
    {
      "name": "Extract Booking Data",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        224,
        224
      ],
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "a1",
              "name": "name",
              "value": "={{ $json.payload.name }}",
              "type": "string"
            },
            {
              "id": "a2",
              "name": "email",
              "value": "={{ $json.payload.email }}",
              "type": "string"
            },
            {
              "id": "a3",
              "name": "company",
              "value": "={{ $json.payload.questions_and_answers?.[0]?.answer || \"their company\" }}",
              "type": "string"
            },
            {
              "id": "a4",
              "name": "business_description",
              "value": "={{ $json.payload.questions_and_answers?.[1]?.answer || \"\" }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      }
    },
    {
      "name": "Build Demo Site",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 3.1,
      "position": [
        448,
        224
      ],
      "parameters": {
        "promptType": "define",
        "text": "=Build a demo website for an upcoming sales call.\n\nProspect: {{ $json.name }}\nCompany: {{ $json.company }}\nBusiness: {{ $json.business_description }}\n\nUse the Lindo Create Website tool with a detailed prompt. Return the workflow_id.",
        "options": {
          "systemMessage": "You build impressive demo websites for sales prospects."
        }
      }
    },
    {
      "name": "OpenAI",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.3,
      "position": [
        464,
        448
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "Yuica5wlzDrhFTNk",
          "name": "OpenAi account"
        }
      }
    },
    {
      "name": "Lindo Create Website",
      "type": "n8n-nodes-lindo.lindoTool",
      "typeVersion": 1,
      "position": [
        592,
        448
      ],
      "parameters": {
        "prompt": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Prompt', '') }}"
      },
      "credentials": {
        "lindoApi": {
          "id": "EZiHryOUuVuxcDYQ",
          "name": "Lindo account"
        }
      }
    },
    {
      "name": "Persist Data",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        800,
        224
      ],
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "b1",
              "name": "workflow_id",
              "value": "={{ $json.output.match(/workflow_id[:\\\\s]*([\\\\w-]+)/)?.[1] || \"\" }}",
              "type": "string"
            },
            {
              "id": "b2",
              "name": "name",
              "value": "={{ $(\"Extract Booking Data\").first().json.name }}",
              "type": "string"
            },
            {
              "id": "b3",
              "name": "email",
              "value": "={{ $(\"Extract Booking Data\").first().json.email }}",
              "type": "string"
            },
            {
              "id": "b4",
              "name": "company",
              "value": "={{ $(\"Extract Booking Data\").first().json.company }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      }
    },
    {
      "name": "Check Status",
      "type": "n8n-nodes-lindo.lindo",
      "typeVersion": 1,
      "position": [
        1024,
        224
      ],
      "parameters": {
        "resource": "workflow",
        "operation": "checkWebsite",
        "workflowId": "={{ $(\"Persist Data\").first().json.workflow_id }}"
      },
      "credentials": {
        "lindoApi": {
          "id": "EZiHryOUuVuxcDYQ",
          "name": "Lindo account"
        }
      }
    },
    {
      "name": "Carry Forward",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1248,
        160
      ],
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "c1",
              "name": "done",
              "value": "={{ $json.done }}",
              "type": "boolean"
            },
            {
              "id": "c2",
              "name": "website_url",
              "value": "={{ $json.result?.domain || \"\" }}",
              "type": "string"
            },
            {
              "id": "c3",
              "name": "name",
              "value": "={{ $(\"Persist Data\").first().json.name }}",
              "type": "string"
            },
            {
              "id": "c4",
              "name": "email",
              "value": "={{ $(\"Persist Data\").first().json.email }}",
              "type": "string"
            },
            {
              "id": "c5",
              "name": "company",
              "value": "={{ $(\"Persist Data\").first().json.company }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      }
    },
    {
      "name": "Done?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.3,
      "position": [
        1472,
        160
      ],
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 3
          },
          "conditions": [
            {
              "id": "d1",
              "leftValue": "={{ $json.done }}",
              "rightValue": true,
              "operator": {
                "type": "boolean",
                "operation": "equals",
                "name": "filter.operator.equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      }
    },
    {
      "name": "Generate Magic Link",
      "type": "n8n-nodes-lindo.lindo",
      "typeVersion": 1,
      "position": [
        1696,
        112
      ],
      "parameters": {
        "resource": "client",
        "operation": "generateMagicLink",
        "clientId": "={{ $json.email }}"
      },
      "credentials": {
        "lindoApi": {
          "id": "EZiHryOUuVuxcDYQ",
          "name": "Lindo account"
        }
      }
    },
    {
      "name": "Send Pre-Meeting Email",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 3.1,
      "position": [
        1920,
        112
      ],
      "parameters": {
        "promptType": "define",
        "text": "=Send a pre-meeting email with the demo site.\n\nProspect: {{ $(\"Carry Forward\").first().json.name }} ({{ $(\"Carry Forward\").first().json.email }})\nCompany: {{ $(\"Carry Forward\").first().json.company }}\nDemo Site: {{ $(\"Carry Forward\").first().json.website_url }}\n\nBrief exciting email: \"Before our call, here's a preview.\" Include URL. Send via Emailr.",
        "options": {
          "systemMessage": "Send a brief pre-meeting demo preview email via Emailr."
        }
      }
    },
    {
      "name": "OpenAI Email",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.3,
      "position": [
        1936,
        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": [
        2064,
        336
      ],
      "parameters": {
        "from": "lindo.ai <sales@lindo.ai>",
        "to": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('To', '') }}",
        "subject": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Subject', '') }}",
        "html": "=",
        "text": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Text_Body', ``, 'string') }}"
      },
      "credentials": {
        "emailrApi": {
          "id": "1QJ6NqiurNRi9d4C",
          "name": "Emailr account"
        }
      }
    },
    {
      "name": "Slack: AE Prep",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.4,
      "position": [
        2272,
        112
      ],
      "parameters": {
        "resource": "message",
        "operation": "post",
        "channel": "#ae-prep",
        "text": "=📅 Demo ready for {{ $(\"Carry Forward\").first().json.company }}: {{ $(\"Carry Forward\").first().json.website_url }}"
      },
      "webhookId": "1a5bd4ac-3ed5-4ca4-936f-9277f1505458",
      "credentials": {
        "slackApi": {
          "id": "sXUjiMVMx3RPbSTG",
          "name": "Slack account"
        }
      }
    },
    {
      "name": "Wait 60s",
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        1696,
        320
      ],
      "parameters": {
        "amount": 60
      },
      "webhookId": "1559db79-e6b0-4b2d-b46b-b90c7e55c9d4"
    },
    {
      "name": "Sticky Note d57255af",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1136,
        496
      ],
      "parameters": {
        "content": "### 03 · Calendly Booking → Pre-Built Demo Site\n\n**How it works:** Calendly invitee.created webhook fires → extracts prospect info → AI agent builds a personalised demo website → polls status → generates magic link → sends pre-meeting email with site preview → alerts AE in Slack.\n\n**Setup:** Connect Calendly trigger. Add custom questions for company name and business description. Connect Slack to #ae-prep. Configure Emailr credentials.\n\n**Customisation:** Adjust the AI prompt to match your demo style. Change email tone in the Send Pre-Meeting Email agent. Add CRM logging after the Slack step. Modify polling interval (default 60s).",
        "color": 2,
        "width": 2572,
        "height": 408
      }
    },
    {
      "name": "Sticky Note 10f38a49",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1136,
        496
      ],
      "parameters": {
        "content": "## Trigger & Extract\nCalendly booking webhook extracts prospect name, email, company, and business description.",
        "color": 1,
        "width": 524,
        "height": 200
      }
    },
    {
      "name": "Sticky Note a7787722",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1136,
        496
      ],
      "parameters": {
        "content": "## AI Demo Builder\nGPT-4o agent creates a tailored demo site using Lindo tool based on prospect context.",
        "color": 1,
        "width": 300,
        "height": 200
      }
    },
    {
      "name": "Sticky Note 3fa41f1c",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1136,
        496
      ],
      "parameters": {
        "content": "## Delivery & Notification\nMagic link generated, pre-meeting email sent, AE alerted in Slack with demo URL.",
        "color": 1,
        "width": 876,
        "height": 200
      }
    }
  ],
  "connections": {
    "Calendly Booking": {
      "main": [
        [
          {
            "node": "Extract Booking Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Booking Data": {
      "main": [
        [
          {
            "node": "Build Demo Site",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Demo Site": {
      "main": [
        [
          {
            "node": "Persist Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI": {
      "ai_languageModel": [
        [
          {
            "node": "Build Demo Site",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Lindo Create Website": {
      "ai_tool": [
        [
          {
            "node": "Build Demo Site",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Persist Data": {
      "main": [
        [
          {
            "node": "Check Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Status": {
      "main": [
        [
          {
            "node": "Carry Forward",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Carry Forward": {
      "main": [
        [
          {
            "node": "Done?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Done?": {
      "main": [
        [
          {
            "node": "Generate Magic Link",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait 60s",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Magic Link": {
      "main": [
        [
          {
            "node": "Send Pre-Meeting Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Pre-Meeting Email": {
      "main": [
        [
          {
            "node": "Slack: AE Prep",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Email": {
      "ai_languageModel": [
        [
          {
            "node": "Send Pre-Meeting Email",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Emailr": {
      "ai_tool": [
        [
          {
            "node": "Send Pre-Meeting Email",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Wait 60s": {
      "main": [
        [
          {
            "node": "Check Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "templateCredsSetupCompleted": false
  }
}