2
0

♻️ Introduce typebot v6 with events (#1013)

Closes #885
This commit is contained in:
Baptiste Arnaud
2023-11-08 15:34:16 +01:00
committed by GitHub
parent 68e4fc71fb
commit 35300eaf34
634 changed files with 58971 additions and 31449 deletions

View File

@ -16,9 +16,6 @@
"NEXT_PUBLIC_VIEWER_URL": "http://localhost:3001", "NEXT_PUBLIC_VIEWER_URL": "http://localhost:3001",
"NEXTAUTH_URL": "http://localhost:3000" "NEXTAUTH_URL": "http://localhost:3000"
}, },
"[php]": {
"editor.defaultFormatter": "bmewburn.vscode-intelephense-client"
},
"[prisma]": { "[prisma]": {
"editor.defaultFormatter": "Prisma.prisma" "editor.defaultFormatter": "Prisma.prisma"
} }

View File

@ -39,6 +39,7 @@
"@typebot.io/emails": "workspace:*", "@typebot.io/emails": "workspace:*",
"@typebot.io/env": "workspace:*", "@typebot.io/env": "workspace:*",
"@typebot.io/nextjs": "workspace:*", "@typebot.io/nextjs": "workspace:*",
"@typebot.io/js": "workspace:*",
"@udecode/plate-basic-marks": "21.1.5", "@udecode/plate-basic-marks": "21.1.5",
"@udecode/plate-common": "21.1.5", "@udecode/plate-common": "21.1.5",
"@udecode/plate-core": "21.1.5", "@udecode/plate-core": "21.1.5",
@ -116,7 +117,7 @@
"eslint-config-custom": "workspace:*", "eslint-config-custom": "workspace:*",
"next-runtime-env": "1.6.2", "next-runtime-env": "1.6.2",
"superjson": "1.12.4", "superjson": "1.12.4",
"typescript": "5.1.6", "typescript": "5.2.2",
"zod": "3.21.4" "zod": "3.22.4"
} }
} }

View File

@ -1,129 +1,24 @@
{ {
"id": "clf6ov7hg00001ao6q02sb8re", "version": "6",
"version": "4", "id": "clofz4jhf00071a5pjlh8ruwr",
"createdAt": "2023-03-13T10:35:44.933Z",
"updatedAt": "2023-03-13T14:53:00.817Z",
"icon": "🤖",
"name": "Basic ChatGPT", "name": "Basic ChatGPT",
"folderId": null, "events": [
"groups": [
{ {
"id": "ewnfbo0exlu7ihfu2lu2lusm", "id": "ewnfbo0exlu7ihfu2lu2lusm",
"title": "Start", "outgoingEdgeId": "q25yjqccpjv3i1tclgv1x941",
"blocks": [ "graphCoordinates": { "x": -228.25, "y": -123.31 },
{ "type": "start"
"id": "igbipfi63m6p9sl2f77uicuv", }
"type": "start", ],
"label": "Start", "groups": [
"groupId": "ewnfbo0exlu7ihfu2lu2lusm",
"outgoingEdgeId": "sevwpre8fo896btd6xm1e1dv"
}
],
"graphCoordinates": { "x": -20.9296875, "y": -125.6796875 }
},
{
"id": "qfrz5nwm63g12dajsjxothb5",
"title": "User input",
"blocks": [
{
"id": "ovgk70u0kfxrbtz9dy4e040o",
"type": "text input",
"groupId": "qfrz5nwm63g12dajsjxothb5",
"options": {
"isLong": true,
"labels": {
"button": "Send",
"placeholder": "Type your answer..."
},
"variableId": "vevnx5f5bojz0sv648x6ppcmv",
"isPrefillDisabled": true
},
"outgoingEdgeId": "kwm65fnel1gddbwdki9rq76v"
}
],
"graphCoordinates": { "x": 385.59765625, "y": 176 }
},
{
"id": "a6ymhjwtkqwp8t127plz8qmk",
"title": "ChatGPT reply",
"blocks": [
{
"id": "xikptnw1lp1qxdqo10qhmwy1",
"type": "OpenAI",
"groupId": "a6ymhjwtkqwp8t127plz8qmk",
"options": {
"task": "Create chat completion",
"model": "gpt-3.5-turbo",
"messages": [
{
"id": "vexqydoltfc5fkdrcednlvjz",
"role": "Messages sequence ✨",
"content": {
"userMessagesVariableId": "vevnx5f5bojz0sv648x6ppcmv",
"assistantMessagesVariableId": "vni6kwbch8zlq92dclgcivzyr"
}
}
],
"responseMapping": [
{
"id": "brb5ccisi1tjiqf3ng0asaiq",
"variableId": "vni6kwbch8zlq92dclgcivzyr",
"valueToExtract": "Message content"
}
]
}
},
{
"id": "myldn1l1nfdwwm8qvza71rwv",
"type": "text",
"content": {
"richText": [
{
"type": "p",
"children": [{ "text": "{{Assistant Messages}}" }]
}
]
},
"groupId": "a6ymhjwtkqwp8t127plz8qmk",
"outgoingEdgeId": "y8ml9ljnsydol9b42fd9zdve"
}
],
"graphCoordinates": { "x": 744.05078125, "y": 178.00390625 }
},
{
"id": "c5f00f3oclwi1srcz10jjt9u",
"title": "Intro",
"blocks": [
{
"id": "vzcrfk4vl9gy8igu0ysja5nc",
"type": "text",
"content": {
"richText": [
{ "type": "p", "children": [{ "text": "Hi there 👋" }] }
]
},
"groupId": "c5f00f3oclwi1srcz10jjt9u"
},
{
"id": "gphm5wy1md9cunwkdtbzg6nq",
"type": "text",
"content": {
"richText": [
{ "type": "p", "children": [{ "text": "How can I help?" }] }
]
},
"groupId": "c5f00f3oclwi1srcz10jjt9u",
"outgoingEdgeId": "h5sk58j0ryrxmfv4gmw7r4dw"
}
],
"graphCoordinates": { "x": 54.7421875, "y": 172.83203125 }
},
{ {
"id": "t3tv4dm3khwmiotjle5jb65g", "id": "t3tv4dm3khwmiotjle5jb65g",
"title": "", "title": "",
"graphCoordinates": { "x": 10.94, "y": -121.96 },
"blocks": [ "blocks": [
{ {
"id": "s6eky7dd3md9hto9y4wsuj7h", "id": "s6eky7dd3md9hto9y4wsuj7h",
"groupId": "t3tv4dm3khwmiotjle5jb65g",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
@ -136,11 +31,11 @@
] ]
} }
] ]
}, }
"groupId": "t3tv4dm3khwmiotjle5jb65g"
}, },
{ {
"id": "nqsu9f13q5j8tt56bcbuto62", "id": "nqsu9f13q5j8tt56bcbuto62",
"groupId": "t3tv4dm3khwmiotjle5jb65g",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
@ -151,92 +46,169 @@
"text": "Once it's done, delete this group and connect the " "text": "Once it's done, delete this group and connect the "
}, },
{ "bold": true, "text": "Start" }, { "bold": true, "text": "Start" },
{ "text": " block with " }, { "text": " event with " },
{ "bold": true, "text": "Intro" }, { "bold": true, "text": "Intro" },
{ "text": " 🚀" } { "text": " 🚀" }
] ]
} }
] ]
}, }
"groupId": "t3tv4dm3khwmiotjle5jb65g"
} }
], ]
"graphCoordinates": { "x": 321.13671875, "y": -121.90234375 } },
{
"id": "qfrz5nwm63g12dajsjxothb5",
"title": "User input",
"graphCoordinates": { "x": 198.64, "y": 179.04 },
"blocks": [
{
"id": "ovgk70u0kfxrbtz9dy4e040o",
"groupId": "qfrz5nwm63g12dajsjxothb5",
"type": "text input",
"options": { "variableId": "vudksu3zyrat6s1bq6qne0rx3" }
},
{
"id": "m4jadtknjb3za3gvxj1xdn1k",
"groupId": "qfrz5nwm63g12dajsjxothb5",
"outgoingEdgeId": "fpj0xacppqd1s5slyljzhzc9",
"type": "Set variable",
"options": {
"variableId": "vabkycu0qqff5d6ar2ama16pf",
"type": "Append value(s)",
"item": "{{User Message}}"
}
}
]
},
{
"id": "a6ymhjwtkqwp8t127plz8qmk",
"title": "ChatGPT reply",
"graphCoordinates": { "x": 624.57, "y": 200.09 },
"blocks": [
{
"id": "xikptnw1lp1qxdqo10qhmwy1",
"groupId": "a6ymhjwtkqwp8t127plz8qmk",
"type": "OpenAI",
"options": {
"task": "Create chat completion",
"model": "gpt-3.5-turbo",
"messages": [
{
"id": "wsdxha9db58gk2v9n1j10m7c",
"role": "Dialogue",
"dialogueVariableId": "vabkycu0qqff5d6ar2ama16pf",
"startsBy": "user"
}
],
"responseMapping": [
{
"id": "p8ksqi2jhyzid2od3dikv299",
"valueToExtract": "Message content",
"variableId": "vni6kwbch8zlq92dclgcivzyr"
}
],
"credentialsId": "clocxtxlc00031an2uc59hdpb"
}
},
{
"id": "yblc864bzipaqfja7b2o3oo0",
"groupId": "a6ymhjwtkqwp8t127plz8qmk",
"type": "Set variable",
"options": {
"variableId": "vabkycu0qqff5d6ar2ama16pf",
"type": "Append value(s)",
"item": "{{Assistant Message}}"
}
},
{
"id": "myldn1l1nfdwwm8qvza71rwv",
"groupId": "a6ymhjwtkqwp8t127plz8qmk",
"outgoingEdgeId": "y8ml9ljnsydol9b42fd9zdve",
"type": "text",
"content": {
"richText": [
{ "type": "p", "children": [{ "text": "{{Assistant Message}}" }] }
]
}
}
]
},
{
"id": "c5f00f3oclwi1srcz10jjt9u",
"title": "Intro",
"graphCoordinates": { "x": -183.19, "y": 156.03 },
"blocks": [
{
"id": "vzcrfk4vl9gy8igu0ysja5nc",
"groupId": "c5f00f3oclwi1srcz10jjt9u",
"type": "text",
"content": {
"richText": [
{ "type": "p", "children": [{ "text": "Hi there 👋" }] }
]
}
},
{
"id": "gphm5wy1md9cunwkdtbzg6nq",
"groupId": "c5f00f3oclwi1srcz10jjt9u",
"outgoingEdgeId": "h5sk58j0ryrxmfv4gmw7r4dw",
"type": "text",
"content": {
"richText": [
{ "type": "p", "children": [{ "text": "How can I help?" }] }
]
}
}
]
} }
], ],
"variables": [
{ "id": "vni6kwbch8zlq92dclgcivzyr", "name": "Assistant Messages" },
{ "id": "vevnx5f5bojz0sv648x6ppcmv", "name": "User Messages" }
],
"edges": [ "edges": [
{ {
"id": "h5sk58j0ryrxmfv4gmw7r4dw", "id": "h5sk58j0ryrxmfv4gmw7r4dw",
"to": { "groupId": "qfrz5nwm63g12dajsjxothb5" },
"from": { "from": {
"blockId": "gphm5wy1md9cunwkdtbzg6nq", "groupId": "c5f00f3oclwi1srcz10jjt9u",
"groupId": "c5f00f3oclwi1srcz10jjt9u" "blockId": "gphm5wy1md9cunwkdtbzg6nq"
} },
}, "to": { "groupId": "qfrz5nwm63g12dajsjxothb5" }
{
"id": "kwm65fnel1gddbwdki9rq76v",
"to": { "groupId": "a6ymhjwtkqwp8t127plz8qmk" },
"from": {
"blockId": "ovgk70u0kfxrbtz9dy4e040o",
"groupId": "qfrz5nwm63g12dajsjxothb5"
}
}, },
{ {
"id": "y8ml9ljnsydol9b42fd9zdve", "id": "y8ml9ljnsydol9b42fd9zdve",
"to": { "groupId": "qfrz5nwm63g12dajsjxothb5" },
"from": { "from": {
"blockId": "myldn1l1nfdwwm8qvza71rwv", "groupId": "a6ymhjwtkqwp8t127plz8qmk",
"groupId": "a6ymhjwtkqwp8t127plz8qmk" "blockId": "myldn1l1nfdwwm8qvza71rwv"
} },
"to": { "groupId": "qfrz5nwm63g12dajsjxothb5" }
}, },
{ {
"id": "sevwpre8fo896btd6xm1e1dv", "id": "fpj0xacppqd1s5slyljzhzc9",
"to": { "groupId": "t3tv4dm3khwmiotjle5jb65g" },
"from": { "from": {
"blockId": "igbipfi63m6p9sl2f77uicuv", "groupId": "qfrz5nwm63g12dajsjxothb5",
"groupId": "ewnfbo0exlu7ihfu2lu2lusm" "blockId": "m4jadtknjb3za3gvxj1xdn1k"
} },
"to": { "groupId": "a6ymhjwtkqwp8t127plz8qmk" }
},
{
"from": { "eventId": "ewnfbo0exlu7ihfu2lu2lusm" },
"to": { "groupId": "t3tv4dm3khwmiotjle5jb65g" },
"id": "q25yjqccpjv3i1tclgv1x941"
} }
], ],
"theme": { "variables": [
"chat": { { "id": "vni6kwbch8zlq92dclgcivzyr", "name": "Assistant Message" },
"inputs": { { "id": "vudksu3zyrat6s1bq6qne0rx3", "name": "User Message" },
"color": "#303235", { "id": "vabkycu0qqff5d6ar2ama16pf", "name": "Chat history" }
"backgroundColor": "#FFFFFF", ],
"placeholderColor": "#9095A0" "theme": {},
}, "selectedThemeTemplateId": null,
"buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" }, "settings": { "general": {} },
"hostAvatar": { "createdAt": "2023-11-01T16:30:13.155Z",
"isEnabled": true "updatedAt": "2023-11-01T16:30:13.155Z",
}, "icon": "🤖",
"hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" }, "folderId": null,
"guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" }
},
"general": {
"font": "Open Sans",
"background": { "type": "Color", "content": "#ffffff" }
}
},
"settings": {
"general": {
"isBrandingEnabled": false,
"isInputPrefillEnabled": true,
"isHideQueryParamsEnabled": true,
"isNewResultOnRefreshEnabled": true
},
"metadata": {
"description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form."
},
"typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 }
},
"publicId": null, "publicId": null,
"customDomain": null, "customDomain": null,
"workspaceId": "freeWorkspace",
"resultsTablePreferences": null, "resultsTablePreferences": null,
"isArchived": false, "isArchived": false,
"isClosed": false "isClosed": false,
"whatsAppCredentialsId": null
} }

View File

@ -1,29 +1,20 @@
{ {
"id": "qcueq3ttys1ddagic7jsimp4", "version": "6",
"version": "4", "id": "cloi9k6tf00051aqji6vk88pq",
"createdAt": "2023-03-30T15:45:12.464Z",
"updatedAt": "2023-03-30T15:45:12.464Z",
"icon": "🎭",
"name": "ChatGPT personas", "name": "ChatGPT personas",
"folderId": null, "events": [
"groups": [
{ {
"id": "w99qhdr20tw02sfrfwkfc1tg", "id": "w99qhdr20tw02sfrfwkfc1tg",
"title": "Start", "outgoingEdgeId": "c3733n7ia1hxcwld9lm3p351",
"blocks": [ "graphCoordinates": { "x": -95.29, "y": -267.02 },
{ "type": "start"
"id": "igbipfi63m6p9sl2f77uicuv", }
"type": "start", ],
"label": "Start", "groups": [
"groupId": "w99qhdr20tw02sfrfwkfc1tg",
"outgoingEdgeId": "x91dpk80zw2b4co4xra33cwg"
}
],
"graphCoordinates": { "x": -61.95703125, "y": -242.94140625 }
},
{ {
"id": "bofjp88arodr4k0btv2esyqy", "id": "bofjp88arodr4k0btv2esyqy",
"title": "", "title": "",
"graphCoordinates": { "x": 188.44, "y": -308.74 },
"blocks": [ "blocks": [
{ {
"id": "s6eky7dd3md9hto9y4wsuj7h", "id": "s6eky7dd3md9hto9y4wsuj7h",
@ -39,8 +30,7 @@
] ]
} }
] ]
}, }
"groupId": "bofjp88arodr4k0btv2esyqy"
}, },
{ {
"id": "nqsu9f13q5j8tt56bcbuto62", "id": "nqsu9f13q5j8tt56bcbuto62",
@ -60,20 +50,18 @@
] ]
} }
] ]
}, }
"groupId": "bofjp88arodr4k0btv2esyqy"
} }
], ]
"graphCoordinates": { "x": 303.5859375, "y": -278.4921875 }
}, },
{ {
"id": "dmg57mgick51p8l5pnyqtyf9", "id": "dmg57mgick51p8l5pnyqtyf9",
"title": "Explainer AI reply", "title": "Explainer AI reply",
"graphCoordinates": { "x": 1053.297810684862, "y": 919.9658659364646 },
"blocks": [ "blocks": [
{ {
"id": "xikptnw1lp1qxdqo10qhmwy1", "id": "xikptnw1lp1qxdqo10qhmwy1",
"type": "OpenAI", "type": "OpenAI",
"groupId": "dmg57mgick51p8l5pnyqtyf9",
"options": { "options": {
"task": "Create chat completion", "task": "Create chat completion",
"model": "gpt-3.5-turbo", "model": "gpt-3.5-turbo",
@ -85,34 +73,36 @@
}, },
{ {
"id": "i8i226uylkh84ovtpguaqc83", "id": "i8i226uylkh84ovtpguaqc83",
"role": "Messages sequence ✨", "role": "Dialogue",
"content": { "dialogueVariableId": "vu9adij5penetej2xz89htfe6"
"userMessagesVariableId": "vevnx5f5bojz0sv648x6ppcmv",
"assistantMessagesVariableId": "vni6kwbch8zlq92dclgcivzyr"
}
} }
], ],
"responseMapping": [ "responseMapping": [
{ {
"id": "brb5ccisi1tjiqf3ng0asaiq", "id": "brb5ccisi1tjiqf3ng0asaiq",
"variableId": "vni6kwbch8zlq92dclgcivzyr", "valueToExtract": "Message content",
"valueToExtract": "Message content" "variableId": "vni6kwbch8zlq92dclgcivzyr"
} }
] ]
} }
}, },
{
"id": "kftq9x1wnrcefzc268ydmqkn",
"type": "Set variable",
"options": {
"variableId": "vu9adij5penetej2xz89htfe6",
"type": "Append value(s)",
"item": "{{Assistant Message}}"
}
},
{ {
"id": "myldn1l1nfdwwm8qvza71rwv", "id": "myldn1l1nfdwwm8qvza71rwv",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
{ { "type": "p", "children": [{ "text": "{{Assistant Message}}" }] }
"type": "p",
"children": [{ "text": "{{Assistant Messages}}" }]
}
] ]
}, }
"groupId": "dmg57mgick51p8l5pnyqtyf9"
}, },
{ {
"id": "jz9mklagfikyukzs7n3kmlcf", "id": "jz9mklagfikyukzs7n3kmlcf",
@ -120,33 +110,28 @@
"items": [ "items": [
{ {
"id": "x18iwzwmbzi9jjpnwij1861i", "id": "x18iwzwmbzi9jjpnwij1861i",
"type": 0, "outgoingEdgeId": "mxl8lftsj3pbmj4g24ymxajo",
"blockId": "jz9mklagfikyukzs7n3kmlcf", "type": "button",
"content": "Continue", "content": "Continue"
"outgoingEdgeId": "mxl8lftsj3pbmj4g24ymxajo"
}, },
{ {
"id": "imx7otsonvm0takr02b4ulyo", "id": "imx7otsonvm0takr02b4ulyo",
"type": 0, "outgoingEdgeId": "ny44r5sp69gne7obgshidhph",
"blockId": "jz9mklagfikyukzs7n3kmlcf", "type": "button",
"content": "Menu", "content": "Menu"
"outgoingEdgeId": "ny44r5sp69gne7obgshidhph"
} }
], ]
"groupId": "dmg57mgick51p8l5pnyqtyf9",
"options": { "buttonLabel": "Send", "isMultipleChoice": false }
} }
], ]
"graphCoordinates": { "x": 1053.2978106848623, "y": 919.9658659364646 }
}, },
{ {
"id": "fj5z2nx488htv0843kq6qeyk", "id": "fj5z2nx488htv0843kq6qeyk",
"title": "Professor AI reply", "title": "Professor AI reply",
"graphCoordinates": { "x": 1040.86, "y": -128.46 },
"blocks": [ "blocks": [
{ {
"id": "f2r11ibqq2ufrahfcl3gf6qi", "id": "f2r11ibqq2ufrahfcl3gf6qi",
"type": "OpenAI", "type": "OpenAI",
"groupId": "fj5z2nx488htv0843kq6qeyk",
"options": { "options": {
"task": "Create chat completion", "task": "Create chat completion",
"model": "gpt-3.5-turbo", "model": "gpt-3.5-turbo",
@ -158,34 +143,36 @@
}, },
{ {
"id": "biqljpsbqfkgno4m80s4j5p0", "id": "biqljpsbqfkgno4m80s4j5p0",
"role": "Messages sequence ✨", "role": "Dialogue",
"content": { "dialogueVariableId": "vu9adij5penetej2xz89htfe6"
"userMessagesVariableId": "vevnx5f5bojz0sv648x6ppcmv",
"assistantMessagesVariableId": "vni6kwbch8zlq92dclgcivzyr"
}
} }
], ],
"responseMapping": [ "responseMapping": [
{ {
"id": "brb5ccisi1tjiqf3ng0asaiq", "id": "brb5ccisi1tjiqf3ng0asaiq",
"variableId": "vni6kwbch8zlq92dclgcivzyr", "valueToExtract": "Message content",
"valueToExtract": "Message content" "variableId": "vni6kwbch8zlq92dclgcivzyr"
} }
] ]
} }
}, },
{
"id": "dyfigmu4095x8p99qe461zbh",
"type": "Set variable",
"options": {
"variableId": "vu9adij5penetej2xz89htfe6",
"type": "Append value(s)",
"item": "{{Assistant Message}}"
}
},
{ {
"id": "sei88rrjcmpgm3vhxjvkofyt", "id": "sei88rrjcmpgm3vhxjvkofyt",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
{ { "type": "p", "children": [{ "text": "{{Assistant Message}}" }] }
"type": "p",
"children": [{ "text": "{{Assistant Messages}}" }]
}
] ]
}, }
"groupId": "fj5z2nx488htv0843kq6qeyk"
}, },
{ {
"id": "h3qetbhcpxhawnqoymo0v3hw", "id": "h3qetbhcpxhawnqoymo0v3hw",
@ -193,33 +180,28 @@
"items": [ "items": [
{ {
"id": "zaylo8bstqx0wp6bpdbd1rak", "id": "zaylo8bstqx0wp6bpdbd1rak",
"type": 0, "outgoingEdgeId": "q6o0cbyzxtvgls3jtz7rpdgw",
"blockId": "h3qetbhcpxhawnqoymo0v3hw", "type": "button",
"content": "Continue", "content": "Continue"
"outgoingEdgeId": "q6o0cbyzxtvgls3jtz7rpdgw"
}, },
{ {
"id": "d5jv3sjpzobsrnhcp055mxkv", "id": "d5jv3sjpzobsrnhcp055mxkv",
"type": 0, "outgoingEdgeId": "xjv7pkpgpwh169448t8pepg4",
"blockId": "h3qetbhcpxhawnqoymo0v3hw", "type": "button",
"content": "Back to menu", "content": "Back to menu"
"outgoingEdgeId": "xjv7pkpgpwh169448t8pepg4"
} }
], ]
"groupId": "fj5z2nx488htv0843kq6qeyk",
"options": { "buttonLabel": "Send", "isMultipleChoice": false }
} }
], ]
"graphCoordinates": { "x": 1047.7979125005486, "y": 4.6530793670072885 }
}, },
{ {
"id": "csbysu8dr08zxr4i6hzvzjdf", "id": "csbysu8dr08zxr4i6hzvzjdf",
"title": "Copywriter AI reply", "title": "Copywriter AI reply",
"graphCoordinates": { "x": 1044.25, "y": 372.87 },
"blocks": [ "blocks": [
{ {
"id": "h2t5vbir3zh8eku55ozwb1du", "id": "h2t5vbir3zh8eku55ozwb1du",
"type": "OpenAI", "type": "OpenAI",
"groupId": "csbysu8dr08zxr4i6hzvzjdf",
"options": { "options": {
"task": "Create chat completion", "task": "Create chat completion",
"model": "gpt-3.5-turbo", "model": "gpt-3.5-turbo",
@ -231,34 +213,36 @@
}, },
{ {
"id": "ynbhlcbsmy24pobiay9zezli", "id": "ynbhlcbsmy24pobiay9zezli",
"role": "Messages sequence ✨", "role": "Dialogue",
"content": { "dialogueVariableId": "vu9adij5penetej2xz89htfe6"
"userMessagesVariableId": "vevnx5f5bojz0sv648x6ppcmv",
"assistantMessagesVariableId": "vni6kwbch8zlq92dclgcivzyr"
}
} }
], ],
"responseMapping": [ "responseMapping": [
{ {
"id": "brb5ccisi1tjiqf3ng0asaiq", "id": "brb5ccisi1tjiqf3ng0asaiq",
"variableId": "vni6kwbch8zlq92dclgcivzyr", "valueToExtract": "Message content",
"valueToExtract": "Message content" "variableId": "vni6kwbch8zlq92dclgcivzyr"
} }
] ]
} }
}, },
{
"id": "usolgxcte60rin18ccygzbdu",
"type": "Set variable",
"options": {
"variableId": "vu9adij5penetej2xz89htfe6",
"type": "Append value(s)",
"item": "{{Assistant Message}}"
}
},
{ {
"id": "h96lile0evtqa0jx24gmfo25", "id": "h96lile0evtqa0jx24gmfo25",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
{ { "type": "p", "children": [{ "text": "{{Assistant Message}}" }] }
"type": "p",
"children": [{ "text": "{{Assistant Messages}}" }]
}
] ]
}, }
"groupId": "csbysu8dr08zxr4i6hzvzjdf"
}, },
{ {
"id": "u4jdl0gwv8965o2etxjk12w0", "id": "u4jdl0gwv8965o2etxjk12w0",
@ -266,29 +250,33 @@
"items": [ "items": [
{ {
"id": "b6zif4xxe2cuiddc2oqayaxi", "id": "b6zif4xxe2cuiddc2oqayaxi",
"type": 0, "outgoingEdgeId": "jwydpoxngp2gvwanaruphe6s",
"blockId": "u4jdl0gwv8965o2etxjk12w0", "type": "button",
"content": "Continue", "content": "Continue"
"outgoingEdgeId": "jwydpoxngp2gvwanaruphe6s"
}, },
{ {
"id": "ooib3mqlfkazta6iol1ocloe", "id": "ooib3mqlfkazta6iol1ocloe",
"type": 0, "outgoingEdgeId": "gfrpgowch879p1qaj9jzsh01",
"blockId": "u4jdl0gwv8965o2etxjk12w0", "type": "button",
"content": "Back to menu", "content": "Back to menu"
"outgoingEdgeId": "gfrpgowch879p1qaj9jzsh01"
} }
], ]
"groupId": "csbysu8dr08zxr4i6hzvzjdf",
"options": { "buttonLabel": "Send", "isMultipleChoice": false }
} }
], ]
"graphCoordinates": { "x": 1049.2780591838002, "y": 458.6633630669161 }
}, },
{ {
"id": "u6nm47oyneidmsebszp60t0m", "id": "u6nm47oyneidmsebszp60t0m",
"title": "Menu", "title": "Menu",
"graphCoordinates": { "x": -6.082566623728974, "y": 37.78518756228981 },
"blocks": [ "blocks": [
{
"id": "rzlhl61q6dmh8n93usvqgyij",
"type": "Set variable",
"options": {
"variableId": "vu9adij5penetej2xz89htfe6",
"type": "Empty"
}
},
{ {
"id": "gphm5wy1md9cunwkdtbzg6nq", "id": "gphm5wy1md9cunwkdtbzg6nq",
"type": "text", "type": "text",
@ -299,20 +287,7 @@
"children": [{ "text": "Who would you want to talk to?" }] "children": [{ "text": "Who would you want to talk to?" }]
} }
] ]
}, }
"groupId": "u6nm47oyneidmsebszp60t0m"
},
{
"id": "yodc4upemgfx55m919mdz694",
"type": "Set variable",
"groupId": "u6nm47oyneidmsebszp60t0m",
"options": { "variableId": "vevnx5f5bojz0sv648x6ppcmv" }
},
{
"id": "rzlhl61q6dmh8n93usvqgyij",
"type": "Set variable",
"groupId": "u6nm47oyneidmsebszp60t0m",
"options": { "variableId": "vni6kwbch8zlq92dclgcivzyr" }
}, },
{ {
"id": "ohh19koa7up0nbke3146hnjp", "id": "ohh19koa7up0nbke3146hnjp",
@ -320,104 +295,91 @@
"items": [ "items": [
{ {
"id": "rn0lqz1wvsg9lmc0jcl6ps8j", "id": "rn0lqz1wvsg9lmc0jcl6ps8j",
"type": 0, "outgoingEdgeId": "ry7l8wcaidxw5izm7zoy83kj",
"blockId": "ohh19koa7up0nbke3146hnjp", "type": "button",
"content": "English professor", "content": "English professor"
"outgoingEdgeId": "ry7l8wcaidxw5izm7zoy83kj"
}, },
{ {
"id": "le84cls9vkmrxquvqw8bhp7h", "id": "le84cls9vkmrxquvqw8bhp7h",
"type": 0, "outgoingEdgeId": "iy2htkuup0l908fsosg6d2qz",
"blockId": "ohh19koa7up0nbke3146hnjp", "type": "button",
"content": "Copywriter", "content": "Copywriter"
"outgoingEdgeId": "iy2htkuup0l908fsosg6d2qz"
}, },
{ {
"id": "mx4kgfgena53mxf87piwu1j2", "id": "mx4kgfgena53mxf87piwu1j2",
"type": 0, "outgoingEdgeId": "kmex71jzzzekni4louuy3xbf",
"blockId": "ohh19koa7up0nbke3146hnjp", "type": "button",
"content": "Concept explainer", "content": "Concept explainer"
"outgoingEdgeId": "kmex71jzzzekni4louuy3xbf"
} }
], ],
"groupId": "u6nm47oyneidmsebszp60t0m",
"options": { "options": {
"variableId": "vs7wwz29yyd21pfl4syeptdgi", "variableId": "vs7wwz29yyd21pfl4syeptdgi"
"buttonLabel": "Send",
"isMultipleChoice": false
} }
} }
], ]
"graphCoordinates": { "x": -6.082566623728974, "y": 37.78518756228981 }
}, },
{ {
"id": "oemwa82xy3yt74gzilrojogl", "id": "oemwa82xy3yt74gzilrojogl",
"title": "Jumps", "title": "Jumps",
"graphCoordinates": { "x": 1431.381871940994, "y": 1083.626261828848 },
"blocks": [ "blocks": [
{ {
"id": "nnzp5mle206cl3nnqlkqjau1", "id": "nnzp5mle206cl3nnqlkqjau1",
"type": "Jump", "type": "Jump",
"groupId": "py4fhjf59krp2ahz7fpdtj6h",
"options": { "groupId": "irnu2zu8m2i4fu6485hxtra5" } "options": { "groupId": "irnu2zu8m2i4fu6485hxtra5" }
}, },
{ {
"id": "nm6vp6ifbjq7mttohwhibjvj", "id": "nm6vp6ifbjq7mttohwhibjvj",
"type": "Jump", "type": "Jump",
"groupId": "py4fhjf59krp2ahz7fpdtj6h",
"options": { "groupId": "u6nm47oyneidmsebszp60t0m" } "options": { "groupId": "u6nm47oyneidmsebszp60t0m" }
} }
], ]
"graphCoordinates": { "x": 1431.381871940994, "y": 1083.6262618288476 }
}, },
{ {
"id": "p1fh0e2y8sq4lhrskc4rb5z2", "id": "p1fh0e2y8sq4lhrskc4rb5z2",
"title": "Jumps", "title": "Jumps",
"graphCoordinates": { "x": 1436.545931193238, "y": 679.7247165284323 },
"blocks": [ "blocks": [
{ {
"id": "kyuvkruakbxjvxwgtjqti3gc", "id": "kyuvkruakbxjvxwgtjqti3gc",
"type": "Jump", "type": "Jump",
"groupId": "wjgoxgdh5dxvulkn013oad81",
"options": { "groupId": "h4mcrr5x6lvy1mz96k0ey3do" } "options": { "groupId": "h4mcrr5x6lvy1mz96k0ey3do" }
}, },
{ {
"id": "vywm4h8yz87ew4gjy4l6nmm3", "id": "vywm4h8yz87ew4gjy4l6nmm3",
"type": "Jump", "type": "Jump",
"groupId": "wjgoxgdh5dxvulkn013oad81",
"options": { "groupId": "u6nm47oyneidmsebszp60t0m" } "options": { "groupId": "u6nm47oyneidmsebszp60t0m" }
} }
], ]
"graphCoordinates": { "x": 1436.5459311932382, "y": 679.7247165284323 }
}, },
{ {
"id": "ow2g8fv93xxrgpcabnx8uod8", "id": "ow2g8fv93xxrgpcabnx8uod8",
"title": "Jumps", "title": "Jumps",
"graphCoordinates": { "x": 1419.568721793131, "y": 169.5335644029076 },
"blocks": [ "blocks": [
{ {
"id": "qxgl1cscs38pfwzaj4pqsd46", "id": "qxgl1cscs38pfwzaj4pqsd46",
"type": "Jump", "type": "Jump",
"groupId": "uz4isdxf2lha8y98f5umzeb7",
"options": { "groupId": "m84gejzvl08ky6ynruiuszpc" } "options": { "groupId": "m84gejzvl08ky6ynruiuszpc" }
}, },
{ {
"id": "m94q879l9yr1vx5xrbxlsj6q", "id": "m94q879l9yr1vx5xrbxlsj6q",
"type": "Jump", "type": "Jump",
"groupId": "uz4isdxf2lha8y98f5umzeb7",
"options": { "groupId": "u6nm47oyneidmsebszp60t0m" } "options": { "groupId": "u6nm47oyneidmsebszp60t0m" }
} }
], ]
"graphCoordinates": { "x": 1419.5687217931309, "y": 169.5335644029076 }
}, },
{ {
"id": "py719ungczkgz5f40zkw3tr2", "id": "py719ungczkgz5f40zkw3tr2",
"title": "EN professor intro", "title": "EN professor intro",
"graphCoordinates": { "x": 339.814926172369, "y": 9.945652574763692 },
"blocks": [ "blocks": [
{ {
"id": "qm3v36qb93ijnghdjgy9mcwf", "id": "qm3v36qb93ijnghdjgy9mcwf",
"type": "text", "type": "text",
"content": { "content": {
"richText": [{ "type": "p", "children": [{ "text": "Hi 👋" }] }] "richText": [{ "type": "p", "children": [{ "text": "Hi 👋" }] }]
}, }
"groupId": "py719ungczkgz5f40zkw3tr2"
}, },
{ {
"id": "ln8d3vdq4shclzrxcy9rmxfg", "id": "ln8d3vdq4shclzrxcy9rmxfg",
@ -433,34 +395,31 @@
] ]
} }
] ]
}, }
"groupId": "py719ungczkgz5f40zkw3tr2"
}, },
{ {
"id": "r7yu488ugfif8hxy3e4sospb", "id": "r7yu488ugfif8hxy3e4sospb",
"outgoingEdgeId": "ripf74t9yicdze8xr2yrklyx",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
{ "type": "p", "children": [{ "text": "How can I help?" }] } { "type": "p", "children": [{ "text": "How can I help?" }] }
] ]
}, }
"groupId": "py719ungczkgz5f40zkw3tr2",
"outgoingEdgeId": "ripf74t9yicdze8xr2yrklyx"
} }
], ]
"graphCoordinates": { "x": 339.81492617236904, "y": 9.945652574763692 }
}, },
{ {
"id": "uyry49c9bm1pvk6t8i471l2d", "id": "uyry49c9bm1pvk6t8i471l2d",
"title": "Copywriter intro", "title": "Copywriter intro",
"graphCoordinates": { "x": 335.3081238025464, "y": 468.3681191076254 },
"blocks": [ "blocks": [
{ {
"id": "bbeedootn9m8eass0mqu3w4t", "id": "bbeedootn9m8eass0mqu3w4t",
"type": "text", "type": "text",
"content": { "content": {
"richText": [{ "type": "p", "children": [{ "text": "Hi 👋" }] }] "richText": [{ "type": "p", "children": [{ "text": "Hi 👋" }] }]
}, }
"groupId": "uyry49c9bm1pvk6t8i471l2d"
}, },
{ {
"id": "chdghb0k27c4okwu9yky4ox4", "id": "chdghb0k27c4okwu9yky4ox4",
@ -472,34 +431,31 @@
"children": [{ "text": "I'm an expert in copywriting." }] "children": [{ "text": "I'm an expert in copywriting." }]
} }
] ]
}, }
"groupId": "uyry49c9bm1pvk6t8i471l2d"
}, },
{ {
"id": "idp7w8c8zbkvl95oa1vquiml", "id": "idp7w8c8zbkvl95oa1vquiml",
"outgoingEdgeId": "v0tfmbt8tpwwrieftvzg8lti",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
{ "type": "p", "children": [{ "text": "How can I help?" }] } { "type": "p", "children": [{ "text": "How can I help?" }] }
] ]
}, }
"groupId": "uyry49c9bm1pvk6t8i471l2d",
"outgoingEdgeId": "v0tfmbt8tpwwrieftvzg8lti"
} }
], ]
"graphCoordinates": { "x": 335.3081238025464, "y": 468.3681191076254 }
}, },
{ {
"id": "zfa8oj0a0tnlho9a67llulst", "id": "zfa8oj0a0tnlho9a67llulst",
"title": "Explainer intro", "title": "Explainer intro",
"graphCoordinates": { "x": 326.9849960884654, "y": 928.6632806049557 },
"blocks": [ "blocks": [
{ {
"id": "n96j3pf3m87aufcapx2ulr2n", "id": "n96j3pf3m87aufcapx2ulr2n",
"type": "text", "type": "text",
"content": { "content": {
"richText": [{ "type": "p", "children": [{ "text": "Hi 👋" }] }] "richText": [{ "type": "p", "children": [{ "text": "Hi 👋" }] }]
}, }
"groupId": "zfa8oj0a0tnlho9a67llulst"
}, },
{ {
"id": "wxk5z9yyiojkk9u3b5m6shax", "id": "wxk5z9yyiojkk9u3b5m6shax",
@ -513,11 +469,11 @@
] ]
} }
] ]
}, }
"groupId": "zfa8oj0a0tnlho9a67llulst"
}, },
{ {
"id": "ileqgg2r2kyh2zovpivr775s", "id": "ileqgg2r2kyh2zovpivr775s",
"outgoingEdgeId": "v5bki4h7m1lnryhgzudnvvpx",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
@ -528,279 +484,242 @@
] ]
} }
] ]
}, }
"groupId": "zfa8oj0a0tnlho9a67llulst",
"outgoingEdgeId": "v5bki4h7m1lnryhgzudnvvpx"
} }
], ]
"graphCoordinates": { "x": 326.98499608846544, "y": 928.6632806049557 }
}, },
{ {
"id": "m84gejzvl08ky6ynruiuszpc", "id": "m84gejzvl08ky6ynruiuszpc",
"title": "EN professor question", "title": "EN professor question",
"graphCoordinates": { "x": 692.86, "y": -14.84 },
"blocks": [ "blocks": [
{ {
"id": "ovgk70u0kfxrbtz9dy4e040o", "id": "ovgk70u0kfxrbtz9dy4e040o",
"type": "text input", "type": "text input",
"groupId": "m84gejzvl08ky6ynruiuszpc",
"options": { "options": {
"isLong": true,
"labels": { "labels": {
"button": "Send", "placeholder": "Type your answer...",
"placeholder": "Type your answer..." "button": "Send"
}, },
"variableId": "vevnx5f5bojz0sv648x6ppcmv", "variableId": "vevnx5f5bojz0sv648x6ppcmv",
"isPrefillDisabled": true "isLong": true
}, }
"outgoingEdgeId": "vapajzlffxq1lgudxgm14g05" },
{
"id": "nx6v1ogcp9x9o6regjopvff8",
"outgoingEdgeId": "cplyootzgqo5jpmhntgz4shm",
"type": "Set variable",
"options": {
"variableId": "vu9adij5penetej2xz89htfe6",
"type": "Append value(s)",
"item": "{{User Message}}"
}
} }
], ]
"graphCoordinates": { "x": 692.8604882239152, "y": 11.63391545939837 }
}, },
{ {
"id": "h4mcrr5x6lvy1mz96k0ey3do", "id": "h4mcrr5x6lvy1mz96k0ey3do",
"title": "Copywriter question", "title": "Copywriter question",
"graphCoordinates": { "x": 692.3449852228088, "y": 462.3858990822391 },
"blocks": [ "blocks": [
{ {
"id": "emii43mtihiuy35gpp6b91d8", "id": "emii43mtihiuy35gpp6b91d8",
"type": "text input", "type": "text input",
"groupId": "h4mcrr5x6lvy1mz96k0ey3do",
"options": { "options": {
"isLong": true,
"labels": { "labels": {
"button": "Send", "placeholder": "Type your answer...",
"placeholder": "Type your answer..." "button": "Send"
}, },
"variableId": "vevnx5f5bojz0sv648x6ppcmv", "variableId": "vevnx5f5bojz0sv648x6ppcmv",
"isPrefillDisabled": true "isLong": true
}, }
"outgoingEdgeId": "vtffpz6eh4n95kwlb8zpu7cz" },
{
"id": "h0cgmv6q61s3yhuq6u2pb5p0",
"outgoingEdgeId": "za1pwdunrlwgfu1kz7dnsb3m",
"type": "Set variable",
"options": {
"variableId": "vu9adij5penetej2xz89htfe6",
"type": "Append value(s)",
"item": "{{User Message}}"
}
} }
], ]
"graphCoordinates": { "x": 692.3449852228088, "y": 462.38589908223906 }
}, },
{ {
"id": "irnu2zu8m2i4fu6485hxtra5", "id": "irnu2zu8m2i4fu6485hxtra5",
"title": "Explainer question", "title": "Explainer question",
"graphCoordinates": { "x": 686.3012488543691, "y": 924.2085365228105 },
"blocks": [ "blocks": [
{ {
"id": "e6rovxwxlizr54iy8nyi84pi", "id": "e6rovxwxlizr54iy8nyi84pi",
"type": "text input", "type": "text input",
"groupId": "irnu2zu8m2i4fu6485hxtra5",
"options": { "options": {
"isLong": false,
"labels": { "labels": {
"button": "Send", "placeholder": "Type your answer...",
"placeholder": "Type your answer..." "button": "Send"
}, },
"variableId": "vevnx5f5bojz0sv648x6ppcmv", "variableId": "vevnx5f5bojz0sv648x6ppcmv",
"isPrefillDisabled": true "isLong": false
}, }
"outgoingEdgeId": "wv3t43ccf35mewn52liqtjg1" },
{
"id": "b937909x86r3wzbn4mzxmw25",
"outgoingEdgeId": "fz77htstfb4jig82k66pl0vt",
"type": "Set variable",
"options": {
"variableId": "vu9adij5penetej2xz89htfe6",
"type": "Append value(s)",
"item": "{{User Message}}"
}
} }
], ]
"graphCoordinates": { "x": 686.3012488543691, "y": 924.2085365228105 }
} }
], ],
"variables": [
{ "id": "vni6kwbch8zlq92dclgcivzyr", "name": "Assistant Messages" },
{ "id": "vevnx5f5bojz0sv648x6ppcmv", "name": "User Messages" },
{ "id": "vldefdrythqxfh9p9p38jvmb2", "name": "Prompt" },
{ "id": "vs7wwz29yyd21pfl4syeptdgi", "name": "Persona" }
],
"edges": [ "edges": [
{ {
"id": "ny44r5sp69gne7obgshidhph", "id": "ny44r5sp69gne7obgshidhph",
"to": {
"blockId": "nm6vp6ifbjq7mttohwhibjvj",
"groupId": "oemwa82xy3yt74gzilrojogl"
},
"from": { "from": {
"itemId": "imx7otsonvm0takr02b4ulyo",
"blockId": "jz9mklagfikyukzs7n3kmlcf", "blockId": "jz9mklagfikyukzs7n3kmlcf",
"groupId": "dmg57mgick51p8l5pnyqtyf9" "itemId": "imx7otsonvm0takr02b4ulyo"
},
"to": {
"groupId": "oemwa82xy3yt74gzilrojogl",
"blockId": "nm6vp6ifbjq7mttohwhibjvj"
} }
}, },
{ {
"id": "mxl8lftsj3pbmj4g24ymxajo", "id": "mxl8lftsj3pbmj4g24ymxajo",
"to": {
"blockId": "nnzp5mle206cl3nnqlkqjau1",
"groupId": "oemwa82xy3yt74gzilrojogl"
},
"from": { "from": {
"itemId": "x18iwzwmbzi9jjpnwij1861i",
"blockId": "jz9mklagfikyukzs7n3kmlcf", "blockId": "jz9mklagfikyukzs7n3kmlcf",
"groupId": "dmg57mgick51p8l5pnyqtyf9" "itemId": "x18iwzwmbzi9jjpnwij1861i"
},
"to": {
"groupId": "oemwa82xy3yt74gzilrojogl",
"blockId": "nnzp5mle206cl3nnqlkqjau1"
} }
}, },
{ {
"id": "ry7l8wcaidxw5izm7zoy83kj", "id": "ry7l8wcaidxw5izm7zoy83kj",
"to": { "groupId": "py719ungczkgz5f40zkw3tr2" },
"from": { "from": {
"itemId": "rn0lqz1wvsg9lmc0jcl6ps8j",
"blockId": "ohh19koa7up0nbke3146hnjp", "blockId": "ohh19koa7up0nbke3146hnjp",
"groupId": "u6nm47oyneidmsebszp60t0m" "itemId": "rn0lqz1wvsg9lmc0jcl6ps8j"
} },
"to": { "groupId": "py719ungczkgz5f40zkw3tr2" }
}, },
{ {
"id": "ripf74t9yicdze8xr2yrklyx", "id": "ripf74t9yicdze8xr2yrklyx",
"to": { "groupId": "m84gejzvl08ky6ynruiuszpc" }, "from": { "blockId": "r7yu488ugfif8hxy3e4sospb" },
"from": { "to": { "groupId": "m84gejzvl08ky6ynruiuszpc" }
"blockId": "r7yu488ugfif8hxy3e4sospb",
"groupId": "py719ungczkgz5f40zkw3tr2"
}
},
{
"id": "vapajzlffxq1lgudxgm14g05",
"to": { "groupId": "fj5z2nx488htv0843kq6qeyk" },
"from": {
"blockId": "ovgk70u0kfxrbtz9dy4e040o",
"groupId": "m84gejzvl08ky6ynruiuszpc"
}
}, },
{ {
"id": "q6o0cbyzxtvgls3jtz7rpdgw", "id": "q6o0cbyzxtvgls3jtz7rpdgw",
"to": {
"blockId": "qxgl1cscs38pfwzaj4pqsd46",
"groupId": "ow2g8fv93xxrgpcabnx8uod8"
},
"from": { "from": {
"itemId": "zaylo8bstqx0wp6bpdbd1rak",
"blockId": "h3qetbhcpxhawnqoymo0v3hw", "blockId": "h3qetbhcpxhawnqoymo0v3hw",
"groupId": "fj5z2nx488htv0843kq6qeyk" "itemId": "zaylo8bstqx0wp6bpdbd1rak"
},
"to": {
"groupId": "ow2g8fv93xxrgpcabnx8uod8",
"blockId": "qxgl1cscs38pfwzaj4pqsd46"
} }
}, },
{ {
"id": "xjv7pkpgpwh169448t8pepg4", "id": "xjv7pkpgpwh169448t8pepg4",
"to": {
"blockId": "m94q879l9yr1vx5xrbxlsj6q",
"groupId": "ow2g8fv93xxrgpcabnx8uod8"
},
"from": { "from": {
"itemId": "d5jv3sjpzobsrnhcp055mxkv",
"blockId": "h3qetbhcpxhawnqoymo0v3hw", "blockId": "h3qetbhcpxhawnqoymo0v3hw",
"groupId": "fj5z2nx488htv0843kq6qeyk" "itemId": "d5jv3sjpzobsrnhcp055mxkv"
},
"to": {
"groupId": "ow2g8fv93xxrgpcabnx8uod8",
"blockId": "m94q879l9yr1vx5xrbxlsj6q"
} }
}, },
{ {
"id": "v0tfmbt8tpwwrieftvzg8lti", "id": "v0tfmbt8tpwwrieftvzg8lti",
"to": { "groupId": "h4mcrr5x6lvy1mz96k0ey3do" }, "from": { "blockId": "idp7w8c8zbkvl95oa1vquiml" },
"from": { "to": { "groupId": "h4mcrr5x6lvy1mz96k0ey3do" }
"blockId": "idp7w8c8zbkvl95oa1vquiml",
"groupId": "uyry49c9bm1pvk6t8i471l2d"
}
},
{
"id": "vtffpz6eh4n95kwlb8zpu7cz",
"to": { "groupId": "csbysu8dr08zxr4i6hzvzjdf" },
"from": {
"blockId": "emii43mtihiuy35gpp6b91d8",
"groupId": "h4mcrr5x6lvy1mz96k0ey3do"
}
}, },
{ {
"id": "iy2htkuup0l908fsosg6d2qz", "id": "iy2htkuup0l908fsosg6d2qz",
"to": { "groupId": "uyry49c9bm1pvk6t8i471l2d" },
"from": { "from": {
"itemId": "le84cls9vkmrxquvqw8bhp7h",
"blockId": "ohh19koa7up0nbke3146hnjp", "blockId": "ohh19koa7up0nbke3146hnjp",
"groupId": "u6nm47oyneidmsebszp60t0m" "itemId": "le84cls9vkmrxquvqw8bhp7h"
} },
"to": { "groupId": "uyry49c9bm1pvk6t8i471l2d" }
}, },
{ {
"id": "kmex71jzzzekni4louuy3xbf", "id": "kmex71jzzzekni4louuy3xbf",
"to": { "groupId": "zfa8oj0a0tnlho9a67llulst" },
"from": { "from": {
"itemId": "mx4kgfgena53mxf87piwu1j2",
"blockId": "ohh19koa7up0nbke3146hnjp", "blockId": "ohh19koa7up0nbke3146hnjp",
"groupId": "u6nm47oyneidmsebszp60t0m" "itemId": "mx4kgfgena53mxf87piwu1j2"
} },
"to": { "groupId": "zfa8oj0a0tnlho9a67llulst" }
}, },
{ {
"id": "v5bki4h7m1lnryhgzudnvvpx", "id": "v5bki4h7m1lnryhgzudnvvpx",
"to": { "groupId": "irnu2zu8m2i4fu6485hxtra5" }, "from": { "blockId": "ileqgg2r2kyh2zovpivr775s" },
"from": { "to": { "groupId": "irnu2zu8m2i4fu6485hxtra5" }
"blockId": "ileqgg2r2kyh2zovpivr775s",
"groupId": "zfa8oj0a0tnlho9a67llulst"
}
},
{
"id": "wv3t43ccf35mewn52liqtjg1",
"to": { "groupId": "dmg57mgick51p8l5pnyqtyf9" },
"from": {
"blockId": "e6rovxwxlizr54iy8nyi84pi",
"groupId": "irnu2zu8m2i4fu6485hxtra5"
}
}, },
{ {
"id": "gfrpgowch879p1qaj9jzsh01", "id": "gfrpgowch879p1qaj9jzsh01",
"to": {
"blockId": "vywm4h8yz87ew4gjy4l6nmm3",
"groupId": "p1fh0e2y8sq4lhrskc4rb5z2"
},
"from": { "from": {
"itemId": "ooib3mqlfkazta6iol1ocloe",
"blockId": "u4jdl0gwv8965o2etxjk12w0", "blockId": "u4jdl0gwv8965o2etxjk12w0",
"groupId": "csbysu8dr08zxr4i6hzvzjdf" "itemId": "ooib3mqlfkazta6iol1ocloe"
},
"to": {
"groupId": "p1fh0e2y8sq4lhrskc4rb5z2",
"blockId": "vywm4h8yz87ew4gjy4l6nmm3"
} }
}, },
{ {
"id": "jwydpoxngp2gvwanaruphe6s", "id": "jwydpoxngp2gvwanaruphe6s",
"to": {
"blockId": "kyuvkruakbxjvxwgtjqti3gc",
"groupId": "p1fh0e2y8sq4lhrskc4rb5z2"
},
"from": { "from": {
"itemId": "b6zif4xxe2cuiddc2oqayaxi",
"blockId": "u4jdl0gwv8965o2etxjk12w0", "blockId": "u4jdl0gwv8965o2etxjk12w0",
"groupId": "csbysu8dr08zxr4i6hzvzjdf" "itemId": "b6zif4xxe2cuiddc2oqayaxi"
},
"to": {
"groupId": "p1fh0e2y8sq4lhrskc4rb5z2",
"blockId": "kyuvkruakbxjvxwgtjqti3gc"
} }
}, },
{ {
"from": { "id": "cplyootzgqo5jpmhntgz4shm",
"groupId": "w99qhdr20tw02sfrfwkfc1tg", "from": { "blockId": "nx6v1ogcp9x9o6regjopvff8" },
"blockId": "igbipfi63m6p9sl2f77uicuv" "to": { "groupId": "fj5z2nx488htv0843kq6qeyk" }
}, },
{
"id": "za1pwdunrlwgfu1kz7dnsb3m",
"from": { "blockId": "h0cgmv6q61s3yhuq6u2pb5p0" },
"to": { "groupId": "csbysu8dr08zxr4i6hzvzjdf" }
},
{
"id": "fz77htstfb4jig82k66pl0vt",
"from": { "blockId": "b937909x86r3wzbn4mzxmw25" },
"to": { "groupId": "dmg57mgick51p8l5pnyqtyf9" }
},
{
"from": { "eventId": "w99qhdr20tw02sfrfwkfc1tg" },
"to": { "groupId": "bofjp88arodr4k0btv2esyqy" }, "to": { "groupId": "bofjp88arodr4k0btv2esyqy" },
"id": "x91dpk80zw2b4co4xra33cwg" "id": "c3733n7ia1hxcwld9lm3p351"
} }
], ],
"theme": { "variables": [
"chat": { { "id": "vni6kwbch8zlq92dclgcivzyr", "name": "Assistant Message" },
"inputs": { { "id": "vevnx5f5bojz0sv648x6ppcmv", "name": "User Message" },
"color": "#303235", { "id": "vu9adij5penetej2xz89htfe6", "name": "Chat history" }
"backgroundColor": "#FFFFFF", ],
"placeholderColor": "#9095A0" "theme": {},
},
"buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" },
"hostAvatar": {
"isEnabled": true
},
"hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" },
"guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" }
},
"general": {
"font": "Open Sans",
"background": { "type": "Color", "content": "#ffffff" }
}
},
"selectedThemeTemplateId": null, "selectedThemeTemplateId": null,
"settings": { "settings": {},
"general": { "createdAt": "2023-11-03T06:57:51.747Z",
"isBrandingEnabled": false, "updatedAt": "2023-11-03T07:03:19.089Z",
"isInputPrefillEnabled": true, "icon": "🎭",
"isHideQueryParamsEnabled": true, "folderId": null,
"isNewResultOnRefreshEnabled": true
},
"metadata": {
"description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form."
},
"typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 }
},
"publicId": null, "publicId": null,
"customDomain": null, "customDomain": null,
"workspaceId": "proWorkspace", "workspaceId": "proWorkspace",
"resultsTablePreferences": null, "resultsTablePreferences": null,
"isArchived": false, "isArchived": false,
"isClosed": false "isClosed": false,
"whatsAppCredentialsId": null
} }

View File

@ -1,33 +1,24 @@
{ {
"id": "cl16la7p900990b1a72qjqbb3", "version": "6",
"version": "4", "id": "cloo046v300051aorhtv76f0i",
"createdAt": "2022-03-25T15:39:33.885Z",
"updatedAt": "2022-03-25T15:42:12.544Z",
"name": "Customer Support", "name": "Customer Support",
"icon": "😍", "events": [
"folderId": null,
"groups": [
{ {
"id": "uG1tt8JdDyu2nju3oJ4wc1", "id": "uG1tt8JdDyu2nju3oJ4wc1",
"blocks": [ "outgoingEdgeId": "2dzxChB1qm9WGfzNF91tfg",
{ "graphCoordinates": { "x": -281, "y": -89 },
"id": "bFHwV7tnY5dke8pQeFY8v6", "type": "start"
"type": "start", }
"label": "Start", ],
"groupId": "uG1tt8JdDyu2nju3oJ4wc1", "groups": [
"outgoingEdgeId": "2dzxChB1qm9WGfzNF91tfg"
}
],
"title": "Start",
"graphCoordinates": { "x": -281, "y": -89 }
},
{ {
"id": "vLUAPaxKwPF49iZhg4XZYa", "id": "vLUAPaxKwPF49iZhg4XZYa",
"title": "Menu",
"graphCoordinates": { "x": -28.4, "y": -88.19 },
"blocks": [ "blocks": [
{ {
"id": "spud6U3K1omh2dZG8yN2CW4", "id": "spud6U3K1omh2dZG8yN2CW4",
"type": "text", "type": "text",
"groupId": "vLUAPaxKwPF49iZhg4XZYa",
"content": { "content": {
"richText": [ "richText": [
{ "type": "p", "children": [{ "text": "Hey friend 👋" }] }, { "type": "p", "children": [{ "text": "Hey friend 👋" }] },
@ -41,40 +32,31 @@
"items": [ "items": [
{ {
"id": "fQ8oLDnKmDBuPDK7riJ2kt", "id": "fQ8oLDnKmDBuPDK7riJ2kt",
"type": 0, "outgoingEdgeId": "dhniFxrsH5r54aEE5JXwK2",
"blockId": "s6kp2Z4igeY3kL7B64qBdUg", "content": "I have a feature request ✨"
"content": "I have a feature request ✨",
"outgoingEdgeId": "dhniFxrsH5r54aEE5JXwK2"
}, },
{ {
"id": "h2rFDX2UnKS4Kdu3Eyuqq3", "id": "h2rFDX2UnKS4Kdu3Eyuqq3",
"type": 0, "outgoingEdgeId": "2C4mhU5o2Hdm7dztR9xNE9",
"blockId": "s6kp2Z4igeY3kL7B64qBdUg", "content": "There is a bug 🐛"
"content": "There is a bug 🐛",
"outgoingEdgeId": "2C4mhU5o2Hdm7dztR9xNE9"
}, },
{ {
"id": "hcUFBPeQA3gSyXRprRk2v9", "id": "hcUFBPeQA3gSyXRprRk2v9",
"type": 0, "outgoingEdgeId": "bTo6CZD1YapDDyVdvJgFDV",
"blockId": "s6kp2Z4igeY3kL7B64qBdUg", "content": "I have a question 💭"
"content": "I have a question 💭",
"outgoingEdgeId": "bTo6CZD1YapDDyVdvJgFDV"
} }
], ]
"groupId": "vLUAPaxKwPF49iZhg4XZYa",
"options": { "buttonLabel": "Send", "isMultipleChoice": false }
} }
], ]
"title": "Menu",
"graphCoordinates": { "x": -7, "y": 90 }
}, },
{ {
"id": "7MuqF6nen1ZTwGB53Mz8VY", "id": "7MuqF6nen1ZTwGB53Mz8VY",
"title": "Bug",
"graphCoordinates": { "x": 364.46, "y": 92.39 },
"blocks": [ "blocks": [
{ {
"id": "sjsECyfSBMkUnoWaEnBTmJX", "id": "sjsECyfSBMkUnoWaEnBTmJX",
"type": "text", "type": "text",
"groupId": "7MuqF6nen1ZTwGB53Mz8VY",
"content": { "content": {
"richText": [{ "type": "p", "children": [{ "text": "Shoot! 🤪" }] }] "richText": [{ "type": "p", "children": [{ "text": "Shoot! 🤪" }] }]
} }
@ -82,7 +64,6 @@
{ {
"id": "seomQsnPWgiMzQVeZ3us7x2", "id": "seomQsnPWgiMzQVeZ3us7x2",
"type": "text", "type": "text",
"groupId": "7MuqF6nen1ZTwGB53Mz8VY",
"content": { "content": {
"richText": [ "richText": [
{ {
@ -98,29 +79,26 @@
}, },
{ {
"id": "s3LYyyYtjdQ88jkMMV5DSW7", "id": "s3LYyyYtjdQ88jkMMV5DSW7",
"outgoingEdgeId": "cl1571jhh00022e6dk77f52wg",
"type": "text input", "type": "text input",
"groupId": "7MuqF6nen1ZTwGB53Mz8VY",
"options": { "options": {
"isLong": true,
"labels": { "labels": {
"button": "Send",
"placeholder": "Describe the bug..." "placeholder": "Describe the bug..."
}, },
"variableId": "v51BcuecnB6kRU1tsttaGyR" "variableId": "v51BcuecnB6kRU1tsttaGyR",
}, "isLong": true
"outgoingEdgeId": "cl1571jhh00022e6dk77f52wg" }
} }
], ]
"title": "Bug",
"graphCoordinates": { "x": 476, "y": 76 }
}, },
{ {
"id": "kyK8JQ77NodUYaz3JLS88A", "id": "kyK8JQ77NodUYaz3JLS88A",
"title": "Feature request",
"graphCoordinates": { "x": 364.36, "y": -517.93 },
"blocks": [ "blocks": [
{ {
"id": "s9bgHcWdobb8Z5cTbrnTz6R", "id": "s9bgHcWdobb8Z5cTbrnTz6R",
"type": "text", "type": "text",
"groupId": "kyK8JQ77NodUYaz3JLS88A",
"content": { "content": {
"richText": [{ "type": "p", "children": [{ "text": "Awesome!" }] }] "richText": [{ "type": "p", "children": [{ "text": "Awesome!" }] }]
} }
@ -128,7 +106,6 @@
{ {
"id": "s2NbNaBGKhMvdEUdVPXKZjy", "id": "s2NbNaBGKhMvdEUdVPXKZjy",
"type": "text", "type": "text",
"groupId": "kyK8JQ77NodUYaz3JLS88A",
"content": { "content": {
"richText": [ "richText": [
{ {
@ -162,39 +139,24 @@
}, },
{ {
"id": "cl16lb3b300092e6dh4h01vxw", "id": "cl16lb3b300092e6dh4h01vxw",
"groupId": "kyK8JQ77NodUYaz3JLS88A",
"type": "choice input", "type": "choice input",
"options": { "buttonLabel": "Send", "isMultipleChoice": false }, "items": [{ "id": "cl16lb3b3000a2e6dy8zdhzpz", "content": "Restart" }]
"items": [
{
"id": "cl16lb3b3000a2e6dy8zdhzpz",
"blockId": "cl16lb3b300092e6dh4h01vxw",
"type": 0,
"content": "Restart"
}
]
}, },
{ {
"id": "cl16lablb00082e6dadk55sxv", "id": "j08qxg0h804rngfroedblt5f",
"groupId": "kyK8JQ77NodUYaz3JLS88A", "type": "Jump",
"type": "Typebot link", "options": { "groupId": "vLUAPaxKwPF49iZhg4XZYa" }
"options": {
"typebotId": "current",
"groupId": "vLUAPaxKwPF49iZhg4XZYa",
"mergeResults": false
}
} }
], ]
"title": "Feature request",
"graphCoordinates": { "x": 477, "y": -563 }
}, },
{ {
"id": "puWCBhGWSQRbqTkVH89RCf", "id": "puWCBhGWSQRbqTkVH89RCf",
"title": "Question",
"graphCoordinates": { "x": 365.4, "y": 491.3 },
"blocks": [ "blocks": [
{ {
"id": "sm4iHhLQs9yNdRG3b7xqV8Y", "id": "sm4iHhLQs9yNdRG3b7xqV8Y",
"type": "text", "type": "text",
"groupId": "puWCBhGWSQRbqTkVH89RCf",
"content": { "content": {
"richText": [ "richText": [
{ {
@ -205,8 +167,7 @@
"url": "https://docs.typebot.io/", "url": "https://docs.typebot.io/",
"type": "a", "type": "a",
"children": [{ "text": "Documentation 🙏" }] "children": [{ "text": "Documentation 🙏" }]
}, }
{ "text": "" }
] ]
} }
] ]
@ -215,7 +176,6 @@
{ {
"id": "sreX6rwMevEmbTpnkGCtp3k", "id": "sreX6rwMevEmbTpnkGCtp3k",
"type": "text", "type": "text",
"groupId": "puWCBhGWSQRbqTkVH89RCf",
"content": { "content": {
"richText": [ "richText": [
{ {
@ -228,36 +188,29 @@
{ {
"id": "so4GiKFWWjKCjXgmMJYCGbe", "id": "so4GiKFWWjKCjXgmMJYCGbe",
"type": "image", "type": "image",
"groupId": "puWCBhGWSQRbqTkVH89RCf",
"content": { "content": {
"url": "https://media0.giphy.com/media/rhgwg4qBu97ISgbfni/giphy-downsized.gif?cid=fe3852a3wimy48e55djt23j44uto7gdlu8ksytylafisvr0q&rid=giphy-downsized.gif&ct=g" "url": "https://media0.giphy.com/media/rhgwg4qBu97ISgbfni/giphy-downsized.gif?cid=fe3852a3wimy48e55djt23j44uto7gdlu8ksytylafisvr0q&rid=giphy-downsized.gif&ct=g"
} }
}, },
{ {
"id": "sjd4qACugMarB7gJC8nMhb3", "id": "sjd4qACugMarB7gJC8nMhb3",
"outgoingEdgeId": "cl1571ktd00032e6dyti22850",
"type": "text input", "type": "text input",
"groupId": "puWCBhGWSQRbqTkVH89RCf",
"options": { "options": {
"isLong": true, "variableId": "v51BcuecnB6kRU1tsttaGyR",
"labels": { "isLong": true
"button": "Send", }
"placeholder": "Type your answer..."
},
"variableId": "v51BcuecnB6kRU1tsttaGyR"
},
"outgoingEdgeId": "cl1571ktd00032e6dyti22850"
} }
], ]
"title": "Question",
"graphCoordinates": { "x": 476, "y": 399 }
}, },
{ {
"id": "1GvxCAAEysxJMxrVngud3X", "id": "1GvxCAAEysxJMxrVngud3X",
"title": "Bye",
"graphCoordinates": { "x": 1115.81, "y": 728.71 },
"blocks": [ "blocks": [
{ {
"id": "s6uLw72EAKbACrpYHr7DSyY", "id": "s6uLw72EAKbACrpYHr7DSyY",
"type": "text", "type": "text",
"groupId": "1GvxCAAEysxJMxrVngud3X",
"content": { "content": {
"richText": [ "richText": [
{ {
@ -272,7 +225,6 @@
{ {
"id": "stM7cTBFCLhpQagRHT64K6u", "id": "stM7cTBFCLhpQagRHT64K6u",
"type": "text", "type": "text",
"groupId": "1GvxCAAEysxJMxrVngud3X",
"content": { "content": {
"richText": [ "richText": [
{ {
@ -289,38 +241,23 @@
{ {
"id": "s4JATFkBxzmcqqEKQB2xFfa", "id": "s4JATFkBxzmcqqEKQB2xFfa",
"type": "choice input", "type": "choice input",
"items": [ "items": [{ "id": "jqm8wZa5yYb73493n5s3Uc", "content": "Restart" }]
{
"id": "jqm8wZa5yYb73493n5s3Uc",
"type": 0,
"blockId": "s4JATFkBxzmcqqEKQB2xFfa",
"content": "Restart"
}
],
"groupId": "1GvxCAAEysxJMxrVngud3X",
"options": { "buttonLabel": "Send", "isMultipleChoice": false }
}, },
{ {
"id": "cl14qlt8600072e69rez236gx", "id": "igdnc34rcmiyamazghr8s708",
"type": "Typebot link", "type": "Jump",
"groupId": "1GvxCAAEysxJMxrVngud3X", "options": { "groupId": "vLUAPaxKwPF49iZhg4XZYa" }
"options": {
"groupId": "vLUAPaxKwPF49iZhg4XZYa",
"typebotId": "current",
"mergeResults": false
}
} }
], ]
"title": "Bye",
"graphCoordinates": { "x": 1177, "y": 113 }
}, },
{ {
"id": "wncvzVDFJDvhh1M3CXJ6aL", "id": "wncvzVDFJDvhh1M3CXJ6aL",
"title": "Email",
"graphCoordinates": { "x": 746.29, "y": 577.22 },
"blocks": [ "blocks": [
{ {
"id": "soiDpBL5r1dbvHxuT2Sd3mH", "id": "soiDpBL5r1dbvHxuT2Sd3mH",
"type": "text", "type": "text",
"groupId": "wncvzVDFJDvhh1M3CXJ6aL",
"content": { "content": {
"richText": [ "richText": [
{ {
@ -332,117 +269,77 @@
}, },
{ {
"id": "s5Fh7zHUw3j4zDM5xjzwsXB", "id": "s5Fh7zHUw3j4zDM5xjzwsXB",
"outgoingEdgeId": "cl1571xtc00042e6dcptam5jw",
"type": "email input", "type": "email input",
"groupId": "wncvzVDFJDvhh1M3CXJ6aL",
"options": { "options": {
"labels": { "button": "Send", "placeholder": "Type your email..." }, "variableId": "t2k6cj3uYfNdJX13APA4b9"
"variableId": "t2k6cj3uYfNdJX13APA4b9", }
"retryMessageContent": "This email doesn't seem to be valid. Can you type it again?"
},
"outgoingEdgeId": "cl1571xtc00042e6dcptam5jw"
} }
], ]
"title": "Email", }
"graphCoordinates": { "x": 830, "y": 115 } ],
"edges": [
{
"id": "2dzxChB1qm9WGfzNF91tfg",
"from": { "eventId": "uG1tt8JdDyu2nju3oJ4wc1" },
"to": { "groupId": "vLUAPaxKwPF49iZhg4XZYa" }
},
{
"id": "dhniFxrsH5r54aEE5JXwK2",
"from": {
"blockId": "s6kp2Z4igeY3kL7B64qBdUg",
"itemId": "fQ8oLDnKmDBuPDK7riJ2kt"
},
"to": { "groupId": "kyK8JQ77NodUYaz3JLS88A" }
},
{
"id": "2C4mhU5o2Hdm7dztR9xNE9",
"from": {
"blockId": "s6kp2Z4igeY3kL7B64qBdUg",
"itemId": "h2rFDX2UnKS4Kdu3Eyuqq3"
},
"to": { "groupId": "7MuqF6nen1ZTwGB53Mz8VY" }
},
{
"id": "bTo6CZD1YapDDyVdvJgFDV",
"from": {
"blockId": "s6kp2Z4igeY3kL7B64qBdUg",
"itemId": "hcUFBPeQA3gSyXRprRk2v9"
},
"to": { "groupId": "puWCBhGWSQRbqTkVH89RCf" }
},
{
"id": "cl1571jhh00022e6dk77f52wg",
"from": { "blockId": "s3LYyyYtjdQ88jkMMV5DSW7" },
"to": { "groupId": "wncvzVDFJDvhh1M3CXJ6aL" }
},
{
"id": "cl1571ktd00032e6dyti22850",
"from": { "blockId": "sjd4qACugMarB7gJC8nMhb3" },
"to": { "groupId": "wncvzVDFJDvhh1M3CXJ6aL" }
},
{
"id": "cl1571xtc00042e6dcptam5jw",
"from": { "blockId": "s5Fh7zHUw3j4zDM5xjzwsXB" },
"to": { "groupId": "1GvxCAAEysxJMxrVngud3X" }
} }
], ],
"variables": [ "variables": [
{ "id": "t2k6cj3uYfNdJX13APA4b9", "name": "Email" }, { "id": "t2k6cj3uYfNdJX13APA4b9", "name": "Email" },
{ "id": "v51BcuecnB6kRU1tsttaGyR", "name": "Content" } { "id": "v51BcuecnB6kRU1tsttaGyR", "name": "Content" }
], ],
"edges": [ "theme": {},
{ "selectedThemeTemplateId": null,
"id": "2dzxChB1qm9WGfzNF91tfg", "settings": {},
"to": { "groupId": "vLUAPaxKwPF49iZhg4XZYa" }, "createdAt": "2023-11-07T07:20:05.823Z",
"from": { "updatedAt": "2023-11-07T07:24:28.824Z",
"blockId": "bFHwV7tnY5dke8pQeFY8v6", "icon": "😍",
"groupId": "uG1tt8JdDyu2nju3oJ4wc1" "folderId": null,
}
},
{
"id": "dhniFxrsH5r54aEE5JXwK2",
"to": { "groupId": "kyK8JQ77NodUYaz3JLS88A" },
"from": {
"itemId": "fQ8oLDnKmDBuPDK7riJ2kt",
"blockId": "s6kp2Z4igeY3kL7B64qBdUg",
"groupId": "vLUAPaxKwPF49iZhg4XZYa"
}
},
{
"id": "2C4mhU5o2Hdm7dztR9xNE9",
"to": { "groupId": "7MuqF6nen1ZTwGB53Mz8VY" },
"from": {
"itemId": "h2rFDX2UnKS4Kdu3Eyuqq3",
"blockId": "s6kp2Z4igeY3kL7B64qBdUg",
"groupId": "vLUAPaxKwPF49iZhg4XZYa"
}
},
{
"id": "bTo6CZD1YapDDyVdvJgFDV",
"to": { "groupId": "puWCBhGWSQRbqTkVH89RCf" },
"from": {
"itemId": "hcUFBPeQA3gSyXRprRk2v9",
"blockId": "s6kp2Z4igeY3kL7B64qBdUg",
"groupId": "vLUAPaxKwPF49iZhg4XZYa"
}
},
{
"id": "cl1571jhh00022e6dk77f52wg",
"to": { "groupId": "wncvzVDFJDvhh1M3CXJ6aL" },
"from": {
"blockId": "s3LYyyYtjdQ88jkMMV5DSW7",
"groupId": "7MuqF6nen1ZTwGB53Mz8VY"
}
},
{
"id": "cl1571ktd00032e6dyti22850",
"to": { "groupId": "wncvzVDFJDvhh1M3CXJ6aL" },
"from": {
"blockId": "sjd4qACugMarB7gJC8nMhb3",
"groupId": "puWCBhGWSQRbqTkVH89RCf"
}
},
{
"id": "cl1571xtc00042e6dcptam5jw",
"to": { "groupId": "1GvxCAAEysxJMxrVngud3X" },
"from": {
"blockId": "s5Fh7zHUw3j4zDM5xjzwsXB",
"groupId": "wncvzVDFJDvhh1M3CXJ6aL"
}
}
],
"theme": {
"chat": {
"inputs": {
"color": "#303235",
"backgroundColor": "#FFFFFF",
"placeholderColor": "#9095A0"
},
"buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" },
"hostAvatar": {
"isEnabled": true
},
"hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" },
"guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" }
},
"general": {
"font": "Open Sans",
"background": { "type": "Color", "content": "#ffffff" }
}
},
"settings": {
"general": {
"isBrandingEnabled": false,
"isInputPrefillEnabled": true,
"isResultSavingEnabled": true,
"isHideQueryParamsEnabled": true,
"isNewResultOnRefreshEnabled": true
},
"metadata": {
"description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form."
},
"typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 }
},
"publicId": null, "publicId": null,
"customDomain": null "customDomain": null,
"workspaceId": "proWorkspace",
"resultsTablePreferences": null,
"isArchived": false,
"isClosed": false,
"whatsAppCredentialsId": null
} }

View File

@ -1,34 +1,23 @@
{ {
"id": "cl3u43chu40824z1acel3iw1c", "version": "6",
"version": "4", "id": "cloo0oket000d1aortnxzuslp",
"createdAt": "2022-05-31T12:04:12.930Z",
"updatedAt": "2022-05-31T12:31:12.867Z",
"icon": "🖼️",
"name": "Digital Product Payment", "name": "Digital Product Payment",
"folderId": null, "events": [
"groups": [
{ {
"id": "cl3u43cht00044z1adg20ffni", "id": "cl3u43cht00044z1adg20ffni",
"blocks": [ "outgoingEdgeId": "cl3u448z200062e6gr653itny",
{ "graphCoordinates": { "x": 0, "y": 0 },
"id": "cl3u43chu00054z1abb5x7fzk", "type": "start"
"type": "start", }
"label": "Start", ],
"groupId": "cl3u43cht00044z1adg20ffni", "groups": [
"outgoingEdgeId": "cl3u448z200062e6gr653itny"
}
],
"title": "Start",
"graphCoordinates": { "x": 0, "y": 0 }
},
{ {
"id": "cl3u4431400042e6go5nd0euq", "id": "cl3u4431400042e6go5nd0euq",
"graphCoordinates": { "x": 365, "y": 126 },
"title": "Name", "title": "Name",
"graphCoordinates": { "x": 257.86, "y": 0.85 },
"blocks": [ "blocks": [
{ {
"id": "cl3u4431500052e6gruhlxklx", "id": "cl3u4431500052e6gruhlxklx",
"groupId": "cl3u4431400042e6go5nd0euq",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
@ -38,7 +27,6 @@
}, },
{ {
"id": "cl3u4592z00082e6go92cuu43", "id": "cl3u4592z00082e6go92cuu43",
"groupId": "cl3u4431400042e6go5nd0euq",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
@ -48,28 +36,22 @@
}, },
{ {
"id": "cl3u45f0n000a2e6gci2xgmph", "id": "cl3u45f0n000a2e6gci2xgmph",
"groupId": "cl3u4431400042e6go5nd0euq", "outgoingEdgeId": "cl3u45j0n000c2e6go4nnaavg",
"type": "text input", "type": "text input",
"options": { "options": {
"isLong": false, "labels": { "placeholder": "Type your name..." },
"labels": {
"button": "Send",
"placeholder": "John"
},
"variableId": "vcl3u45hek000b2e6gkl05z1da" "variableId": "vcl3u45hek000b2e6gkl05z1da"
}, }
"outgoingEdgeId": "cl3u45j0n000c2e6go4nnaavg"
} }
] ]
}, },
{ {
"id": "cl3u45dib00092e6g4q2tdkpu", "id": "cl3u45dib00092e6g4q2tdkpu",
"graphCoordinates": { "x": 705, "y": 121 },
"title": "Product demo", "title": "Product demo",
"graphCoordinates": { "x": 613.7, "y": 1.82 },
"blocks": [ "blocks": [
{ {
"id": "cl3u45lqz000d2e6gxo4n5ets", "id": "cl3u45lqz000d2e6gxo4n5ets",
"groupId": "cl3u45dib00092e6g4q2tdkpu",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
@ -82,7 +64,6 @@
}, },
{ {
"id": "cl3u44adg00072e6gc13e1n12", "id": "cl3u44adg00072e6gc13e1n12",
"groupId": "cl3u45dib00092e6g4q2tdkpu",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
@ -99,7 +80,6 @@
}, },
{ {
"id": "cl3u46b0i000e2e6gkpf4qiry", "id": "cl3u46b0i000e2e6gkpf4qiry",
"groupId": "cl3u45dib00092e6g4q2tdkpu",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
@ -114,33 +94,23 @@
}, },
{ {
"id": "cl3u49lmg000f2e6guhhgf825", "id": "cl3u49lmg000f2e6guhhgf825",
"groupId": "cl3u45dib00092e6g4q2tdkpu",
"type": "video", "type": "video",
"content": { "content": {
"type": "url", "url": "https://typebot.s3.eu-west-3.amazonaws.com/assets/bullseye+template+preview.mp4",
"url": "https://typebot.s3.eu-west-3.amazonaws.com/assets/bullseye+template+preview.mp4" "type": "url"
} }
}, },
{ {
"id": "cl3u4hyl9000i2e6gtdz8m04b", "id": "cl3u4hyl9000i2e6gtdz8m04b",
"groupId": "cl3u45dib00092e6g4q2tdkpu",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
{ { "type": "p", "children": [{ "text": "It's yours for $9" }] }
"type": "p",
"children": [
{
"text": "It's yours for $9"
}
]
}
] ]
} }
}, },
{ {
"id": "cl3u4hyl9000i2e6gtdz8m04a", "id": "cl3u4hyl9000i2e6gtdz8m04a",
"groupId": "cl3u45dib00092e6g4q2tdkpu",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
@ -157,23 +127,17 @@
}, },
{ {
"id": "cl3u4id67000l2e6gahw4v1ny", "id": "cl3u4id67000l2e6gahw4v1ny",
"groupId": "cl3u45dib00092e6g4q2tdkpu",
"type": "choice input", "type": "choice input",
"options": { "buttonLabel": "Send", "isMultipleChoice": false },
"items": [ "items": [
{ {
"id": "cl3u4id67000m2e6g3x3do8kd", "id": "cl3u4id67000m2e6g3x3do8kd",
"blockId": "cl3u4id67000l2e6gahw4v1ny", "outgoingEdgeId": "cl3u4l4do00102e6ghd9s5p3f",
"type": 0, "content": "Hell yes!"
"content": "Hell yes!",
"outgoingEdgeId": "cl3u4l4do00102e6ghd9s5p3f"
}, },
{ {
"blockId": "cl3u4id67000l2e6gahw4v1ny",
"type": 0,
"id": "cl3u4iexy000o2e6gbagmrxcc", "id": "cl3u4iexy000o2e6gbagmrxcc",
"content": "I'm ok, thanks.", "outgoingEdgeId": "cl3u4jxq2000v2e6gkpwko0uo",
"outgoingEdgeId": "cl3u4jxq2000v2e6gkpwko0uo" "content": "I'm ok, thanks."
} }
] ]
} }
@ -181,12 +145,11 @@
}, },
{ {
"id": "cl3u4iw28000s2e6gdmukl6qb", "id": "cl3u4iw28000s2e6gdmukl6qb",
"graphCoordinates": { "x": 897, "y": 960 },
"title": "Bye", "title": "Bye",
"graphCoordinates": { "x": 795.34, "y": 877.43 },
"blocks": [ "blocks": [
{ {
"id": "cl3u4iw29000t2e6gakbxvz4u", "id": "cl3u4iw29000t2e6gakbxvz4u",
"groupId": "cl3u4iw28000s2e6gdmukl6qb",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
@ -203,7 +166,6 @@
}, },
{ {
"id": "cl3u4jcyt000u2e6gzyj2p5ss", "id": "cl3u4jcyt000u2e6gzyj2p5ss",
"groupId": "cl3u4iw28000s2e6gdmukl6qb",
"type": "image", "type": "image",
"content": { "content": {
"url": "https://media3.giphy.com/media/48FhEMYGWji8/giphy.gif?cid=fe3852a32dqdmhdazal2zzctxpxukjx171k0e4eflp0w36jf&rid=giphy.gif&ct=g" "url": "https://media3.giphy.com/media/48FhEMYGWji8/giphy.gif?cid=fe3852a32dqdmhdazal2zzctxpxukjx171k0e4eflp0w36jf&rid=giphy.gif&ct=g"
@ -213,12 +175,11 @@
}, },
{ {
"id": "cl3u4kblb000w2e6gfflsq56p", "id": "cl3u4kblb000w2e6gfflsq56p",
"graphCoordinates": { "x": 1072, "y": 588 },
"title": "Email", "title": "Email",
"graphCoordinates": { "x": 992.42, "y": 342.36 },
"blocks": [ "blocks": [
{ {
"id": "cl3u4kblb000x2e6g49rot8h0", "id": "cl3u4kblb000x2e6g49rot8h0",
"groupId": "cl3u4kblb000w2e6gfflsq56p",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
@ -228,7 +189,6 @@
}, },
{ {
"id": "cl3u4khsx000y2e6gx9iysgt4", "id": "cl3u4khsx000y2e6gx9iysgt4",
"groupId": "cl3u4kblb000w2e6gfflsq56p",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
@ -245,25 +205,21 @@
}, },
{ {
"id": "cl3u4l2et000z2e6gjlmh45jp", "id": "cl3u4l2et000z2e6gjlmh45jp",
"groupId": "cl3u4kblb000w2e6gfflsq56p", "outgoingEdgeId": "dstr8midu9f0x6ylyet7dljw",
"type": "email input", "type": "email input",
"options": { "options": {
"labels": { "button": "Send", "placeholder": "Type your email..." },
"retryMessageContent": "This email doesn't seem to be valid. Can you type it again?",
"variableId": "vcl3u4n1vk00162e6gs6x59o2k" "variableId": "vcl3u4n1vk00162e6gs6x59o2k"
}, }
"outgoingEdgeId": "cl3u4mbrj00142e6gxif5x53i"
} }
] ]
}, },
{ {
"id": "cl3u4leig00112e6gxbk65r7y", "id": "cl3u4leig00112e6gxbk65r7y",
"graphCoordinates": { "x": 1400, "y": 589 },
"title": "Payment", "title": "Payment",
"graphCoordinates": { "x": 1338.38, "y": 343.48 },
"blocks": [ "blocks": [
{ {
"id": "cl3u4leig00122e6gqx7skfhb", "id": "cl3u4leig00122e6gqx7skfhb",
"groupId": "cl3u4leig00112e6gxbk65r7y",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
@ -273,7 +229,6 @@
}, },
{ {
"id": "cl3u4llj300132e6gciw2ivyv", "id": "cl3u4llj300132e6gciw2ivyv",
"groupId": "cl3u4leig00112e6gxbk65r7y",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
@ -290,30 +245,25 @@
}, },
{ {
"id": "cl3u4mjq900152e6grwyg90zt", "id": "cl3u4mjq900152e6grwyg90zt",
"groupId": "cl3u4leig00112e6gxbk65r7y", "outgoingEdgeId": "cl3u4wynv001b2e6g6pxc7int",
"type": "payment input", "type": "payment input",
"options": { "options": {
"provider": "Stripe",
"labels": { "button": "Pay" },
"currency": "USD",
"amount": "9",
"additionalInformation": { "additionalInformation": {
"name": "{{Name}}", "name": "{{Name}}",
"email": "{{Email}}" "email": "{{Email}}"
} },
}, "amount": "9"
"outgoingEdgeId": "cl3u4wynv001b2e6g6pxc7int" }
} }
] ]
}, },
{ {
"id": "cl3u4vnth00182e6g2hh0gewl", "id": "cl3u4vnth00182e6g2hh0gewl",
"graphCoordinates": { "x": 1731.4449652273986, "y": 586.6975439409757 },
"title": "Send email", "title": "Send email",
"graphCoordinates": { "x": 1683.86, "y": 346.93 },
"blocks": [ "blocks": [
{ {
"id": "cl3u4wi2d001a2e6gznp1r9d4", "id": "cl3u4wi2d001a2e6gznp1r9d4",
"groupId": "cl3u4vnth00182e6g2hh0gewl",
"type": "image", "type": "image",
"content": { "content": {
"url": "https://media1.giphy.com/media/s2qXK8wAvkHTO/giphy.gif?cid=fe3852a3edx7hsbquhw3lu17c422yzc6wsiplnpn02rzm2kf&rid=giphy.gif&ct=g" "url": "https://media1.giphy.com/media/s2qXK8wAvkHTO/giphy.gif?cid=fe3852a3edx7hsbquhw3lu17c422yzc6wsiplnpn02rzm2kf&rid=giphy.gif&ct=g"
@ -321,10 +271,9 @@
}, },
{ {
"id": "cl3u4xcqc001c2e6g355vnigh", "id": "cl3u4xcqc001c2e6g355vnigh",
"groupId": "cl3u4vnth00182e6g2hh0gewl",
"type": "Email", "type": "Email",
"options": { "options": {
"credentialsId": "default", "isCustomBody": true,
"recipients": ["{{Email}}"], "recipients": ["{{Email}}"],
"subject": "Here is your Bullseye Framework template 🎉", "subject": "Here is your Bullseye Framework template 🎉",
"body": "Hey {{Name}},\n\nThank you again for buying the template.\n\nHere is the link where you can duplicate it:\n\nhttps://baptistearno.notion.site/Growth-Framework-Bullseye-c2166e03d99340daa1aa87e4356bdc83\n\nFeel free to tell me what I can improve.\n\nBaptiste." "body": "Hey {{Name}},\n\nThank you again for buying the template.\n\nHere is the link where you can duplicate it:\n\nhttps://baptistearno.notion.site/Growth-Framework-Bullseye-c2166e03d99340daa1aa87e4356bdc83\n\nFeel free to tell me what I can improve.\n\nBaptiste."
@ -332,7 +281,6 @@
}, },
{ {
"id": "cl3u5189q001d2e6gd1q7qshq", "id": "cl3u5189q001d2e6gd1q7qshq",
"groupId": "cl3u4vnth00182e6g2hh0gewl",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
@ -349,7 +297,6 @@
}, },
{ {
"id": "cl3u51mpe001e2e6ggrjjzxek", "id": "cl3u51mpe001e2e6ggrjjzxek",
"groupId": "cl3u4vnth00182e6g2hh0gewl",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
@ -362,104 +309,110 @@
}, },
{ {
"id": "cl3u51z0o001f2e6gbl96p7bi", "id": "cl3u51z0o001f2e6gbl96p7bi",
"groupId": "cl3u4vnth00182e6g2hh0gewl",
"type": "text", "type": "text",
"content": { "content": {
"richText": [{ "type": "p", "children": [{ "text": "Bye 👋" }] }] "richText": [{ "type": "p", "children": [{ "text": "Bye 👋" }] }]
} }
} }
] ]
},
{
"id": "i47yu1c1pjhsqoe68kktbxgl",
"title": "",
"graphCoordinates": { "x": 1336.77, "y": 43.66 },
"blocks": [
{
"id": "unw1076x8ematnu6jrbop8sv",
"type": "text",
"content": {
"richText": [
{
"type": "p",
"children": [
{
"text": "You need to add your Stripe credentials in the next Payment block."
}
]
}
]
}
},
{
"id": "ck19ttflkp6mbxnxpnyxp7vh",
"type": "text",
"content": {
"richText": [
{
"type": "p",
"children": [
{
"text": "Once it's done, you can remove this group and connect the email input to the \"Payment\" group 🪄"
}
]
}
]
}
}
]
}
],
"edges": [
{
"id": "cl3u448z200062e6gr653itny",
"from": { "eventId": "cl3u43cht00044z1adg20ffni" },
"to": { "groupId": "cl3u4431400042e6go5nd0euq" }
},
{
"id": "cl3u45j0n000c2e6go4nnaavg",
"from": { "blockId": "cl3u45f0n000a2e6gci2xgmph" },
"to": { "groupId": "cl3u45dib00092e6g4q2tdkpu" }
},
{
"id": "cl3u4jxq2000v2e6gkpwko0uo",
"from": {
"blockId": "cl3u4id67000l2e6gahw4v1ny",
"itemId": "cl3u4iexy000o2e6gbagmrxcc"
},
"to": { "groupId": "cl3u4iw28000s2e6gdmukl6qb" }
},
{
"id": "cl3u4l4do00102e6ghd9s5p3f",
"from": {
"blockId": "cl3u4id67000l2e6gahw4v1ny",
"itemId": "cl3u4id67000m2e6g3x3do8kd"
},
"to": { "groupId": "cl3u4kblb000w2e6gfflsq56p" }
},
{
"id": "cl3u4wynv001b2e6g6pxc7int",
"from": { "blockId": "cl3u4mjq900152e6grwyg90zt" },
"to": { "groupId": "cl3u4vnth00182e6g2hh0gewl" }
},
{
"from": {
"blockId": "cl3u4l2et000z2e6gjlmh45jp",
"groupId": "cl3u4kblb000w2e6gfflsq56p"
},
"to": { "groupId": "i47yu1c1pjhsqoe68kktbxgl" },
"id": "dstr8midu9f0x6ylyet7dljw"
} }
], ],
"variables": [ "variables": [
{ "id": "vcl3u45hek000b2e6gkl05z1da", "name": "Name" }, { "id": "vcl3u45hek000b2e6gkl05z1da", "name": "Name" },
{ "id": "vcl3u4n1vk00162e6gs6x59o2k", "name": "Email" } { "id": "vcl3u4n1vk00162e6gs6x59o2k", "name": "Email" }
], ],
"edges": [ "theme": {},
{ "selectedThemeTemplateId": null,
"from": { "settings": {},
"groupId": "cl3u43cht00044z1adg20ffni", "createdAt": "2023-11-07T07:35:56.501Z",
"blockId": "cl3u43chu00054z1abb5x7fzk" "updatedAt": "2023-11-07T07:40:03.471Z",
}, "icon": "🖼️",
"to": { "groupId": "cl3u4431400042e6go5nd0euq" }, "folderId": null,
"id": "cl3u448z200062e6gr653itny"
},
{
"from": {
"groupId": "cl3u4431400042e6go5nd0euq",
"blockId": "cl3u45f0n000a2e6gci2xgmph"
},
"to": { "groupId": "cl3u45dib00092e6g4q2tdkpu" },
"id": "cl3u45j0n000c2e6go4nnaavg"
},
{
"from": {
"groupId": "cl3u45dib00092e6g4q2tdkpu",
"blockId": "cl3u4id67000l2e6gahw4v1ny",
"itemId": "cl3u4iexy000o2e6gbagmrxcc"
},
"to": { "groupId": "cl3u4iw28000s2e6gdmukl6qb" },
"id": "cl3u4jxq2000v2e6gkpwko0uo"
},
{
"from": {
"groupId": "cl3u45dib00092e6g4q2tdkpu",
"blockId": "cl3u4id67000l2e6gahw4v1ny",
"itemId": "cl3u4id67000m2e6g3x3do8kd"
},
"to": { "groupId": "cl3u4kblb000w2e6gfflsq56p" },
"id": "cl3u4l4do00102e6ghd9s5p3f"
},
{
"from": {
"groupId": "cl3u4kblb000w2e6gfflsq56p",
"blockId": "cl3u4l2et000z2e6gjlmh45jp"
},
"to": { "groupId": "cl3u4leig00112e6gxbk65r7y" },
"id": "cl3u4mbrj00142e6gxif5x53i"
},
{
"from": {
"groupId": "cl3u4leig00112e6gxbk65r7y",
"blockId": "cl3u4mjq900152e6grwyg90zt"
},
"to": { "groupId": "cl3u4vnth00182e6g2hh0gewl" },
"id": "cl3u4wynv001b2e6g6pxc7int"
}
],
"theme": {
"chat": {
"inputs": {
"color": "#303235",
"backgroundColor": "#FFFFFF",
"placeholderColor": "#9095A0"
},
"buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" },
"hostAvatar": {
"isEnabled": true
},
"hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" },
"guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" }
},
"general": {
"font": "Open Sans",
"background": { "type": "Color", "content": "#ffffff" }
}
},
"settings": {
"general": {
"isBrandingEnabled": false,
"isInputPrefillEnabled": true,
"isResultSavingEnabled": true,
"isHideQueryParamsEnabled": true,
"isNewResultOnRefreshEnabled": true
},
"metadata": {
"description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form."
},
"typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 }
},
"publicId": null, "publicId": null,
"customDomain": null, "customDomain": null,
"workspaceId": "cl3ncues300081a1as58wmkxz" "workspaceId": "proWorkspace",
"resultsTablePreferences": null,
"isArchived": false,
"isClosed": false,
"whatsAppCredentialsId": null
} }

View File

@ -1,36 +1,25 @@
{ {
"id": "clh9fzu4b00031aotzr1ik4ba", "version": "6",
"version": "4", "id": "clonzza7600031aorlgsreya0",
"createdAt": "2023-05-04T18:10:07.548Z",
"updatedAt": "2023-05-04T19:13:45.356Z",
"icon": "🐶",
"name": "Insurance offer", "name": "Insurance offer",
"folderId": null, "events": [
"groups": [
{ {
"id": "f4ef28wxteh0wdjgubtojnkr", "id": "f4ef28wxteh0wdjgubtojnkr",
"title": "Start", "outgoingEdgeId": "u0009iy3sakdgh3k1x41i5yr",
"blocks": [ "graphCoordinates": { "x": 0, "y": 0 },
{ "type": "start"
"id": "wj0uw1i63j4j4xe1q8xxmda0", }
"type": "start", ],
"label": "Start", "groups": [
"groupId": "f4ef28wxteh0wdjgubtojnkr",
"outgoingEdgeId": "u0009iy3sakdgh3k1x41i5yr"
}
],
"graphCoordinates": { "x": 0, "y": 0 }
},
{ {
"id": "av0jzkh3qhgdyjrouvl2zywe", "id": "av0jzkh3qhgdyjrouvl2zywe",
"title": "Welcome", "title": "Welcome",
"graphCoordinates": { "x": 68.4296875, "y": 176.178531769944 },
"blocks": [ "blocks": [
{ {
"id": "y0iukpry1i6h8sv22gz4ffsg", "id": "y0iukpry1i6h8sv22gz4ffsg",
"type": "Set variable", "type": "Set variable",
"groupId": "av0jzkh3qhgdyjrouvl2zywe",
"options": { "options": {
"isCode": true,
"variableId": "vq61f8ykwadq1pj8389qf9h91", "variableId": "vq61f8ykwadq1pj8389qf9h91",
"expressionToEvaluate": "0" "expressionToEvaluate": "0"
} }
@ -40,8 +29,7 @@
"type": "text", "type": "text",
"content": { "content": {
"richText": [{ "type": "p", "children": [{ "text": "Hey 👋" }] }] "richText": [{ "type": "p", "children": [{ "text": "Hey 👋" }] }]
}, }
"groupId": "av0jzkh3qhgdyjrouvl2zywe"
}, },
{ {
"id": "rhp6p4obkdehddhm6j7tqxe0", "id": "rhp6p4obkdehddhm6j7tqxe0",
@ -50,8 +38,7 @@
"richText": [ "richText": [
{ "type": "p", "children": [{ "text": "I'm John from Dogz" }] } { "type": "p", "children": [{ "text": "I'm John from Dogz" }] }
] ]
}, }
"groupId": "av0jzkh3qhgdyjrouvl2zywe"
}, },
{ {
"id": "tizd6f2qo70g59lz1rnnvho7", "id": "tizd6f2qo70g59lz1rnnvho7",
@ -67,8 +54,7 @@
] ]
} }
] ]
}, }
"groupId": "av0jzkh3qhgdyjrouvl2zywe"
}, },
{ {
"id": "dtvbio4qytr3iojc7tq2quvy", "id": "dtvbio4qytr3iojc7tq2quvy",
@ -76,26 +62,17 @@
"items": [ "items": [
{ {
"id": "m7l8u4y5vmwozvdtsmhq3q49", "id": "m7l8u4y5vmwozvdtsmhq3q49",
"type": 0, "outgoingEdgeId": "vl23l0ak8w2qxj9wrgxhznz3",
"blockId": "dtvbio4qytr3iojc7tq2quvy", "content": "Let's go!"
"content": "Let's go!",
"outgoingEdgeId": "vl23l0ak8w2qxj9wrgxhznz3"
} }
], ]
"groupId": "av0jzkh3qhgdyjrouvl2zywe",
"options": {
"buttonLabel": "Send",
"isSearchable": false,
"isMultipleChoice": false,
"searchInputPlaceholder": "Filter the options..."
}
} }
], ]
"graphCoordinates": { "x": 68.4296875, "y": 176.178531769944 }
}, },
{ {
"id": "dh3wz001jaclg8ifc1vhovlq", "id": "dh3wz001jaclg8ifc1vhovlq",
"title": "Breed", "title": "Breed",
"graphCoordinates": { "x": 431.756656769944, "y": 177.60546875 },
"blocks": [ "blocks": [
{ {
"id": "mvdogpw4qucgot4yzabpxtcl", "id": "mvdogpw4qucgot4yzabpxtcl",
@ -107,65 +84,27 @@
"children": [{ "text": "What breed is your dog?" }] "children": [{ "text": "What breed is your dog?" }]
} }
] ]
}, }
"groupId": "dh3wz001jaclg8ifc1vhovlq"
}, },
{ {
"id": "f2902yy6o00fwe5h4xihrntj", "id": "f2902yy6o00fwe5h4xihrntj",
"outgoingEdgeId": "moj9ezfl6bvpr4aj76cztkiu",
"type": "choice input", "type": "choice input",
"items": [ "items": [
{ { "id": "q7ydcwda7rsfn1w5ep9ur4y3", "content": "Crossbreed" },
"id": "q7ydcwda7rsfn1w5ep9ur4y3", { "id": "q33qu26t8uhtp63rl7th4p0u", "content": "Labrador" },
"type": 0, { "id": "c9fy5o23cuanywze536ie071", "content": "Golden Retriever" },
"blockId": "f2902yy6o00fwe5h4xihrntj", { "id": "xmozt619ao4pn3lcovs6e1wp", "content": "Jack Russel" },
"content": "Crossbreed" { "id": "qhc245vs9s3vhq8oz9sur4jy", "content": "Husky" },
}, { "id": "bqt7o8aotn5wwye98vw2u8is", "content": "Other" }
{ ]
"id": "q33qu26t8uhtp63rl7th4p0u",
"type": 0,
"blockId": "f2902yy6o00fwe5h4xihrntj",
"content": "Labrador"
},
{
"id": "c9fy5o23cuanywze536ie071",
"type": 0,
"blockId": "f2902yy6o00fwe5h4xihrntj",
"content": "Golden Retriever"
},
{
"id": "xmozt619ao4pn3lcovs6e1wp",
"type": 0,
"blockId": "f2902yy6o00fwe5h4xihrntj",
"content": "Jack Russel"
},
{
"id": "qhc245vs9s3vhq8oz9sur4jy",
"type": 0,
"blockId": "f2902yy6o00fwe5h4xihrntj",
"content": "Husky"
},
{
"id": "bqt7o8aotn5wwye98vw2u8is",
"type": 0,
"blockId": "f2902yy6o00fwe5h4xihrntj",
"content": "Other"
}
],
"groupId": "dh3wz001jaclg8ifc1vhovlq",
"options": {
"buttonLabel": "Send",
"isSearchable": false,
"isMultipleChoice": false,
"searchInputPlaceholder": "Filter the options..."
},
"outgoingEdgeId": "moj9ezfl6bvpr4aj76cztkiu"
} }
], ]
"graphCoordinates": { "x": 431.756656769944, "y": 177.60546875 }
}, },
{ {
"id": "ynt0ya95bvuqj8mf39e938k4", "id": "ynt0ya95bvuqj8mf39e938k4",
"title": "Sex", "title": "Sex",
"graphCoordinates": { "x": 786.06640625, "y": 173.0310202976334 },
"blocks": [ "blocks": [
{ {
"id": "u4voz45sk9gh4khul8c519df", "id": "u4voz45sk9gh4khul8c519df",
@ -177,8 +116,7 @@
"children": [{ "text": "Is it a male or a female?" }] "children": [{ "text": "Is it a male or a female?" }]
} }
] ]
}, }
"groupId": "ynt0ya95bvuqj8mf39e938k4"
}, },
{ {
"id": "zuza6om08ubafgqhbadwv60i", "id": "zuza6om08ubafgqhbadwv60i",
@ -186,38 +124,26 @@
"items": [ "items": [
{ {
"id": "mrca2ini7z81ik4k1o9g3a1s", "id": "mrca2ini7z81ik4k1o9g3a1s",
"type": 0, "outgoingEdgeId": "wciafstvwt3m4lhrejlgl0s0",
"blockId": "zuza6om08ubafgqhbadwv60i", "content": "♂️ Male"
"content": "♂️ Male",
"outgoingEdgeId": "wciafstvwt3m4lhrejlgl0s0"
}, },
{ {
"id": "ymxxgoxxbfcmnhudwmerfgbx", "id": "ymxxgoxxbfcmnhudwmerfgbx",
"type": 0, "outgoingEdgeId": "f60ldz2g58kfkvsfmnf39fjb",
"blockId": "zuza6om08ubafgqhbadwv60i", "content": "♀️ Female"
"content": "♀️ Female",
"outgoingEdgeId": "f60ldz2g58kfkvsfmnf39fjb"
} }
], ]
"groupId": "ynt0ya95bvuqj8mf39e938k4",
"options": {
"buttonLabel": "Send",
"isSearchable": false,
"isMultipleChoice": false,
"searchInputPlaceholder": "Filter the options..."
}
} }
], ]
"graphCoordinates": { "x": 786.06640625, "y": 173.03102029763343 }
}, },
{ {
"id": "c59xwfc18i4xjpaeu9dzrjcu", "id": "c59xwfc18i4xjpaeu9dzrjcu",
"title": "", "title": "",
"graphCoordinates": { "x": 1142.220231700246, "y": 145.316328962412 },
"blocks": [ "blocks": [
{ {
"id": "meoptkjq8tupr3qkyqkpaxqq", "id": "meoptkjq8tupr3qkyqkpaxqq",
"type": "Set variable", "type": "Set variable",
"groupId": "c59xwfc18i4xjpaeu9dzrjcu",
"options": { "options": {
"variableId": "vhl1s7qoksnw7r8b1soocxwsd", "variableId": "vhl1s7qoksnw7r8b1soocxwsd",
"expressionToEvaluate": "he" "expressionToEvaluate": "he"
@ -225,26 +151,24 @@
}, },
{ {
"id": "kqbiaq87al2uq07vuno69syo", "id": "kqbiaq87al2uq07vuno69syo",
"outgoingEdgeId": "to4im28nzrg3yk0ama07l2oz",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
{ "type": "p", "children": [{ "text": "What's his name?" }] } { "type": "p", "children": [{ "text": "What's his name?" }] }
] ]
}, }
"groupId": "c59xwfc18i4xjpaeu9dzrjcu",
"outgoingEdgeId": "to4im28nzrg3yk0ama07l2oz"
} }
], ]
"graphCoordinates": { "x": 1142.2202317002457, "y": 145.31632896241197 }
}, },
{ {
"id": "qzge99trjqvp7vjmjo6rk56o", "id": "qzge99trjqvp7vjmjo6rk56o",
"title": "", "title": "",
"graphCoordinates": { "x": 1140.34375, "y": 328.5390625 },
"blocks": [ "blocks": [
{ {
"id": "jyi9t11totyrw2jeohfhvfw1", "id": "jyi9t11totyrw2jeohfhvfw1",
"type": "Set variable", "type": "Set variable",
"groupId": "qzge99trjqvp7vjmjo6rk56o",
"options": { "options": {
"variableId": "vhl1s7qoksnw7r8b1soocxwsd", "variableId": "vhl1s7qoksnw7r8b1soocxwsd",
"expressionToEvaluate": "she" "expressionToEvaluate": "she"
@ -252,42 +176,35 @@
}, },
{ {
"id": "f9qyzjo67x7zen5q4xih3xv2", "id": "f9qyzjo67x7zen5q4xih3xv2",
"outgoingEdgeId": "c6x6fubn2qu5vvgfc6d14krl",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
{ "type": "p", "children": [{ "text": "What's her name?" }] } { "type": "p", "children": [{ "text": "What's her name?" }] }
] ]
}, }
"groupId": "qzge99trjqvp7vjmjo6rk56o",
"outgoingEdgeId": "c6x6fubn2qu5vvgfc6d14krl"
} }
], ]
"graphCoordinates": { "x": 1140.34375, "y": 328.5390625 }
}, },
{ {
"id": "eq1tnkdfxxf8q08vxckl3md6", "id": "eq1tnkdfxxf8q08vxckl3md6",
"title": "Name", "title": "Name",
"graphCoordinates": { "x": 1501.890625, "y": 169.65234375 },
"blocks": [ "blocks": [
{ {
"id": "kxzi32ioxwqpdy9yy0ktoavu", "id": "kxzi32ioxwqpdy9yy0ktoavu",
"outgoingEdgeId": "g4do01p1scej1trqlbidbrw1",
"type": "text input", "type": "text input",
"groupId": "eq1tnkdfxxf8q08vxckl3md6",
"options": { "options": {
"isLong": false,
"labels": {
"button": "Send",
"placeholder": "Type your answer..."
},
"variableId": "vgl2m65vej3cjwqvkawnpih2l" "variableId": "vgl2m65vej3cjwqvkawnpih2l"
}, }
"outgoingEdgeId": "g4do01p1scej1trqlbidbrw1"
} }
], ]
"graphCoordinates": { "x": 1501.890625, "y": 169.65234375 }
}, },
{ {
"id": "xgulc4hfxlmjmr288ghillwz", "id": "xgulc4hfxlmjmr288ghillwz",
"title": "Age", "title": "Age",
"graphCoordinates": { "x": 1846.419374527324, "y": 168.0560932773236 },
"blocks": [ "blocks": [
{ {
"id": "e61e41j7wdisp1yxlr78gjxs", "id": "e61e41j7wdisp1yxlr78gjxs",
@ -296,8 +213,7 @@
"richText": [ "richText": [
{ "type": "p", "children": [{ "text": "How cute 😊" }] } { "type": "p", "children": [{ "text": "How cute 😊" }] }
] ]
}, }
"groupId": "xgulc4hfxlmjmr288ghillwz"
}, },
{ {
"id": "ep4iqxpgalslj0blt71rglbv", "id": "ep4iqxpgalslj0blt71rglbv",
@ -306,8 +222,7 @@
"richText": [ "richText": [
{ "type": "p", "children": [{ "text": "How old is {{Name}}?" }] } { "type": "p", "children": [{ "text": "How old is {{Name}}?" }] }
] ]
}, }
"groupId": "xgulc4hfxlmjmr288ghillwz"
}, },
{ {
"id": "y2fcko12ha5n9zjxickaakxt", "id": "y2fcko12ha5n9zjxickaakxt",
@ -315,49 +230,36 @@
"items": [ "items": [
{ {
"id": "vliolql8p4vo58pvsz7olf5w", "id": "vliolql8p4vo58pvsz7olf5w",
"type": 3, "outgoingEdgeId": "pehpu3fo38ofsgh6b9dli0i4",
"title": "Less than 1 year",
"blockId": "y2fcko12ha5n9zjxickaakxt",
"pictureSrc": "https://images.unsplash.com/photo-1592924728350-f7d4fd5d1655?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=Mnw0MjU2MDR8MHwxfHNlYXJjaHwxNXx8cHVwcHl8ZW58MHwwfHx8MTY4MzIyNDMxOA&ixlib=rb-4.0.3&q=80&w=1080", "pictureSrc": "https://images.unsplash.com/photo-1592924728350-f7d4fd5d1655?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=Mnw0MjU2MDR8MHwxfHNlYXJjaHwxNXx8cHVwcHl8ZW58MHwwfHx8MTY4MzIyNDMxOA&ixlib=rb-4.0.3&q=80&w=1080",
"outgoingEdgeId": "pehpu3fo38ofsgh6b9dli0i4" "title": "Less than 1 year"
}, },
{ {
"id": "b3ci3fpppgsu312gsl4hs6au", "id": "b3ci3fpppgsu312gsl4hs6au",
"type": 3, "outgoingEdgeId": "ilvu55d6cmembesg0askzgzh",
"title": "1-5 years",
"blockId": "y2fcko12ha5n9zjxickaakxt",
"pictureSrc": "https://images.unsplash.com/photo-1672363340663-37526fffa24d?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=Mnw0MjU2MDR8MHwxfHNlYXJjaHwxMHx8eW91bmclMjBkb2d8ZW58MHwwfHx8MTY4MzIyNDM0OA&ixlib=rb-4.0.3&q=80&w=1080", "pictureSrc": "https://images.unsplash.com/photo-1672363340663-37526fffa24d?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=Mnw0MjU2MDR8MHwxfHNlYXJjaHwxMHx8eW91bmclMjBkb2d8ZW58MHwwfHx8MTY4MzIyNDM0OA&ixlib=rb-4.0.3&q=80&w=1080",
"outgoingEdgeId": "ilvu55d6cmembesg0askzgzh" "title": "1-5 years"
}, },
{ {
"id": "asi8dmhlwnysvm4tmvoipglz", "id": "asi8dmhlwnysvm4tmvoipglz",
"type": 3, "outgoingEdgeId": "kvlz0ly8o4h99997ijiejwe8",
"title": "5-10 years",
"blockId": "y2fcko12ha5n9zjxickaakxt",
"pictureSrc": "https://images.unsplash.com/photo-1587300003388-59208cc962cb?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=Mnw0MjU2MDR8MHwxfHNlYXJjaHwzfHxkb2d8ZW58MHwwfHx8MTY4MzIyNDEwNg&ixlib=rb-4.0.3&q=80&w=1080", "pictureSrc": "https://images.unsplash.com/photo-1587300003388-59208cc962cb?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=Mnw0MjU2MDR8MHwxfHNlYXJjaHwzfHxkb2d8ZW58MHwwfHx8MTY4MzIyNDEwNg&ixlib=rb-4.0.3&q=80&w=1080",
"outgoingEdgeId": "kvlz0ly8o4h99997ijiejwe8" "title": "5-10 years"
}, },
{ {
"id": "w9eeiclycv7nm0ennaxbxo1d", "id": "w9eeiclycv7nm0ennaxbxo1d",
"type": 3, "outgoingEdgeId": "y8v7vkh236e4o4f2latpb7mr",
"title": "Above 10 years",
"blockId": "y2fcko12ha5n9zjxickaakxt",
"pictureSrc": "https://images.unsplash.com/photo-1553531009-7e4b807a0673?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=Mnw0MjU2MDR8MHwxfHNlYXJjaHw4fHxvbGQlMjBkb2d8ZW58MHwwfHx8MTY4MzIyNDQxNw&ixlib=rb-4.0.3&q=80&w=1080", "pictureSrc": "https://images.unsplash.com/photo-1553531009-7e4b807a0673?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=Mnw0MjU2MDR8MHwxfHNlYXJjaHw4fHxvbGQlMjBkb2d8ZW58MHwwfHx8MTY4MzIyNDQxNw&ixlib=rb-4.0.3&q=80&w=1080",
"outgoingEdgeId": "y8v7vkh236e4o4f2latpb7mr" "title": "Above 10 years"
} }
], ]
"groupId": "xgulc4hfxlmjmr288ghillwz",
"options": {
"buttonLabel": "Send",
"searchInputPlaceholder": "Filter the options..."
}
} }
], ]
"graphCoordinates": { "x": 1846.4193745273237, "y": 168.05609327732364 }
}, },
{ {
"id": "s4cccw69brg5ipyakvsoaioo", "id": "s4cccw69brg5ipyakvsoaioo",
"title": "Spayed", "title": "Spayed",
"graphCoordinates": { "x": 2535.586058093481, "y": 164.2060504876776 },
"blocks": [ "blocks": [
{ {
"id": "zw0mfpqem8eib75qs5brnfnu", "id": "zw0mfpqem8eib75qs5brnfnu",
@ -369,8 +271,7 @@
"children": [{ "text": "Is {{Pronoun}} spayed or neutered" }] "children": [{ "text": "Is {{Pronoun}} spayed or neutered" }]
} }
] ]
}, }
"groupId": "s4cccw69brg5ipyakvsoaioo"
}, },
{ {
"id": "w8l8qekmkjwdct0f73f64yke", "id": "w8l8qekmkjwdct0f73f64yke",
@ -378,33 +279,22 @@
"items": [ "items": [
{ {
"id": "njc0kol8iicj5xo06gezhl52", "id": "njc0kol8iicj5xo06gezhl52",
"type": 0, "outgoingEdgeId": "bindxs5p6lbkszkuw7rhpvh1",
"blockId": "w8l8qekmkjwdct0f73f64yke", "content": "❌ No"
"content": "❌ No",
"outgoingEdgeId": "bindxs5p6lbkszkuw7rhpvh1"
}, },
{ {
"id": "jp5k0mx1drijt7k1v4a2z6t8", "id": "jp5k0mx1drijt7k1v4a2z6t8",
"type": 0, "outgoingEdgeId": "igwjs895n7q48h47xhpc90wc",
"blockId": "w8l8qekmkjwdct0f73f64yke", "content": "✅ Yes"
"content": "✅ Yes",
"outgoingEdgeId": "igwjs895n7q48h47xhpc90wc"
} }
], ]
"groupId": "s4cccw69brg5ipyakvsoaioo",
"options": {
"buttonLabel": "Send",
"isSearchable": false,
"isMultipleChoice": false,
"searchInputPlaceholder": "Filter the options..."
}
} }
], ]
"graphCoordinates": { "x": 2535.5860580934814, "y": 164.20605048767763 }
}, },
{ {
"id": "j19dlmdh2ojntwk1lzqemo7a", "id": "j19dlmdh2ojntwk1lzqemo7a",
"title": "Email", "title": "Email",
"graphCoordinates": { "x": 2989.53096827949, "y": 367.6582890794456 },
"blocks": [ "blocks": [
{ {
"id": "os3ecqb05r4todaekg0206t4", "id": "os3ecqb05r4todaekg0206t4",
@ -416,8 +306,7 @@
"children": [{ "text": "Thank you for all this information." }] "children": [{ "text": "Thank you for all this information." }]
} }
] ]
}, }
"groupId": "j19dlmdh2ojntwk1lzqemo7a"
}, },
{ {
"id": "v5sxfs35u83hqfsh9970flj7", "id": "v5sxfs35u83hqfsh9970flj7",
@ -433,8 +322,7 @@
] ]
} }
] ]
}, }
"groupId": "j19dlmdh2ojntwk1lzqemo7a"
}, },
{ {
"id": "sutyhv073mi6p80115jyu8s4", "id": "sutyhv073mi6p80115jyu8s4",
@ -448,116 +336,102 @@
] ]
} }
] ]
}, }
"groupId": "j19dlmdh2ojntwk1lzqemo7a"
}, },
{ {
"id": "ouu081yxvf9raf522k08vr6g", "id": "ouu081yxvf9raf522k08vr6g",
"outgoingEdgeId": "bw2ddpla0a4qggv8b7et3m12",
"type": "email input", "type": "email input",
"groupId": "j19dlmdh2ojntwk1lzqemo7a",
"options": { "options": {
"labels": { "button": "Send", "placeholder": "Type your email..." }, "variableId": "vzhkagzjqqa0amfc78jekl2gz"
"variableId": "vzhkagzjqqa0amfc78jekl2gz", }
"retryMessageContent": "This email doesn't seem to be valid. Can you type it again?"
},
"outgoingEdgeId": "bw2ddpla0a4qggv8b7et3m12"
} }
], ]
"graphCoordinates": { "x": 2989.53096827949, "y": 367.6582890794456 }
}, },
{ {
"id": "rly6ojrxf1oo4augnflhj0kj", "id": "rly6ojrxf1oo4augnflhj0kj",
"title": "", "title": "",
"graphCoordinates": { "x": 2186.904241629908, "y": 387.2160670995469 },
"blocks": [ "blocks": [
{ {
"id": "cubvtqhhgvf6k9597von95bt", "id": "cubvtqhhgvf6k9597von95bt",
"outgoingEdgeId": "wtbthu0nu61a6qijaranccfw",
"type": "Set variable", "type": "Set variable",
"groupId": "rly6ojrxf1oo4augnflhj0kj",
"options": { "options": {
"isCode": true,
"variableId": "vq61f8ykwadq1pj8389qf9h91", "variableId": "vq61f8ykwadq1pj8389qf9h91",
"expressionToEvaluate": "{{Estimated price}} + 5" "expressionToEvaluate": "{{Estimated price}} + 5"
}, }
"outgoingEdgeId": "wtbthu0nu61a6qijaranccfw"
} }
], ]
"graphCoordinates": { "x": 2186.904241629908, "y": 387.2160670995469 }
}, },
{ {
"id": "ggiqdlnnh0urjn8r5d0wip5u", "id": "ggiqdlnnh0urjn8r5d0wip5u",
"title": "", "title": "",
"graphCoordinates": { "x": 2892.884331508873, "y": 193.3583588107446 },
"blocks": [ "blocks": [
{ {
"id": "ww4zmawu2jbvrykqwqq7fnh5", "id": "ww4zmawu2jbvrykqwqq7fnh5",
"outgoingEdgeId": "kuh8vfaq0nazrtpkif9pzrpu",
"type": "Set variable", "type": "Set variable",
"groupId": "ggiqdlnnh0urjn8r5d0wip5u",
"options": { "options": {
"isCode": true,
"variableId": "vq61f8ykwadq1pj8389qf9h91", "variableId": "vq61f8ykwadq1pj8389qf9h91",
"expressionToEvaluate": "{{Estimated price}} + 20" "expressionToEvaluate": "{{Estimated price}} + 20"
}, }
"outgoingEdgeId": "kuh8vfaq0nazrtpkif9pzrpu"
} }
], ]
"graphCoordinates": { "x": 2892.8843315088734, "y": 193.35835881074462 }
}, },
{ {
"id": "trjrsr2xpg0idmldl9pwcqry", "id": "trjrsr2xpg0idmldl9pwcqry",
"title": "", "title": "",
"graphCoordinates": { "x": 2187.765700621067, "y": 522.8303147750385 },
"blocks": [ "blocks": [
{ {
"id": "gdujudl5bf90oayj6z96ghv8", "id": "gdujudl5bf90oayj6z96ghv8",
"outgoingEdgeId": "dvaakgyx7rteqs23qxz8uqx8",
"type": "Set variable", "type": "Set variable",
"groupId": "trjrsr2xpg0idmldl9pwcqry",
"options": { "options": {
"isCode": true,
"variableId": "vq61f8ykwadq1pj8389qf9h91", "variableId": "vq61f8ykwadq1pj8389qf9h91",
"expressionToEvaluate": "{{Estimated price}} + 10" "expressionToEvaluate": "{{Estimated price}} + 10"
}, }
"outgoingEdgeId": "dvaakgyx7rteqs23qxz8uqx8"
} }
], ]
"graphCoordinates": { "x": 2187.7657006210675, "y": 522.8303147750385 }
}, },
{ {
"id": "ykjr48s18zp8a0tiwik18mum", "id": "ykjr48s18zp8a0tiwik18mum",
"title": "", "title": "",
"graphCoordinates": { "x": 2187.927544552159, "y": 661.0263366270658 },
"blocks": [ "blocks": [
{ {
"id": "sevhy7y6pkbss80rph5blunn", "id": "sevhy7y6pkbss80rph5blunn",
"outgoingEdgeId": "opipj5xi262umvn98kkga4tx",
"type": "Set variable", "type": "Set variable",
"groupId": "ykjr48s18zp8a0tiwik18mum",
"options": { "options": {
"isCode": true,
"variableId": "vq61f8ykwadq1pj8389qf9h91", "variableId": "vq61f8ykwadq1pj8389qf9h91",
"expressionToEvaluate": "{{Estimated price}} + 25" "expressionToEvaluate": "{{Estimated price}} + 25"
}, }
"outgoingEdgeId": "opipj5xi262umvn98kkga4tx"
} }
], ]
"graphCoordinates": { "x": 2187.927544552159, "y": 661.0263366270658 }
}, },
{ {
"id": "c1x4umwx2g4j39peylr9rfor", "id": "c1x4umwx2g4j39peylr9rfor",
"title": "", "title": "",
"graphCoordinates": { "x": 2189.67995427391, "y": 796.4435670811636 },
"blocks": [ "blocks": [
{ {
"id": "bw9d73ypbvc83ltqme9kwwzc", "id": "bw9d73ypbvc83ltqme9kwwzc",
"outgoingEdgeId": "ozsoiu70hbqp5pqucstlnh3b",
"type": "Set variable", "type": "Set variable",
"groupId": "c1x4umwx2g4j39peylr9rfor",
"options": { "options": {
"isCode": true,
"variableId": "vq61f8ykwadq1pj8389qf9h91", "variableId": "vq61f8ykwadq1pj8389qf9h91",
"expressionToEvaluate": "{{Estimated price}} + 55" "expressionToEvaluate": "{{Estimated price}} + 55"
}, }
"outgoingEdgeId": "ozsoiu70hbqp5pqucstlnh3b"
} }
], ]
"graphCoordinates": { "x": 2189.6799542739104, "y": 796.4435670811636 }
}, },
{ {
"id": "lmrd5falh8nkdizqy9obpeqi", "id": "lmrd5falh8nkdizqy9obpeqi",
"title": "Bye", "title": "Bye",
"graphCoordinates": { "x": 3340.474508360785, "y": 365.6627012838016 },
"blocks": [ "blocks": [
{ {
"id": "ddpum0cjrd2bredvakte914k", "id": "ddpum0cjrd2bredvakte914k",
@ -566,8 +440,7 @@
"richText": [ "richText": [
{ "type": "p", "children": [{ "text": "Perfect 👌" }] } { "type": "p", "children": [{ "text": "Perfect 👌" }] }
] ]
}, }
"groupId": "lmrd5falh8nkdizqy9obpeqi"
}, },
{ {
"id": "qabtk59h81p0fv14au584ay8", "id": "qabtk59h81p0fv14au584ay8",
@ -583,11 +456,138 @@
] ]
} }
] ]
}, }
"groupId": "lmrd5falh8nkdizqy9obpeqi"
} }
], ]
"graphCoordinates": { "x": 3340.474508360785, "y": 365.6627012838016 } }
],
"edges": [
{
"id": "u0009iy3sakdgh3k1x41i5yr",
"from": { "eventId": "f4ef28wxteh0wdjgubtojnkr" },
"to": { "groupId": "av0jzkh3qhgdyjrouvl2zywe" }
},
{
"id": "vl23l0ak8w2qxj9wrgxhznz3",
"from": {
"blockId": "dtvbio4qytr3iojc7tq2quvy",
"itemId": "m7l8u4y5vmwozvdtsmhq3q49"
},
"to": { "groupId": "dh3wz001jaclg8ifc1vhovlq" }
},
{
"id": "moj9ezfl6bvpr4aj76cztkiu",
"from": { "blockId": "f2902yy6o00fwe5h4xihrntj" },
"to": { "groupId": "ynt0ya95bvuqj8mf39e938k4" }
},
{
"id": "wciafstvwt3m4lhrejlgl0s0",
"from": {
"blockId": "zuza6om08ubafgqhbadwv60i",
"itemId": "mrca2ini7z81ik4k1o9g3a1s"
},
"to": { "groupId": "c59xwfc18i4xjpaeu9dzrjcu" }
},
{
"id": "f60ldz2g58kfkvsfmnf39fjb",
"from": {
"blockId": "zuza6om08ubafgqhbadwv60i",
"itemId": "ymxxgoxxbfcmnhudwmerfgbx"
},
"to": { "groupId": "qzge99trjqvp7vjmjo6rk56o" }
},
{
"id": "to4im28nzrg3yk0ama07l2oz",
"from": { "blockId": "kqbiaq87al2uq07vuno69syo" },
"to": { "groupId": "eq1tnkdfxxf8q08vxckl3md6" }
},
{
"id": "c6x6fubn2qu5vvgfc6d14krl",
"from": { "blockId": "f9qyzjo67x7zen5q4xih3xv2" },
"to": { "groupId": "eq1tnkdfxxf8q08vxckl3md6" }
},
{
"id": "g4do01p1scej1trqlbidbrw1",
"from": { "blockId": "kxzi32ioxwqpdy9yy0ktoavu" },
"to": { "groupId": "xgulc4hfxlmjmr288ghillwz" }
},
{
"id": "pehpu3fo38ofsgh6b9dli0i4",
"from": {
"blockId": "y2fcko12ha5n9zjxickaakxt",
"itemId": "vliolql8p4vo58pvsz7olf5w"
},
"to": { "groupId": "rly6ojrxf1oo4augnflhj0kj" }
},
{
"id": "ilvu55d6cmembesg0askzgzh",
"from": {
"blockId": "y2fcko12ha5n9zjxickaakxt",
"itemId": "b3ci3fpppgsu312gsl4hs6au"
},
"to": { "groupId": "trjrsr2xpg0idmldl9pwcqry" }
},
{
"id": "kvlz0ly8o4h99997ijiejwe8",
"from": {
"blockId": "y2fcko12ha5n9zjxickaakxt",
"itemId": "asi8dmhlwnysvm4tmvoipglz"
},
"to": { "groupId": "ykjr48s18zp8a0tiwik18mum" }
},
{
"id": "y8v7vkh236e4o4f2latpb7mr",
"from": {
"blockId": "y2fcko12ha5n9zjxickaakxt",
"itemId": "w9eeiclycv7nm0ennaxbxo1d"
},
"to": { "groupId": "c1x4umwx2g4j39peylr9rfor" }
},
{
"id": "wtbthu0nu61a6qijaranccfw",
"from": { "blockId": "cubvtqhhgvf6k9597von95bt" },
"to": { "groupId": "s4cccw69brg5ipyakvsoaioo" }
},
{
"id": "dvaakgyx7rteqs23qxz8uqx8",
"from": { "blockId": "gdujudl5bf90oayj6z96ghv8" },
"to": { "groupId": "s4cccw69brg5ipyakvsoaioo" }
},
{
"id": "opipj5xi262umvn98kkga4tx",
"from": { "blockId": "sevhy7y6pkbss80rph5blunn" },
"to": { "groupId": "s4cccw69brg5ipyakvsoaioo" }
},
{
"id": "ozsoiu70hbqp5pqucstlnh3b",
"from": { "blockId": "bw9d73ypbvc83ltqme9kwwzc" },
"to": { "groupId": "s4cccw69brg5ipyakvsoaioo" }
},
{
"id": "bindxs5p6lbkszkuw7rhpvh1",
"from": {
"blockId": "w8l8qekmkjwdct0f73f64yke",
"itemId": "njc0kol8iicj5xo06gezhl52"
},
"to": { "groupId": "ggiqdlnnh0urjn8r5d0wip5u" }
},
{
"id": "igwjs895n7q48h47xhpc90wc",
"from": {
"blockId": "w8l8qekmkjwdct0f73f64yke",
"itemId": "jp5k0mx1drijt7k1v4a2z6t8"
},
"to": { "groupId": "j19dlmdh2ojntwk1lzqemo7a" }
},
{
"id": "kuh8vfaq0nazrtpkif9pzrpu",
"from": { "blockId": "ww4zmawu2jbvrykqwqq7fnh5" },
"to": { "groupId": "j19dlmdh2ojntwk1lzqemo7a" }
},
{
"id": "bw2ddpla0a4qggv8b7et3m12",
"from": { "blockId": "ouu081yxvf9raf522k08vr6g" },
"to": { "groupId": "lmrd5falh8nkdizqy9obpeqi" }
} }
], ],
"variables": [ "variables": [
@ -596,213 +596,18 @@
{ "id": "vq61f8ykwadq1pj8389qf9h91", "name": "Estimated price" }, { "id": "vq61f8ykwadq1pj8389qf9h91", "name": "Estimated price" },
{ "id": "vzhkagzjqqa0amfc78jekl2gz", "name": "Email" } { "id": "vzhkagzjqqa0amfc78jekl2gz", "name": "Email" }
], ],
"edges": [ "theme": {},
{
"id": "u0009iy3sakdgh3k1x41i5yr",
"to": { "groupId": "av0jzkh3qhgdyjrouvl2zywe" },
"from": {
"blockId": "wj0uw1i63j4j4xe1q8xxmda0",
"groupId": "f4ef28wxteh0wdjgubtojnkr"
}
},
{
"id": "vl23l0ak8w2qxj9wrgxhznz3",
"to": { "groupId": "dh3wz001jaclg8ifc1vhovlq" },
"from": {
"itemId": "m7l8u4y5vmwozvdtsmhq3q49",
"blockId": "dtvbio4qytr3iojc7tq2quvy",
"groupId": "av0jzkh3qhgdyjrouvl2zywe"
}
},
{
"id": "moj9ezfl6bvpr4aj76cztkiu",
"to": { "groupId": "ynt0ya95bvuqj8mf39e938k4" },
"from": {
"blockId": "f2902yy6o00fwe5h4xihrntj",
"groupId": "dh3wz001jaclg8ifc1vhovlq"
}
},
{
"id": "wciafstvwt3m4lhrejlgl0s0",
"to": { "groupId": "c59xwfc18i4xjpaeu9dzrjcu" },
"from": {
"itemId": "mrca2ini7z81ik4k1o9g3a1s",
"blockId": "zuza6om08ubafgqhbadwv60i",
"groupId": "ynt0ya95bvuqj8mf39e938k4"
}
},
{
"id": "f60ldz2g58kfkvsfmnf39fjb",
"to": { "groupId": "qzge99trjqvp7vjmjo6rk56o" },
"from": {
"itemId": "ymxxgoxxbfcmnhudwmerfgbx",
"blockId": "zuza6om08ubafgqhbadwv60i",
"groupId": "ynt0ya95bvuqj8mf39e938k4"
}
},
{
"id": "to4im28nzrg3yk0ama07l2oz",
"to": { "groupId": "eq1tnkdfxxf8q08vxckl3md6" },
"from": {
"blockId": "kqbiaq87al2uq07vuno69syo",
"groupId": "c59xwfc18i4xjpaeu9dzrjcu"
}
},
{
"id": "c6x6fubn2qu5vvgfc6d14krl",
"to": { "groupId": "eq1tnkdfxxf8q08vxckl3md6" },
"from": {
"blockId": "f9qyzjo67x7zen5q4xih3xv2",
"groupId": "qzge99trjqvp7vjmjo6rk56o"
}
},
{
"id": "g4do01p1scej1trqlbidbrw1",
"to": { "groupId": "xgulc4hfxlmjmr288ghillwz" },
"from": {
"blockId": "kxzi32ioxwqpdy9yy0ktoavu",
"groupId": "eq1tnkdfxxf8q08vxckl3md6"
}
},
{
"id": "pehpu3fo38ofsgh6b9dli0i4",
"to": { "groupId": "rly6ojrxf1oo4augnflhj0kj" },
"from": {
"itemId": "vliolql8p4vo58pvsz7olf5w",
"blockId": "y2fcko12ha5n9zjxickaakxt",
"groupId": "xgulc4hfxlmjmr288ghillwz"
}
},
{
"id": "ilvu55d6cmembesg0askzgzh",
"to": { "groupId": "trjrsr2xpg0idmldl9pwcqry" },
"from": {
"itemId": "b3ci3fpppgsu312gsl4hs6au",
"blockId": "y2fcko12ha5n9zjxickaakxt",
"groupId": "xgulc4hfxlmjmr288ghillwz"
}
},
{
"id": "kvlz0ly8o4h99997ijiejwe8",
"to": { "groupId": "ykjr48s18zp8a0tiwik18mum" },
"from": {
"itemId": "asi8dmhlwnysvm4tmvoipglz",
"blockId": "y2fcko12ha5n9zjxickaakxt",
"groupId": "xgulc4hfxlmjmr288ghillwz"
}
},
{
"id": "y8v7vkh236e4o4f2latpb7mr",
"to": { "groupId": "c1x4umwx2g4j39peylr9rfor" },
"from": {
"itemId": "w9eeiclycv7nm0ennaxbxo1d",
"blockId": "y2fcko12ha5n9zjxickaakxt",
"groupId": "xgulc4hfxlmjmr288ghillwz"
}
},
{
"id": "wtbthu0nu61a6qijaranccfw",
"to": { "groupId": "s4cccw69brg5ipyakvsoaioo" },
"from": {
"blockId": "cubvtqhhgvf6k9597von95bt",
"groupId": "rly6ojrxf1oo4augnflhj0kj"
}
},
{
"id": "dvaakgyx7rteqs23qxz8uqx8",
"to": { "groupId": "s4cccw69brg5ipyakvsoaioo" },
"from": {
"blockId": "gdujudl5bf90oayj6z96ghv8",
"groupId": "trjrsr2xpg0idmldl9pwcqry"
}
},
{
"id": "opipj5xi262umvn98kkga4tx",
"to": { "groupId": "s4cccw69brg5ipyakvsoaioo" },
"from": {
"blockId": "sevhy7y6pkbss80rph5blunn",
"groupId": "ykjr48s18zp8a0tiwik18mum"
}
},
{
"id": "ozsoiu70hbqp5pqucstlnh3b",
"to": { "groupId": "s4cccw69brg5ipyakvsoaioo" },
"from": {
"blockId": "bw9d73ypbvc83ltqme9kwwzc",
"groupId": "c1x4umwx2g4j39peylr9rfor"
}
},
{
"id": "bindxs5p6lbkszkuw7rhpvh1",
"to": { "groupId": "ggiqdlnnh0urjn8r5d0wip5u" },
"from": {
"itemId": "njc0kol8iicj5xo06gezhl52",
"blockId": "w8l8qekmkjwdct0f73f64yke",
"groupId": "s4cccw69brg5ipyakvsoaioo"
}
},
{
"id": "igwjs895n7q48h47xhpc90wc",
"to": { "groupId": "j19dlmdh2ojntwk1lzqemo7a" },
"from": {
"itemId": "jp5k0mx1drijt7k1v4a2z6t8",
"blockId": "w8l8qekmkjwdct0f73f64yke",
"groupId": "s4cccw69brg5ipyakvsoaioo"
}
},
{
"id": "kuh8vfaq0nazrtpkif9pzrpu",
"to": { "groupId": "j19dlmdh2ojntwk1lzqemo7a" },
"from": {
"blockId": "ww4zmawu2jbvrykqwqq7fnh5",
"groupId": "ggiqdlnnh0urjn8r5d0wip5u"
}
},
{
"id": "bw2ddpla0a4qggv8b7et3m12",
"to": { "groupId": "lmrd5falh8nkdizqy9obpeqi" },
"from": {
"blockId": "ouu081yxvf9raf522k08vr6g",
"groupId": "j19dlmdh2ojntwk1lzqemo7a"
}
}
],
"theme": {
"chat": {
"inputs": {
"color": "#303235",
"backgroundColor": "#FFFFFF",
"placeholderColor": "#9095A0"
},
"buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" },
"hostAvatar": {
"isEnabled": true
},
"hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" },
"guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" }
},
"general": {
"font": "Open Sans",
"background": { "type": "Color", "content": "#ffffff" }
}
},
"selectedThemeTemplateId": null, "selectedThemeTemplateId": null,
"settings": { "settings": {},
"general": { "createdAt": "2023-11-07T07:16:16.866Z",
"isBrandingEnabled": true, "updatedAt": "2023-11-07T07:16:16.866Z",
"isInputPrefillEnabled": true, "icon": "🐶",
"isHideQueryParamsEnabled": true, "folderId": null,
"isNewResultOnRefreshEnabled": true
},
"metadata": {
"description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form."
},
"typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 }
},
"publicId": null, "publicId": null,
"customDomain": null, "customDomain": null,
"workspaceId": "freeWorkspace", "workspaceId": "proWorkspace",
"resultsTablePreferences": null, "resultsTablePreferences": null,
"isArchived": false, "isArchived": false,
"isClosed": false "isClosed": false,
"whatsAppCredentialsId": null
} }

View File

@ -1,34 +1,23 @@
{ {
"id": "cl96ns7zc000dky099ku4bmav", "version": "6",
"version": "4", "id": "cloo0iymj000b1aoraoto4iom",
"createdAt": "2022-10-13T06:07:11.976Z",
"updatedAt": "2022-10-13T06:27:31.951Z",
"icon": "💬",
"name": "FAQ", "name": "FAQ",
"folderId": null, "events": [
"groups": [
{ {
"id": "cl96ns7za000309kyewk56s22", "id": "cl96ns7za000309kyewk56s22",
"title": "Start", "outgoingEdgeId": "cl96nv0ij00093b6id4t83dvu",
"blocks": [ "graphCoordinates": { "x": 0, "y": 0 },
{ "type": "start"
"id": "cl96ns7za000409kydoui7mpu", }
"type": "start", ],
"label": "Start", "groups": [
"groupId": "cl96ns7za000309kyewk56s22",
"outgoingEdgeId": "cl96nv0ij00093b6id4t83dvu"
}
],
"graphCoordinates": { "x": 0, "y": 0 }
},
{ {
"id": "cl96ns9qr00043b6ii07bo25o", "id": "cl96ns9qr00043b6ii07bo25o",
"graphCoordinates": { "x": 392, "y": 181 },
"title": "Menu", "title": "Menu",
"graphCoordinates": { "x": 385.68, "y": 86.92 },
"blocks": [ "blocks": [
{ {
"id": "cl96ns9qr00053b6igebgtl5q", "id": "cl96ns9qr00053b6igebgtl5q",
"groupId": "cl96ns9qr00043b6ii07bo25o",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
@ -45,37 +34,27 @@
}, },
{ {
"id": "cl96nv877000b3b6i7p69ss2o", "id": "cl96nv877000b3b6i7p69ss2o",
"groupId": "cl96ns9qr00043b6ii07bo25o",
"type": "choice input", "type": "choice input",
"options": { "buttonLabel": "Send", "isMultipleChoice": false },
"items": [ "items": [
{ {
"id": "cl96nv877000c3b6idyepv694", "id": "cl96nv877000c3b6idyepv694",
"blockId": "cl96nv877000b3b6i7p69ss2o", "outgoingEdgeId": "cl96o2u6h000t3b6izmh4pguj",
"type": 0, "content": "What's Analyzr?"
"content": "What's Analyzr?",
"outgoingEdgeId": "cl96o2u6h000t3b6izmh4pguj"
}, },
{ {
"blockId": "cl96nv877000b3b6i7p69ss2o",
"type": 0,
"id": "cl96nvcwi000d3b6ipyfzcyaw", "id": "cl96nvcwi000d3b6ipyfzcyaw",
"content": "Can I use your tool for free?", "outgoingEdgeId": "cl96o6hxh00173b6ix83nn581",
"outgoingEdgeId": "cl96o6hxh00173b6ix83nn581" "content": "Can I use your tool for free?"
}, },
{ {
"blockId": "cl96nv877000b3b6i7p69ss2o",
"type": 0,
"id": "cl96obwgy001k3b6ir1a8qk5w", "id": "cl96obwgy001k3b6ir1a8qk5w",
"content": "Tell me about the company", "outgoingEdgeId": "cl96ofn4s001q3b6i482xx6jp",
"outgoingEdgeId": "cl96ofn4s001q3b6i482xx6jp" "content": "Tell me about the company"
}, },
{ {
"blockId": "cl96nv877000b3b6i7p69ss2o",
"type": 0,
"id": "cl96nvstv000e3b6itm8cj1s5", "id": "cl96nvstv000e3b6itm8cj1s5",
"content": "I have another question", "outgoingEdgeId": "cl96ogaa0001x3b6izae2alxq",
"outgoingEdgeId": "cl96ogaa0001x3b6izae2alxq" "content": "I have another question"
} }
] ]
} }
@ -83,12 +62,11 @@
}, },
{ {
"id": "cl96nt9ob00063b6ii2pktlxq", "id": "cl96nt9ob00063b6ii2pktlxq",
"graphCoordinates": { "x": 26.51592874499341, "y": 202.71976248331134 },
"title": "Welcom", "title": "Welcom",
"graphCoordinates": { "x": 43.5, "y": 89.92 },
"blocks": [ "blocks": [
{ {
"id": "cl96nt9ob00073b6ionlvakha", "id": "cl96nt9ob00073b6ionlvakha",
"groupId": "cl96nt9ob00063b6ii2pktlxq",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
@ -98,7 +76,7 @@
}, },
{ {
"id": "cl96ntraa00083b6ij922v2qh", "id": "cl96ntraa00083b6ij922v2qh",
"groupId": "cl96nt9ob00063b6ii2pktlxq", "outgoingEdgeId": "cl96nv51s000a3b6i3wmlcmdt",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
@ -111,19 +89,17 @@
] ]
} }
] ]
}, }
"outgoingEdgeId": "cl96nv51s000a3b6i3wmlcmdt"
} }
] ]
}, },
{ {
"id": "cl96o2cgi000r3b6iljr1iwdl", "id": "cl96o2cgi000r3b6iljr1iwdl",
"graphCoordinates": { "x": 787, "y": -534 },
"title": "What's Analyzr", "title": "What's Analyzr",
"graphCoordinates": { "x": 774.53, "y": -513.14 },
"blocks": [ "blocks": [
{ {
"id": "cl96o2cgi000s3b6ikdv6iogz", "id": "cl96o2cgi000s3b6ikdv6iogz",
"groupId": "cl96o2cgi000r3b6iljr1iwdl",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
@ -140,7 +116,6 @@
}, },
{ {
"id": "cl96o3260000u3b6i9czqm52g", "id": "cl96o3260000u3b6i9czqm52g",
"groupId": "cl96o2cgi000r3b6iljr1iwdl",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
@ -156,29 +131,28 @@
}, },
{ {
"id": "cl96o55z3000x3b6ikq14g2tu", "id": "cl96o55z3000x3b6ikq14g2tu",
"groupId": "cl96o2cgi000r3b6iljr1iwdl",
"type": "choice input", "type": "choice input",
"options": { "buttonLabel": "Send", "isMultipleChoice": false },
"items": [ "items": [
{ { "id": "cl96o55z3000y3b6idpn54byw", "content": "Sounds good!" }
"id": "cl96o55z3000y3b6idpn54byw",
"blockId": "cl96o55z3000x3b6ikq14g2tu",
"type": 0,
"content": "Sounds good!",
"outgoingEdgeId": "cl96o5k4n00103b6irh2dfp2r"
}
] ]
},
{
"id": "qrg1xtxxbmyo8a6mztma3dvr",
"type": "Jump",
"options": {
"groupId": "cl96ns9qr00043b6ii07bo25o",
"blockId": "cl96nv877000b3b6i7p69ss2o"
}
} }
] ]
}, },
{ {
"id": "cl96o6a2700123b6ie4efb6bb", "id": "cl96o6a2700123b6ie4efb6bb",
"graphCoordinates": { "x": 803.5720553542924, "y": 7.420010744791735 },
"title": "Use for free", "title": "Use for free",
"graphCoordinates": { "x": 775.05, "y": 7.42 },
"blocks": [ "blocks": [
{ {
"id": "cl96o6a2700133b6ii5n027h2", "id": "cl96o6a2700133b6ii5n027h2",
"groupId": "cl96o6a2700123b6ie4efb6bb",
"type": "text", "type": "text",
"content": { "content": {
"richText": [{ "type": "p", "children": [{ "text": "You can!" }] }] "richText": [{ "type": "p", "children": [{ "text": "You can!" }] }]
@ -186,7 +160,6 @@
}, },
{ {
"id": "cl96o6a2700143b6ija9jqhky", "id": "cl96o6a2700143b6ija9jqhky",
"groupId": "cl96o6a2700123b6ie4efb6bb",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
@ -203,23 +176,17 @@
}, },
{ {
"id": "cl96o6a2700153b6il1wj2aev", "id": "cl96o6a2700153b6il1wj2aev",
"groupId": "cl96o6a2700123b6ie4efb6bb",
"type": "choice input", "type": "choice input",
"options": { "buttonLabel": "Send", "isMultipleChoice": false },
"items": [ "items": [
{ {
"id": "cl96o6a2700163b6i818ywnqv", "id": "cl96o6a2700163b6i818ywnqv",
"blockId": "cl96o6a2700153b6il1wj2aev", "outgoingEdgeId": "n4rgj2fmqrmnkvo9m9ebzak7",
"type": 0, "content": "Awesome!"
"content": "Awesome!",
"outgoingEdgeId": "cl96oa6kn001g3b6iaormwu2j"
}, },
{ {
"blockId": "cl96o6a2700153b6il1wj2aev",
"type": 0,
"id": "cl96o83lo00183b6igen42ivq", "id": "cl96o83lo00183b6igen42ivq",
"content": "What's an event?", "outgoingEdgeId": "cl96oa83f001h3b6i81wodnjx",
"outgoingEdgeId": "cl96oa83f001h3b6i81wodnjx" "content": "What's an event?"
} }
] ]
} }
@ -227,12 +194,11 @@
}, },
{ {
"id": "cl96o8eym001a3b6i3lxh7kw0", "id": "cl96o8eym001a3b6i3lxh7kw0",
"graphCoordinates": { "x": 1179.4933795363515, "y": 7.7432256889634 },
"title": "User event", "title": "User event",
"graphCoordinates": { "x": 1158.01, "y": 322.44 },
"blocks": [ "blocks": [
{ {
"id": "cl96o8eyn001b3b6icmbgg7lw", "id": "cl96o8eyn001b3b6icmbgg7lw",
"groupId": "cl96o8eym001a3b6i3lxh7kw0",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
@ -247,7 +213,6 @@
}, },
{ {
"id": "cl96o990s001c3b6ie2jjefhf", "id": "cl96o990s001c3b6ie2jjefhf",
"groupId": "cl96o8eym001a3b6i3lxh7kw0",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
@ -264,38 +229,28 @@
}, },
{ {
"id": "cl96o9xba001d3b6i9004l33e", "id": "cl96o9xba001d3b6i9004l33e",
"groupId": "cl96o8eym001a3b6i3lxh7kw0",
"type": "choice input", "type": "choice input",
"options": { "buttonLabel": "Send", "isMultipleChoice": false },
"items": [ "items": [
{ { "id": "cl96o9xbd001e3b6i6ag5ooo7", "content": "Ok, got it!" }
"id": "cl96o9xbd001e3b6i6ag5ooo7",
"blockId": "cl96o9xba001d3b6i9004l33e",
"type": 0,
"content": "Ok, got it!"
}
] ]
}, },
{ {
"id": "cl96oaa8n001j3b6ieqe5r775", "id": "bkmgmgxa96k5261su12hv58k",
"groupId": "cl96o8eym001a3b6i3lxh7kw0", "type": "Jump",
"type": "Typebot link",
"options": { "options": {
"typebotId": "current",
"groupId": "cl96ns9qr00043b6ii07bo25o", "groupId": "cl96ns9qr00043b6ii07bo25o",
"mergeResults": false "blockId": "cl96nv877000b3b6i7p69ss2o"
} }
} }
] ]
}, },
{ {
"id": "cl96oc274001m3b6ig3beli9v", "id": "cl96oc274001m3b6ig3beli9v",
"graphCoordinates": { "x": 802.8616130197884, "y": 477.1611550243932 },
"title": "Company", "title": "Company",
"graphCoordinates": { "x": 772.59, "y": 432 },
"blocks": [ "blocks": [
{ {
"id": "cl96ods3i001o3b6iiyboljuf", "id": "cl96ods3i001o3b6iiyboljuf",
"groupId": "cl96oc274001m3b6ig3beli9v",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
@ -310,7 +265,6 @@
}, },
{ {
"id": "cl96oc277001n3b6if8wv6hzl", "id": "cl96oc277001n3b6if8wv6hzl",
"groupId": "cl96oc274001m3b6ig3beli9v",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
@ -323,7 +277,6 @@
}, },
{ {
"id": "cl96oenlh001p3b6iutaiw9wl", "id": "cl96oenlh001p3b6iutaiw9wl",
"groupId": "cl96oc274001m3b6ig3beli9v",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
@ -340,29 +293,26 @@
}, },
{ {
"id": "cl96oftnv001r3b6ixen8g0bv", "id": "cl96oftnv001r3b6ixen8g0bv",
"groupId": "cl96oc274001m3b6ig3beli9v",
"type": "choice input", "type": "choice input",
"options": { "buttonLabel": "Send", "isMultipleChoice": false }, "items": [{ "id": "cl96oftnv001s3b6i7kjyq7me", "content": "Cool!" }]
"items": [ },
{ {
"id": "cl96oftnv001s3b6i7kjyq7me", "id": "js5pbqj76g67yvs6wz99rcbm",
"blockId": "cl96oftnv001r3b6ixen8g0bv", "type": "Jump",
"type": 0, "options": {
"content": "Cool!", "groupId": "cl96ns9qr00043b6ii07bo25o",
"outgoingEdgeId": "cl96ofyy3001u3b6iro2dkp0w" "blockId": "cl96nv877000b3b6i7p69ss2o"
} }
]
} }
] ]
}, },
{ {
"id": "cl96og2yr001v3b6ivhzb1x34", "id": "cl96og2yr001v3b6ivhzb1x34",
"graphCoordinates": { "x": 798.1737080264639, "y": 1045.5696354649942 },
"title": "Question", "title": "Question",
"graphCoordinates": { "x": 773.69, "y": 1020.26 },
"blocks": [ "blocks": [
{ {
"id": "cl96og2yu001w3b6ijqgstubu", "id": "cl96og2yu001w3b6ijqgstubu",
"groupId": "cl96og2yr001v3b6ivhzb1x34",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
@ -372,27 +322,24 @@
}, },
{ {
"id": "cl96ogmjx001y3b6iwfosloet", "id": "cl96ogmjx001y3b6iwfosloet",
"groupId": "cl96og2yr001v3b6ivhzb1x34", "outgoingEdgeId": "cl96ohn9900213b6ibex8g6my",
"type": "text input", "type": "text input",
"options": { "options": {
"isLong": true,
"labels": { "labels": {
"button": "Send",
"placeholder": "Type your question..." "placeholder": "Type your question..."
} },
}, "isLong": true
"outgoingEdgeId": "cl96ohn9900213b6ibex8g6my" }
} }
] ]
}, },
{ {
"id": "cl96oh3mn001z3b6i2b0no81w", "id": "cl96oh3mn001z3b6i2b0no81w",
"graphCoordinates": { "x": 1174.378083740756, "y": 1049.0855642099898 },
"title": "Bye", "title": "Bye",
"graphCoordinates": { "x": 1174.378083740756, "y": 1049.08556420999 },
"blocks": [ "blocks": [
{ {
"id": "cl96oh3mn00203b6iahw2x1ns", "id": "cl96oh3mn00203b6iahw2x1ns",
"groupId": "cl96oh3mn001z3b6i2b0no81w",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
@ -408,143 +355,101 @@
} }
} }
] ]
},
{
"id": "pqldfrkh43ncm39lzyeartv3",
"title": "",
"graphCoordinates": { "x": 1151.09, "y": 194.39 },
"blocks": [
{
"id": "ifaxemnkm6ikjfv2ozzeg1o3",
"type": "Jump",
"options": {
"groupId": "cl96ns9qr00043b6ii07bo25o",
"blockId": "cl96nv877000b3b6i7p69ss2o"
}
}
]
} }
], ],
"variables": [],
"edges": [ "edges": [
{ {
"from": { "id": "cl96nv0ij00093b6id4t83dvu",
"groupId": "cl96ns7za000309kyewk56s22", "from": { "eventId": "cl96ns7za000309kyewk56s22" },
"blockId": "cl96ns7za000409kydoui7mpu" "to": { "groupId": "cl96nt9ob00063b6ii2pktlxq" }
},
"to": { "groupId": "cl96nt9ob00063b6ii2pktlxq" },
"id": "cl96nv0ij00093b6id4t83dvu"
}, },
{ {
"from": { "id": "cl96nv51s000a3b6i3wmlcmdt",
"groupId": "cl96nt9ob00063b6ii2pktlxq", "from": { "blockId": "cl96ntraa00083b6ij922v2qh" },
"blockId": "cl96ntraa00083b6ij922v2qh" "to": { "groupId": "cl96ns9qr00043b6ii07bo25o" }
},
"to": { "groupId": "cl96ns9qr00043b6ii07bo25o" },
"id": "cl96nv51s000a3b6i3wmlcmdt"
}, },
{ {
"id": "cl96o2u6h000t3b6izmh4pguj",
"from": { "from": {
"groupId": "cl96ns9qr00043b6ii07bo25o",
"blockId": "cl96nv877000b3b6i7p69ss2o", "blockId": "cl96nv877000b3b6i7p69ss2o",
"itemId": "cl96nv877000c3b6idyepv694" "itemId": "cl96nv877000c3b6idyepv694"
}, },
"to": { "groupId": "cl96o2cgi000r3b6iljr1iwdl" }, "to": { "groupId": "cl96o2cgi000r3b6iljr1iwdl" }
"id": "cl96o2u6h000t3b6izmh4pguj"
}, },
{ {
"id": "cl96o6hxh00173b6ix83nn581",
"from": { "from": {
"groupId": "cl96o2cgi000r3b6iljr1iwdl",
"blockId": "cl96o55z3000x3b6ikq14g2tu",
"itemId": "cl96o55z3000y3b6idpn54byw"
},
"to": { "groupId": "cl96ns9qr00043b6ii07bo25o" },
"id": "cl96o5k4n00103b6irh2dfp2r"
},
{
"from": {
"groupId": "cl96ns9qr00043b6ii07bo25o",
"blockId": "cl96nv877000b3b6i7p69ss2o", "blockId": "cl96nv877000b3b6i7p69ss2o",
"itemId": "cl96nvcwi000d3b6ipyfzcyaw" "itemId": "cl96nvcwi000d3b6ipyfzcyaw"
}, },
"to": { "groupId": "cl96o6a2700123b6ie4efb6bb" }, "to": { "groupId": "cl96o6a2700123b6ie4efb6bb" }
"id": "cl96o6hxh00173b6ix83nn581"
}, },
{ {
"id": "cl96oa83f001h3b6i81wodnjx",
"from": { "from": {
"groupId": "cl96o6a2700123b6ie4efb6bb",
"blockId": "cl96o6a2700153b6il1wj2aev",
"itemId": "cl96o6a2700163b6i818ywnqv"
},
"to": { "groupId": "cl96ns9qr00043b6ii07bo25o" },
"id": "cl96oa6kn001g3b6iaormwu2j"
},
{
"from": {
"groupId": "cl96o6a2700123b6ie4efb6bb",
"blockId": "cl96o6a2700153b6il1wj2aev", "blockId": "cl96o6a2700153b6il1wj2aev",
"itemId": "cl96o83lo00183b6igen42ivq" "itemId": "cl96o83lo00183b6igen42ivq"
}, },
"to": { "groupId": "cl96o8eym001a3b6i3lxh7kw0" }, "to": { "groupId": "cl96o8eym001a3b6i3lxh7kw0" }
"id": "cl96oa83f001h3b6i81wodnjx"
}, },
{ {
"id": "cl96ofn4s001q3b6i482xx6jp",
"from": { "from": {
"groupId": "cl96ns9qr00043b6ii07bo25o",
"blockId": "cl96nv877000b3b6i7p69ss2o", "blockId": "cl96nv877000b3b6i7p69ss2o",
"itemId": "cl96obwgy001k3b6ir1a8qk5w" "itemId": "cl96obwgy001k3b6ir1a8qk5w"
}, },
"to": { "groupId": "cl96oc274001m3b6ig3beli9v" }, "to": { "groupId": "cl96oc274001m3b6ig3beli9v" }
"id": "cl96ofn4s001q3b6i482xx6jp"
}, },
{ {
"id": "cl96ogaa0001x3b6izae2alxq",
"from": { "from": {
"groupId": "cl96oc274001m3b6ig3beli9v",
"blockId": "cl96oftnv001r3b6ixen8g0bv",
"itemId": "cl96oftnv001s3b6i7kjyq7me"
},
"to": { "groupId": "cl96ns9qr00043b6ii07bo25o" },
"id": "cl96ofyy3001u3b6iro2dkp0w"
},
{
"from": {
"groupId": "cl96ns9qr00043b6ii07bo25o",
"blockId": "cl96nv877000b3b6i7p69ss2o", "blockId": "cl96nv877000b3b6i7p69ss2o",
"itemId": "cl96nvstv000e3b6itm8cj1s5" "itemId": "cl96nvstv000e3b6itm8cj1s5"
}, },
"to": { "groupId": "cl96og2yr001v3b6ivhzb1x34" }, "to": { "groupId": "cl96og2yr001v3b6ivhzb1x34" }
"id": "cl96ogaa0001x3b6izae2alxq"
}, },
{ {
"id": "cl96ohn9900213b6ibex8g6my",
"from": { "blockId": "cl96ogmjx001y3b6iwfosloet" },
"to": { "groupId": "cl96oh3mn001z3b6i2b0no81w" }
},
{
"id": "n4rgj2fmqrmnkvo9m9ebzak7",
"from": { "from": {
"groupId": "cl96og2yr001v3b6ivhzb1x34", "blockId": "cl96o6a2700153b6il1wj2aev",
"blockId": "cl96ogmjx001y3b6iwfosloet" "itemId": "cl96o6a2700163b6i818ywnqv"
}, },
"to": { "groupId": "cl96oh3mn001z3b6i2b0no81w" }, "to": { "groupId": "pqldfrkh43ncm39lzyeartv3" }
"id": "cl96ohn9900213b6ibex8g6my"
} }
], ],
"theme": { "variables": [],
"chat": { "theme": {},
"inputs": { "selectedThemeTemplateId": null,
"color": "#303235", "settings": {},
"backgroundColor": "#FFFFFF", "createdAt": "2023-11-07T07:31:34.987Z",
"placeholderColor": "#9095A0" "updatedAt": "2023-11-07T07:34:11.360Z",
}, "icon": "💬",
"buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" }, "folderId": null,
"hostAvatar": {
"isEnabled": true
},
"hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" },
"guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" }
},
"general": {
"font": "Open Sans",
"background": { "type": "Color", "content": "#ffffff" }
}
},
"settings": {
"general": {
"isBrandingEnabled": false,
"isInputPrefillEnabled": true,
"isResultSavingEnabled": true,
"isHideQueryParamsEnabled": true,
"isNewResultOnRefreshEnabled": true
},
"metadata": {
"description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form."
},
"typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 }
},
"publicId": null, "publicId": null,
"customDomain": null, "customDomain": null,
"workspaceId": "cl35yesle00188gcpgqu70ia1", "workspaceId": "proWorkspace",
"resultsTablePreferences": null, "resultsTablePreferences": null,
"isArchived": false, "isArchived": false,
"isClosed": false "isClosed": false,
"whatsAppCredentialsId": null
} }

View File

@ -1,45 +1,34 @@
{ {
"id": "pjkxzxkujkbk2oml3d35w6zz", "version": "6",
"version": "4", "id": "clon6cteb000i1avnrdaj92au",
"createdAt": "2023-04-20T12:29:18.633Z",
"updatedAt": "2023-04-20T12:50:12.385Z",
"icon": "🦾",
"name": "Lead Gen with AI", "name": "Lead Gen with AI",
"folderId": null, "events": [
"groups": [
{ {
"id": "i6xofskq0vdlnfyvf28hzcle", "id": "i6xofskq0vdlnfyvf28hzcle",
"title": "Start", "outgoingEdgeId": "dkgy7qanybx0d9zl2ke2aa03",
"blocks": [ "graphCoordinates": { "x": 0, "y": 0 },
{ "type": "start"
"id": "22HP69iipkLjJDTUcc1AWW", }
"type": "start", ],
"label": "Start", "groups": [
"groupId": "i6xofskq0vdlnfyvf28hzcle",
"outgoingEdgeId": "dkgy7qanybx0d9zl2ke2aa03"
}
],
"graphCoordinates": { "x": 0, "y": 0 }
},
{ {
"id": "nmlij3lrk42cymsu1tj6b9nv", "id": "nmlij3lrk42cymsu1tj6b9nv",
"title": "Welcome", "title": "Welcome",
"graphCoordinates": { "x": 1, "y": 148 },
"blocks": [ "blocks": [
{ {
"id": "sc1y8VwDabNJgiVTBi4qtif", "id": "sc1y8VwDabNJgiVTBi4qtif",
"type": "text", "type": "text",
"content": { "content": {
"richText": [{ "type": "p", "children": [{ "text": "Hey 👋" }] }] "richText": [{ "type": "p", "children": [{ "text": "Hey 👋" }] }]
}, }
"groupId": "nmlij3lrk42cymsu1tj6b9nv"
}, },
{ {
"id": "s7YqZTBeyCa4Hp3wN2j922c", "id": "s7YqZTBeyCa4Hp3wN2j922c",
"type": "image", "type": "image",
"content": { "content": {
"url": "https://media0.giphy.com/media/2f7RQiiWMJc40/giphy.gif?cid=fe3852a34jqk83z51tbm8a1jxmqpuckxxwef79p5myafdlw5&rid=giphy.gif&ct=g" "url": "https://media0.giphy.com/media/2f7RQiiWMJc40/giphy.gif?cid=fe3852a34jqk83z51tbm8a1jxmqpuckxxwef79p5myafdlw5&rid=giphy.gif&ct=g"
}, }
"groupId": "nmlij3lrk42cymsu1tj6b9nv"
}, },
{ {
"id": "z5tydv4qcam6xnh1ehm8hask", "id": "z5tydv4qcam6xnh1ehm8hask",
@ -55,8 +44,7 @@
] ]
} }
] ]
}, }
"groupId": "nmlij3lrk42cymsu1tj6b9nv"
}, },
{ {
"id": "ygo5cubnk50m5jt6ull3bn0i", "id": "ygo5cubnk50m5jt6ull3bn0i",
@ -72,38 +60,27 @@
] ]
} }
] ]
}, }
"groupId": "nmlij3lrk42cymsu1tj6b9nv"
}, },
{ {
"id": "vw9s76hgwu749gw15bqk4vd3", "id": "vw9s76hgwu749gw15bqk4vd3",
"type": "text", "type": "text",
"content": { "content": {
"richText": [{ "type": "p", "children": [{ "text": "Ready?" }] }] "richText": [{ "type": "p", "children": [{ "text": "Ready?" }] }]
}, }
"groupId": "nmlij3lrk42cymsu1tj6b9nv"
}, },
{ {
"id": "sbjZWLJGVkHAkDqS4JQeGow", "id": "sbjZWLJGVkHAkDqS4JQeGow",
"outgoingEdgeId": "vgi4r3yjle17balwlhpas25t",
"type": "choice input", "type": "choice input",
"items": [ "items": [{ "id": "hQw2zbp7FDX7XYK9cFpbgC", "content": "Yes!" }]
{
"id": "hQw2zbp7FDX7XYK9cFpbgC",
"type": 0,
"blockId": "sbjZWLJGVkHAkDqS4JQeGow",
"content": "Yes!"
}
],
"groupId": "nmlij3lrk42cymsu1tj6b9nv",
"options": { "buttonLabel": "Send", "isMultipleChoice": false },
"outgoingEdgeId": "vgi4r3yjle17balwlhpas25t"
} }
], ]
"graphCoordinates": { "x": 1, "y": 148 }
}, },
{ {
"id": "vrv6xoriyl74wcz34gqlvc0q", "id": "vrv6xoriyl74wcz34gqlvc0q",
"title": "Email", "title": "Email",
"graphCoordinates": { "x": 666.07421875, "y": 141 },
"blocks": [ "blocks": [
{ {
"id": "scQ5kduafAtfP9T8SHUJnGi", "id": "scQ5kduafAtfP9T8SHUJnGi",
@ -117,26 +94,22 @@
] ]
} }
] ]
}, }
"groupId": "vrv6xoriyl74wcz34gqlvc0q"
}, },
{ {
"id": "snbsad18Bgry8yZ8DZCfdFD", "id": "snbsad18Bgry8yZ8DZCfdFD",
"outgoingEdgeId": "piew4sf9dpafiweghqvucmax",
"type": "email input", "type": "email input",
"groupId": "vrv6xoriyl74wcz34gqlvc0q",
"options": { "options": {
"labels": { "button": "Send", "placeholder": "Type your email..." }, "variableId": "v3VFChNVSCXQ2rXv4DrJ8Ah"
"variableId": "v3VFChNVSCXQ2rXv4DrJ8Ah", }
"retryMessageContent": "This email doesn't seem to be valid. Can you type it again?"
},
"outgoingEdgeId": "piew4sf9dpafiweghqvucmax"
} }
], ]
"graphCoordinates": { "x": 666.07421875, "y": 141 }
}, },
{ {
"id": "wlcaalj5zej2sl1t9kkq55se", "id": "wlcaalj5zej2sl1t9kkq55se",
"title": "Company", "title": "Company",
"graphCoordinates": { "x": 325.22265625, "y": 144.37890625 },
"blocks": [ "blocks": [
{ {
"id": "sgtE2Sy7cKykac9B223Kq9R", "id": "sgtE2Sy7cKykac9B223Kq9R",
@ -148,29 +121,26 @@
"children": [{ "text": "What company do you work for?" }] "children": [{ "text": "What company do you work for?" }]
} }
] ]
}, }
"groupId": "wlcaalj5zej2sl1t9kkq55se"
}, },
{ {
"id": "sqEsMo747LTDnY9FjQcEwUv", "id": "sqEsMo747LTDnY9FjQcEwUv",
"outgoingEdgeId": "wlzesf38jzeyf65i1aj6j517",
"type": "text input", "type": "text input",
"groupId": "wlcaalj5zej2sl1t9kkq55se",
"options": { "options": {
"isLong": false,
"labels": { "labels": {
"button": "Send", "placeholder": "Type your answer...",
"placeholder": "Type your answer..." "button": "Send"
}, },
"variableId": "giiLFGw5xXBCHzvp1qAbdX" "variableId": "giiLFGw5xXBCHzvp1qAbdX"
}, }
"outgoingEdgeId": "wlzesf38jzeyf65i1aj6j517"
} }
], ]
"graphCoordinates": { "x": 325.22265625, "y": 144.37890625 }
}, },
{ {
"id": "trcslng32mdxkjmrw8zxpnpj", "id": "trcslng32mdxkjmrw8zxpnpj",
"title": "Services", "title": "Services",
"graphCoordinates": { "x": 999.90625, "y": 143.7578125 },
"blocks": [ "blocks": [
{ {
"id": "su7HceVXWyTCzi2vv3m4QbK", "id": "su7HceVXWyTCzi2vv3m4QbK",
@ -182,52 +152,29 @@
"children": [{ "text": "What services are you interested in?" }] "children": [{ "text": "What services are you interested in?" }]
} }
] ]
}, }
"groupId": "trcslng32mdxkjmrw8zxpnpj"
}, },
{ {
"id": "s5VQGsVF4hQgziQsXVdwPDW", "id": "s5VQGsVF4hQgziQsXVdwPDW",
"outgoingEdgeId": "wtw2lm86g46ehgvp43fcfks6",
"type": "choice input", "type": "choice input",
"items": [ "items": [
{ { "id": "fnLCBF4NdraSwcubnBhk8H", "content": "Website dev" },
"id": "fnLCBF4NdraSwcubnBhk8H", { "id": "a782h8ynMouY84QjH7XSnR", "content": "Content Marketing" },
"type": 0, { "id": "jGvh94zBByvVFpSS3w97zY", "content": "Social Media" },
"blockId": "s5VQGsVF4hQgziQsXVdwPDW", { "id": "6PRLbKUezuFmwWtLVbvAQ7", "content": "UI / UX Design" }
"content": "Website dev"
},
{
"id": "a782h8ynMouY84QjH7XSnR",
"type": 0,
"blockId": "s5VQGsVF4hQgziQsXVdwPDW",
"content": "Content Marketing"
},
{
"id": "jGvh94zBByvVFpSS3w97zY",
"type": 0,
"blockId": "s5VQGsVF4hQgziQsXVdwPDW",
"content": "Social Media"
},
{
"id": "6PRLbKUezuFmwWtLVbvAQ7",
"type": 0,
"blockId": "s5VQGsVF4hQgziQsXVdwPDW",
"content": "UI / UX Design"
}
], ],
"groupId": "trcslng32mdxkjmrw8zxpnpj",
"options": { "options": {
"variableId": "vi0mmx9o2m4s8z9cccsjcvpj5", "variableId": "vi0mmx9o2m4s8z9cccsjcvpj5",
"buttonLabel": "Send",
"isMultipleChoice": true "isMultipleChoice": true
}, }
"outgoingEdgeId": "gcbys1rzwi0dscvjodyygfme"
} }
], ]
"graphCoordinates": { "x": 999.90625, "y": 143.7578125 }
}, },
{ {
"id": "m4oxxhg9wfv3wc6n8rhzy6ga", "id": "m4oxxhg9wfv3wc6n8rhzy6ga",
"title": "[AI] Additional information", "title": "[AI] Additional information",
"graphCoordinates": { "x": 1340.59, "y": 41.79 },
"blocks": [ "blocks": [
{ {
"id": "px8ciz2nu2frvdqjporqpg95", "id": "px8ciz2nu2frvdqjporqpg95",
@ -235,28 +182,23 @@
"items": [ "items": [
{ {
"id": "w1cg5txczy2qmn4kbh1eybkk", "id": "w1cg5txczy2qmn4kbh1eybkk",
"type": 1, "outgoingEdgeId": "tfixdvay6mxj4g7z7bfmjthc",
"blockId": "px8ciz2nu2frvdqjporqpg95",
"content": { "content": {
"comparisons": [ "comparisons": [
{ {
"id": "r9ju98p1i6tevti45tt6jwk8", "id": "r9ju98p1i6tevti45tt6jwk8",
"value": "3", "variableId": "vi5ta5lktses2h6skf5ky2zs0",
"variableId": "vpvkbogoj3rmogz0ssh5odmnn", "comparisonOperator": "Greater than",
"comparisonOperator": "Greater than" "value": "5"
} }
], ]
"logicalOperator": "AND" }
},
"outgoingEdgeId": "tfixdvay6mxj4g7z7bfmjthc"
} }
], ]
"groupId": "m4oxxhg9wfv3wc6n8rhzy6ga"
}, },
{ {
"id": "dc58mxvcstc2rdwnlg4yd2aa", "id": "dc58mxvcstc2rdwnlg4yd2aa",
"type": "OpenAI", "type": "OpenAI",
"groupId": "m4oxxhg9wfv3wc6n8rhzy6ga",
"options": { "options": {
"task": "Create chat completion", "task": "Create chat completion",
"model": "gpt-3.5-turbo", "model": "gpt-3.5-turbo",
@ -288,21 +230,28 @@
}, },
{ {
"id": "j1pgsjm0snn3pz034h8y91vg", "id": "j1pgsjm0snn3pz034h8y91vg",
"role": "Messages sequence ✨", "role": "Dialogue",
"content": { "dialogueVariableId": "vi5ta5lktses2h6skf5ky2zs0",
"userMessagesVariableId": "vhp0ymgwq4id82l97g0kliglf", "startsBy": "assistant"
"assistantMessagesVariableId": "vpvkbogoj3rmogz0ssh5odmnn"
}
} }
], ],
"credentialsId": "clgp3rhio00011a0b1ai2dfne",
"responseMapping": [ "responseMapping": [
{ {
"id": "krixyhr7qw5ow52yf3i11y3a", "id": "krixyhr7qw5ow52yf3i11y3a",
"variableId": "vpvkbogoj3rmogz0ssh5odmnn", "valueToExtract": "Message content",
"valueToExtract": "Message content" "variableId": "vpvkbogoj3rmogz0ssh5odmnn"
} }
] ],
"credentialsId": "clocxtxlc00031an2uc59hdpb"
}
},
{
"id": "vssvfz99ain77sc5w07ci5a1",
"type": "Set variable",
"options": {
"variableId": "vi5ta5lktses2h6skf5ky2zs0",
"type": "Append value(s)",
"item": "{{AI reply}}"
} }
}, },
{ {
@ -310,39 +259,44 @@
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
{ "type": "p", "children": [{ "text": "{{AI replies}}" }] } { "type": "p", "children": [{ "text": "{{AI reply}}" }] }
] ]
}, }
"groupId": "m4oxxhg9wfv3wc6n8rhzy6ga"
}, },
{ {
"id": "sqFy2G3C1mh9p6s3QBdSS5x", "id": "sqFy2G3C1mh9p6s3QBdSS5x",
"type": "text input", "type": "text input",
"groupId": "m4oxxhg9wfv3wc6n8rhzy6ga",
"options": { "options": {
"isLong": true,
"labels": { "labels": {
"button": "Send", "placeholder": "Type your answer...",
"placeholder": "Type your answer..." "button": "Send"
}, },
"variableId": "vhp0ymgwq4id82l97g0kliglf" "variableId": "vhp0ymgwq4id82l97g0kliglf"
}, }
"outgoingEdgeId": "tc9irw81xlw9ghv68fp8p8xl" },
{
"id": "t8s54i11vfebpp5cbc7xukn5",
"outgoingEdgeId": "buwcxt81dfrh6prteij8cvo8",
"type": "Set variable",
"options": {
"variableId": "vi5ta5lktses2h6skf5ky2zs0",
"type": "Append value(s)",
"item": "{{Additional information}}"
}
} }
], ]
"graphCoordinates": { "x": 1339.1953125, "y": 146.37890625 }
}, },
{ {
"id": "gjahzyusg4mlpvpaeov0awtm", "id": "gjahzyusg4mlpvpaeov0awtm",
"title": "Bye", "title": "Bye",
"graphCoordinates": { "x": 1676.6171875, "y": 142.7109375 },
"blocks": [ "blocks": [
{ {
"id": "seLegenCgUwMopRFeAefqZ7", "id": "seLegenCgUwMopRFeAefqZ7",
"type": "text", "type": "text",
"content": { "content": {
"richText": [{ "type": "p", "children": [{ "text": "Perfect!" }] }] "richText": [{ "type": "p", "children": [{ "text": "Perfect!" }] }]
}, }
"groupId": "gjahzyusg4mlpvpaeov0awtm"
}, },
{ {
"id": "s779Q1y51aVaDUJVrFb16vv", "id": "s779Q1y51aVaDUJVrFb16vv",
@ -354,15 +308,14 @@
"children": [{ "text": "We'll get back to you at {{Email}}" }] "children": [{ "text": "We'll get back to you at {{Email}}" }]
} }
] ]
}, }
"groupId": "gjahzyusg4mlpvpaeov0awtm"
} }
], ]
"graphCoordinates": { "x": 1676.6171875, "y": 142.7109375 }
}, },
{ {
"id": "l0223zmqvndj1irhk68yh10v", "id": "l0223zmqvndj1irhk68yh10v",
"title": "", "title": "",
"graphCoordinates": { "x": 1342.76, "y": 692.3 },
"blocks": [ "blocks": [
{ {
"id": "l7r996nrnqb937nzyrprcvs0", "id": "l7r996nrnqb937nzyrprcvs0",
@ -378,8 +331,7 @@
] ]
} }
] ]
}, }
"groupId": "l0223zmqvndj1irhk68yh10v"
}, },
{ {
"id": "jxrp7xdzmnqnfmzfvid2u4s1", "id": "jxrp7xdzmnqnfmzfvid2u4s1",
@ -399,116 +351,74 @@
] ]
} }
] ]
}, }
"groupId": "l0223zmqvndj1irhk68yh10v"
} }
], ]
"graphCoordinates": { "x": 1342.1015625, "y": 627.70703125 } }
],
"edges": [
{
"id": "dkgy7qanybx0d9zl2ke2aa03",
"from": { "eventId": "i6xofskq0vdlnfyvf28hzcle" },
"to": { "groupId": "nmlij3lrk42cymsu1tj6b9nv" }
},
{
"id": "vgi4r3yjle17balwlhpas25t",
"from": { "blockId": "sbjZWLJGVkHAkDqS4JQeGow" },
"to": { "groupId": "wlcaalj5zej2sl1t9kkq55se" }
},
{
"id": "wlzesf38jzeyf65i1aj6j517",
"from": { "blockId": "sqEsMo747LTDnY9FjQcEwUv" },
"to": { "groupId": "vrv6xoriyl74wcz34gqlvc0q" }
},
{
"id": "piew4sf9dpafiweghqvucmax",
"from": { "blockId": "snbsad18Bgry8yZ8DZCfdFD" },
"to": { "groupId": "trcslng32mdxkjmrw8zxpnpj" }
},
{
"id": "tfixdvay6mxj4g7z7bfmjthc",
"from": {
"blockId": "px8ciz2nu2frvdqjporqpg95",
"itemId": "w1cg5txczy2qmn4kbh1eybkk"
},
"to": { "groupId": "gjahzyusg4mlpvpaeov0awtm" }
},
{
"id": "buwcxt81dfrh6prteij8cvo8",
"from": { "blockId": "t8s54i11vfebpp5cbc7xukn5" },
"to": { "groupId": "m4oxxhg9wfv3wc6n8rhzy6ga" }
},
{
"from": {
"blockId": "s5VQGsVF4hQgziQsXVdwPDW",
"groupId": "trcslng32mdxkjmrw8zxpnpj"
},
"to": { "groupId": "l0223zmqvndj1irhk68yh10v" },
"id": "wtw2lm86g46ehgvp43fcfks6"
} }
], ],
"variables": [ "variables": [
{ "id": "giiLFGw5xXBCHzvp1qAbdX", "name": "Company" }, { "id": "giiLFGw5xXBCHzvp1qAbdX", "name": "Company" },
{ "id": "v3VFChNVSCXQ2rXv4DrJ8Ah", "name": "Email" }, { "id": "v3VFChNVSCXQ2rXv4DrJ8Ah", "name": "Email" },
{ "id": "vi0mmx9o2m4s8z9cccsjcvpj5", "name": "Services" }, { "id": "vi0mmx9o2m4s8z9cccsjcvpj5", "name": "Services" },
{ "id": "vpvkbogoj3rmogz0ssh5odmnn", "name": "AI replies" }, { "id": "vpvkbogoj3rmogz0ssh5odmnn", "name": "AI reply" },
{ "id": "vhp0ymgwq4id82l97g0kliglf", "name": "Additional informations" } { "id": "vhp0ymgwq4id82l97g0kliglf", "name": "Additional information" },
{ "id": "vi5ta5lktses2h6skf5ky2zs0", "name": "AI Dialogue" }
], ],
"edges": [ "theme": {},
{
"id": "dkgy7qanybx0d9zl2ke2aa03",
"to": { "groupId": "nmlij3lrk42cymsu1tj6b9nv" },
"from": {
"blockId": "22HP69iipkLjJDTUcc1AWW",
"groupId": "i6xofskq0vdlnfyvf28hzcle"
}
},
{
"id": "vgi4r3yjle17balwlhpas25t",
"to": { "groupId": "wlcaalj5zej2sl1t9kkq55se" },
"from": {
"blockId": "sbjZWLJGVkHAkDqS4JQeGow",
"groupId": "nmlij3lrk42cymsu1tj6b9nv"
}
},
{
"id": "wlzesf38jzeyf65i1aj6j517",
"to": { "groupId": "vrv6xoriyl74wcz34gqlvc0q" },
"from": {
"blockId": "sqEsMo747LTDnY9FjQcEwUv",
"groupId": "wlcaalj5zej2sl1t9kkq55se"
}
},
{
"id": "piew4sf9dpafiweghqvucmax",
"to": { "groupId": "trcslng32mdxkjmrw8zxpnpj" },
"from": {
"blockId": "snbsad18Bgry8yZ8DZCfdFD",
"groupId": "vrv6xoriyl74wcz34gqlvc0q"
}
},
{
"id": "tfixdvay6mxj4g7z7bfmjthc",
"to": { "groupId": "gjahzyusg4mlpvpaeov0awtm" },
"from": {
"itemId": "w1cg5txczy2qmn4kbh1eybkk",
"blockId": "px8ciz2nu2frvdqjporqpg95",
"groupId": "m4oxxhg9wfv3wc6n8rhzy6ga"
}
},
{
"id": "tc9irw81xlw9ghv68fp8p8xl",
"to": { "groupId": "m4oxxhg9wfv3wc6n8rhzy6ga" },
"from": {
"blockId": "sqFy2G3C1mh9p6s3QBdSS5x",
"groupId": "m4oxxhg9wfv3wc6n8rhzy6ga"
}
},
{
"id": "gcbys1rzwi0dscvjodyygfme",
"to": { "groupId": "l0223zmqvndj1irhk68yh10v" },
"from": {
"blockId": "s5VQGsVF4hQgziQsXVdwPDW",
"groupId": "trcslng32mdxkjmrw8zxpnpj"
}
}
],
"theme": {
"chat": {
"inputs": {
"color": "#303235",
"backgroundColor": "#FFFFFF",
"placeholderColor": "#9095A0"
},
"buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" },
"hostAvatar": {
"isEnabled": true
},
"hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" },
"guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" }
},
"general": {
"font": "Open Sans",
"background": { "type": "Color", "content": "#ffffff" }
}
},
"selectedThemeTemplateId": null, "selectedThemeTemplateId": null,
"settings": { "settings": {},
"general": { "createdAt": "2023-11-06T17:26:59.795Z",
"isBrandingEnabled": false, "updatedAt": "2023-11-07T06:50:56.154Z",
"isInputPrefillEnabled": true, "icon": "🦾",
"isResultSavingEnabled": true, "folderId": null,
"isHideQueryParamsEnabled": true,
"isNewResultOnRefreshEnabled": true
},
"metadata": {
"description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form."
},
"typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 }
},
"publicId": null, "publicId": null,
"customDomain": null, "customDomain": null,
"workspaceId": "proWorkspace", "workspaceId": "proWorkspace",
"resultsTablePreferences": null, "resultsTablePreferences": null,
"isArchived": false, "isArchived": false,
"isClosed": false "isClosed": false,
"whatsAppCredentialsId": null
} }

View File

@ -1,33 +1,24 @@
{ {
"id": "qgMiLSr4W1ftXocFncin1G", "version": "6",
"version": "4", "id": "cloiafj9e00091aqj6o9nfrww",
"createdAt": "2022-02-05T06:21:16.522Z",
"updatedAt": "2022-02-05T06:21:16.522Z",
"name": "Lead Generation", "name": "Lead Generation",
"icon": "🤝", "events": [
"folderId": null,
"groups": [
{ {
"id": "k6kY6gwRE6noPoYQNGzgUq", "id": "k6kY6gwRE6noPoYQNGzgUq",
"blocks": [ "outgoingEdgeId": "oNvqaqNExdSH2kKEhKZHuE",
{ "graphCoordinates": { "x": 0, "y": 0 },
"id": "22HP69iipkLjJDTUcc1AWW", "type": "start"
"type": "start", }
"label": "Start", ],
"groupId": "k6kY6gwRE6noPoYQNGzgUq", "groups": [
"outgoingEdgeId": "oNvqaqNExdSH2kKEhKZHuE"
}
],
"title": "Start",
"graphCoordinates": { "x": 0, "y": 0 }
},
{ {
"id": "kinRXxYop2X4d7F9qt8WNB", "id": "kinRXxYop2X4d7F9qt8WNB",
"title": "Welcome",
"graphCoordinates": { "x": 1, "y": 148 },
"blocks": [ "blocks": [
{ {
"id": "sc1y8VwDabNJgiVTBi4qtif", "id": "sc1y8VwDabNJgiVTBi4qtif",
"type": "text", "type": "text",
"groupId": "kinRXxYop2X4d7F9qt8WNB",
"content": { "content": {
"richText": [ "richText": [
{ {
@ -44,37 +35,31 @@
{ {
"id": "s7YqZTBeyCa4Hp3wN2j922c", "id": "s7YqZTBeyCa4Hp3wN2j922c",
"type": "image", "type": "image",
"groupId": "kinRXxYop2X4d7F9qt8WNB",
"content": { "content": {
"url": "https://media2.giphy.com/media/XD9o33QG9BoMis7iM4/giphy.gif?cid=fe3852a3ihg8rvipzzky5lybmdyq38fhke2tkrnshwk52c7d&rid=giphy.gif&ct=g" "url": "https://media2.giphy.com/media/XD9o33QG9BoMis7iM4/giphy.gif?cid=fe3852a3ihg8rvipzzky5lybmdyq38fhke2tkrnshwk52c7d&rid=giphy.gif&ct=g"
} }
}, },
{ {
"id": "sbjZWLJGVkHAkDqS4JQeGow", "id": "sbjZWLJGVkHAkDqS4JQeGow",
"outgoingEdgeId": "i51YhHpk1dtSyduFNf5Wim",
"type": "choice input", "type": "choice input",
"items": [ "items": [
{ {
"id": "hQw2zbp7FDX7XYK9cFpbgC", "id": "hQw2zbp7FDX7XYK9cFpbgC",
"type": 0,
"blockId": "sbjZWLJGVkHAkDqS4JQeGow",
"content": "Hi!" "content": "Hi!"
} }
], ]
"groupId": "kinRXxYop2X4d7F9qt8WNB",
"options": { "buttonLabel": "Send", "isMultipleChoice": false },
"outgoingEdgeId": "i51YhHpk1dtSyduFNf5Wim"
} }
], ]
"title": "Welcome",
"graphCoordinates": { "x": 1, "y": 148 }
}, },
{ {
"id": "o4SH1UtKANnW5N5D67oZUz", "id": "o4SH1UtKANnW5N5D67oZUz",
"title": "Email",
"graphCoordinates": { "x": 669, "y": 141 },
"blocks": [ "blocks": [
{ {
"id": "sxeYubYN6XzhAfG7m9Fivhc", "id": "sxeYubYN6XzhAfG7m9Fivhc",
"type": "text", "type": "text",
"groupId": "o4SH1UtKANnW5N5D67oZUz",
"content": { "content": {
"richText": [ "richText": [
{ {
@ -87,7 +72,6 @@
{ {
"id": "scQ5kduafAtfP9T8SHUJnGi", "id": "scQ5kduafAtfP9T8SHUJnGi",
"type": "text", "type": "text",
"groupId": "o4SH1UtKANnW5N5D67oZUz",
"content": { "content": {
"richText": [ "richText": [
{ {
@ -101,26 +85,22 @@
}, },
{ {
"id": "snbsad18Bgry8yZ8DZCfdFD", "id": "snbsad18Bgry8yZ8DZCfdFD",
"outgoingEdgeId": "w3MiN1Ct38jT5NykVsgmb5",
"type": "email input", "type": "email input",
"groupId": "o4SH1UtKANnW5N5D67oZUz",
"options": { "options": {
"labels": { "button": "Send", "placeholder": "Type your email..." }, "variableId": "v3VFChNVSCXQ2rXv4DrJ8Ah"
"variableId": "v3VFChNVSCXQ2rXv4DrJ8Ah", }
"retryMessageContent": "This email doesn't seem to be valid. Can you type it again?"
},
"outgoingEdgeId": "w3MiN1Ct38jT5NykVsgmb5"
} }
], ]
"title": "Email",
"graphCoordinates": { "x": 669, "y": 141 }
}, },
{ {
"id": "q5dAhqSTCaNdiGSJm9B9Rw", "id": "q5dAhqSTCaNdiGSJm9B9Rw",
"title": "Name",
"graphCoordinates": { "x": 340, "y": 143 },
"blocks": [ "blocks": [
{ {
"id": "sgtE2Sy7cKykac9B223Kq9R", "id": "sgtE2Sy7cKykac9B223Kq9R",
"type": "text", "type": "text",
"groupId": "q5dAhqSTCaNdiGSJm9B9Rw",
"content": { "content": {
"richText": [ "richText": [
{ "type": "p", "children": [{ "text": "What's your name?" }] } { "type": "p", "children": [{ "text": "What's your name?" }] }
@ -129,29 +109,22 @@
}, },
{ {
"id": "sqEsMo747LTDnY9FjQcEwUv", "id": "sqEsMo747LTDnY9FjQcEwUv",
"outgoingEdgeId": "4tYbERpi5Po4goVgt6rWXg",
"type": "text input", "type": "text input",
"groupId": "q5dAhqSTCaNdiGSJm9B9Rw",
"options": { "options": {
"isLong": false,
"labels": {
"button": "Send",
"placeholder": "Type your answer..."
},
"variableId": "giiLFGw5xXBCHzvp1qAbdX" "variableId": "giiLFGw5xXBCHzvp1qAbdX"
}, }
"outgoingEdgeId": "4tYbERpi5Po4goVgt6rWXg"
} }
], ]
"title": "Name",
"graphCoordinates": { "x": 340, "y": 143 }
}, },
{ {
"id": "fKqRz7iswk7ULaj5PJocZL", "id": "fKqRz7iswk7ULaj5PJocZL",
"title": "Services",
"graphCoordinates": { "x": 1002, "y": 144 },
"blocks": [ "blocks": [
{ {
"id": "su7HceVXWyTCzi2vv3m4QbK", "id": "su7HceVXWyTCzi2vv3m4QbK",
"type": "text", "type": "text",
"groupId": "fKqRz7iswk7ULaj5PJocZL",
"content": { "content": {
"richText": [ "richText": [
{ {
@ -163,48 +136,37 @@
}, },
{ {
"id": "s5VQGsVF4hQgziQsXVdwPDW", "id": "s5VQGsVF4hQgziQsXVdwPDW",
"outgoingEdgeId": "ohTRakmcYJ7GdFWRZrWRjk",
"type": "choice input", "type": "choice input",
"items": [ "items": [
{ {
"id": "fnLCBF4NdraSwcubnBhk8H", "id": "fnLCBF4NdraSwcubnBhk8H",
"type": 0,
"blockId": "s5VQGsVF4hQgziQsXVdwPDW",
"content": "Website dev" "content": "Website dev"
}, },
{ {
"id": "a782h8ynMouY84QjH7XSnR", "id": "a782h8ynMouY84QjH7XSnR",
"type": 0,
"blockId": "s5VQGsVF4hQgziQsXVdwPDW",
"content": "Content Marketing" "content": "Content Marketing"
}, },
{ {
"id": "jGvh94zBByvVFpSS3w97zY", "id": "jGvh94zBByvVFpSS3w97zY",
"type": 0,
"blockId": "s5VQGsVF4hQgziQsXVdwPDW",
"content": "Social Media" "content": "Social Media"
}, },
{ {
"id": "6PRLbKUezuFmwWtLVbvAQ7", "id": "6PRLbKUezuFmwWtLVbvAQ7",
"type": 0,
"blockId": "s5VQGsVF4hQgziQsXVdwPDW",
"content": "UI / UX Design" "content": "UI / UX Design"
} }
], ]
"groupId": "fKqRz7iswk7ULaj5PJocZL",
"options": { "buttonLabel": "Send", "isMultipleChoice": true },
"outgoingEdgeId": "ohTRakmcYJ7GdFWRZrWRjk"
} }
], ]
"title": "Services",
"graphCoordinates": { "x": 1002, "y": 144 }
}, },
{ {
"id": "7qHBEyCMvKEJryBHzPmHjV", "id": "7qHBEyCMvKEJryBHzPmHjV",
"title": "Additional information",
"graphCoordinates": { "x": 1337, "y": 145 },
"blocks": [ "blocks": [
{ {
"id": "sqR8Sz9gW21aUYKtUikq7qZ", "id": "sqR8Sz9gW21aUYKtUikq7qZ",
"type": "text", "type": "text",
"groupId": "7qHBEyCMvKEJryBHzPmHjV",
"content": { "content": {
"richText": [ "richText": [
{ {
@ -218,25 +180,22 @@
}, },
{ {
"id": "sqFy2G3C1mh9p6s3QBdSS5x", "id": "sqFy2G3C1mh9p6s3QBdSS5x",
"outgoingEdgeId": "sH5nUssG2XQbm6ZidGv9BY",
"type": "text input", "type": "text input",
"groupId": "7qHBEyCMvKEJryBHzPmHjV",
"options": { "options": {
"isLong": true, "isLong": true
"labels": { "button": "Send", "placeholder": "Type your answer..." } }
},
"outgoingEdgeId": "sH5nUssG2XQbm6ZidGv9BY"
} }
], ]
"title": "Additional information",
"graphCoordinates": { "x": 1337, "y": 145 }
}, },
{ {
"id": "vF7AD7zSAj7SNvN3gr9N94", "id": "vF7AD7zSAj7SNvN3gr9N94",
"title": "Bye",
"graphCoordinates": { "x": 1668, "y": 143 },
"blocks": [ "blocks": [
{ {
"id": "seLegenCgUwMopRFeAefqZ7", "id": "seLegenCgUwMopRFeAefqZ7",
"type": "text", "type": "text",
"groupId": "vF7AD7zSAj7SNvN3gr9N94",
"content": { "content": {
"richText": [{ "type": "p", "children": [{ "text": "Perfect!" }] }] "richText": [{ "type": "p", "children": [{ "text": "Perfect!" }] }]
} }
@ -244,7 +203,6 @@
{ {
"id": "s779Q1y51aVaDUJVrFb16vv", "id": "s779Q1y51aVaDUJVrFb16vv",
"type": "text", "type": "text",
"groupId": "vF7AD7zSAj7SNvN3gr9N94",
"content": { "content": {
"richText": [ "richText": [
{ {
@ -254,96 +212,57 @@
] ]
} }
} }
], ]
"title": "Bye", }
"graphCoordinates": { "x": 1668, "y": 143 } ],
"edges": [
{
"id": "oNvqaqNExdSH2kKEhKZHuE",
"from": { "eventId": "k6kY6gwRE6noPoYQNGzgUq" },
"to": { "groupId": "kinRXxYop2X4d7F9qt8WNB" }
},
{
"id": "i51YhHpk1dtSyduFNf5Wim",
"from": { "blockId": "sbjZWLJGVkHAkDqS4JQeGow" },
"to": { "groupId": "q5dAhqSTCaNdiGSJm9B9Rw" }
},
{
"id": "4tYbERpi5Po4goVgt6rWXg",
"from": { "blockId": "sqEsMo747LTDnY9FjQcEwUv" },
"to": { "groupId": "o4SH1UtKANnW5N5D67oZUz" }
},
{
"id": "w3MiN1Ct38jT5NykVsgmb5",
"from": { "blockId": "snbsad18Bgry8yZ8DZCfdFD" },
"to": { "groupId": "fKqRz7iswk7ULaj5PJocZL" }
},
{
"id": "ohTRakmcYJ7GdFWRZrWRjk",
"from": { "blockId": "s5VQGsVF4hQgziQsXVdwPDW" },
"to": { "groupId": "7qHBEyCMvKEJryBHzPmHjV" }
},
{
"id": "sH5nUssG2XQbm6ZidGv9BY",
"from": { "blockId": "sqFy2G3C1mh9p6s3QBdSS5x" },
"to": { "groupId": "vF7AD7zSAj7SNvN3gr9N94" }
} }
], ],
"variables": [ "variables": [
{ "id": "giiLFGw5xXBCHzvp1qAbdX", "name": "Name" }, { "id": "giiLFGw5xXBCHzvp1qAbdX", "name": "Name" },
{ "id": "v3VFChNVSCXQ2rXv4DrJ8Ah", "name": "Email" } { "id": "v3VFChNVSCXQ2rXv4DrJ8Ah", "name": "Email" }
], ],
"edges": [ "theme": {},
{ "selectedThemeTemplateId": null,
"id": "oNvqaqNExdSH2kKEhKZHuE", "settings": {},
"to": { "groupId": "kinRXxYop2X4d7F9qt8WNB" }, "createdAt": "2023-11-03T07:22:14.210Z",
"from": { "updatedAt": "2023-11-03T07:22:14.210Z",
"blockId": "22HP69iipkLjJDTUcc1AWW", "icon": "🤝",
"groupId": "k6kY6gwRE6noPoYQNGzgUq" "folderId": null,
} "publicId": null,
}, "customDomain": null,
{ "workspaceId": "proWorkspace",
"id": "i51YhHpk1dtSyduFNf5Wim", "resultsTablePreferences": null,
"to": { "groupId": "q5dAhqSTCaNdiGSJm9B9Rw" }, "isArchived": false,
"from": { "isClosed": false,
"blockId": "sbjZWLJGVkHAkDqS4JQeGow", "whatsAppCredentialsId": null
"groupId": "kinRXxYop2X4d7F9qt8WNB"
}
},
{
"id": "4tYbERpi5Po4goVgt6rWXg",
"to": { "groupId": "o4SH1UtKANnW5N5D67oZUz" },
"from": {
"blockId": "sqEsMo747LTDnY9FjQcEwUv",
"groupId": "q5dAhqSTCaNdiGSJm9B9Rw"
}
},
{
"id": "w3MiN1Ct38jT5NykVsgmb5",
"to": { "groupId": "fKqRz7iswk7ULaj5PJocZL" },
"from": {
"blockId": "snbsad18Bgry8yZ8DZCfdFD",
"groupId": "o4SH1UtKANnW5N5D67oZUz"
}
},
{
"id": "ohTRakmcYJ7GdFWRZrWRjk",
"to": { "groupId": "7qHBEyCMvKEJryBHzPmHjV" },
"from": {
"blockId": "s5VQGsVF4hQgziQsXVdwPDW",
"groupId": "fKqRz7iswk7ULaj5PJocZL"
}
},
{
"id": "sH5nUssG2XQbm6ZidGv9BY",
"to": { "groupId": "vF7AD7zSAj7SNvN3gr9N94" },
"from": {
"blockId": "sqFy2G3C1mh9p6s3QBdSS5x",
"groupId": "7qHBEyCMvKEJryBHzPmHjV"
}
}
],
"theme": {
"chat": {
"inputs": {
"color": "#303235",
"backgroundColor": "#FFFFFF",
"placeholderColor": "#9095A0"
},
"buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" },
"hostAvatar": {
"isEnabled": true
},
"hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" },
"guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" }
},
"general": {
"font": "Open Sans",
"background": { "type": "Color", "content": "#ffffff" }
}
},
"settings": {
"general": {
"isBrandingEnabled": false,
"isInputPrefillEnabled": true,
"isResultSavingEnabled": true,
"isHideQueryParamsEnabled": true,
"isNewResultOnRefreshEnabled": true
},
"metadata": {
"description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form."
},
"typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 }
},
"publicId": null
} }

View File

@ -1,29 +1,20 @@
{ {
"id": "clg69gafk00011ar14aryt8ej", "version": "6",
"version": "4", "id": "clon5n2yo00091avnmbju5698",
"createdAt": "2023-04-07T08:03:57.008Z",
"updatedAt": "2023-04-07T08:22:10.285Z",
"icon": "🧲",
"name": "Lead magnet", "name": "Lead magnet",
"folderId": null, "events": [
"groups": [
{ {
"id": "emejg92oa3743x6z556xi1ig", "id": "emejg92oa3743x6z556xi1ig",
"title": "Start", "outgoingEdgeId": "hfugjlwxkt5eqvxe5poimt6w",
"blocks": [ "graphCoordinates": { "x": 0, "y": 0 },
{ "type": "start"
"id": "fp82tc3nolkjpw38j60xxemb", }
"type": "start", ],
"label": "Start", "groups": [
"groupId": "emejg92oa3743x6z556xi1ig",
"outgoingEdgeId": "hfugjlwxkt5eqvxe5poimt6w"
}
],
"graphCoordinates": { "x": 0, "y": 0 }
},
{ {
"id": "gr9wedxcqxie11ki9yss1h5o", "id": "gr9wedxcqxie11ki9yss1h5o",
"title": "Intro", "title": "Intro",
"graphCoordinates": { "x": 209.12109375, "y": 176.5703125 },
"blocks": [ "blocks": [
{ {
"id": "uaks8b01ec3fln8g5iq9gnv7", "id": "uaks8b01ec3fln8g5iq9gnv7",
@ -32,8 +23,7 @@
"richText": [ "richText": [
{ "type": "p", "children": [{ "text": "Hi there! 👋" }] } { "type": "p", "children": [{ "text": "Hi there! 👋" }] }
] ]
}, }
"groupId": "gr9wedxcqxie11ki9yss1h5o"
}, },
{ {
"id": "iy9brewiabfhv7ctsvdd5fg6", "id": "iy9brewiabfhv7ctsvdd5fg6",
@ -51,8 +41,7 @@
] ]
} }
] ]
}, }
"groupId": "gr9wedxcqxie11ki9yss1h5o"
}, },
{ {
"id": "immlrmjc0tnvc0rd1552c0ey", "id": "immlrmjc0tnvc0rd1552c0ey",
@ -68,8 +57,7 @@
] ]
} }
] ]
}, }
"groupId": "gr9wedxcqxie11ki9yss1h5o"
}, },
{ {
"id": "i1pv6t8sj9wdzoheplwj1cnr", "id": "i1pv6t8sj9wdzoheplwj1cnr",
@ -78,26 +66,23 @@
"richText": [ "richText": [
{ "type": "p", "children": [{ "text": "What's your name?" }] } { "type": "p", "children": [{ "text": "What's your name?" }] }
] ]
}, }
"groupId": "gr9wedxcqxie11ki9yss1h5o"
}, },
{ {
"id": "uocaxxtg26btl2zytwy09jh9", "id": "uocaxxtg26btl2zytwy09jh9",
"outgoingEdgeId": "rczh7k3r065okzax6za00lvh",
"type": "text input", "type": "text input",
"groupId": "gr9wedxcqxie11ki9yss1h5o",
"options": { "options": {
"isLong": false, "labels": { "placeholder": "Your first name" },
"labels": { "button": "Send", "placeholder": "Your first name" },
"variableId": "vyu4paeim4jcjgmxr26bdk286" "variableId": "vyu4paeim4jcjgmxr26bdk286"
}, }
"outgoingEdgeId": "rczh7k3r065okzax6za00lvh"
} }
], ]
"graphCoordinates": { "x": 209.12109375, "y": 176.5703125 }
}, },
{ {
"id": "xaloto3qrrbtcdcrob013xcx", "id": "xaloto3qrrbtcdcrob013xcx",
"title": "Email", "title": "Email",
"graphCoordinates": { "x": 563.2421875, "y": 177.484375 },
"blocks": [ "blocks": [
{ {
"id": "pcx0bo7egsq3il16707mkuzc", "id": "pcx0bo7egsq3il16707mkuzc",
@ -113,26 +98,21 @@
] ]
} }
] ]
}, }
"groupId": "xaloto3qrrbtcdcrob013xcx"
}, },
{ {
"id": "fu17h0e24vpplfnrhla0t5id", "id": "nu9ibw4r4q9piwl3b308bezp",
"type": "text input",
"groupId": "xaloto3qrrbtcdcrob013xcx", "groupId": "xaloto3qrrbtcdcrob013xcx",
"options": { "type": "email input",
"isLong": false, "options": { "variableId": "vrhd0bug6b6dzgijevfoonvo2" },
"labels": { "button": "Send", "placeholder": "Your email address" }, "outgoingEdgeId": "dxj0x2miwwkxsesp4chyjqek"
"variableId": "vrhd0bug6b6dzgijevfoonvo2"
},
"outgoingEdgeId": "x9hmtjizy3cl3kzyagf0ucnp"
} }
], ]
"graphCoordinates": { "x": 563.2421875, "y": 177.484375 }
}, },
{ {
"id": "tp9r95ay5vm9zlgzw8twtxn3", "id": "tp9r95ay5vm9zlgzw8twtxn3",
"title": "Goal", "title": "Goal",
"graphCoordinates": { "x": 1243.07421875, "y": 172.2421875 },
"blocks": [ "blocks": [
{ {
"id": "o6helbp9c682dur5e8bt9yov", "id": "o6helbp9c682dur5e8bt9yov",
@ -144,52 +124,31 @@
"children": [{ "text": "What's your goal with the community?" }] "children": [{ "text": "What's your goal with the community?" }]
} }
] ]
}, }
"groupId": "tp9r95ay5vm9zlgzw8twtxn3"
}, },
{ {
"id": "wq7yofni4bqr9rt5qrzk6928", "id": "wq7yofni4bqr9rt5qrzk6928",
"outgoingEdgeId": "on3al6xuczmckpu3roboo9te",
"type": "choice input", "type": "choice input",
"items": [ "items": [
{ { "id": "ux0ly8ocxfm8i8ivdbwjnmnt", "content": "Win loyal fans" },
"id": "ux0ly8ocxfm8i8ivdbwjnmnt",
"type": 0,
"blockId": "wq7yofni4bqr9rt5qrzk6928",
"content": "Win loyal fans"
},
{ {
"id": "izz0nwo2iy2kmlif5fav2oc5", "id": "izz0nwo2iy2kmlif5fav2oc5",
"type": 0,
"blockId": "wq7yofni4bqr9rt5qrzk6928",
"content": "Competitive advantage" "content": "Competitive advantage"
}, },
{ { "id": "jtkx9v5uqjw84hapq3umqlb5", "content": "Better product" },
"id": "jtkx9v5uqjw84hapq3umqlb5", { "id": "k7a7rkpoigrtrulilap7q6fw", "content": "Support" }
"type": 0,
"blockId": "wq7yofni4bqr9rt5qrzk6928",
"content": "Better product"
},
{
"id": "k7a7rkpoigrtrulilap7q6fw",
"type": 0,
"blockId": "wq7yofni4bqr9rt5qrzk6928",
"content": "Support"
}
], ],
"groupId": "tp9r95ay5vm9zlgzw8twtxn3",
"options": { "options": {
"variableId": "vf49immob0ih3kxn5b0nraqkq", "variableId": "vf49immob0ih3kxn5b0nraqkq"
"buttonLabel": "Send", }
"isMultipleChoice": false
},
"outgoingEdgeId": "on3al6xuczmckpu3roboo9te"
} }
], ]
"graphCoordinates": { "x": 1243.07421875, "y": 172.2421875 }
}, },
{ {
"id": "cszciavjonb2qp0ga0pladoj", "id": "cszciavjonb2qp0ga0pladoj",
"title": "Goal", "title": "Goal",
"graphCoordinates": { "x": 1590.85546875, "y": 164.02734375 },
"blocks": [ "blocks": [
{ {
"id": "tfqqveo72xt7i7ii9imztcd4", "id": "tfqqveo72xt7i7ii9imztcd4",
@ -205,8 +164,7 @@
] ]
} }
] ]
}, }
"groupId": "cszciavjonb2qp0ga0pladoj"
}, },
{ {
"id": "yxuk1bhfas07i4bxq64hi0vj", "id": "yxuk1bhfas07i4bxq64hi0vj",
@ -214,102 +172,86 @@
"items": [ "items": [
{ {
"id": "qn6w72jgckfz777e9ehb421v", "id": "qn6w72jgckfz777e9ehb421v",
"type": 1, "outgoingEdgeId": "yml7f2btr9q4hptk06cqn2xv",
"blockId": "yxuk1bhfas07i4bxq64hi0vj",
"content": { "content": {
"comparisons": [ "comparisons": [
{ {
"id": "nt0c7o7w0elbbrfde8nned76", "id": "nt0c7o7w0elbbrfde8nned76",
"value": "Win loyal fans",
"variableId": "vf49immob0ih3kxn5b0nraqkq", "variableId": "vf49immob0ih3kxn5b0nraqkq",
"comparisonOperator": "Equal to" "comparisonOperator": "Equal to",
"value": "Win loyal fans"
} }
], ]
"logicalOperator": "AND" }
},
"outgoingEdgeId": "yml7f2btr9q4hptk06cqn2xv"
}, },
{ {
"id": "vuun8mijpfzcu0o9qk0vtift", "id": "vuun8mijpfzcu0o9qk0vtift",
"type": 1, "outgoingEdgeId": "qhpximatxzjmmm1njwoqzplw",
"blockId": "yxuk1bhfas07i4bxq64hi0vj",
"content": { "content": {
"comparisons": [ "comparisons": [
{ {
"id": "yf6asq9i97ap9y2jxibmjylv", "id": "yf6asq9i97ap9y2jxibmjylv",
"value": "Competitive advantage",
"variableId": "vf49immob0ih3kxn5b0nraqkq", "variableId": "vf49immob0ih3kxn5b0nraqkq",
"comparisonOperator": "Equal to" "comparisonOperator": "Equal to",
"value": "Competitive advantage"
} }
], ]
"logicalOperator": "AND" }
},
"outgoingEdgeId": "qhpximatxzjmmm1njwoqzplw"
}, },
{ {
"id": "dg28mo88efs00p8ech81qxmu", "id": "dg28mo88efs00p8ech81qxmu",
"type": 1, "outgoingEdgeId": "xa5z7a7en5vfevqk5e5q05go",
"blockId": "yxuk1bhfas07i4bxq64hi0vj",
"content": { "content": {
"comparisons": [ "comparisons": [
{ {
"id": "x7tbo8q47r1wdlg6w3c48mru", "id": "x7tbo8q47r1wdlg6w3c48mru",
"value": "Better product",
"variableId": "vf49immob0ih3kxn5b0nraqkq", "variableId": "vf49immob0ih3kxn5b0nraqkq",
"comparisonOperator": "Equal to" "comparisonOperator": "Equal to",
"value": "Better product"
} }
], ]
"logicalOperator": "AND" }
},
"outgoingEdgeId": "xa5z7a7en5vfevqk5e5q05go"
}, },
{ {
"id": "lrj50vf8c0cj46jrtxid5a60", "id": "lrj50vf8c0cj46jrtxid5a60",
"type": 1, "outgoingEdgeId": "ogpmoxw3lrt12rgxnq0wajrj",
"blockId": "yxuk1bhfas07i4bxq64hi0vj",
"content": { "content": {
"comparisons": [ "comparisons": [
{ {
"id": "hkb9qy6un3yrhhxtm0s6c8rg", "id": "hkb9qy6un3yrhhxtm0s6c8rg",
"value": "Support",
"variableId": "vf49immob0ih3kxn5b0nraqkq", "variableId": "vf49immob0ih3kxn5b0nraqkq",
"comparisonOperator": "Equal to" "comparisonOperator": "Equal to",
"value": "Support"
} }
], ]
"logicalOperator": "AND" }
},
"outgoingEdgeId": "ogpmoxw3lrt12rgxnq0wajrj"
} }
], ]
"groupId": "cszciavjonb2qp0ga0pladoj"
} }
], ]
"graphCoordinates": { "x": 1590.85546875, "y": 164.02734375 }
}, },
{ {
"id": "vvlecgglxadq0x2eg7ozr535", "id": "vvlecgglxadq0x2eg7ozr535",
"title": "Send bundle", "title": "Send bundle",
"graphCoordinates": { "x": 901.6953125, "y": 180.0546875 },
"blocks": [ "blocks": [
{ {
"id": "w53cmmn4iowq753r8jmvk7o7", "id": "w53cmmn4iowq753r8jmvk7o7",
"outgoingEdgeId": "qkrpdn1z0bv1xvsa3wrdyyn3",
"type": "Email", "type": "Email",
"groupId": "vvlecgglxadq0x2eg7ozr535",
"options": { "options": {
"body": "Hey {{Name}},\n\nHere is a link to download the community bundle:\n\nhttps://typebot.io\n\nI hope it will help you create the right community for your project 🚀\n\nBest,\nTypebot team.",
"replyTo": "",
"subject": "Here is your community bundle ✨",
"recipients": ["{{Email}}"],
"isCustomBody": true, "isCustomBody": true,
"credentialsId": "default" "recipients": ["{{Email}}"],
}, "subject": "Here is your community bundle ✨",
"outgoingEdgeId": "qkrpdn1z0bv1xvsa3wrdyyn3" "body": "Hey {{Name}},\n\nHere is a link to download the community bundle:\n\nhttps://typebot.io\n\nI hope it will help you create the right community for your project 🚀\n\nBest,\nTypebot team."
}
} }
], ]
"graphCoordinates": { "x": 901.6953125, "y": 180.0546875 }
}, },
{ {
"id": "k2sbuizycrpuyf44v9eebebr", "id": "k2sbuizycrpuyf44v9eebebr",
"title": "Win loyal fans video", "title": "Win loyal fans video",
"graphCoordinates": { "x": 1969.18359375, "y": -205.76171875 },
"blocks": [ "blocks": [
{ {
"id": "dzcw0vwo23vhp2nwyxl99va8", "id": "dzcw0vwo23vhp2nwyxl99va8",
@ -321,8 +263,7 @@
"children": [{ "text": "Want to know how to win loyal fans?" }] "children": [{ "text": "Want to know how to win loyal fans?" }]
} }
] ]
}, }
"groupId": "k2sbuizycrpuyf44v9eebebr"
}, },
{ {
"id": "yh8ueuio717ceybrcsqa1ekq", "id": "yh8ueuio717ceybrcsqa1ekq",
@ -331,25 +272,23 @@
"richText": [ "richText": [
{ "type": "p", "children": [{ "text": "Check out this video:" }] } { "type": "p", "children": [{ "text": "Check out this video:" }] }
] ]
}, }
"groupId": "k2sbuizycrpuyf44v9eebebr"
}, },
{ {
"id": "z3ffqugex7gipsb4ke6ov874", "id": "z3ffqugex7gipsb4ke6ov874",
"type": "video", "type": "video",
"content": { "content": {
"id": "jp3ggg_42-M",
"url": "https://www.youtube.com/watch?v=jp3ggg_42-M&t=22s", "url": "https://www.youtube.com/watch?v=jp3ggg_42-M&t=22s",
"id": "jp3ggg_42-M",
"type": "youtube" "type": "youtube"
}, }
"groupId": "k2sbuizycrpuyf44v9eebebr"
} }
], ]
"graphCoordinates": { "x": 1969.18359375, "y": -205.76171875 }
}, },
{ {
"id": "v6s5yza7kgretdmbke7lg5u7", "id": "v6s5yza7kgretdmbke7lg5u7",
"title": "Competitive advantage video", "title": "Competitive advantage video",
"graphCoordinates": { "x": 1968.1484375, "y": 181.5703125 },
"blocks": [ "blocks": [
{ {
"id": "anu87wo53n3ihq4xl8smprwg", "id": "anu87wo53n3ihq4xl8smprwg",
@ -365,8 +304,7 @@
] ]
} }
] ]
}, }
"groupId": "v6s5yza7kgretdmbke7lg5u7"
}, },
{ {
"id": "ku2scubf21eqnip3ig3rc7n9", "id": "ku2scubf21eqnip3ig3rc7n9",
@ -375,25 +313,23 @@
"richText": [ "richText": [
{ "type": "p", "children": [{ "text": "Check out this video:" }] } { "type": "p", "children": [{ "text": "Check out this video:" }] }
] ]
}, }
"groupId": "v6s5yza7kgretdmbke7lg5u7"
}, },
{ {
"id": "rvdh4tk0ebg7t9tdga9aw8ao", "id": "rvdh4tk0ebg7t9tdga9aw8ao",
"type": "video", "type": "video",
"content": { "content": {
"id": "jp3ggg_42-M",
"url": "https://www.youtube.com/watch?v=jp3ggg_42-M&t=22s", "url": "https://www.youtube.com/watch?v=jp3ggg_42-M&t=22s",
"id": "jp3ggg_42-M",
"type": "youtube" "type": "youtube"
}, }
"groupId": "v6s5yza7kgretdmbke7lg5u7"
} }
], ]
"graphCoordinates": { "x": 1968.1484375, "y": 181.5703125 }
}, },
{ {
"id": "l3pc0992zp0hw8ea83b7aky3", "id": "l3pc0992zp0hw8ea83b7aky3",
"title": "Better product", "title": "Better product",
"graphCoordinates": { "x": 1968.703125, "y": 600.07421875 },
"blocks": [ "blocks": [
{ {
"id": "ysedrtj5q17usk5ezpa5g88e", "id": "ysedrtj5q17usk5ezpa5g88e",
@ -409,8 +345,7 @@
] ]
} }
] ]
}, }
"groupId": "l3pc0992zp0hw8ea83b7aky3"
}, },
{ {
"id": "xy08sticb76u82sgcfaeqpe2", "id": "xy08sticb76u82sgcfaeqpe2",
@ -419,25 +354,23 @@
"richText": [ "richText": [
{ "type": "p", "children": [{ "text": "Check out this video:" }] } { "type": "p", "children": [{ "text": "Check out this video:" }] }
] ]
}, }
"groupId": "l3pc0992zp0hw8ea83b7aky3"
}, },
{ {
"id": "jiz2uvo89456jpy081hazkd4", "id": "jiz2uvo89456jpy081hazkd4",
"type": "video", "type": "video",
"content": { "content": {
"id": "jp3ggg_42-M",
"url": "https://www.youtube.com/watch?v=jp3ggg_42-M&t=22s", "url": "https://www.youtube.com/watch?v=jp3ggg_42-M&t=22s",
"id": "jp3ggg_42-M",
"type": "youtube" "type": "youtube"
}, }
"groupId": "l3pc0992zp0hw8ea83b7aky3"
} }
], ]
"graphCoordinates": { "x": 1968.703125, "y": 600.07421875 }
}, },
{ {
"id": "f4hlh2oq8viwxrpl9ppq5d42", "id": "f4hlh2oq8viwxrpl9ppq5d42",
"title": "Support", "title": "Support",
"graphCoordinates": { "x": 1970.0234375, "y": 1025.99609375 },
"blocks": [ "blocks": [
{ {
"id": "lu0bevnjfkor1ugbnbkev7t3", "id": "lu0bevnjfkor1ugbnbkev7t3",
@ -451,8 +384,7 @@
] ]
} }
] ]
}, }
"groupId": "f4hlh2oq8viwxrpl9ppq5d42"
}, },
{ {
"id": "jrhdfrdn4gdstpktq1q0gk1q", "id": "jrhdfrdn4gdstpktq1q0gk1q",
@ -461,21 +393,80 @@
"richText": [ "richText": [
{ "type": "p", "children": [{ "text": "Check out this video:" }] } { "type": "p", "children": [{ "text": "Check out this video:" }] }
] ]
}, }
"groupId": "f4hlh2oq8viwxrpl9ppq5d42"
}, },
{ {
"id": "e3tlj1y4vyhtwcabzifv63q2", "id": "e3tlj1y4vyhtwcabzifv63q2",
"type": "video", "type": "video",
"content": { "content": {
"id": "jp3ggg_42-M",
"url": "https://www.youtube.com/watch?v=jp3ggg_42-M&t=22s", "url": "https://www.youtube.com/watch?v=jp3ggg_42-M&t=22s",
"id": "jp3ggg_42-M",
"type": "youtube" "type": "youtube"
}, }
"groupId": "f4hlh2oq8viwxrpl9ppq5d42"
} }
], ]
"graphCoordinates": { "x": 1970.0234375, "y": 1025.99609375 } }
],
"edges": [
{
"id": "hfugjlwxkt5eqvxe5poimt6w",
"from": { "eventId": "emejg92oa3743x6z556xi1ig" },
"to": { "groupId": "gr9wedxcqxie11ki9yss1h5o" }
},
{
"id": "rczh7k3r065okzax6za00lvh",
"from": { "blockId": "uocaxxtg26btl2zytwy09jh9" },
"to": { "groupId": "xaloto3qrrbtcdcrob013xcx" }
},
{
"id": "on3al6xuczmckpu3roboo9te",
"from": { "blockId": "wq7yofni4bqr9rt5qrzk6928" },
"to": { "groupId": "cszciavjonb2qp0ga0pladoj" }
},
{
"id": "qkrpdn1z0bv1xvsa3wrdyyn3",
"from": { "blockId": "w53cmmn4iowq753r8jmvk7o7" },
"to": { "groupId": "tp9r95ay5vm9zlgzw8twtxn3" }
},
{
"id": "yml7f2btr9q4hptk06cqn2xv",
"from": {
"blockId": "yxuk1bhfas07i4bxq64hi0vj",
"itemId": "qn6w72jgckfz777e9ehb421v"
},
"to": { "groupId": "k2sbuizycrpuyf44v9eebebr" }
},
{
"id": "qhpximatxzjmmm1njwoqzplw",
"from": {
"blockId": "yxuk1bhfas07i4bxq64hi0vj",
"itemId": "vuun8mijpfzcu0o9qk0vtift"
},
"to": { "groupId": "v6s5yza7kgretdmbke7lg5u7" }
},
{
"id": "xa5z7a7en5vfevqk5e5q05go",
"from": {
"blockId": "yxuk1bhfas07i4bxq64hi0vj",
"itemId": "dg28mo88efs00p8ech81qxmu"
},
"to": { "groupId": "l3pc0992zp0hw8ea83b7aky3" }
},
{
"id": "ogpmoxw3lrt12rgxnq0wajrj",
"from": {
"blockId": "yxuk1bhfas07i4bxq64hi0vj",
"itemId": "lrj50vf8c0cj46jrtxid5a60"
},
"to": { "groupId": "f4hlh2oq8viwxrpl9ppq5d42" }
},
{
"from": {
"blockId": "nu9ibw4r4q9piwl3b308bezp",
"groupId": "xaloto3qrrbtcdcrob013xcx"
},
"to": { "groupId": "vvlecgglxadq0x2eg7ozr535" },
"id": "dxj0x2miwwkxsesp4chyjqek"
} }
], ],
"variables": [ "variables": [
@ -483,120 +474,18 @@
{ "id": "vf49immob0ih3kxn5b0nraqkq", "name": "Goal" }, { "id": "vf49immob0ih3kxn5b0nraqkq", "name": "Goal" },
{ "id": "vrhd0bug6b6dzgijevfoonvo2", "name": "Email" } { "id": "vrhd0bug6b6dzgijevfoonvo2", "name": "Email" }
], ],
"edges": [ "theme": {},
{
"id": "hfugjlwxkt5eqvxe5poimt6w",
"to": { "groupId": "gr9wedxcqxie11ki9yss1h5o" },
"from": {
"blockId": "fp82tc3nolkjpw38j60xxemb",
"groupId": "emejg92oa3743x6z556xi1ig"
}
},
{
"id": "rczh7k3r065okzax6za00lvh",
"to": { "groupId": "xaloto3qrrbtcdcrob013xcx" },
"from": {
"blockId": "uocaxxtg26btl2zytwy09jh9",
"groupId": "gr9wedxcqxie11ki9yss1h5o"
}
},
{
"id": "on3al6xuczmckpu3roboo9te",
"to": { "groupId": "cszciavjonb2qp0ga0pladoj" },
"from": {
"blockId": "wq7yofni4bqr9rt5qrzk6928",
"groupId": "tp9r95ay5vm9zlgzw8twtxn3"
}
},
{
"id": "x9hmtjizy3cl3kzyagf0ucnp",
"to": { "groupId": "vvlecgglxadq0x2eg7ozr535" },
"from": {
"blockId": "fu17h0e24vpplfnrhla0t5id",
"groupId": "xaloto3qrrbtcdcrob013xcx"
}
},
{
"id": "qkrpdn1z0bv1xvsa3wrdyyn3",
"to": { "groupId": "tp9r95ay5vm9zlgzw8twtxn3" },
"from": {
"blockId": "w53cmmn4iowq753r8jmvk7o7",
"groupId": "vvlecgglxadq0x2eg7ozr535"
}
},
{
"id": "yml7f2btr9q4hptk06cqn2xv",
"to": { "groupId": "k2sbuizycrpuyf44v9eebebr" },
"from": {
"itemId": "qn6w72jgckfz777e9ehb421v",
"blockId": "yxuk1bhfas07i4bxq64hi0vj",
"groupId": "cszciavjonb2qp0ga0pladoj"
}
},
{
"id": "qhpximatxzjmmm1njwoqzplw",
"to": { "groupId": "v6s5yza7kgretdmbke7lg5u7" },
"from": {
"itemId": "vuun8mijpfzcu0o9qk0vtift",
"blockId": "yxuk1bhfas07i4bxq64hi0vj",
"groupId": "cszciavjonb2qp0ga0pladoj"
}
},
{
"id": "xa5z7a7en5vfevqk5e5q05go",
"to": { "groupId": "l3pc0992zp0hw8ea83b7aky3" },
"from": {
"itemId": "dg28mo88efs00p8ech81qxmu",
"blockId": "yxuk1bhfas07i4bxq64hi0vj",
"groupId": "cszciavjonb2qp0ga0pladoj"
}
},
{
"id": "ogpmoxw3lrt12rgxnq0wajrj",
"to": { "groupId": "f4hlh2oq8viwxrpl9ppq5d42" },
"from": {
"itemId": "lrj50vf8c0cj46jrtxid5a60",
"blockId": "yxuk1bhfas07i4bxq64hi0vj",
"groupId": "cszciavjonb2qp0ga0pladoj"
}
}
],
"theme": {
"chat": {
"inputs": {
"color": "#303235",
"backgroundColor": "#FFFFFF",
"placeholderColor": "#9095A0"
},
"buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" },
"hostAvatar": {
"isEnabled": true
},
"hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" },
"guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" }
},
"general": {
"font": "Open Sans",
"background": { "type": "Color", "content": "#ffffff" }
}
},
"selectedThemeTemplateId": null, "selectedThemeTemplateId": null,
"settings": { "settings": {},
"general": { "createdAt": "2023-11-06T17:06:59.136Z",
"isBrandingEnabled": false, "updatedAt": "2023-11-06T17:06:59.136Z",
"isInputPrefillEnabled": true, "icon": "🧲",
"isHideQueryParamsEnabled": true, "folderId": null,
"isNewResultOnRefreshEnabled": true
},
"metadata": {
"description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form."
},
"typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 }
},
"publicId": null, "publicId": null,
"customDomain": null, "customDomain": null,
"workspaceId": "freeWorkspace", "workspaceId": "proWorkspace",
"resultsTablePreferences": null, "resultsTablePreferences": null,
"isArchived": false, "isArchived": false,
"isClosed": false "isClosed": false,
"whatsAppCredentialsId": null
} }

View File

@ -1,34 +1,23 @@
{ {
"id": "cl1seoz582103xk1at12y4ucb", "version": "6",
"version": "4", "id": "clon58wkg00051avnkor66u6m",
"createdAt": "2022-04-09T22:06:01.196Z",
"updatedAt": "2022-04-09T22:35:22.449Z",
"icon": "🏆",
"name": "Lead Scoring", "name": "Lead Scoring",
"folderId": null, "events": [
"groups": [
{ {
"id": "cl1seoz560000xk1ags8s67b0", "id": "cl1seoz560000xk1ags8s67b0",
"blocks": [ "outgoingEdgeId": "cl1seraz9001z2e6e85zrx08l",
{ "graphCoordinates": { "x": 0, "y": 0 },
"id": "cl1seoz570001xk1ab0rd05k6", "type": "start"
"type": "start", }
"label": "Start", ],
"groupId": "cl1seoz560000xk1ags8s67b0", "groups": [
"outgoingEdgeId": "cl1seraz9001z2e6e85zrx08l"
}
],
"title": "Start",
"graphCoordinates": { "x": 0, "y": 0 }
},
{ {
"id": "cl1sep1c5001w2e6e77bb1uwb", "id": "cl1sep1c5001w2e6e77bb1uwb",
"graphCoordinates": { "x": 0, "y": 171 },
"title": "Welcome", "title": "Welcome",
"graphCoordinates": { "x": 0, "y": 171 },
"blocks": [ "blocks": [
{ {
"id": "cl1sep1cc001x2e6eikrwf9jy", "id": "cl1sep1cc001x2e6eikrwf9jy",
"groupId": "cl1sep1c5001w2e6e77bb1uwb",
"type": "text", "type": "text",
"content": { "content": {
"richText": [{ "type": "p", "children": [{ "text": "Hi! 👋" }] }] "richText": [{ "type": "p", "children": [{ "text": "Hi! 👋" }] }]
@ -36,7 +25,6 @@
}, },
{ {
"id": "cl1sep7jn001y2e6ez7ee7eiw", "id": "cl1sep7jn001y2e6ez7ee7eiw",
"groupId": "cl1sep1c5001w2e6e77bb1uwb",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
@ -51,7 +39,6 @@
}, },
{ {
"id": "cl1seyazl00252e6e3zsbosvm", "id": "cl1seyazl00252e6e3zsbosvm",
"groupId": "cl1sep1c5001w2e6e77bb1uwb",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
@ -66,24 +53,22 @@
}, },
{ {
"id": "cl1sezuul002a2e6ex7nc444j", "id": "cl1sezuul002a2e6ex7nc444j",
"groupId": "cl1sep1c5001w2e6e77bb1uwb", "outgoingEdgeId": "cl1sf8v96003k2e6e2rbcfjmz",
"type": "Set variable", "type": "Set variable",
"options": { "options": {
"variableId": "vcl1sezzln002b2e6e6ssxh9bf", "variableId": "vcl1sezzln002b2e6e6ssxh9bf",
"expressionToEvaluate": "0" "expressionToEvaluate": "0"
}, }
"outgoingEdgeId": "cl1sf8v96003k2e6e2rbcfjmz"
} }
] ]
}, },
{ {
"id": "cl1sern8w00202e6ez69l190j", "id": "cl1sern8w00202e6ez69l190j",
"graphCoordinates": { "x": 377, "y": 166 },
"title": "Q1", "title": "Q1",
"graphCoordinates": { "x": 377, "y": 166 },
"blocks": [ "blocks": [
{ {
"id": "cl1sern9200212e6esrid307i", "id": "cl1sern9200212e6esrid307i",
"groupId": "cl1sern8w00202e6ez69l190j",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
@ -96,23 +81,17 @@
}, },
{ {
"id": "cl1ses31000222e6ebrb4wxo0", "id": "cl1ses31000222e6ebrb4wxo0",
"groupId": "cl1sern8w00202e6ez69l190j",
"type": "choice input", "type": "choice input",
"options": { "buttonLabel": "Send", "isMultipleChoice": false },
"items": [ "items": [
{ {
"id": "cl1ses31100232e6eq3nnp2mm", "id": "cl1ses31100232e6eq3nnp2mm",
"blockId": "cl1ses31000222e6ebrb4wxo0", "outgoingEdgeId": "cl1sezo4z00292e6ean8s487x",
"type": 0, "content": "Yes"
"content": "Yes",
"outgoingEdgeId": "cl1sezo4z00292e6ean8s487x"
}, },
{ {
"blockId": "cl1ses31000222e6ebrb4wxo0",
"type": 0,
"id": "cl1ses3y400242e6e1qjwkhq4", "id": "cl1ses3y400242e6e1qjwkhq4",
"content": "No", "outgoingEdgeId": "cl1sfertf004i2e6epf68fwri",
"outgoingEdgeId": "cl1sfertf004i2e6epf68fwri" "content": "No"
} }
] ]
} }
@ -120,12 +99,11 @@
}, },
{ {
"id": "cl1sez6zd00262e6ebh59k1bs", "id": "cl1sez6zd00262e6ebh59k1bs",
"graphCoordinates": { "x": 748, "y": 135 },
"title": "Company", "title": "Company",
"graphCoordinates": { "x": 748, "y": 135 },
"blocks": [ "blocks": [
{ {
"id": "cl1sf04yl002c2e6eaeu463cq", "id": "cl1sf04yl002c2e6eaeu463cq",
"groupId": "cl1sez6zd00262e6ebh59k1bs",
"type": "Set variable", "type": "Set variable",
"options": { "options": {
"variableId": "vcl1sezzln002b2e6e6ssxh9bf", "variableId": "vcl1sezzln002b2e6e6ssxh9bf",
@ -134,7 +112,6 @@
}, },
{ {
"id": "cl1sez6zt00272e6ecsefq05y", "id": "cl1sez6zt00272e6ecsefq05y",
"groupId": "cl1sez6zd00262e6ebh59k1bs",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
@ -144,28 +121,21 @@
}, },
{ {
"id": "cl1sezlw700282e6eozkzmed0", "id": "cl1sezlw700282e6eozkzmed0",
"groupId": "cl1sez6zd00262e6ebh59k1bs", "outgoingEdgeId": "cl1sf1mm0002h2e6eurv21l5n",
"type": "text input", "type": "text input",
"options": { "options": {
"isLong": false,
"labels": {
"button": "Send",
"placeholder": "Type your answer..."
},
"variableId": "vcl1sf93s2003l2e6eojomb66g" "variableId": "vcl1sf93s2003l2e6eojomb66g"
}, }
"outgoingEdgeId": "cl1sf1mm0002h2e6eurv21l5n"
} }
] ]
}, },
{ {
"id": "cl1sf0ogu002d2e6edyhcuu6f", "id": "cl1sf0ogu002d2e6edyhcuu6f",
"graphCoordinates": { "x": 1096, "y": -62 },
"title": "Q2", "title": "Q2",
"graphCoordinates": { "x": 1096, "y": -62 },
"blocks": [ "blocks": [
{ {
"id": "cl1sf0ohc002e2e6egrjoj10z", "id": "cl1sf0ohc002e2e6egrjoj10z",
"groupId": "cl1sf0ogu002d2e6edyhcuu6f",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
@ -180,22 +150,18 @@
}, },
{ {
"id": "cl1sf1er7002f2e6eakhc25yy", "id": "cl1sf1er7002f2e6eakhc25yy",
"groupId": "cl1sf0ogu002d2e6edyhcuu6f",
"type": "number input", "type": "number input",
"options": { "options": {
"labels": { "button": "Send", "placeholder": "Type a number..." },
"variableId": "vcl1sf1ko5002g2e6egjmyb16v" "variableId": "vcl1sf1ko5002g2e6egjmyb16v"
} }
}, },
{ {
"id": "cl1sf1vkf002j2e6e971somqx", "id": "cl1sf1vkf002j2e6e971somqx",
"groupId": "cl1sf0ogu002d2e6edyhcuu6f",
"type": "Condition", "type": "Condition",
"items": [ "items": [
{ {
"id": "cl1sf1vkg002k2e6ec54p0s4v", "id": "cl1sf1vkg002k2e6ec54p0s4v",
"blockId": "cl1sf1vkf002j2e6e971somqx", "outgoingEdgeId": "cl1sf35fh002t2e6e8u68r9gz",
"type": 1,
"content": { "content": {
"comparisons": [ "comparisons": [
{ {
@ -204,22 +170,19 @@
"comparisonOperator": "Greater than", "comparisonOperator": "Greater than",
"value": "30" "value": "30"
} }
], ]
"logicalOperator": "AND" }
},
"outgoingEdgeId": "cl1sf35fh002t2e6e8u68r9gz"
} }
] ]
}, },
{ {
"id": "cl1sf2iix002n2e6egibs95yb", "id": "cl1sf2iix002n2e6egibs95yb",
"groupId": "cl1sf0ogu002d2e6edyhcuu6f", "outgoingEdgeId": "cl1sfen6a004f2e6estkfooss",
"type": "Condition", "type": "Condition",
"items": [ "items": [
{ {
"id": "cl1sf2iix002o2e6eai567rnj", "id": "cl1sf2iix002o2e6eai567rnj",
"blockId": "cl1sf2iix002n2e6egibs95yb", "outgoingEdgeId": "cl1sf37rv002x2e6e7wz3lawd",
"type": 1,
"content": { "content": {
"comparisons": [ "comparisons": [
{ {
@ -227,58 +190,52 @@
"variableId": "vcl1sf1ko5002g2e6egjmyb16v", "variableId": "vcl1sf1ko5002g2e6egjmyb16v",
"value": "10" "value": "10"
} }
], ]
"logicalOperator": "AND" }
},
"outgoingEdgeId": "cl1sf37rv002x2e6e7wz3lawd"
} }
], ]
"outgoingEdgeId": "cl1sfen6a004f2e6estkfooss"
} }
] ]
}, },
{ {
"id": "cl1sf2wnu002r2e6ehdp859qv", "id": "cl1sf2wnu002r2e6ehdp859qv",
"graphCoordinates": { "x": 1458, "y": -72 },
"title": "Add 20", "title": "Add 20",
"graphCoordinates": { "x": 1458, "y": -72 },
"blocks": [ "blocks": [
{ {
"id": "cl1sf2wom002s2e6e8cmcnhpn", "id": "cl1sf2wom002s2e6e8cmcnhpn",
"groupId": "cl1sf2wnu002r2e6ehdp859qv", "outgoingEdgeId": "cl1sfeq3f004h2e6eglhjyx2o",
"type": "Set variable", "type": "Set variable",
"options": { "options": {
"variableId": "vcl1sezzln002b2e6e6ssxh9bf", "variableId": "vcl1sezzln002b2e6e6ssxh9bf",
"expressionToEvaluate": "{{Lead Score}} + 20" "expressionToEvaluate": "{{Lead Score}} + 20"
}, }
"outgoingEdgeId": "cl1sfeq3f004h2e6eglhjyx2o"
} }
] ]
}, },
{ {
"id": "cl1sf36ia002u2e6e16ifow0z", "id": "cl1sf36ia002u2e6e16ifow0z",
"graphCoordinates": { "x": 1458, "y": 88 },
"title": "Add 10", "title": "Add 10",
"graphCoordinates": { "x": 1458, "y": 88 },
"blocks": [ "blocks": [
{ {
"id": "cl1sf36ib002v2e6ejyyrrjnh", "id": "cl1sf36ib002v2e6ejyyrrjnh",
"groupId": "cl1sf36ia002u2e6e16ifow0z", "outgoingEdgeId": "cl1sfeog5004g2e6eiil842nb",
"type": "Set variable", "type": "Set variable",
"options": { "options": {
"variableId": "vcl1sezzln002b2e6e6ssxh9bf", "variableId": "vcl1sezzln002b2e6e6ssxh9bf",
"expressionToEvaluate": "{{Lead Score}} + 10" "expressionToEvaluate": "{{Lead Score}} + 10"
}, }
"outgoingEdgeId": "cl1sfeog5004g2e6eiil842nb"
} }
] ]
}, },
{ {
"id": "cl1sf4qk500332e6e8gs5mn3t", "id": "cl1sf4qk500332e6e8gs5mn3t",
"graphCoordinates": { "x": 2442.929831215626, "y": 391 },
"title": "Q4", "title": "Q4",
"graphCoordinates": { "x": 2442.929831215626, "y": 391 },
"blocks": [ "blocks": [
{ {
"id": "cl1sf4ql500342e6ebj863aex", "id": "cl1sf4ql500342e6ebj863aex",
"groupId": "cl1sf4qk500332e6e8gs5mn3t",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
@ -288,12 +245,9 @@
}, },
{ {
"id": "cl1sf4z8n00352e6ejypaeinl", "id": "cl1sf4z8n00352e6ejypaeinl",
"groupId": "cl1sf4qk500332e6e8gs5mn3t",
"type": "text input", "type": "text input",
"options": { "options": {
"isLong": false,
"labels": { "labels": {
"button": "Send",
"placeholder": "Type your country..." "placeholder": "Type your country..."
}, },
"variableId": "vcl1sf525q00362e6eoyosycte" "variableId": "vcl1sf525q00362e6eoyosycte"
@ -301,13 +255,12 @@
}, },
{ {
"id": "cl1sf738d003c2e6eswslikio", "id": "cl1sf738d003c2e6eswslikio",
"groupId": "cl1sf4qk500332e6e8gs5mn3t", "outgoingEdgeId": "cl1sf9acz003n2e6ekwjq7209",
"type": "Condition", "type": "Condition",
"items": [ "items": [
{ {
"id": "cl1sf738d003d2e6eqpzlxh8f", "id": "cl1sf738d003d2e6eqpzlxh8f",
"blockId": "cl1sf738d003c2e6eswslikio", "outgoingEdgeId": "cl1sf7qlx003h2e6e60635qrt",
"type": 1,
"content": { "content": {
"comparisons": [ "comparisons": [
{ {
@ -316,41 +269,36 @@
"comparisonOperator": "Equal to", "comparisonOperator": "Equal to",
"value": "United States" "value": "United States"
} }
], ]
"logicalOperator": "AND" }
},
"outgoingEdgeId": "cl1sf7qlx003h2e6e60635qrt"
} }
], ]
"outgoingEdgeId": "cl1sf9acz003n2e6ekwjq7209"
} }
] ]
}, },
{ {
"id": "cl1sf7jbi003f2e6euy48woy4", "id": "cl1sf7jbi003f2e6euy48woy4",
"graphCoordinates": { "x": 2765.4297996080672, "y": 386.7142676528225 },
"title": "Add 10", "title": "Add 10",
"graphCoordinates": { "x": 2765.429799608067, "y": 386.7142676528225 },
"blocks": [ "blocks": [
{ {
"id": "cl1sf7jcx003g2e6ec1z9xh0w", "id": "cl1sf7jcx003g2e6ec1z9xh0w",
"groupId": "cl1sf7jbi003f2e6euy48woy4", "outgoingEdgeId": "cl1sf99bb003m2e6eywy661ww",
"type": "Set variable", "type": "Set variable",
"options": { "options": {
"variableId": "vcl1sezzln002b2e6e6ssxh9bf", "variableId": "vcl1sezzln002b2e6e6ssxh9bf",
"expressionToEvaluate": "10" "expressionToEvaluate": "10"
}, }
"outgoingEdgeId": "cl1sf99bb003m2e6eywy661ww"
} }
] ]
}, },
{ {
"id": "cl1sf85am003i2e6e1yq8eoa7", "id": "cl1sf85am003i2e6e1yq8eoa7",
"graphCoordinates": { "x": 2953.7865857513116, "y": 570.3154133255522 },
"title": "Filtering", "title": "Filtering",
"graphCoordinates": { "x": 2953.786585751312, "y": 570.3154133255522 },
"blocks": [ "blocks": [
{ {
"id": "cl1sf85bm003j2e6e04d210vs", "id": "cl1sf85bm003j2e6e04d210vs",
"groupId": "cl1sf85am003i2e6e1yq8eoa7",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
@ -365,13 +313,12 @@
}, },
{ {
"id": "cl1sfat0h003p2e6e7j0hpilh", "id": "cl1sfat0h003p2e6e7j0hpilh",
"groupId": "cl1sf85am003i2e6e1yq8eoa7", "outgoingEdgeId": "cl1sfgtau004n2e6ev68sikcr",
"type": "Condition", "type": "Condition",
"items": [ "items": [
{ {
"id": "cl1sfat0h003q2e6eyx6vxe0f", "id": "cl1sfat0h003q2e6eyx6vxe0f",
"blockId": "cl1sfat0h003p2e6e7j0hpilh", "outgoingEdgeId": "cl1sfg9fc004k2e6egywpim9v",
"type": 1,
"content": { "content": {
"comparisons": [ "comparisons": [
{ {
@ -380,24 +327,20 @@
"comparisonOperator": "Greater than", "comparisonOperator": "Greater than",
"value": "20" "value": "20"
} }
], ]
"logicalOperator": "AND" }
},
"outgoingEdgeId": "cl1sfg9fc004k2e6egywpim9v"
} }
], ]
"outgoingEdgeId": "cl1sfgtau004n2e6ev68sikcr"
} }
] ]
}, },
{ {
"id": "cl1sfbbv0003s2e6eheyhv7ke", "id": "cl1sfbbv0003s2e6eheyhv7ke",
"graphCoordinates": { "x": 1632.8573866868949, "y": 465.7855110942534 },
"title": "Q3", "title": "Q3",
"graphCoordinates": { "x": 1632.857386686895, "y": 465.7855110942534 },
"blocks": [ "blocks": [
{ {
"id": "cl1sfcqjw003z2e6ebmyzey4o", "id": "cl1sfcqjw003z2e6ebmyzey4o",
"groupId": "cl1sfbbv0003s2e6eheyhv7ke",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
@ -407,86 +350,64 @@
}, },
{ {
"id": "cl1sfbbw3003t2e6e16ec9w29", "id": "cl1sfbbw3003t2e6e16ec9w29",
"groupId": "cl1sfbbv0003s2e6eheyhv7ke", "outgoingEdgeId": "cl1sfek9r004e2e6elkh3h7a2",
"type": "choice input", "type": "choice input",
"options": {
"buttonLabel": "Send",
"isMultipleChoice": false
},
"items": [ "items": [
{ "id": "cl1sfbbw3003u2e6e7luhj0n1", "content": "UI/UX Designer" },
{ "id": "cl1sfbq6z003v2e6egnctk2n2", "content": "Product Owner" },
{ {
"id": "cl1sfbbw3003u2e6e7luhj0n1",
"blockId": "cl1sfbbw3003t2e6e16ec9w29",
"type": 0,
"content": "UI/UX Designer"
},
{
"blockId": "cl1sfbbw3003t2e6e16ec9w29",
"type": 0,
"id": "cl1sfbq6z003v2e6egnctk2n2",
"content": "Product Owner"
},
{
"blockId": "cl1sfbbw3003t2e6e16ec9w29",
"type": 0,
"id": "cl1sfbtz8003w2e6eodbt4ogs", "id": "cl1sfbtz8003w2e6eodbt4ogs",
"content": "Marketing Officer", "outgoingEdgeId": "cl1sfebs9004a2e6ere0zokyo",
"outgoingEdgeId": "cl1sfebs9004a2e6ere0zokyo" "content": "Marketing Officer"
}, },
{ {
"blockId": "cl1sfbbw3003t2e6e16ec9w29",
"type": 0,
"id": "cl1sfc545003x2e6e833juo6m", "id": "cl1sfc545003x2e6e833juo6m",
"content": "Developer", "outgoingEdgeId": "cl1sfedcd004b2e6eerh8hz33",
"outgoingEdgeId": "cl1sfedcd004b2e6eerh8hz33" "content": "Developer"
} }
], ]
"outgoingEdgeId": "cl1sfek9r004e2e6elkh3h7a2"
} }
] ]
}, },
{ {
"id": "cl1sfdroa00452e6e5o458z9h", "id": "cl1sfdroa00452e6e5o458z9h",
"graphCoordinates": { "x": 1983.1431822491943, "y": 82.85612238447435 },
"title": "Add 20", "title": "Add 20",
"graphCoordinates": { "x": 1983.143182249194, "y": 82.85612238447435 },
"blocks": [ "blocks": [
{ {
"id": "cl1sfdrpi00462e6emfd9sj14", "id": "cl1sfdrpi00462e6emfd9sj14",
"groupId": "cl1sfdroa00452e6e5o458z9h", "outgoingEdgeId": "cl1sfeg2k004c2e6eu9rjnski",
"type": "Set variable", "type": "Set variable",
"options": { "options": {
"variableId": "vcl1sezzln002b2e6e6ssxh9bf", "variableId": "vcl1sezzln002b2e6e6ssxh9bf",
"expressionToEvaluate": "{{Lead Score}} + 20" "expressionToEvaluate": "{{Lead Score}} + 20"
}, }
"outgoingEdgeId": "cl1sfeg2k004c2e6eu9rjnski"
} }
] ]
}, },
{ {
"id": "cl1sfe2kn00472e6ead4qs2d9", "id": "cl1sfe2kn00472e6ead4qs2d9",
"graphCoordinates": { "x": 1984.2856059169358, "y": 240.8562488147158 },
"title": "Add 10", "title": "Add 10",
"graphCoordinates": { "x": 1984.285605916936, "y": 240.8562488147158 },
"blocks": [ "blocks": [
{ {
"id": "cl1sfe2kn00482e6eukp8r9bj", "id": "cl1sfe2kn00482e6eukp8r9bj",
"groupId": "cl1sfe2kn00472e6ead4qs2d9", "outgoingEdgeId": "cl1sfeik5004d2e6ejj03f1gn",
"type": "Set variable", "type": "Set variable",
"options": { "options": {
"variableId": "vcl1sezzln002b2e6e6ssxh9bf", "variableId": "vcl1sezzln002b2e6e6ssxh9bf",
"expressionToEvaluate": "{{Lead Score}} + 20" "expressionToEvaluate": "{{Lead Score}} + 20"
}, }
"outgoingEdgeId": "cl1sfeik5004d2e6ejj03f1gn"
} }
] ]
}, },
{ {
"id": "cl1sffxet004j2e6ec6gfbffh", "id": "cl1sffxet004j2e6ec6gfbffh",
"graphCoordinates": { "x": 3350.0874940277185, "y": 509.77356639445065 },
"title": "Conclusion - Qualified", "title": "Conclusion - Qualified",
"graphCoordinates": { "x": 3350.087494027719, "y": 509.7735663944507 },
"blocks": [ "blocks": [
{ {
"id": "cl1sfgwox004o2e6evzi0n7hk", "id": "cl1sfgwox004o2e6evzi0n7hk",
"groupId": "cl1sffxet004j2e6ec6gfbffh",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
@ -503,7 +424,6 @@
}, },
{ {
"id": "cl1sfhz4f004p2e6esidqktmr", "id": "cl1sfhz4f004p2e6esidqktmr",
"groupId": "cl1sffxet004j2e6ec6gfbffh",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
@ -518,12 +438,11 @@
}, },
{ {
"id": "cl1sfgjlr004l2e6erykli1ud", "id": "cl1sfgjlr004l2e6erykli1ud",
"graphCoordinates": { "x": 3352.8943392345736, "y": 786.5865419115444 },
"title": "Conclusion - Not qualified", "title": "Conclusion - Not qualified",
"graphCoordinates": { "x": 3352.894339234574, "y": 786.5865419115444 },
"blocks": [ "blocks": [
{ {
"id": "cl1sfgjnr004m2e6e63sqh0dh", "id": "cl1sfgjnr004m2e6e63sqh0dh",
"groupId": "cl1sfgjlr004l2e6erykli1ud",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
@ -538,7 +457,6 @@
}, },
{ {
"id": "cl1sfikh5004q2e6elyvzgd0s", "id": "cl1sfikh5004q2e6elyvzgd0s",
"groupId": "cl1sfgjlr004l2e6erykli1ud",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
@ -553,7 +471,6 @@
}, },
{ {
"id": "cl1sfitz4004r2e6e3ge4x7uy", "id": "cl1sfitz4004r2e6e3ge4x7uy",
"groupId": "cl1sfgjlr004l2e6erykli1ud",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
@ -564,214 +481,150 @@
] ]
} }
], ],
"edges": [
{
"id": "cl1seraz9001z2e6e85zrx08l",
"from": { "eventId": "cl1seoz560000xk1ags8s67b0" },
"to": { "groupId": "cl1sep1c5001w2e6e77bb1uwb" }
},
{
"id": "cl1sezo4z00292e6ean8s487x",
"from": {
"blockId": "cl1ses31000222e6ebrb4wxo0",
"itemId": "cl1ses31100232e6eq3nnp2mm"
},
"to": { "groupId": "cl1sez6zd00262e6ebh59k1bs" }
},
{
"id": "cl1sf1mm0002h2e6eurv21l5n",
"from": { "blockId": "cl1sezlw700282e6eozkzmed0" },
"to": { "groupId": "cl1sf0ogu002d2e6edyhcuu6f" }
},
{
"id": "cl1sf35fh002t2e6e8u68r9gz",
"from": {
"blockId": "cl1sf1vkf002j2e6e971somqx",
"itemId": "cl1sf1vkg002k2e6ec54p0s4v"
},
"to": { "groupId": "cl1sf2wnu002r2e6ehdp859qv" }
},
{
"id": "cl1sf37rv002x2e6e7wz3lawd",
"from": {
"blockId": "cl1sf2iix002n2e6egibs95yb",
"itemId": "cl1sf2iix002o2e6eai567rnj"
},
"to": { "groupId": "cl1sf36ia002u2e6e16ifow0z" }
},
{
"id": "cl1sf7qlx003h2e6e60635qrt",
"from": {
"blockId": "cl1sf738d003c2e6eswslikio",
"itemId": "cl1sf738d003d2e6eqpzlxh8f"
},
"to": { "groupId": "cl1sf7jbi003f2e6euy48woy4" }
},
{
"id": "cl1sf8v96003k2e6e2rbcfjmz",
"from": { "blockId": "cl1sezuul002a2e6ex7nc444j" },
"to": { "groupId": "cl1sern8w00202e6ez69l190j" }
},
{
"id": "cl1sf99bb003m2e6eywy661ww",
"from": { "blockId": "cl1sf7jcx003g2e6ec1z9xh0w" },
"to": { "groupId": "cl1sf85am003i2e6e1yq8eoa7" }
},
{
"id": "cl1sf9acz003n2e6ekwjq7209",
"from": { "blockId": "cl1sf738d003c2e6eswslikio" },
"to": { "groupId": "cl1sf85am003i2e6e1yq8eoa7" }
},
{
"id": "cl1sfebs9004a2e6ere0zokyo",
"from": {
"blockId": "cl1sfbbw3003t2e6e16ec9w29",
"itemId": "cl1sfbtz8003w2e6eodbt4ogs"
},
"to": { "groupId": "cl1sfdroa00452e6e5o458z9h" }
},
{
"id": "cl1sfedcd004b2e6eerh8hz33",
"from": {
"blockId": "cl1sfbbw3003t2e6e16ec9w29",
"itemId": "cl1sfc545003x2e6e833juo6m"
},
"to": { "groupId": "cl1sfe2kn00472e6ead4qs2d9" }
},
{
"id": "cl1sfeg2k004c2e6eu9rjnski",
"from": { "blockId": "cl1sfdrpi00462e6emfd9sj14" },
"to": { "groupId": "cl1sf4qk500332e6e8gs5mn3t" }
},
{
"id": "cl1sfeik5004d2e6ejj03f1gn",
"from": { "blockId": "cl1sfe2kn00482e6eukp8r9bj" },
"to": { "groupId": "cl1sf4qk500332e6e8gs5mn3t" }
},
{
"id": "cl1sfek9r004e2e6elkh3h7a2",
"from": { "blockId": "cl1sfbbw3003t2e6e16ec9w29" },
"to": { "groupId": "cl1sf4qk500332e6e8gs5mn3t" }
},
{
"id": "cl1sfen6a004f2e6estkfooss",
"from": { "blockId": "cl1sf2iix002n2e6egibs95yb" },
"to": { "groupId": "cl1sfbbv0003s2e6eheyhv7ke" }
},
{
"id": "cl1sfeog5004g2e6eiil842nb",
"from": { "blockId": "cl1sf36ib002v2e6ejyyrrjnh" },
"to": { "groupId": "cl1sfbbv0003s2e6eheyhv7ke" }
},
{
"id": "cl1sfeq3f004h2e6eglhjyx2o",
"from": { "blockId": "cl1sf2wom002s2e6e8cmcnhpn" },
"to": { "groupId": "cl1sfbbv0003s2e6eheyhv7ke" }
},
{
"id": "cl1sfertf004i2e6epf68fwri",
"from": {
"blockId": "cl1ses31000222e6ebrb4wxo0",
"itemId": "cl1ses3y400242e6e1qjwkhq4"
},
"to": { "groupId": "cl1sfbbv0003s2e6eheyhv7ke" }
},
{
"id": "cl1sfg9fc004k2e6egywpim9v",
"from": {
"blockId": "cl1sfat0h003p2e6e7j0hpilh",
"itemId": "cl1sfat0h003q2e6eyx6vxe0f"
},
"to": { "groupId": "cl1sffxet004j2e6ec6gfbffh" }
},
{
"id": "cl1sfgtau004n2e6ev68sikcr",
"from": { "blockId": "cl1sfat0h003p2e6e7j0hpilh" },
"to": { "groupId": "cl1sfgjlr004l2e6erykli1ud" }
}
],
"variables": [ "variables": [
{ "id": "vcl1sezzln002b2e6e6ssxh9bf", "name": "Lead Score" }, { "id": "vcl1sezzln002b2e6e6ssxh9bf", "name": "Lead Score" },
{ "id": "vcl1sf1ko5002g2e6egjmyb16v", "name": "Team size" }, { "id": "vcl1sf1ko5002g2e6egjmyb16v", "name": "Team size" },
{ "id": "vcl1sf525q00362e6eoyosycte", "name": "Country" }, { "id": "vcl1sf525q00362e6eoyosycte", "name": "Country" },
{ "id": "vcl1sf93s2003l2e6eojomb66g", "name": "Company" } { "id": "vcl1sf93s2003l2e6eojomb66g", "name": "Company" }
], ],
"edges": [ "theme": {},
{ "selectedThemeTemplateId": null,
"from": { "settings": {},
"groupId": "cl1seoz560000xk1ags8s67b0", "createdAt": "2023-11-06T16:55:57.664Z",
"blockId": "cl1seoz570001xk1ab0rd05k6" "updatedAt": "2023-11-06T16:55:57.664Z",
}, "icon": "🏆",
"to": { "groupId": "cl1sep1c5001w2e6e77bb1uwb" }, "folderId": null,
"id": "cl1seraz9001z2e6e85zrx08l"
},
{
"from": {
"groupId": "cl1sern8w00202e6ez69l190j",
"blockId": "cl1ses31000222e6ebrb4wxo0",
"itemId": "cl1ses31100232e6eq3nnp2mm"
},
"to": { "groupId": "cl1sez6zd00262e6ebh59k1bs" },
"id": "cl1sezo4z00292e6ean8s487x"
},
{
"from": {
"groupId": "cl1sez6zd00262e6ebh59k1bs",
"blockId": "cl1sezlw700282e6eozkzmed0"
},
"to": { "groupId": "cl1sf0ogu002d2e6edyhcuu6f" },
"id": "cl1sf1mm0002h2e6eurv21l5n"
},
{
"from": {
"groupId": "cl1sf0ogu002d2e6edyhcuu6f",
"blockId": "cl1sf1vkf002j2e6e971somqx",
"itemId": "cl1sf1vkg002k2e6ec54p0s4v"
},
"to": { "groupId": "cl1sf2wnu002r2e6ehdp859qv" },
"id": "cl1sf35fh002t2e6e8u68r9gz"
},
{
"from": {
"groupId": "cl1sf0ogu002d2e6edyhcuu6f",
"blockId": "cl1sf2iix002n2e6egibs95yb",
"itemId": "cl1sf2iix002o2e6eai567rnj"
},
"to": { "groupId": "cl1sf36ia002u2e6e16ifow0z" },
"id": "cl1sf37rv002x2e6e7wz3lawd"
},
{
"from": {
"groupId": "cl1sf4qk500332e6e8gs5mn3t",
"blockId": "cl1sf738d003c2e6eswslikio",
"itemId": "cl1sf738d003d2e6eqpzlxh8f"
},
"to": { "groupId": "cl1sf7jbi003f2e6euy48woy4" },
"id": "cl1sf7qlx003h2e6e60635qrt"
},
{
"from": {
"groupId": "cl1sep1c5001w2e6e77bb1uwb",
"blockId": "cl1sezuul002a2e6ex7nc444j"
},
"to": { "groupId": "cl1sern8w00202e6ez69l190j" },
"id": "cl1sf8v96003k2e6e2rbcfjmz"
},
{
"from": {
"groupId": "cl1sf7jbi003f2e6euy48woy4",
"blockId": "cl1sf7jcx003g2e6ec1z9xh0w"
},
"to": { "groupId": "cl1sf85am003i2e6e1yq8eoa7" },
"id": "cl1sf99bb003m2e6eywy661ww"
},
{
"from": {
"groupId": "cl1sf4qk500332e6e8gs5mn3t",
"blockId": "cl1sf738d003c2e6eswslikio"
},
"to": { "groupId": "cl1sf85am003i2e6e1yq8eoa7" },
"id": "cl1sf9acz003n2e6ekwjq7209"
},
{
"from": {
"groupId": "cl1sfbbv0003s2e6eheyhv7ke",
"blockId": "cl1sfbbw3003t2e6e16ec9w29",
"itemId": "cl1sfbtz8003w2e6eodbt4ogs"
},
"to": { "groupId": "cl1sfdroa00452e6e5o458z9h" },
"id": "cl1sfebs9004a2e6ere0zokyo"
},
{
"from": {
"groupId": "cl1sfbbv0003s2e6eheyhv7ke",
"blockId": "cl1sfbbw3003t2e6e16ec9w29",
"itemId": "cl1sfc545003x2e6e833juo6m"
},
"to": { "groupId": "cl1sfe2kn00472e6ead4qs2d9" },
"id": "cl1sfedcd004b2e6eerh8hz33"
},
{
"from": {
"groupId": "cl1sfdroa00452e6e5o458z9h",
"blockId": "cl1sfdrpi00462e6emfd9sj14"
},
"to": { "groupId": "cl1sf4qk500332e6e8gs5mn3t" },
"id": "cl1sfeg2k004c2e6eu9rjnski"
},
{
"from": {
"groupId": "cl1sfe2kn00472e6ead4qs2d9",
"blockId": "cl1sfe2kn00482e6eukp8r9bj"
},
"to": { "groupId": "cl1sf4qk500332e6e8gs5mn3t" },
"id": "cl1sfeik5004d2e6ejj03f1gn"
},
{
"from": {
"groupId": "cl1sfbbv0003s2e6eheyhv7ke",
"blockId": "cl1sfbbw3003t2e6e16ec9w29"
},
"to": { "groupId": "cl1sf4qk500332e6e8gs5mn3t" },
"id": "cl1sfek9r004e2e6elkh3h7a2"
},
{
"from": {
"groupId": "cl1sf0ogu002d2e6edyhcuu6f",
"blockId": "cl1sf2iix002n2e6egibs95yb"
},
"to": { "groupId": "cl1sfbbv0003s2e6eheyhv7ke" },
"id": "cl1sfen6a004f2e6estkfooss"
},
{
"from": {
"groupId": "cl1sf36ia002u2e6e16ifow0z",
"blockId": "cl1sf36ib002v2e6ejyyrrjnh"
},
"to": { "groupId": "cl1sfbbv0003s2e6eheyhv7ke" },
"id": "cl1sfeog5004g2e6eiil842nb"
},
{
"from": {
"groupId": "cl1sf2wnu002r2e6ehdp859qv",
"blockId": "cl1sf2wom002s2e6e8cmcnhpn"
},
"to": { "groupId": "cl1sfbbv0003s2e6eheyhv7ke" },
"id": "cl1sfeq3f004h2e6eglhjyx2o"
},
{
"from": {
"groupId": "cl1sern8w00202e6ez69l190j",
"blockId": "cl1ses31000222e6ebrb4wxo0",
"itemId": "cl1ses3y400242e6e1qjwkhq4"
},
"to": { "groupId": "cl1sfbbv0003s2e6eheyhv7ke" },
"id": "cl1sfertf004i2e6epf68fwri"
},
{
"from": {
"groupId": "cl1sf85am003i2e6e1yq8eoa7",
"blockId": "cl1sfat0h003p2e6e7j0hpilh",
"itemId": "cl1sfat0h003q2e6eyx6vxe0f"
},
"to": { "groupId": "cl1sffxet004j2e6ec6gfbffh" },
"id": "cl1sfg9fc004k2e6egywpim9v"
},
{
"from": {
"groupId": "cl1sf85am003i2e6e1yq8eoa7",
"blockId": "cl1sfat0h003p2e6e7j0hpilh"
},
"to": { "groupId": "cl1sfgjlr004l2e6erykli1ud" },
"id": "cl1sfgtau004n2e6ev68sikcr"
}
],
"theme": {
"chat": {
"inputs": {
"color": "#303235",
"backgroundColor": "#FFFFFF",
"placeholderColor": "#9095A0"
},
"buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" },
"hostAvatar": {
"isEnabled": true
},
"hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" },
"guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" }
},
"general": {
"font": "Open Sans",
"background": { "type": "Color", "content": "#ffffff" }
}
},
"settings": {
"general": {
"isBrandingEnabled": false,
"isInputPrefillEnabled": true,
"isResultSavingEnabled": true,
"isHideQueryParamsEnabled": true,
"isNewResultOnRefreshEnabled": true
},
"metadata": {
"description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form."
},
"typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 }
},
"publicId": null, "publicId": null,
"customDomain": null "customDomain": null,
"workspaceId": "proWorkspace",
"resultsTablePreferences": null,
"isArchived": false,
"isClosed": false,
"whatsAppCredentialsId": null
} }

View File

@ -1,34 +1,24 @@
{ {
"id": "d8z3y5ats5r0lyptw938re79", "version": "6",
"version": "4", "id": "cloo0wet7000h1aor38uwjxjw",
"createdAt": "2023-08-06T05:56:35.727Z",
"updatedAt": "2023-08-06T06:39:16.019Z",
"icon": "🍿",
"name": "Movie recommendation", "name": "Movie recommendation",
"folderId": null, "events": [
"groups": [
{ {
"id": "u6lpjibfjhyoqij5wjf9kvnl", "id": "u6lpjibfjhyoqij5wjf9kvnl",
"title": "Start", "outgoingEdgeId": "wfec8f4e1jtden2wqna6nrso",
"blocks": [ "graphCoordinates": { "x": 0, "y": 0 },
{ "type": "start"
"id": "rha69fygov33vym1hf6z837p", }
"type": "start", ],
"label": "Start", "groups": [
"groupId": "u6lpjibfjhyoqij5wjf9kvnl",
"outgoingEdgeId": "wfec8f4e1jtden2wqna6nrso"
}
],
"graphCoordinates": { "x": 0, "y": 0 }
},
{ {
"id": "mjnkukpkpvf4ha2g4n5m804v", "id": "mjnkukpkpvf4ha2g4n5m804v",
"title": "Menu", "title": "Menu",
"graphCoordinates": { "x": 243.1, "y": 12.32 },
"blocks": [ "blocks": [
{ {
"id": "kjlf184vxf0uorniwje28iqb", "id": "kjlf184vxf0uorniwje28iqb",
"type": "Set variable", "type": "Set variable",
"groupId": "mjnkukpkpvf4ha2g4n5m804v",
"options": { "options": {
"variableId": "vh5bxx07kl3016wr1undh2yb3", "variableId": "vh5bxx07kl3016wr1undh2yb3",
"expressionToEvaluate": "2f584d1ffe2b7fb082dd4e05038e9bd7" "expressionToEvaluate": "2f584d1ffe2b7fb082dd4e05038e9bd7"
@ -46,16 +36,14 @@
] ]
} }
] ]
}, }
"groupId": "mjnkukpkpvf4ha2g4n5m804v"
}, },
{ {
"id": "c7swi84rmdvrul0wz5kxtplm", "id": "c7swi84rmdvrul0wz5kxtplm",
"type": "image", "type": "image",
"content": { "content": {
"url": "https://media3.giphy.com/media/BElb9DVpHezcZufOhl/giphy-downsized.gif?cid=fe3852a3uwhsp1sc3j6avr625v5e94h1v8o3wfb1ii3xwswk&rid=giphy-downsized.gif&ct=g" "url": "https://media3.giphy.com/media/BElb9DVpHezcZufOhl/giphy-downsized.gif?cid=fe3852a3uwhsp1sc3j6avr625v5e94h1v8o3wfb1ii3xwswk&rid=giphy-downsized.gif&ct=g"
}, }
"groupId": "mjnkukpkpvf4ha2g4n5m804v"
}, },
{ {
"id": "nlihfc4ptxnxoktqblh6mcql", "id": "nlihfc4ptxnxoktqblh6mcql",
@ -67,16 +55,14 @@
"children": [{ "text": "It is powered by The Movie DB API 🚀" }] "children": [{ "text": "It is powered by The Movie DB API 🚀" }]
} }
] ]
}, }
"groupId": "mjnkukpkpvf4ha2g4n5m804v"
}, },
{ {
"id": "vr73urm54d9mq2oqg7ey1xh8", "id": "vr73urm54d9mq2oqg7ey1xh8",
"type": "image", "type": "image",
"content": { "content": {
"url": "https://www.themoviedb.org/assets/2/v4/logos/v2/blue_square_1-5bdc75aaebeb75dc7ae79426ddd9be3b2be1e342510f8202baf6bffa71d7f5c4.svg" "url": "https://www.themoviedb.org/assets/2/v4/logos/v2/blue_square_1-5bdc75aaebeb75dc7ae79426ddd9be3b2be1e342510f8202baf6bffa71d7f5c4.svg"
}, }
"groupId": "mjnkukpkpvf4ha2g4n5m804v"
}, },
{ {
"id": "g5yyuh9g75x7xa7fgqhhi1zz", "id": "g5yyuh9g75x7xa7fgqhhi1zz",
@ -85,8 +71,7 @@
"richText": [ "richText": [
{ "type": "p", "children": [{ "text": "How can I we help?" }] } { "type": "p", "children": [{ "text": "How can I we help?" }] }
] ]
}, }
"groupId": "mjnkukpkpvf4ha2g4n5m804v"
}, },
{ {
"id": "tzf45bvd8iquoxz7qgta8v94", "id": "tzf45bvd8iquoxz7qgta8v94",
@ -94,76 +79,65 @@
"items": [ "items": [
{ {
"id": "kaimvzg9igdtktgou5m3s1bw", "id": "kaimvzg9igdtktgou5m3s1bw",
"type": 0, "outgoingEdgeId": "t8qyjpigrz7cdl8gxl1wxlwj",
"blockId": "sodsq9mcigwvogmwx0t4jvil", "content": "Select a genre 💅"
"content": "Select a genre 💅",
"outgoingEdgeId": "t8qyjpigrz7cdl8gxl1wxlwj"
}, },
{ {
"id": "i8ls2f8inq2ovuijj6l7rbcq", "id": "i8ls2f8inq2ovuijj6l7rbcq",
"type": 0, "outgoingEdgeId": "tjn2ljosqyd4aj9dk8mnifsu",
"blockId": "sodsq9mcigwvogmwx0t4jvil", "content": "See what's trending 🔝"
"content": "See what's trending 🔝",
"outgoingEdgeId": "tjn2ljosqyd4aj9dk8mnifsu"
} }
], ]
"groupId": "mjnkukpkpvf4ha2g4n5m804v",
"options": { "buttonLabel": "Send", "isMultipleChoice": false }
} }
], ]
"graphCoordinates": { "x": 255.25, "y": 172.89 }
}, },
{ {
"id": "kq1g5z6pz4buot7sawqdrr3s", "id": "kq1g5z6pz4buot7sawqdrr3s",
"title": "Genre", "title": "Genre",
"graphCoordinates": { "x": 607.85, "y": 295.32 },
"blocks": [ "blocks": [
{ {
"id": "ecwz96cghzp4ji3lyx7taxt1", "id": "ecwz96cghzp4ji3lyx7taxt1",
"type": "text", "type": "text",
"content": { "content": {
"richText": [{ "type": "p", "children": [{ "text": "Sure!" }] }] "richText": [{ "type": "p", "children": [{ "text": "Sure!" }] }]
}, }
"groupId": "kq1g5z6pz4buot7sawqdrr3s"
}, },
{ {
"id": "gd4lt2pcljer6zaf7v9hkr1k", "id": "gd4lt2pcljer6zaf7v9hkr1k",
"type": "Webhook", "type": "Webhook",
"groupId": "kq1g5z6pz4buot7sawqdrr3s",
"options": { "options": {
"variablesForTest": [
{
"id": "oqbhwya4cewto5pfjmftjmpn",
"variableId": "vh5bxx07kl3016wr1undh2yb3",
"value": "2f584d1ffe2b7fb082dd4e05038e9bd7"
}
],
"responseVariableMapping": [
{
"id": "bm186wvb4e2aqj1myx5gc251",
"variableId": "vx0bbqzug4vk3zpc31ly8k7al",
"bodyPath": "data.genres.flatMap(item => item.name)"
},
{
"id": "xsrhvxf3hv74e2hkokmdflbc",
"variableId": "vwc00rydyp035vtb0nlaqyzwr",
"bodyPath": "data.genres.flatMap(item => item.id)"
}
],
"isAdvancedConfig": true,
"webhook": { "webhook": {
"id": "t4pht3ndfc8tu9geovi7czqm",
"url": "https://api.themoviedb.org/3/genre/movie/list",
"method": "GET",
"headers": [],
"queryParams": [ "queryParams": [
{ {
"id": "gq6m7x2k20qzrj752qi2zpmu", "id": "gq6m7x2k20qzrj752qi2zpmu",
"key": "api_key", "key": "api_key",
"value": "{{API Key}}" "value": "{{API Key}}"
} }
] ],
}, "method": "GET",
"isCustomBody": false, "url": "https://api.themoviedb.org/3/genre/movie/list"
"isAdvancedConfig": true, }
"variablesForTest": [
{
"id": "oqbhwya4cewto5pfjmftjmpn",
"value": "2f584d1ffe2b7fb082dd4e05038e9bd7",
"variableId": "vh5bxx07kl3016wr1undh2yb3"
}
],
"responseVariableMapping": [
{
"id": "bm186wvb4e2aqj1myx5gc251",
"bodyPath": "data.genres.flatMap(item => item.name)",
"variableId": "vx0bbqzug4vk3zpc31ly8k7al"
},
{
"id": "xsrhvxf3hv74e2hkokmdflbc",
"bodyPath": "data.genres.flatMap(item => item.id)",
"variableId": "vwc00rydyp035vtb0nlaqyzwr"
}
]
} }
}, },
{ {
@ -176,99 +150,82 @@
"children": [{ "text": "Select your desired genre 👇" }] "children": [{ "text": "Select your desired genre 👇" }]
} }
] ]
}, }
"groupId": "kq1g5z6pz4buot7sawqdrr3s"
}, },
{ {
"id": "nwuk2clo78hmnh4d0g31u9xg", "id": "nwuk2clo78hmnh4d0g31u9xg",
"type": "choice input", "type": "choice input",
"items": [ "items": [
{ { "id": "ri3avm9p0i96p8gx4028b6ye", "content": "Click to edit" }
"id": "ri3avm9p0i96p8gx4028b6ye",
"type": 0,
"blockId": "eqm19tzeh7kullwld8auoqy4",
"content": "Click to edit"
}
], ],
"groupId": "kq1g5z6pz4buot7sawqdrr3s",
"options": { "options": {
"variableId": "vkmbb3rb2hcfd2io1fhf7rz5x", "variableId": "vkmbb3rb2hcfd2io1fhf7rz5x",
"buttonLabel": "Send",
"isMultipleChoice": false,
"dynamicVariableId": "vx0bbqzug4vk3zpc31ly8k7al" "dynamicVariableId": "vx0bbqzug4vk3zpc31ly8k7al"
} }
}, },
{ {
"id": "j7pm34um4piuyabwlobjc356", "id": "j7pm34um4piuyabwlobjc356",
"outgoingEdgeId": "tfuuwjnpn7mftd5s65mbhytd",
"type": "Set variable", "type": "Set variable",
"groupId": "kq1g5z6pz4buot7sawqdrr3s",
"options": { "options": {
"type": "Map item with same index",
"isCode": true,
"variableId": "vwewa4yugqch2sswdpneszk3i", "variableId": "vwewa4yugqch2sswdpneszk3i",
"type": "Map item with same index",
"mapListItemParams": { "mapListItemParams": {
"baseItemVariableId": "vkmbb3rb2hcfd2io1fhf7rz5x", "baseItemVariableId": "vkmbb3rb2hcfd2io1fhf7rz5x",
"baseListVariableId": "vx0bbqzug4vk3zpc31ly8k7al", "baseListVariableId": "vx0bbqzug4vk3zpc31ly8k7al",
"targetListVariableId": "vwc00rydyp035vtb0nlaqyzwr" "targetListVariableId": "vwc00rydyp035vtb0nlaqyzwr"
}, }
"expressionToEvaluate": "{{Genre IDs}}.at({{Genres}}.indexOf({{Selected genre}}))" }
},
"outgoingEdgeId": "tfuuwjnpn7mftd5s65mbhytd"
} }
], ]
"graphCoordinates": { "x": 630.85, "y": 333.68 }
}, },
{ {
"id": "d6v9lh83c7zuwrhf2mmo6nxo", "id": "d6v9lh83c7zuwrhf2mmo6nxo",
"title": "Trending", "title": "Trending",
"graphCoordinates": { "x": 599.83, "y": 880.98 },
"blocks": [ "blocks": [
{ {
"id": "edokvbp15ubqeuydw9n7wf4w", "id": "edokvbp15ubqeuydw9n7wf4w",
"type": "text", "type": "text",
"content": { "content": {
"richText": [{ "type": "p", "children": [{ "text": "Sure!" }] }] "richText": [{ "type": "p", "children": [{ "text": "Sure!" }] }]
}, }
"groupId": "d6v9lh83c7zuwrhf2mmo6nxo"
}, },
{ {
"id": "pwxb57b8nc2bp764vcdstois", "id": "pwxb57b8nc2bp764vcdstois",
"type": "Webhook", "type": "Webhook",
"groupId": "d6v9lh83c7zuwrhf2mmo6nxo",
"options": { "options": {
"variablesForTest": [
{
"id": "oqbhwya4cewto5pfjmftjmpn",
"variableId": "vh5bxx07kl3016wr1undh2yb3",
"value": "2f584d1ffe2b7fb082dd4e05038e9bd7"
}
],
"responseVariableMapping": [
{
"id": "g5ga79m1dzgp28chaxlj2i72",
"variableId": "vkzk96oh1pmdjv2bt5ps60qc0",
"bodyPath": "data.results.flatMap(item => item.title)"
},
{
"id": "albmykstahw37np5gjuafxie",
"variableId": "vcmybxcoaytd2geo5sqx7v8hw",
"bodyPath": "data.results.flatMap(item => item.id)"
}
],
"isAdvancedConfig": true,
"webhook": { "webhook": {
"id": "a5oaijpqxo5a0mqrnjqg3tyt",
"url": "https://api.themoviedb.org/3/trending/movie/week",
"method": "GET",
"headers": [],
"queryParams": [ "queryParams": [
{ {
"id": "x9nxr63itm2lvbe8dmi53mi7", "id": "x9nxr63itm2lvbe8dmi53mi7",
"key": "api_key", "key": "api_key",
"value": "{{API Key}}" "value": "{{API Key}}"
} }
] ],
}, "method": "GET",
"isCustomBody": false, "url": "https://api.themoviedb.org/3/trending/movie/week"
"isAdvancedConfig": true, }
"variablesForTest": [
{
"id": "oqbhwya4cewto5pfjmftjmpn",
"value": "2f584d1ffe2b7fb082dd4e05038e9bd7",
"variableId": "vh5bxx07kl3016wr1undh2yb3"
}
],
"responseVariableMapping": [
{
"id": "g5ga79m1dzgp28chaxlj2i72",
"bodyPath": "data.results.flatMap(item => item.title)",
"variableId": "vkzk96oh1pmdjv2bt5ps60qc0"
},
{
"id": "albmykstahw37np5gjuafxie",
"bodyPath": "data.results.flatMap(item => item.id)",
"variableId": "vcmybxcoaytd2geo5sqx7v8hw"
}
]
} }
}, },
{ {
@ -281,51 +238,39 @@
"children": [{ "text": "Here are popular movies this week 👇" }] "children": [{ "text": "Here are popular movies this week 👇" }]
} }
] ]
}, }
"groupId": "d6v9lh83c7zuwrhf2mmo6nxo"
}, },
{ {
"id": "krcvvncnqtn99v0qe1dzudrk", "id": "krcvvncnqtn99v0qe1dzudrk",
"type": "choice input", "type": "choice input",
"items": [ "items": [
{ { "id": "dicb6lnv5kapkq0tygnx1abh", "content": "Click to edit" }
"id": "dicb6lnv5kapkq0tygnx1abh",
"type": 0,
"blockId": "stlcncbupmsjxjipi86s45hy",
"content": "Click to edit"
}
], ],
"groupId": "d6v9lh83c7zuwrhf2mmo6nxo",
"options": { "options": {
"variableId": "vulnb1om2fk8mvkcesl8s15cr", "variableId": "vulnb1om2fk8mvkcesl8s15cr",
"buttonLabel": "Send",
"isMultipleChoice": false,
"dynamicVariableId": "vkzk96oh1pmdjv2bt5ps60qc0" "dynamicVariableId": "vkzk96oh1pmdjv2bt5ps60qc0"
} }
}, },
{ {
"id": "mgn6uuw2yebmengsukjramjx", "id": "mgn6uuw2yebmengsukjramjx",
"outgoingEdgeId": "ual6xszx6tfcxqrnihc6zrvx",
"type": "Set variable", "type": "Set variable",
"groupId": "d6v9lh83c7zuwrhf2mmo6nxo",
"options": { "options": {
"type": "Map item with same index",
"isCode": true,
"variableId": "vzslfw8oyo1f08uo5rpkegn0x", "variableId": "vzslfw8oyo1f08uo5rpkegn0x",
"type": "Map item with same index",
"mapListItemParams": { "mapListItemParams": {
"baseItemVariableId": "vulnb1om2fk8mvkcesl8s15cr", "baseItemVariableId": "vulnb1om2fk8mvkcesl8s15cr",
"baseListVariableId": "vkzk96oh1pmdjv2bt5ps60qc0", "baseListVariableId": "vkzk96oh1pmdjv2bt5ps60qc0",
"targetListVariableId": "vcmybxcoaytd2geo5sqx7v8hw" "targetListVariableId": "vcmybxcoaytd2geo5sqx7v8hw"
}, }
"expressionToEvaluate": "{{Trending IDs}}.at({{Trending Movies}}.indexOf({{Selected Trending Movie}}))" }
},
"outgoingEdgeId": "ual6xszx6tfcxqrnihc6zrvx"
} }
], ]
"graphCoordinates": { "x": 628.03, "y": 965.53 }
}, },
{ {
"id": "v35sky44jzz9fkwwul2qxufl", "id": "v35sky44jzz9fkwwul2qxufl",
"title": "Movies by genre", "title": "Movies by genre",
"graphCoordinates": { "x": 952.84, "y": 294.85 },
"blocks": [ "blocks": [
{ {
"id": "g2pgwx5yr1ou9vkoy6gdwuor", "id": "g2pgwx5yr1ou9vkoy6gdwuor",
@ -341,19 +286,38 @@
] ]
} }
] ]
}, }
"groupId": "v35sky44jzz9fkwwul2qxufl"
}, },
{ {
"id": "a2datk3pv8o6xgitwjsq61m2", "id": "a2datk3pv8o6xgitwjsq61m2",
"type": "Webhook", "type": "Webhook",
"groupId": "v35sky44jzz9fkwwul2qxufl",
"options": { "options": {
"variablesForTest": [
{
"id": "oqbhwya4cewto5pfjmftjmpn",
"variableId": "vh5bxx07kl3016wr1undh2yb3",
"value": "2f584d1ffe2b7fb082dd4e05038e9bd7"
},
{
"id": "rofxlzwrcv1ksy8aub8cfi6p",
"variableId": "vwewa4yugqch2sswdpneszk3i",
"value": "16"
}
],
"responseVariableMapping": [
{
"id": "w8k1bxjsfkjxt64eev1ib96w",
"variableId": "vad8vq3jfyybxo4la57hfd529",
"bodyPath": "data.results.flatMap(item => item.title)"
},
{
"id": "zysikjyevakboax3czzec7nt",
"variableId": "vhc2pc1sv4xc778r9od2ctooz",
"bodyPath": "data.results.flatMap(item => item.id)"
}
],
"isAdvancedConfig": true,
"webhook": { "webhook": {
"id": "em7huyvp98pd6hr25md0l6hb",
"url": "https://api.themoviedb.org/3/discover/movie",
"method": "GET",
"headers": [],
"queryParams": [ "queryParams": [
{ {
"id": "mgwlp399a056o9jo93tjqp02", "id": "mgwlp399a056o9jo93tjqp02",
@ -365,78 +329,43 @@
"key": "with_genres", "key": "with_genres",
"value": "{{Selected genre ID}}" "value": "{{Selected genre ID}}"
} }
] ],
}, "method": "GET",
"isCustomBody": false, "url": "https://api.themoviedb.org/3/discover/movie"
"isAdvancedConfig": true, }
"variablesForTest": [
{
"id": "oqbhwya4cewto5pfjmftjmpn",
"value": "2f584d1ffe2b7fb082dd4e05038e9bd7",
"variableId": "vh5bxx07kl3016wr1undh2yb3"
},
{
"id": "rofxlzwrcv1ksy8aub8cfi6p",
"value": "16",
"variableId": "vwewa4yugqch2sswdpneszk3i"
}
],
"responseVariableMapping": [
{
"id": "w8k1bxjsfkjxt64eev1ib96w",
"bodyPath": "data.results.flatMap(item => item.title)",
"variableId": "vad8vq3jfyybxo4la57hfd529"
},
{
"id": "zysikjyevakboax3czzec7nt",
"bodyPath": "data.results.flatMap(item => item.id)",
"variableId": "vhc2pc1sv4xc778r9od2ctooz"
}
]
} }
}, },
{ {
"id": "tr5y76tx9ca336f8ob9odfa6", "id": "tr5y76tx9ca336f8ob9odfa6",
"type": "choice input", "type": "choice input",
"items": [ "items": [
{ { "id": "uy2xwxoqhqol852cqsq17r9l", "content": "Click to edit" }
"id": "uy2xwxoqhqol852cqsq17r9l",
"type": 0,
"blockId": "dxp0gakw90f3ckahjuphx5ir",
"content": "Click to edit"
}
], ],
"groupId": "v35sky44jzz9fkwwul2qxufl",
"options": { "options": {
"variableId": "vyyr3j2pu76uzvf88laai8snl", "variableId": "vyyr3j2pu76uzvf88laai8snl",
"buttonLabel": "Send",
"isMultipleChoice": false,
"dynamicVariableId": "vad8vq3jfyybxo4la57hfd529" "dynamicVariableId": "vad8vq3jfyybxo4la57hfd529"
} }
}, },
{ {
"id": "vudr8jrv2k3x0ubemt39tv7a", "id": "vudr8jrv2k3x0ubemt39tv7a",
"outgoingEdgeId": "r4wyd2185zhen98r5pmx53g9",
"type": "Set variable", "type": "Set variable",
"groupId": "v35sky44jzz9fkwwul2qxufl",
"options": { "options": {
"type": "Map item with same index",
"isCode": true,
"variableId": "vzslfw8oyo1f08uo5rpkegn0x", "variableId": "vzslfw8oyo1f08uo5rpkegn0x",
"type": "Map item with same index",
"mapListItemParams": { "mapListItemParams": {
"baseItemVariableId": "vyyr3j2pu76uzvf88laai8snl", "baseItemVariableId": "vyyr3j2pu76uzvf88laai8snl",
"baseListVariableId": "vad8vq3jfyybxo4la57hfd529", "baseListVariableId": "vad8vq3jfyybxo4la57hfd529",
"targetListVariableId": "vhc2pc1sv4xc778r9od2ctooz" "targetListVariableId": "vhc2pc1sv4xc778r9od2ctooz"
}, }
"expressionToEvaluate": "const movieIndex = {{Movies}}.indexOf({{Selected Movie}})\n\nreturn {{Movie IDs}}.at(movieIndex)" }
},
"outgoingEdgeId": "r4wyd2185zhen98r5pmx53g9"
} }
], ]
"graphCoordinates": { "x": 977.48, "y": 330.85 }
}, },
{ {
"id": "uozlg88loeb8xegu6y4le6k8", "id": "uozlg88loeb8xegu6y4le6k8",
"title": "Movie details", "title": "Movie details",
"graphCoordinates": { "x": 1151.05, "y": 913.34 },
"blocks": [ "blocks": [
{ {
"id": "ve9m7fromxw4tbm8558n8520", "id": "ve9m7fromxw4tbm8558n8520",
@ -445,66 +374,59 @@
"richText": [ "richText": [
{ "type": "p", "children": [{ "text": "Excellent choice 🔥" }] } { "type": "p", "children": [{ "text": "Excellent choice 🔥" }] }
] ]
}, }
"groupId": "uozlg88loeb8xegu6y4le6k8"
}, },
{ {
"id": "xag9d5i5td40kdt3poyq5g4b", "id": "xag9d5i5td40kdt3poyq5g4b",
"type": "Webhook", "type": "Webhook",
"groupId": "uozlg88loeb8xegu6y4le6k8",
"options": { "options": {
"variablesForTest": [
{
"id": "oqbhwya4cewto5pfjmftjmpn",
"variableId": "vh5bxx07kl3016wr1undh2yb3",
"value": "2f584d1ffe2b7fb082dd4e05038e9bd7"
},
{
"id": "ja5qwkznouhm00x8zvlghuk4",
"variableId": "vzslfw8oyo1f08uo5rpkegn0x",
"value": "965839"
}
],
"responseVariableMapping": [
{
"id": "dsfek7nejs1a7qqs4v61z709",
"variableId": "vdvjx1w1sorma4zq0qtsdqrdi",
"bodyPath": "data.imdb_id"
},
{
"id": "dtd0rrmz04m5gsi1gq855v1d",
"variableId": "vzns0wpumgo8vxjdty2w5t54a",
"bodyPath": "data.overview"
},
{
"id": "y53g06r3xml0f3jmpctlsgm1",
"variableId": "vzf5ryexokpr4dihiur2spm8z",
"bodyPath": "data.poster_path"
}
],
"isAdvancedConfig": true,
"webhook": { "webhook": {
"id": "ewrjdmbrm2yksvjrbp0z9duy",
"url": "https://api.themoviedb.org/3/movie/{{Selected Movie ID}}",
"method": "GET",
"headers": [],
"queryParams": [ "queryParams": [
{ {
"id": "f33u3unbezibfdv54kbkien3", "id": "f33u3unbezibfdv54kbkien3",
"key": "api_key", "key": "api_key",
"value": "{{API Key}}" "value": "{{API Key}}"
} }
] ],
}, "method": "GET",
"isCustomBody": false, "url": "https://api.themoviedb.org/3/movie/{{Selected Movie ID}}"
"isAdvancedConfig": true, }
"variablesForTest": [
{
"id": "oqbhwya4cewto5pfjmftjmpn",
"value": "2f584d1ffe2b7fb082dd4e05038e9bd7",
"variableId": "vh5bxx07kl3016wr1undh2yb3"
},
{
"id": "ja5qwkznouhm00x8zvlghuk4",
"value": "965839",
"variableId": "vzslfw8oyo1f08uo5rpkegn0x"
}
],
"responseVariableMapping": [
{
"id": "dsfek7nejs1a7qqs4v61z709",
"bodyPath": "data.imdb_id",
"variableId": "vdvjx1w1sorma4zq0qtsdqrdi"
},
{
"id": "dtd0rrmz04m5gsi1gq855v1d",
"bodyPath": "data.overview",
"variableId": "vzns0wpumgo8vxjdty2w5t54a"
},
{
"id": "y53g06r3xml0f3jmpctlsgm1",
"bodyPath": "data.poster_path",
"variableId": "vzf5ryexokpr4dihiur2spm8z"
}
]
} }
}, },
{ {
"id": "d0rsus9shxj8iowczbcaw53i", "id": "d0rsus9shxj8iowczbcaw53i",
"type": "Set variable", "type": "Set variable",
"groupId": "uozlg88loeb8xegu6y4le6k8",
"options": { "options": {
"isCode": false,
"variableId": "vwitf3um5uweynypc0hxxwm14", "variableId": "vwitf3um5uweynypc0hxxwm14",
"expressionToEvaluate": "https://image.tmdb.org/t/p/w185{{Poster path}}" "expressionToEvaluate": "https://image.tmdb.org/t/p/w185{{Poster path}}"
} }
@ -512,8 +434,7 @@
{ {
"id": "nqnry4c1z3wwcni8rwpduuhe", "id": "nqnry4c1z3wwcni8rwpduuhe",
"type": "image", "type": "image",
"content": { "url": "{{Poster URL}}" }, "content": { "url": "{{Poster URL}}" }
"groupId": "uozlg88loeb8xegu6y4le6k8"
}, },
{ {
"id": "lhljw54rdykyqtjiuh6jsl5c", "id": "lhljw54rdykyqtjiuh6jsl5c",
@ -522,8 +443,7 @@
"richText": [ "richText": [
{ "type": "p", "children": [{ "text": "{{Movie Overview}}" }] } { "type": "p", "children": [{ "text": "{{Movie Overview}}" }] }
] ]
}, }
"groupId": "uozlg88loeb8xegu6y4le6k8"
}, },
{ {
"id": "yifjhiamifo1y4ay7vols0mm", "id": "yifjhiamifo1y4ay7vols0mm",
@ -531,56 +451,100 @@
"items": [ "items": [
{ {
"id": "n4818dnrb4arw1xh5v0ot8vz", "id": "n4818dnrb4arw1xh5v0ot8vz",
"type": 0, "outgoingEdgeId": "fteu5frsbj8wejfhhwzuv8t1",
"blockId": "nahhsfc6hsok5sufxcknopxr", "content": "Watch the movie"
"content": "Watch the movie",
"outgoingEdgeId": "fteu5frsbj8wejfhhwzuv8t1"
}, },
{ {
"id": "j9d1pf2tndax0itezys7t73c", "id": "j9d1pf2tndax0itezys7t73c",
"type": 0, "outgoingEdgeId": "zb79atxs2itliks4d00e35uy",
"blockId": "nahhsfc6hsok5sufxcknopxr",
"content": "Find something else" "content": "Find something else"
} }
], ]
"groupId": "uozlg88loeb8xegu6y4le6k8",
"options": { "buttonLabel": "Send", "isMultipleChoice": false },
"outgoingEdgeId": "ntef5v9bt7vn4wg8s3dfm8yl"
} }
], ]
"graphCoordinates": { "x": 1151.05, "y": 913.34 }
}, },
{ {
"id": "x4d8cdsyzoqz6vzsurnb8twc", "id": "x4d8cdsyzoqz6vzsurnb8twc",
"title": "Redirect to IMDB", "title": "Redirect to IMDB",
"graphCoordinates": { "x": 1523.21, "y": 1433.33 },
"blocks": [ "blocks": [
{ {
"id": "mw0e0bzwiokhndkkncp9niu2", "id": "mw0e0bzwiokhndkkncp9niu2",
"type": "Redirect", "type": "Redirect",
"groupId": "x4d8cdsyzoqz6vzsurnb8twc",
"options": { "options": {
"url": "https://m.imdb.com/title/{{IMDB ID}}", "url": "https://m.imdb.com/title/{{IMDB ID}}"
"isNewTab": false
} }
} }
], ]
"graphCoordinates": { "x": 1616.55, "y": 1411.44 }
}, },
{ {
"id": "x9610wtdv125hg56wicm2qmv", "id": "x9610wtdv125hg56wicm2qmv",
"title": "Return to menu", "title": "",
"graphCoordinates": { "x": 1523.2, "y": 1620.1 },
"blocks": [ "blocks": [
{ {
"id": "efto9jivvcvomj3kltf57hbb", "id": "efto9jivvcvomj3kltf57hbb",
"type": "Jump", "type": "Jump",
"groupId": "x9610wtdv125hg56wicm2qmv",
"options": { "options": {
"blockId": "sodsq9mcigwvogmwx0t4jvil", "groupId": "mjnkukpkpvf4ha2g4n5m804v",
"groupId": "mjnkukpkpvf4ha2g4n5m804v" "blockId": "tzf45bvd8iquoxz7qgta8v94"
} }
} }
], ]
"graphCoordinates": { "x": 1619.34, "y": 1586.5 } }
],
"edges": [
{
"id": "wfec8f4e1jtden2wqna6nrso",
"from": { "eventId": "u6lpjibfjhyoqij5wjf9kvnl" },
"to": { "groupId": "mjnkukpkpvf4ha2g4n5m804v" }
},
{
"id": "t8qyjpigrz7cdl8gxl1wxlwj",
"from": {
"blockId": "tzf45bvd8iquoxz7qgta8v94",
"itemId": "kaimvzg9igdtktgou5m3s1bw"
},
"to": { "groupId": "kq1g5z6pz4buot7sawqdrr3s" }
},
{
"id": "tfuuwjnpn7mftd5s65mbhytd",
"from": { "blockId": "j7pm34um4piuyabwlobjc356" },
"to": { "groupId": "v35sky44jzz9fkwwul2qxufl" }
},
{
"id": "r4wyd2185zhen98r5pmx53g9",
"from": { "blockId": "vudr8jrv2k3x0ubemt39tv7a" },
"to": { "groupId": "uozlg88loeb8xegu6y4le6k8" }
},
{
"id": "fteu5frsbj8wejfhhwzuv8t1",
"from": {
"blockId": "yifjhiamifo1y4ay7vols0mm",
"itemId": "n4818dnrb4arw1xh5v0ot8vz"
},
"to": { "groupId": "x4d8cdsyzoqz6vzsurnb8twc" }
},
{
"id": "tjn2ljosqyd4aj9dk8mnifsu",
"from": {
"blockId": "tzf45bvd8iquoxz7qgta8v94",
"itemId": "i8ls2f8inq2ovuijj6l7rbcq"
},
"to": { "groupId": "d6v9lh83c7zuwrhf2mmo6nxo" }
},
{
"id": "ual6xszx6tfcxqrnihc6zrvx",
"from": { "blockId": "mgn6uuw2yebmengsukjramjx" },
"to": { "groupId": "uozlg88loeb8xegu6y4le6k8" }
},
{
"id": "zb79atxs2itliks4d00e35uy",
"from": {
"blockId": "yifjhiamifo1y4ay7vols0mm",
"itemId": "j9d1pf2tndax0itezys7t73c"
},
"to": { "groupId": "x9610wtdv125hg56wicm2qmv" }
} }
], ],
"variables": [ "variables": [
@ -601,109 +565,18 @@
{ "id": "vcmybxcoaytd2geo5sqx7v8hw", "name": "Trending IDs" }, { "id": "vcmybxcoaytd2geo5sqx7v8hw", "name": "Trending IDs" },
{ "id": "vulnb1om2fk8mvkcesl8s15cr", "name": "Selected Trending Movie" } { "id": "vulnb1om2fk8mvkcesl8s15cr", "name": "Selected Trending Movie" }
], ],
"edges": [ "theme": {},
{ "selectedThemeTemplateId": null,
"id": "wfec8f4e1jtden2wqna6nrso", "settings": {},
"to": { "groupId": "mjnkukpkpvf4ha2g4n5m804v" }, "createdAt": "2023-11-07T07:42:02.490Z",
"from": { "updatedAt": "2023-11-07T07:55:03.222Z",
"blockId": "rha69fygov33vym1hf6z837p", "icon": "🍿",
"groupId": "u6lpjibfjhyoqij5wjf9kvnl" "folderId": null,
}
},
{
"id": "t8qyjpigrz7cdl8gxl1wxlwj",
"to": { "groupId": "kq1g5z6pz4buot7sawqdrr3s" },
"from": {
"itemId": "kaimvzg9igdtktgou5m3s1bw",
"blockId": "tzf45bvd8iquoxz7qgta8v94",
"groupId": "mjnkukpkpvf4ha2g4n5m804v"
}
},
{
"id": "tfuuwjnpn7mftd5s65mbhytd",
"to": { "groupId": "v35sky44jzz9fkwwul2qxufl" },
"from": {
"blockId": "j7pm34um4piuyabwlobjc356",
"groupId": "kq1g5z6pz4buot7sawqdrr3s"
}
},
{
"id": "r4wyd2185zhen98r5pmx53g9",
"to": { "groupId": "uozlg88loeb8xegu6y4le6k8" },
"from": {
"blockId": "vudr8jrv2k3x0ubemt39tv7a",
"groupId": "v35sky44jzz9fkwwul2qxufl"
}
},
{
"id": "fteu5frsbj8wejfhhwzuv8t1",
"to": { "groupId": "x4d8cdsyzoqz6vzsurnb8twc" },
"from": {
"itemId": "n4818dnrb4arw1xh5v0ot8vz",
"blockId": "yifjhiamifo1y4ay7vols0mm",
"groupId": "uozlg88loeb8xegu6y4le6k8"
}
},
{
"id": "tjn2ljosqyd4aj9dk8mnifsu",
"to": { "groupId": "d6v9lh83c7zuwrhf2mmo6nxo" },
"from": {
"itemId": "i8ls2f8inq2ovuijj6l7rbcq",
"blockId": "tzf45bvd8iquoxz7qgta8v94",
"groupId": "mjnkukpkpvf4ha2g4n5m804v"
}
},
{
"id": "ntef5v9bt7vn4wg8s3dfm8yl",
"to": { "groupId": "x9610wtdv125hg56wicm2qmv" },
"from": {
"blockId": "yifjhiamifo1y4ay7vols0mm",
"groupId": "uozlg88loeb8xegu6y4le6k8"
}
},
{
"id": "ual6xszx6tfcxqrnihc6zrvx",
"to": { "groupId": "uozlg88loeb8xegu6y4le6k8" },
"from": {
"blockId": "mgn6uuw2yebmengsukjramjx",
"groupId": "d6v9lh83c7zuwrhf2mmo6nxo"
}
}
],
"theme": {
"chat": {
"inputs": {
"color": "#303235",
"backgroundColor": "#FFFFFF",
"placeholderColor": "#9095A0"
},
"buttons": { "color": "#FFFFFF", "backgroundColor": "#0d253f" },
"hostAvatar": {
"isEnabled": true
},
"hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" },
"guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#01b4e4" }
},
"general": {
"font": "Open Sans",
"background": { "type": "Color", "content": "#ffffff" }
}
},
"settings": {
"general": {
"isBrandingEnabled": false,
"isInputPrefillEnabled": true,
"isHideQueryParamsEnabled": true,
"isNewResultOnRefreshEnabled": true
},
"metadata": {
"description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form."
},
"typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 }
},
"publicId": null, "publicId": null,
"customDomain": null, "customDomain": null,
"workspaceId": "proWorkspace",
"resultsTablePreferences": null, "resultsTablePreferences": null,
"isArchived": false, "isArchived": false,
"isClosed": false "isClosed": false,
"whatsAppCredentialsId": null
} }

View File

@ -1,37 +1,27 @@
{ {
"id": "clesntjqu00011a4xkgffc3p0", "version": "6",
"version": "4", "id": "cloo0bge500071aorb4dadsju",
"createdAt": "2023-03-03T14:57:41.430Z",
"updatedAt": "2023-03-03T16:14:29.268Z",
"icon": "⭐",
"name": "NPS Survey", "name": "NPS Survey",
"folderId": null, "events": [
"groups": [
{ {
"id": "yu8qfeteutmum1ghb0wqshu9", "id": "yu8qfeteutmum1ghb0wqshu9",
"title": "Start", "outgoingEdgeId": "qtd5p5sya9w8yoknvbhy493i",
"blocks": [ "graphCoordinates": { "x": 0, "y": 0 },
{ "type": "start"
"id": "up8jk4o8xvbfqtzyd63hsrm5", }
"type": "start", ],
"label": "Start", "groups": [
"groupId": "yu8qfeteutmum1ghb0wqshu9",
"outgoingEdgeId": "qtd5p5sya9w8yoknvbhy493i"
}
],
"graphCoordinates": { "x": 0, "y": 0 }
},
{ {
"id": "g7l1tc86ty1r6x0yn0r2g1xo", "id": "g7l1tc86ty1r6x0yn0r2g1xo",
"title": "Intro", "title": "Intro",
"graphCoordinates": { "x": 10.99, "y": 85.96 },
"blocks": [ "blocks": [
{ {
"id": "vep990mmfbe64nqczp66xebw", "id": "vep990mmfbe64nqczp66xebw",
"type": "text", "type": "text",
"content": { "content": {
"richText": [{ "type": "p", "children": [{ "text": "Hey! 👋" }] }] "richText": [{ "type": "p", "children": [{ "text": "Hey! 👋" }] }]
}, }
"groupId": "g7l1tc86ty1r6x0yn0r2g1xo"
}, },
{ {
"id": "u1oeokc5j8bzwi4lwqyf7c8q", "id": "u1oeokc5j8bzwi4lwqyf7c8q",
@ -49,8 +39,7 @@
] ]
} }
] ]
}, }
"groupId": "g7l1tc86ty1r6x0yn0r2g1xo"
}, },
{ {
"id": "d3asw3zs2gahpxs3usun6lm5", "id": "d3asw3zs2gahpxs3usun6lm5",
@ -58,21 +47,17 @@
"items": [ "items": [
{ {
"id": "wvjhc2vrkqy8512y0wvmciex", "id": "wvjhc2vrkqy8512y0wvmciex",
"type": 0, "outgoingEdgeId": "sjeyoptun1yu805ry37je1ni",
"blockId": "d3asw3zs2gahpxs3usun6lm5", "content": "Sure!"
"content": "Sure!",
"outgoingEdgeId": "sjeyoptun1yu805ry37je1ni"
} }
], ]
"groupId": "g7l1tc86ty1r6x0yn0r2g1xo",
"options": { "buttonLabel": "Send", "isMultipleChoice": false }
} }
], ]
"graphCoordinates": { "x": 8.6484375, "y": 168.64453125 }
}, },
{ {
"id": "xgqei015z6d58gefpviz8053", "id": "xgqei015z6d58gefpviz8053",
"title": "Recommendation", "title": "Recommendation",
"graphCoordinates": { "x": 360.5, "y": 86.64 },
"blocks": [ "blocks": [
{ {
"id": "jcp3qhpb4wf95g0ylrp4e8zb", "id": "jcp3qhpb4wf95g0ylrp4e8zb",
@ -88,74 +73,61 @@
] ]
} }
] ]
}, }
"groupId": "xgqei015z6d58gefpviz8053"
}, },
{ {
"id": "bfvv74k8oz57kaqeqek3uen7", "id": "bfvv74k8oz57kaqeqek3uen7",
"type": "rating input", "type": "rating input",
"groupId": "xgqei015z6d58gefpviz8053",
"options": { "options": {
"variableId": "vwqc8tzl0380h30vxh07fekmm",
"labels": { "labels": {
"left": "Very unlikely", "left": "Very unlikely",
"right": "Very likely", "right": "Very likely"
"button": "Send"
}, },
"length": 10,
"buttonType": "Numbers",
"customIcon": { "isEnabled": false },
"variableId": "vwqc8tzl0380h30vxh07fekmm",
"isOneClickSubmitEnabled": true "isOneClickSubmitEnabled": true
} }
}, },
{ {
"id": "z76m5qjuy15sa6b0p1re0nkp", "id": "z76m5qjuy15sa6b0p1re0nkp",
"outgoingEdgeId": "niec249stbfa2obm9mkd1pgw",
"type": "Condition", "type": "Condition",
"items": [ "items": [
{ {
"id": "xy6ni2aj5dxys27itzbtvdzw", "id": "xy6ni2aj5dxys27itzbtvdzw",
"type": 1, "outgoingEdgeId": "zug5c4jy98sywgp1amtms6oc",
"blockId": "z76m5qjuy15sa6b0p1re0nkp",
"content": { "content": {
"comparisons": [ "comparisons": [
{ {
"id": "r7s1l7ljsv7ugnbaz4u3gy5a", "id": "r7s1l7ljsv7ugnbaz4u3gy5a",
"value": "8",
"variableId": "vwqc8tzl0380h30vxh07fekmm", "variableId": "vwqc8tzl0380h30vxh07fekmm",
"comparisonOperator": "Greater than" "comparisonOperator": "Greater than",
"value": "8"
} }
], ]
"logicalOperator": "AND" }
},
"outgoingEdgeId": "zug5c4jy98sywgp1amtms6oc"
}, },
{ {
"id": "vrhf4u4dt6u146eywqybgrk2", "id": "vrhf4u4dt6u146eywqybgrk2",
"type": 1, "outgoingEdgeId": "qb38wjfqzksaujoppzrrto25",
"blockId": "z76m5qjuy15sa6b0p1re0nkp",
"content": { "content": {
"comparisons": [ "comparisons": [
{ {
"id": "chowr4hsu9butjlwo0ul874g", "id": "chowr4hsu9butjlwo0ul874g",
"value": "6",
"variableId": "vwqc8tzl0380h30vxh07fekmm", "variableId": "vwqc8tzl0380h30vxh07fekmm",
"comparisonOperator": "Greater than" "comparisonOperator": "Greater than",
"value": "6"
} }
], ]
"logicalOperator": "AND" }
},
"outgoingEdgeId": "qb38wjfqzksaujoppzrrto25"
} }
], ]
"groupId": "xgqei015z6d58gefpviz8053",
"outgoingEdgeId": "niec249stbfa2obm9mkd1pgw"
} }
], ]
"graphCoordinates": { "x": 368.4088194304369, "y": 168.5078125 }
}, },
{ {
"id": "rp2r31gn1w5t1aeej96bhjj3", "id": "rp2r31gn1w5t1aeej96bhjj3",
"title": "Good", "title": "Good",
"graphCoordinates": { "x": 1078.85, "y": 292.9 },
"blocks": [ "blocks": [
{ {
"id": "izehojk23xug74tylpm0wbib", "id": "izehojk23xug74tylpm0wbib",
@ -167,11 +139,11 @@
"children": [{ "text": "I'm glad to hear that 😍" }] "children": [{ "text": "I'm glad to hear that 😍" }]
} }
] ]
}, }
"groupId": "rp2r31gn1w5t1aeej96bhjj3"
}, },
{ {
"id": "qj3e1cxwjub800r6g3lfa4ei", "id": "qj3e1cxwjub800r6g3lfa4ei",
"outgoingEdgeId": "hycn6wx0j9ug4wf5vzz9aytx",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
@ -180,36 +152,33 @@
"children": [{ "text": "Could you tell us why?" }] "children": [{ "text": "Could you tell us why?" }]
} }
] ]
}, }
"groupId": "rp2r31gn1w5t1aeej96bhjj3",
"outgoingEdgeId": "hycn6wx0j9ug4wf5vzz9aytx"
} }
], ]
"graphCoordinates": { "x": 1089.022509866445, "y": 366.18359375 }
}, },
{ {
"id": "sk1n3wpfit3uvfrh42fgcykm", "id": "sk1n3wpfit3uvfrh42fgcykm",
"title": "Why?", "title": "Why?",
"graphCoordinates": { "x": 1425.22, "y": 445.48 },
"blocks": [ "blocks": [
{ {
"id": "ro6a6dt7j3x99unduh5jm6an", "id": "ro6a6dt7j3x99unduh5jm6an",
"outgoingEdgeId": "y6gsa6pjrfeu8zi6evtzirs1",
"type": "text input", "type": "text input",
"groupId": "sk1n3wpfit3uvfrh42fgcykm",
"options": { "options": {
"isLong": true, "isLong": true
"labels": { "button": "Send", "placeholder": "Type your answer..." } }
},
"outgoingEdgeId": "y6gsa6pjrfeu8zi6evtzirs1"
} }
], ]
"graphCoordinates": { "x": 1448.80078125, "y": 435.79296875 }
}, },
{ {
"id": "qj9qgsbfv6u1f5oe1bjnwnu9", "id": "qj9qgsbfv6u1f5oe1bjnwnu9",
"title": "Bad", "title": "Bad",
"graphCoordinates": { "x": 1067.22, "y": 575.86 },
"blocks": [ "blocks": [
{ {
"id": "ou7airondk1mxm4inzzyyr1x", "id": "ou7airondk1mxm4inzzyyr1x",
"outgoingEdgeId": "glj5ishgke8i6s6eyjnmbel1",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
@ -218,67 +187,62 @@
"children": [{ "text": "Could you tell us what went wrong?" }] "children": [{ "text": "Could you tell us what went wrong?" }]
} }
] ]
}, }
"groupId": "qj9qgsbfv6u1f5oe1bjnwnu9",
"outgoingEdgeId": "glj5ishgke8i6s6eyjnmbel1"
} }
], ]
"graphCoordinates": { "x": 1089.9140625, "y": 574.9296875 }
}, },
{ {
"id": "tavt0nuh54ck1hvq74kt74vf", "id": "tavt0nuh54ck1hvq74kt74vf",
"title": "Set type", "title": "Set type",
"graphCoordinates": { "x": 726.83, "y": 234.02 },
"blocks": [ "blocks": [
{ {
"id": "vdythdfi91vr47ipbfalddc6", "id": "vdythdfi91vr47ipbfalddc6",
"outgoingEdgeId": "r74zv3gamsln3dbmp1gvxpa2",
"type": "Set variable", "type": "Set variable",
"groupId": "tavt0nuh54ck1hvq74kt74vf",
"options": { "options": {
"variableId": "vcgkjbh8intf2cql1oteyj4mu", "variableId": "vcgkjbh8intf2cql1oteyj4mu",
"expressionToEvaluate": "Promoter" "expressionToEvaluate": "Promoter"
}, }
"outgoingEdgeId": "r74zv3gamsln3dbmp1gvxpa2"
} }
], ]
"graphCoordinates": { "x": 740.34375, "y": 319.4375 }
}, },
{ {
"id": "e887eoxfamv45hj8bz47jize", "id": "e887eoxfamv45hj8bz47jize",
"title": "Set type", "title": "Set type",
"graphCoordinates": { "x": 722.39, "y": 399.91 },
"blocks": [ "blocks": [
{ {
"id": "w40rjuv0avoetpdj6l5nbiz6", "id": "w40rjuv0avoetpdj6l5nbiz6",
"outgoingEdgeId": "x62wj4inzidyj03ktiyu0g81",
"type": "Set variable", "type": "Set variable",
"groupId": "e887eoxfamv45hj8bz47jize",
"options": { "options": {
"variableId": "vcgkjbh8intf2cql1oteyj4mu", "variableId": "vcgkjbh8intf2cql1oteyj4mu",
"expressionToEvaluate": "Neutral" "expressionToEvaluate": "Neutral"
}, }
"outgoingEdgeId": "x62wj4inzidyj03ktiyu0g81"
} }
], ]
"graphCoordinates": { "x": 738.046875, "y": 480.91015625 }
}, },
{ {
"id": "z4qtvedlz3mzcj4jdnfet2dc", "id": "z4qtvedlz3mzcj4jdnfet2dc",
"title": "Set type", "title": "Set type",
"graphCoordinates": { "x": 722.56, "y": 566.11 },
"blocks": [ "blocks": [
{ {
"id": "melr0p8nxssxe1qyat748uyy", "id": "melr0p8nxssxe1qyat748uyy",
"outgoingEdgeId": "q5xllqzy4x1q3tdvpr1piwgi",
"type": "Set variable", "type": "Set variable",
"groupId": "z4qtvedlz3mzcj4jdnfet2dc",
"options": { "options": {
"variableId": "vcgkjbh8intf2cql1oteyj4mu", "variableId": "vcgkjbh8intf2cql1oteyj4mu",
"expressionToEvaluate": "Detractor" "expressionToEvaluate": "Detractor"
}, }
"outgoingEdgeId": "q5xllqzy4x1q3tdvpr1piwgi"
} }
], ]
"graphCoordinates": { "x": 738.5078125, "y": 635.96484375 }
}, },
{ {
"id": "l7fupza0yi6os0ix6heyd7jz", "id": "l7fupza0yi6os0ix6heyd7jz",
"title": "Final segmentation", "title": "Final segmentation",
"graphCoordinates": { "x": 1777.5859375, "y": 396.8453917968819 },
"blocks": [ "blocks": [
{ {
"id": "z4gsshsckqdu6m1umartgxgb", "id": "z4gsshsckqdu6m1umartgxgb",
@ -286,64 +250,54 @@
"items": [ "items": [
{ {
"id": "vd6ls562brvt5kld746ao63x", "id": "vd6ls562brvt5kld746ao63x",
"type": 1, "outgoingEdgeId": "fcels3dp2kabntjscmirxtl7",
"blockId": "z4gsshsckqdu6m1umartgxgb",
"content": { "content": {
"comparisons": [ "comparisons": [
{ {
"id": "gclfcip3hr0p4vzk5o8n60ru", "id": "gclfcip3hr0p4vzk5o8n60ru",
"value": "Promoter",
"variableId": "vcgkjbh8intf2cql1oteyj4mu", "variableId": "vcgkjbh8intf2cql1oteyj4mu",
"comparisonOperator": "Equal to" "comparisonOperator": "Equal to",
"value": "Promoter"
} }
], ]
"logicalOperator": "AND" }
},
"outgoingEdgeId": "fcels3dp2kabntjscmirxtl7"
}, },
{ {
"id": "vey2i7kouphj3dgzz1rtwuxb", "id": "vey2i7kouphj3dgzz1rtwuxb",
"type": 1, "outgoingEdgeId": "jyen1rcq5cxek118gkio0u6d",
"blockId": "z4gsshsckqdu6m1umartgxgb",
"content": { "content": {
"comparisons": [ "comparisons": [
{ {
"id": "p7shnc0g3b377oip57r7xneq", "id": "p7shnc0g3b377oip57r7xneq",
"value": "Neutral",
"variableId": "vcgkjbh8intf2cql1oteyj4mu", "variableId": "vcgkjbh8intf2cql1oteyj4mu",
"comparisonOperator": "Equal to" "comparisonOperator": "Equal to",
"value": "Neutral"
} }
], ]
"logicalOperator": "AND" }
},
"outgoingEdgeId": "jyen1rcq5cxek118gkio0u6d"
}, },
{ {
"id": "cdi4c43wbyi3ajdns5klfg1g", "id": "cdi4c43wbyi3ajdns5klfg1g",
"type": 1, "outgoingEdgeId": "jjymvdpeyfqu2qpo6hh2zxeo",
"blockId": "z4gsshsckqdu6m1umartgxgb",
"content": { "content": {
"comparisons": [ "comparisons": [
{ {
"id": "iy13qo2guletobbkauklye7a", "id": "iy13qo2guletobbkauklye7a",
"value": "Detractor",
"variableId": "vcgkjbh8intf2cql1oteyj4mu", "variableId": "vcgkjbh8intf2cql1oteyj4mu",
"comparisonOperator": "Equal to" "comparisonOperator": "Equal to",
"value": "Detractor"
} }
], ]
"logicalOperator": "AND" }
},
"outgoingEdgeId": "jjymvdpeyfqu2qpo6hh2zxeo"
} }
], ]
"groupId": "l7fupza0yi6os0ix6heyd7jz"
} }
], ]
"graphCoordinates": { "x": 1777.5859375, "y": 396.8453917968819 }
}, },
{ {
"id": "pp1ncsdaki07pfq5pjl53v6r", "id": "pp1ncsdaki07pfq5pjl53v6r",
"title": "Capterra?", "title": "Capterra?",
"graphCoordinates": { "x": 2160.71875, "y": 69.58984375 },
"blocks": [ "blocks": [
{ {
"id": "eixinwxcgsng6v8blw6jdgwy", "id": "eixinwxcgsng6v8blw6jdgwy",
@ -352,8 +306,7 @@
"richText": [ "richText": [
{ "type": "p", "children": [{ "text": "Thank you! 🙏" }] } { "type": "p", "children": [{ "text": "Thank you! 🙏" }] }
] ]
}, }
"groupId": "pp1ncsdaki07pfq5pjl53v6r"
}, },
{ {
"id": "cjqu4wje2zr8i5ehivxv5567", "id": "cjqu4wje2zr8i5ehivxv5567",
@ -367,8 +320,7 @@
] ]
} }
] ]
}, }
"groupId": "pp1ncsdaki07pfq5pjl53v6r"
}, },
{ {
"id": "v9pf4n5kcwon4g0yvwwc6vk3", "id": "v9pf4n5kcwon4g0yvwwc6vk3",
@ -376,28 +328,22 @@
"items": [ "items": [
{ {
"id": "y34d4iij8y9qrt28y240x7vm", "id": "y34d4iij8y9qrt28y240x7vm",
"type": 0, "outgoingEdgeId": "lw33kviri91z1mvxb87kaew0",
"blockId": "v9pf4n5kcwon4g0yvwwc6vk3", "content": "Sure!"
"content": "Sure!",
"outgoingEdgeId": "lw33kviri91z1mvxb87kaew0"
}, },
{ {
"id": "l7txnq6jtm0niynklcpzb21u", "id": "l7txnq6jtm0niynklcpzb21u",
"type": 0, "outgoingEdgeId": "wjcvbnj1drs6if1p21a8yokf",
"blockId": "v9pf4n5kcwon4g0yvwwc6vk3", "content": "Maybe later"
"content": "Maybe later",
"outgoingEdgeId": "wjcvbnj1drs6if1p21a8yokf"
} }
], ]
"groupId": "pp1ncsdaki07pfq5pjl53v6r",
"options": { "buttonLabel": "Send", "isMultipleChoice": false }
} }
], ]
"graphCoordinates": { "x": 2160.71875, "y": 69.58984375 }
}, },
{ {
"id": "znljx8q0q2ggih0ipu28ryby", "id": "znljx8q0q2ggih0ipu28ryby",
"title": "Bye cheerful", "title": "Bye cheerful",
"graphCoordinates": { "x": 2167.570274174784, "y": 543.712381679639 },
"blocks": [ "blocks": [
{ {
"id": "m1my2b6gqq2hgfecw1vs2vcm", "id": "m1my2b6gqq2hgfecw1vs2vcm",
@ -411,8 +357,7 @@
] ]
} }
] ]
}, }
"groupId": "znljx8q0q2ggih0ipu28ryby"
}, },
{ {
"id": "fyl3k7qc6jdmc8t38b9wkcrh", "id": "fyl3k7qc6jdmc8t38b9wkcrh",
@ -421,23 +366,21 @@
"richText": [ "richText": [
{ "type": "p", "children": [{ "text": "Have a beautiful day!" }] } { "type": "p", "children": [{ "text": "Have a beautiful day!" }] }
] ]
}, }
"groupId": "znljx8q0q2ggih0ipu28ryby"
}, },
{ {
"id": "qobvos2ihgxb8e729ur8b2rv", "id": "qobvos2ihgxb8e729ur8b2rv",
"type": "image", "type": "image",
"content": { "content": {
"url": "https://media3.giphy.com/media/qC2REWsp3fQ1v2mm74/giphy.gif?cid=fe3852a38k350b15tly68dp7plh5iskmlonklrofvce975cq&rid=giphy.gif&ct=g" "url": "https://media3.giphy.com/media/qC2REWsp3fQ1v2mm74/giphy.gif?cid=fe3852a38k350b15tly68dp7plh5iskmlonklrofvce975cq&rid=giphy.gif&ct=g"
}, }
"groupId": "znljx8q0q2ggih0ipu28ryby"
} }
], ]
"graphCoordinates": { "x": 2167.5702741747837, "y": 543.712381679639 }
}, },
{ {
"id": "vvbtgh5ptk49shyjn3zn6d71", "id": "vvbtgh5ptk49shyjn3zn6d71",
"title": "Bye sad", "title": "Bye sad",
"graphCoordinates": { "x": 2173.366603864535, "y": 949.7063235658585 },
"blocks": [ "blocks": [
{ {
"id": "dfisk4xq8csn0t2aute6hbsd", "id": "dfisk4xq8csn0t2aute6hbsd",
@ -453,8 +396,7 @@
] ]
} }
] ]
}, }
"groupId": "vvbtgh5ptk49shyjn3zn6d71"
}, },
{ {
"id": "u6vs0akagfjg63zq8z1rcc14", "id": "u6vs0akagfjg63zq8z1rcc14",
@ -471,23 +413,21 @@
] ]
} }
] ]
}, }
"groupId": "vvbtgh5ptk49shyjn3zn6d71"
}, },
{ {
"id": "lfk1wt96u8yrtfkof6lrianc", "id": "lfk1wt96u8yrtfkof6lrianc",
"type": "image", "type": "image",
"content": { "content": {
"url": "https://media1.giphy.com/media/kaBU6pgv0OsPHz2yxy/giphy-downsized.gif?cid=fe3852a30aonhd3he63idx7116fsc1sydsan2ggr9uq4hs9j&rid=giphy-downsized.gif&ct=g" "url": "https://media1.giphy.com/media/kaBU6pgv0OsPHz2yxy/giphy-downsized.gif?cid=fe3852a30aonhd3he63idx7116fsc1sydsan2ggr9uq4hs9j&rid=giphy-downsized.gif&ct=g"
}, }
"groupId": "vvbtgh5ptk49shyjn3zn6d71"
} }
], ]
"graphCoordinates": { "x": 2173.3666038645347, "y": 949.7063235658585 }
}, },
{ {
"id": "mwfu8ot0z37zfq2fbo5rcyrl", "id": "mwfu8ot0z37zfq2fbo5rcyrl",
"title": "Redirect Capterra", "title": "Redirect Capterra",
"graphCoordinates": { "x": 2531.28515625, "y": 300.828125 },
"blocks": [ "blocks": [
{ {
"id": "cd8ftyg6tkjggncxuo242u3j", "id": "cd8ftyg6tkjggncxuo242u3j",
@ -496,8 +436,7 @@
"richText": [ "richText": [
{ "type": "p", "children": [{ "text": "Amazing 🤩" }] } { "type": "p", "children": [{ "text": "Amazing 🤩" }] }
] ]
}, }
"groupId": "mwfu8ot0z37zfq2fbo5rcyrl"
}, },
{ {
"id": "nigypz7fhnt07440o0829o81", "id": "nigypz7fhnt07440o0829o81",
@ -509,209 +448,148 @@
"children": [{ "text": "Let me take you there..." }] "children": [{ "text": "Let me take you there..." }]
} }
] ]
}, }
"groupId": "mwfu8ot0z37zfq2fbo5rcyrl"
}, },
{ {
"id": "xr1or6dcptogabyvv6zepmw8", "id": "xr1or6dcptogabyvv6zepmw8",
"type": "Wait", "type": "Wait",
"groupId": "mwfu8ot0z37zfq2fbo5rcyrl",
"options": { "secondsToWaitFor": "1" } "options": { "secondsToWaitFor": "1" }
}, },
{ {
"id": "bfyw1eabougkp2aqlrcrf6lz", "id": "bfyw1eabougkp2aqlrcrf6lz",
"type": "Redirect", "type": "Redirect",
"groupId": "mwfu8ot0z37zfq2fbo5rcyrl",
"options": { "options": {
"url": "https://www.capterra.com/p/233968/Typebot/", "url": "https://www.capterra.com/p/233968/Typebot/"
"isNewTab": false
} }
} }
], ]
"graphCoordinates": { "x": 2531.28515625, "y": 300.828125 } }
],
"edges": [
{
"id": "qtd5p5sya9w8yoknvbhy493i",
"from": { "eventId": "yu8qfeteutmum1ghb0wqshu9" },
"to": { "groupId": "g7l1tc86ty1r6x0yn0r2g1xo" }
},
{
"id": "glj5ishgke8i6s6eyjnmbel1",
"from": { "blockId": "ou7airondk1mxm4inzzyyr1x" },
"to": { "groupId": "sk1n3wpfit3uvfrh42fgcykm" }
},
{
"id": "hycn6wx0j9ug4wf5vzz9aytx",
"from": { "blockId": "qj3e1cxwjub800r6g3lfa4ei" },
"to": { "groupId": "sk1n3wpfit3uvfrh42fgcykm" }
},
{
"id": "zug5c4jy98sywgp1amtms6oc",
"from": {
"blockId": "z76m5qjuy15sa6b0p1re0nkp",
"itemId": "xy6ni2aj5dxys27itzbtvdzw"
},
"to": { "groupId": "tavt0nuh54ck1hvq74kt74vf" }
},
{
"id": "niec249stbfa2obm9mkd1pgw",
"from": { "blockId": "z76m5qjuy15sa6b0p1re0nkp" },
"to": { "groupId": "z4qtvedlz3mzcj4jdnfet2dc" }
},
{
"id": "qb38wjfqzksaujoppzrrto25",
"from": {
"blockId": "z76m5qjuy15sa6b0p1re0nkp",
"itemId": "vrhf4u4dt6u146eywqybgrk2"
},
"to": { "groupId": "e887eoxfamv45hj8bz47jize" }
},
{
"id": "r74zv3gamsln3dbmp1gvxpa2",
"from": { "blockId": "vdythdfi91vr47ipbfalddc6" },
"to": { "groupId": "rp2r31gn1w5t1aeej96bhjj3" }
},
{
"id": "x62wj4inzidyj03ktiyu0g81",
"from": { "blockId": "w40rjuv0avoetpdj6l5nbiz6" },
"to": {
"groupId": "rp2r31gn1w5t1aeej96bhjj3",
"blockId": "qj3e1cxwjub800r6g3lfa4ei"
}
},
{
"id": "q5xllqzy4x1q3tdvpr1piwgi",
"from": { "blockId": "melr0p8nxssxe1qyat748uyy" },
"to": { "groupId": "qj9qgsbfv6u1f5oe1bjnwnu9" }
},
{
"id": "y6gsa6pjrfeu8zi6evtzirs1",
"from": { "blockId": "ro6a6dt7j3x99unduh5jm6an" },
"to": { "groupId": "l7fupza0yi6os0ix6heyd7jz" }
},
{
"id": "jjymvdpeyfqu2qpo6hh2zxeo",
"from": {
"blockId": "z4gsshsckqdu6m1umartgxgb",
"itemId": "cdi4c43wbyi3ajdns5klfg1g"
},
"to": { "groupId": "vvbtgh5ptk49shyjn3zn6d71" }
},
{
"id": "jyen1rcq5cxek118gkio0u6d",
"from": {
"blockId": "z4gsshsckqdu6m1umartgxgb",
"itemId": "vey2i7kouphj3dgzz1rtwuxb"
},
"to": { "groupId": "znljx8q0q2ggih0ipu28ryby" }
},
{
"id": "wjcvbnj1drs6if1p21a8yokf",
"from": {
"blockId": "v9pf4n5kcwon4g0yvwwc6vk3",
"itemId": "l7txnq6jtm0niynklcpzb21u"
},
"to": { "groupId": "znljx8q0q2ggih0ipu28ryby" }
},
{
"id": "lw33kviri91z1mvxb87kaew0",
"from": {
"blockId": "v9pf4n5kcwon4g0yvwwc6vk3",
"itemId": "y34d4iij8y9qrt28y240x7vm"
},
"to": { "groupId": "mwfu8ot0z37zfq2fbo5rcyrl" }
},
{
"id": "sjeyoptun1yu805ry37je1ni",
"from": {
"blockId": "d3asw3zs2gahpxs3usun6lm5",
"itemId": "wvjhc2vrkqy8512y0wvmciex"
},
"to": { "groupId": "xgqei015z6d58gefpviz8053" }
},
{
"id": "fcels3dp2kabntjscmirxtl7",
"from": {
"blockId": "z4gsshsckqdu6m1umartgxgb",
"itemId": "vd6ls562brvt5kld746ao63x"
},
"to": { "groupId": "pp1ncsdaki07pfq5pjl53v6r" }
} }
], ],
"variables": [ "variables": [
{ "id": "vwqc8tzl0380h30vxh07fekmm", "name": "Recommend rate" }, { "id": "vwqc8tzl0380h30vxh07fekmm", "name": "Recommend rate" },
{ "id": "vcgkjbh8intf2cql1oteyj4mu", "name": "Type" } { "id": "vcgkjbh8intf2cql1oteyj4mu", "name": "Type" }
], ],
"edges": [ "theme": {},
{ "selectedThemeTemplateId": null,
"id": "qtd5p5sya9w8yoknvbhy493i", "settings": {},
"to": { "groupId": "g7l1tc86ty1r6x0yn0r2g1xo" }, "createdAt": "2023-11-07T07:25:44.765Z",
"from": { "updatedAt": "2023-11-07T07:26:12.044Z",
"blockId": "up8jk4o8xvbfqtzyd63hsrm5", "icon": "⭐",
"groupId": "yu8qfeteutmum1ghb0wqshu9" "folderId": null,
}
},
{
"id": "glj5ishgke8i6s6eyjnmbel1",
"to": { "groupId": "sk1n3wpfit3uvfrh42fgcykm" },
"from": {
"blockId": "ou7airondk1mxm4inzzyyr1x",
"groupId": "qj9qgsbfv6u1f5oe1bjnwnu9"
}
},
{
"id": "hycn6wx0j9ug4wf5vzz9aytx",
"to": { "groupId": "sk1n3wpfit3uvfrh42fgcykm" },
"from": {
"blockId": "qj3e1cxwjub800r6g3lfa4ei",
"groupId": "rp2r31gn1w5t1aeej96bhjj3"
}
},
{
"id": "zug5c4jy98sywgp1amtms6oc",
"to": { "groupId": "tavt0nuh54ck1hvq74kt74vf" },
"from": {
"itemId": "xy6ni2aj5dxys27itzbtvdzw",
"blockId": "z76m5qjuy15sa6b0p1re0nkp",
"groupId": "xgqei015z6d58gefpviz8053"
}
},
{
"id": "niec249stbfa2obm9mkd1pgw",
"to": { "groupId": "z4qtvedlz3mzcj4jdnfet2dc" },
"from": {
"blockId": "z76m5qjuy15sa6b0p1re0nkp",
"groupId": "xgqei015z6d58gefpviz8053"
}
},
{
"id": "qb38wjfqzksaujoppzrrto25",
"to": { "groupId": "e887eoxfamv45hj8bz47jize" },
"from": {
"itemId": "vrhf4u4dt6u146eywqybgrk2",
"blockId": "z76m5qjuy15sa6b0p1re0nkp",
"groupId": "xgqei015z6d58gefpviz8053"
}
},
{
"id": "r74zv3gamsln3dbmp1gvxpa2",
"to": { "groupId": "rp2r31gn1w5t1aeej96bhjj3" },
"from": {
"blockId": "vdythdfi91vr47ipbfalddc6",
"groupId": "tavt0nuh54ck1hvq74kt74vf"
}
},
{
"id": "x62wj4inzidyj03ktiyu0g81",
"to": {
"blockId": "qj3e1cxwjub800r6g3lfa4ei",
"groupId": "rp2r31gn1w5t1aeej96bhjj3"
},
"from": {
"blockId": "w40rjuv0avoetpdj6l5nbiz6",
"groupId": "e887eoxfamv45hj8bz47jize"
}
},
{
"id": "q5xllqzy4x1q3tdvpr1piwgi",
"to": { "groupId": "qj9qgsbfv6u1f5oe1bjnwnu9" },
"from": {
"blockId": "melr0p8nxssxe1qyat748uyy",
"groupId": "z4qtvedlz3mzcj4jdnfet2dc"
}
},
{
"id": "y6gsa6pjrfeu8zi6evtzirs1",
"to": { "groupId": "l7fupza0yi6os0ix6heyd7jz" },
"from": {
"blockId": "ro6a6dt7j3x99unduh5jm6an",
"groupId": "sk1n3wpfit3uvfrh42fgcykm"
}
},
{
"id": "jjymvdpeyfqu2qpo6hh2zxeo",
"to": { "groupId": "vvbtgh5ptk49shyjn3zn6d71" },
"from": {
"itemId": "cdi4c43wbyi3ajdns5klfg1g",
"blockId": "z4gsshsckqdu6m1umartgxgb",
"groupId": "l7fupza0yi6os0ix6heyd7jz"
}
},
{
"id": "jyen1rcq5cxek118gkio0u6d",
"to": { "groupId": "znljx8q0q2ggih0ipu28ryby" },
"from": {
"itemId": "vey2i7kouphj3dgzz1rtwuxb",
"blockId": "z4gsshsckqdu6m1umartgxgb",
"groupId": "l7fupza0yi6os0ix6heyd7jz"
}
},
{
"id": "wjcvbnj1drs6if1p21a8yokf",
"to": { "groupId": "znljx8q0q2ggih0ipu28ryby" },
"from": {
"itemId": "l7txnq6jtm0niynklcpzb21u",
"blockId": "v9pf4n5kcwon4g0yvwwc6vk3",
"groupId": "pp1ncsdaki07pfq5pjl53v6r"
}
},
{
"id": "lw33kviri91z1mvxb87kaew0",
"to": { "groupId": "mwfu8ot0z37zfq2fbo5rcyrl" },
"from": {
"itemId": "y34d4iij8y9qrt28y240x7vm",
"blockId": "v9pf4n5kcwon4g0yvwwc6vk3",
"groupId": "pp1ncsdaki07pfq5pjl53v6r"
}
},
{
"id": "sjeyoptun1yu805ry37je1ni",
"to": { "groupId": "xgqei015z6d58gefpviz8053" },
"from": {
"itemId": "wvjhc2vrkqy8512y0wvmciex",
"blockId": "d3asw3zs2gahpxs3usun6lm5",
"groupId": "g7l1tc86ty1r6x0yn0r2g1xo"
}
},
{
"id": "fcels3dp2kabntjscmirxtl7",
"to": { "groupId": "pp1ncsdaki07pfq5pjl53v6r" },
"from": {
"itemId": "vd6ls562brvt5kld746ao63x",
"blockId": "z4gsshsckqdu6m1umartgxgb",
"groupId": "l7fupza0yi6os0ix6heyd7jz"
}
}
],
"theme": {
"chat": {
"inputs": {
"color": "#303235",
"backgroundColor": "#FFFFFF",
"placeholderColor": "#9095A0"
},
"buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" },
"hostAvatar": {
"isEnabled": true
},
"hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" },
"guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" }
},
"general": {
"font": "Open Sans",
"background": { "type": "Color", "content": "#ffffff" }
}
},
"settings": {
"general": {
"isBrandingEnabled": false,
"isInputPrefillEnabled": true,
"isResultSavingEnabled": true,
"isHideQueryParamsEnabled": true,
"isNewResultOnRefreshEnabled": true
},
"metadata": {
"description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form."
},
"typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 }
},
"publicId": null, "publicId": null,
"customDomain": null, "customDomain": null,
"workspaceId": "proWorkspace", "workspaceId": "proWorkspace",
"resultsTablePreferences": null, "resultsTablePreferences": null,
"isArchived": false, "isArchived": false,
"isClosed": false "isClosed": false,
"whatsAppCredentialsId": null
} }

View File

@ -1,29 +1,20 @@
{ {
"id": "qkvenb8ur2y0ahlbckmx7law", "version": "6",
"version": "4", "id": "cloo0gjvx00091aoryw72ns37",
"createdAt": "2023-02-22T14:26:28.592Z",
"updatedAt": "2023-02-22T14:28:05.063Z",
"icon": null,
"name": "Onboarding copy", "name": "Onboarding copy",
"folderId": null, "events": [
"groups": [
{ {
"id": "yp9qsayuwzhihxc7gzt68osm", "id": "yp9qsayuwzhihxc7gzt68osm",
"title": "Start", "outgoingEdgeId": "qehono05saho85xk59apfvtr",
"blocks": [ "graphCoordinates": { "x": 0, "y": 0 },
{ "type": "start"
"id": "cl1265zct0001mb1afel460do", }
"type": "start", ],
"label": "Start", "groups": [
"groupId": "yp9qsayuwzhihxc7gzt68osm",
"outgoingEdgeId": "qehono05saho85xk59apfvtr"
}
],
"graphCoordinates": { "x": 0, "y": 0 }
},
{ {
"id": "az9nafw4tu9b6dyh3cvutlek", "id": "az9nafw4tu9b6dyh3cvutlek",
"title": "Name", "title": "Name",
"graphCoordinates": { "x": 247.01, "y": 1.45 },
"blocks": [ "blocks": [
{ {
"id": "cl1267q2c000e2e6dynjeg83n", "id": "cl1267q2c000e2e6dynjeg83n",
@ -32,8 +23,7 @@
"richText": [ "richText": [
{ "type": "p", "children": [{ "text": "Welcome 👋" }] } { "type": "p", "children": [{ "text": "Welcome 👋" }] }
] ]
}, }
"groupId": "az9nafw4tu9b6dyh3cvutlek"
}, },
{ {
"id": "cl1267y1u000f2e6d4rlglv6g", "id": "cl1267y1u000f2e6d4rlglv6g",
@ -42,29 +32,22 @@
"richText": [ "richText": [
{ "type": "p", "children": [{ "text": "What's your name?" }] } { "type": "p", "children": [{ "text": "What's your name?" }] }
] ]
}, }
"groupId": "az9nafw4tu9b6dyh3cvutlek"
}, },
{ {
"id": "cl126820m000g2e6dfleq78bt", "id": "cl126820m000g2e6dfleq78bt",
"outgoingEdgeId": "j6x356fbxo32zd9ezje77t4j",
"type": "text input", "type": "text input",
"groupId": "az9nafw4tu9b6dyh3cvutlek",
"options": { "options": {
"isLong": false,
"labels": {
"button": "Send",
"placeholder": "Type your answer..."
},
"variableId": "cl126f4hf000i2e6d8zvzc3t1" "variableId": "cl126f4hf000i2e6d8zvzc3t1"
}, }
"outgoingEdgeId": "j6x356fbxo32zd9ezje77t4j"
} }
], ]
"graphCoordinates": { "x": 329.13877189828236, "y": 5.648473810990222 }
}, },
{ {
"id": "s3hgjtmb1bzq6ip2bm9w1r53", "id": "s3hgjtmb1bzq6ip2bm9w1r53",
"title": "Company", "title": "Company",
"graphCoordinates": { "x": 603.62, "y": 1.09 },
"blocks": [ "blocks": [
{ {
"id": "cl1266v6f000a2e6db7wj3ux7", "id": "cl1266v6f000a2e6db7wj3ux7",
@ -73,8 +56,7 @@
"richText": [ "richText": [
{ "type": "p", "children": [{ "text": "Welcome {{Name}} 👋" }] } { "type": "p", "children": [{ "text": "Welcome {{Name}} 👋" }] }
] ]
}, }
"groupId": "s3hgjtmb1bzq6ip2bm9w1r53"
}, },
{ {
"id": "cl126hb9m000l2e6d5qk3mohn", "id": "cl126hb9m000l2e6d5qk3mohn",
@ -90,8 +72,7 @@
] ]
} }
] ]
}, }
"groupId": "s3hgjtmb1bzq6ip2bm9w1r53"
}, },
{ {
"id": "cl126hpw1000m2e6dneousygl", "id": "cl126hpw1000m2e6dneousygl",
@ -107,8 +88,7 @@
] ]
} }
] ]
}, }
"groupId": "s3hgjtmb1bzq6ip2bm9w1r53"
}, },
{ {
"id": "cl126guhd000k2e6d6ypkex9z", "id": "cl126guhd000k2e6d6ypkex9z",
@ -122,8 +102,7 @@
] ]
} }
] ]
}, }
"groupId": "s3hgjtmb1bzq6ip2bm9w1r53"
}, },
{ {
"id": "cl126ixp9000q2e6dslh0zypi", "id": "cl126ixp9000q2e6dslh0zypi",
@ -135,50 +114,37 @@
"children": [{ "text": "Do you work for a specific company?" }] "children": [{ "text": "Do you work for a specific company?" }]
} }
] ]
}, }
"groupId": "s3hgjtmb1bzq6ip2bm9w1r53"
}, },
{ {
"id": "cl126jb2q000r2e6dgqlnxnt8", "id": "cl126jb2q000r2e6dgqlnxnt8",
"type": "choice input", "type": "choice input",
"items": [ "items": [
{ { "id": "cl126jb2q000s2e6dm60yq5p2", "content": "Yes" },
"id": "cl126jb2q000s2e6dm60yq5p2",
"type": 0,
"blockId": "cl126jb2q000r2e6dgqlnxnt8",
"content": "Yes"
},
{ {
"id": "cl126jc5a000t2e6dqv91w7j6", "id": "cl126jc5a000t2e6dqv91w7j6",
"type": 0, "outgoingEdgeId": "dhva247te6v1cwfbte78bx4v",
"blockId": "cl126jb2q000r2e6dgqlnxnt8", "content": "No"
"content": "No",
"outgoingEdgeId": "dhva247te6v1cwfbte78bx4v"
} }
], ]
"groupId": "s3hgjtmb1bzq6ip2bm9w1r53",
"options": { "buttonLabel": "Send", "isMultipleChoice": false }
}, },
{ {
"id": "cl126jioz000v2e6dwrk1f2cb", "id": "cl126jioz000v2e6dwrk1f2cb",
"outgoingEdgeId": "c5qdoivxsbhu1mkxkmw9yxft",
"type": "text input", "type": "text input",
"groupId": "s3hgjtmb1bzq6ip2bm9w1r53",
"options": { "options": {
"isLong": false,
"labels": { "labels": {
"button": "Send",
"placeholder": "Type the company name..." "placeholder": "Type the company name..."
}, },
"variableId": "cl126jqww000w2e6dq9yv4ifq" "variableId": "cl126jqww000w2e6dq9yv4ifq"
}, }
"outgoingEdgeId": "c5qdoivxsbhu1mkxkmw9yxft"
} }
], ]
"graphCoordinates": { "x": 679.828061917379, "y": 3.351428911218571 }
}, },
{ {
"id": "m8k3pv1rjckh3arxgitwo43i", "id": "m8k3pv1rjckh3arxgitwo43i",
"title": "Bot category", "title": "Bot category",
"graphCoordinates": { "x": 972.94, "y": -0.07 },
"blocks": [ "blocks": [
{ {
"id": "cl126krck00112e6d1m6ctxpn", "id": "cl126krck00112e6d1m6ctxpn",
@ -194,8 +160,7 @@
] ]
} }
] ]
}, }
"groupId": "m8k3pv1rjckh3arxgitwo43i"
}, },
{ {
"id": "cl126lb8v00142e6duv5qe08l", "id": "cl126lb8v00142e6duv5qe08l",
@ -203,91 +168,57 @@
"items": [ "items": [
{ {
"id": "cl126onz9001g2e6dk0nbjeu6", "id": "cl126onz9001g2e6dk0nbjeu6",
"type": 0,
"blockId": "cl126lb8v00142e6duv5qe08l",
"content": "Lead qualification" "content": "Lead qualification"
}, },
{ {
"id": "cl126lm6c00172e6d1pfvdiju", "id": "cl126lm6c00172e6d1pfvdiju",
"type": 0,
"blockId": "cl126lb8v00142e6duv5qe08l",
"content": "Customer support" "content": "Customer support"
}, },
{ {
"id": "cl126orr2001h2e6d0fqs7737", "id": "cl126orr2001h2e6d0fqs7737",
"type": 0,
"blockId": "cl126lb8v00142e6duv5qe08l",
"content": "Customer research" "content": "Customer research"
}, },
{ { "id": "cl126oudu001i2e6dktwi7qwv", "content": "User onboarding" },
"id": "cl126oudu001i2e6dktwi7qwv", { "id": "cl126luv500192e6dl317ssyr", "content": "Quizzes" },
"type": 0,
"blockId": "cl126lb8v00142e6duv5qe08l",
"content": "User onboarding"
},
{
"id": "cl126luv500192e6dl317ssyr",
"type": 0,
"blockId": "cl126lb8v00142e6duv5qe08l",
"content": "Quizzes"
},
{ {
"id": "cl126lz8q001a2e6d8b9lb3b5", "id": "cl126lz8q001a2e6d8b9lb3b5",
"type": 0,
"blockId": "cl126lb8v00142e6duv5qe08l",
"content": "Content distribution" "content": "Content distribution"
}, },
{ { "id": "cl126nf7k001d2e6dg2zczjgz", "content": "FAQ" },
"id": "cl126nf7k001d2e6dg2zczjgz", { "id": "cl126ngy8001e2e6ddfo5s9fm", "content": "Other" }
"type": 0,
"blockId": "cl126lb8v00142e6duv5qe08l",
"content": "FAQ"
},
{
"id": "cl126ngy8001e2e6ddfo5s9fm",
"type": 0,
"blockId": "cl126lb8v00142e6duv5qe08l",
"content": "Other"
}
], ],
"groupId": "m8k3pv1rjckh3arxgitwo43i",
"options": { "options": {
"variableId": "cl126mo3t001b2e6dvyi16bkd", "variableId": "cl126mo3t001b2e6dvyi16bkd",
"buttonLabel": "Send",
"isMultipleChoice": true "isMultipleChoice": true
} }
}, },
{ {
"id": "cl1278gyk002w2e6d744eb87n", "id": "cl1278gyk002w2e6d744eb87n",
"outgoingEdgeId": "zvr4qou4drmkvyyikya9y6ku",
"type": "Condition", "type": "Condition",
"items": [ "items": [
{ {
"id": "cl1278gyk002x2e6dwmpzs3nf", "id": "cl1278gyk002x2e6dwmpzs3nf",
"type": 1, "outgoingEdgeId": "mgsnzw7w104odi0mz9qjg8hf",
"blockId": "cl1278gyk002w2e6d744eb87n",
"content": { "content": {
"comparisons": [ "comparisons": [
{ {
"id": "cl1278irq002y2e6dv4965diw", "id": "cl1278irq002y2e6dv4965diw",
"value": "Other",
"variableId": "cl126mo3t001b2e6dvyi16bkd", "variableId": "cl126mo3t001b2e6dvyi16bkd",
"comparisonOperator": "Contains" "comparisonOperator": "Contains",
"value": "Other"
} }
], ]
"logicalOperator": "AND" }
},
"outgoingEdgeId": "mgsnzw7w104odi0mz9qjg8hf"
} }
], ]
"groupId": "m8k3pv1rjckh3arxgitwo43i",
"outgoingEdgeId": "zvr4qou4drmkvyyikya9y6ku"
} }
], ]
"graphCoordinates": { "x": 1030.2081982319628, "y": -0.2818258211374715 }
}, },
{ {
"id": "cnf2ljrlt875d005783ju7hc", "id": "cnf2ljrlt875d005783ju7hc",
"title": "Bye", "title": "Bye",
"graphCoordinates": { "x": 1522.31, "y": 220.27 },
"blocks": [ "blocks": [
{ {
"id": "cl126p76d001k2e6dbhnf2ysq", "id": "cl126p76d001k2e6dbhnf2ysq",
@ -301,20 +232,17 @@
] ]
} }
] ]
}, }
"groupId": "cnf2ljrlt875d005783ju7hc"
}, },
{ {
"id": "cl126rfy6001t2e6d21gcb6b0", "id": "cl126rfy6001t2e6d21gcb6b0",
"type": "image", "type": "image",
"content": { "content": {
"url": "https://media4.giphy.com/media/l0amJzVHIAfl7jMDos/giphy.gif?cid=fe3852a3i4c33635xdtj3nesr9uq4zteujaab6b0jr42gpxx&rid=giphy.gif&ct=g" "url": "https://media4.giphy.com/media/l0amJzVHIAfl7jMDos/giphy.gif?cid=fe3852a3i4c33635xdtj3nesr9uq4zteujaab6b0jr42gpxx&rid=giphy.gif&ct=g"
}, }
"groupId": "cnf2ljrlt875d005783ju7hc"
}, },
{ {
"id": "agi2i9xxed4jvv40rnrkf23r", "id": "agi2i9xxed4jvv40rnrkf23r",
"groupId": "cnf2ljrlt875d005783ju7hc",
"type": "text", "type": "text",
"content": { "content": {
"richText": [ "richText": [
@ -322,12 +250,12 @@
] ]
} }
} }
], ]
"graphCoordinates": { "x": 1585.6402200792238, "y": 219.28927860860924 }
}, },
{ {
"id": "hduy797g246pj8qnhsxy5kt5", "id": "hduy797g246pj8qnhsxy5kt5",
"title": "Other category", "title": "Other category",
"graphCoordinates": { "x": 1310.68, "y": -6.8 },
"blocks": [ "blocks": [
{ {
"id": "cl127yxym000b2e6d9hksxo6h", "id": "cl127yxym000b2e6d9hksxo6h",
@ -336,22 +264,60 @@
"richText": [ "richText": [
{ "type": "p", "children": [{ "text": "What else?" }] } { "type": "p", "children": [{ "text": "What else?" }] }
] ]
}, }
"groupId": "hduy797g246pj8qnhsxy5kt5"
}, },
{ {
"id": "cl126pv7n001o2e6dajltc4qz", "id": "cl126pv7n001o2e6dajltc4qz",
"outgoingEdgeId": "vk0mgizwhw761s9eo9lx88yv",
"type": "text input", "type": "text input",
"groupId": "hduy797g246pj8qnhsxy5kt5",
"options": { "options": {
"isLong": false,
"labels": { "button": "Send", "placeholder": "Type your answer" },
"variableId": "cl126q38p001q2e6d0hj23f6b" "variableId": "cl126q38p001q2e6d0hj23f6b"
}, }
"outgoingEdgeId": "vk0mgizwhw761s9eo9lx88yv"
} }
], ]
"graphCoordinates": { "x": 1369.6844213687823, "y": -7.90789096298402 } }
],
"edges": [
{
"id": "qehono05saho85xk59apfvtr",
"from": { "eventId": "yp9qsayuwzhihxc7gzt68osm" },
"to": { "groupId": "az9nafw4tu9b6dyh3cvutlek" }
},
{
"id": "dhva247te6v1cwfbte78bx4v",
"from": {
"blockId": "cl126jb2q000r2e6dgqlnxnt8",
"itemId": "cl126jc5a000t2e6dqv91w7j6"
},
"to": { "groupId": "m8k3pv1rjckh3arxgitwo43i" }
},
{
"id": "mgsnzw7w104odi0mz9qjg8hf",
"from": {
"blockId": "cl1278gyk002w2e6d744eb87n",
"itemId": "cl1278gyk002x2e6dwmpzs3nf"
},
"to": { "groupId": "hduy797g246pj8qnhsxy5kt5" }
},
{
"id": "zvr4qou4drmkvyyikya9y6ku",
"from": { "blockId": "cl1278gyk002w2e6d744eb87n" },
"to": { "groupId": "cnf2ljrlt875d005783ju7hc" }
},
{
"id": "c5qdoivxsbhu1mkxkmw9yxft",
"from": { "blockId": "cl126jioz000v2e6dwrk1f2cb" },
"to": { "groupId": "m8k3pv1rjckh3arxgitwo43i" }
},
{
"id": "j6x356fbxo32zd9ezje77t4j",
"from": { "blockId": "cl126820m000g2e6dfleq78bt" },
"to": { "groupId": "s3hgjtmb1bzq6ip2bm9w1r53" }
},
{
"id": "vk0mgizwhw761s9eo9lx88yv",
"from": { "blockId": "cl126pv7n001o2e6dajltc4qz" },
"to": { "groupId": "cnf2ljrlt875d005783ju7hc" }
} }
], ],
"variables": [ "variables": [
@ -360,102 +326,18 @@
{ "id": "cl126mo3t001b2e6dvyi16bkd", "name": "Categories" }, { "id": "cl126mo3t001b2e6dvyi16bkd", "name": "Categories" },
{ "id": "cl126q38p001q2e6d0hj23f6b", "name": "Other categories" } { "id": "cl126q38p001q2e6d0hj23f6b", "name": "Other categories" }
], ],
"edges": [ "theme": {},
{ "selectedThemeTemplateId": null,
"id": "dhva247te6v1cwfbte78bx4v", "settings": {},
"to": { "groupId": "m8k3pv1rjckh3arxgitwo43i" }, "createdAt": "2023-11-07T07:29:42.573Z",
"from": { "updatedAt": "2023-11-07T07:30:16.347Z",
"itemId": "cl126jc5a000t2e6dqv91w7j6", "icon": null,
"blockId": "cl126jb2q000r2e6dgqlnxnt8", "folderId": null,
"groupId": "s3hgjtmb1bzq6ip2bm9w1r53"
}
},
{
"id": "mgsnzw7w104odi0mz9qjg8hf",
"to": { "groupId": "hduy797g246pj8qnhsxy5kt5" },
"from": {
"itemId": "cl1278gyk002x2e6dwmpzs3nf",
"blockId": "cl1278gyk002w2e6d744eb87n",
"groupId": "m8k3pv1rjckh3arxgitwo43i"
}
},
{
"id": "zvr4qou4drmkvyyikya9y6ku",
"to": { "groupId": "cnf2ljrlt875d005783ju7hc" },
"from": {
"blockId": "cl1278gyk002w2e6d744eb87n",
"groupId": "m8k3pv1rjckh3arxgitwo43i"
}
},
{
"id": "c5qdoivxsbhu1mkxkmw9yxft",
"to": { "groupId": "m8k3pv1rjckh3arxgitwo43i" },
"from": {
"blockId": "cl126jioz000v2e6dwrk1f2cb",
"groupId": "s3hgjtmb1bzq6ip2bm9w1r53"
}
},
{
"id": "j6x356fbxo32zd9ezje77t4j",
"to": { "groupId": "s3hgjtmb1bzq6ip2bm9w1r53" },
"from": {
"blockId": "cl126820m000g2e6dfleq78bt",
"groupId": "az9nafw4tu9b6dyh3cvutlek"
}
},
{
"id": "qehono05saho85xk59apfvtr",
"to": { "groupId": "az9nafw4tu9b6dyh3cvutlek" },
"from": {
"blockId": "cl1265zct0001mb1afel460do",
"groupId": "yp9qsayuwzhihxc7gzt68osm"
}
},
{
"id": "vk0mgizwhw761s9eo9lx88yv",
"to": { "groupId": "cnf2ljrlt875d005783ju7hc" },
"from": {
"blockId": "cl126pv7n001o2e6dajltc4qz",
"groupId": "hduy797g246pj8qnhsxy5kt5"
}
}
],
"theme": {
"chat": {
"inputs": {
"color": "#303235",
"backgroundColor": "#FFFFFF",
"placeholderColor": "#9095A0"
},
"buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" },
"hostAvatar": {
"isEnabled": true
},
"hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" },
"guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" }
},
"general": {
"font": "Open Sans",
"background": { "type": "Color", "content": "#ffffff" }
}
},
"settings": {
"general": {
"isBrandingEnabled": false,
"isInputPrefillEnabled": true,
"isResultSavingEnabled": true,
"isHideQueryParamsEnabled": true,
"isNewResultOnRefreshEnabled": true
},
"metadata": {
"description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form."
},
"typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 }
},
"publicId": null, "publicId": null,
"customDomain": null, "customDomain": null,
"workspaceId": "freeWorkspace", "workspaceId": "proWorkspace",
"resultsTablePreferences": null, "resultsTablePreferences": null,
"isArchived": false, "isArchived": false,
"isClosed": false "isClosed": false,
"whatsAppCredentialsId": null
} }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,10 @@
.slate-inline-code {
background-color: #805ad5;
color: white;
padding: 0.125rem 0.25rem;
border-radius: 0.35rem;
}
.slate-variable { .slate-variable {
background-color: #ff8b1a; background-color: #ff8b1a;
color: #ffffff; color: #ffffff;

View File

@ -10,7 +10,7 @@ import {
Stack, Stack,
} from '@chakra-ui/react' } from '@chakra-ui/react'
import { ChevronLeftIcon } from '@/components/icons' import { ChevronLeftIcon } from '@/components/icons'
import React, { ReactNode } from 'react' import React from 'react'
// eslint-disable-next-line @typescript-eslint/no-explicit-any // eslint-disable-next-line @typescript-eslint/no-explicit-any
type Props<T extends readonly any[]> = { type Props<T extends readonly any[]> = {
@ -42,7 +42,7 @@ export const DropdownList = <T extends readonly any[]>({
{...props} {...props}
> >
<chakra.span noOfLines={1} display="block"> <chakra.span noOfLines={1} display="block">
{(currentItem ?? placeholder) as unknown as ReactNode} {currentItem ?? placeholder}
</chakra.span> </chakra.span>
</MenuButton> </MenuButton>
<Portal> <Portal>
@ -57,7 +57,7 @@ export const DropdownList = <T extends readonly any[]>({
textOverflow="ellipsis" textOverflow="ellipsis"
onClick={handleMenuItemClick(item)} onClick={handleMenuItemClick(item)}
> >
{item as unknown as ReactNode} {item}
</MenuItem> </MenuItem>
))} ))}
</Stack> </Stack>

View File

@ -11,6 +11,10 @@ import { TrashIcon, PlusIcon } from '@/components/icons'
import { createId } from '@paralleldrive/cuid2' import { createId } from '@paralleldrive/cuid2'
import React, { useEffect, useState } from 'react' import React, { useEffect, useState } from 'react'
const defaultItem = {
id: createId(),
}
type ItemWithId<T> = T & { id: string } type ItemWithId<T> = T & { id: string }
export type TableListItemProps<T> = { export type TableListItemProps<T> = {
@ -19,10 +23,11 @@ export type TableListItemProps<T> = {
} }
type Props<T> = { type Props<T> = {
initialItems: ItemWithId<T>[] initialItems?: ItemWithId<T>[]
isOrdered?: boolean isOrdered?: boolean
addLabel?: string addLabel?: string
newItemDefaultProps?: Partial<T> newItemDefaultProps?: Partial<T>
hasDefaultItem?: boolean
Item: (props: TableListItemProps<T>) => JSX.Element Item: (props: TableListItemProps<T>) => JSX.Element
ComponentBetweenItems?: (props: unknown) => JSX.Element ComponentBetweenItems?: (props: unknown) => JSX.Element
onItemsChange: (items: ItemWithId<T>[]) => void onItemsChange: (items: ItemWithId<T>[]) => void
@ -33,15 +38,19 @@ export const TableList = <T,>({
isOrdered, isOrdered,
addLabel = 'Add', addLabel = 'Add',
newItemDefaultProps, newItemDefaultProps,
hasDefaultItem,
Item, Item,
ComponentBetweenItems, ComponentBetweenItems,
onItemsChange, onItemsChange,
}: Props<T>) => { }: Props<T>) => {
const [items, setItems] = useState(initialItems) const [items, setItems] = useState(
initialItems ?? hasDefaultItem ? ([defaultItem] as ItemWithId<T>[]) : []
)
const [showDeleteIndex, setShowDeleteIndex] = useState<number | null>(null) const [showDeleteIndex, setShowDeleteIndex] = useState<number | null>(null)
useEffect(() => { useEffect(() => {
if (items.length && initialItems.length === 0) setItems(initialItems) if (items.length && initialItems && initialItems?.length === 0)
setItems(initialItems)
}, [initialItems, items.length]) }, [initialItems, items.length])
const createItem = () => { const createItem = () => {

View File

@ -9,9 +9,8 @@ import {
Input, Input,
HStack, HStack,
FormControl, FormControl,
FormLabel,
} from '@chakra-ui/react' } from '@chakra-ui/react'
import { useState, useRef, useEffect, ReactNode } from 'react' import { useState, useRef, useEffect } from 'react'
import { useDebouncedCallback } from 'use-debounce' import { useDebouncedCallback } from 'use-debounce'
import { isDefined } from '@typebot.io/lib' import { isDefined } from '@typebot.io/lib'
import { useOutsideClick } from '@/hooks/useOutsideClick' import { useOutsideClick } from '@/hooks/useOutsideClick'
@ -20,7 +19,6 @@ import { VariablesButton } from '@/features/variables/components/VariablesButton
import { Variable } from '@typebot.io/schemas' import { Variable } from '@typebot.io/schemas'
import { injectVariableInText } from '@/features/variables/helpers/injectVariableInTextInput' import { injectVariableInText } from '@/features/variables/helpers/injectVariableInTextInput'
import { focusInput } from '@/helpers/focusInput' import { focusInput } from '@/helpers/focusInput'
import { MoreInfoTooltip } from '../MoreInfoTooltip'
import { env } from '@typebot.io/env' import { env } from '@typebot.io/env'
type Props = { type Props = {
@ -30,7 +28,6 @@ type Props = {
debounceTimeout?: number debounceTimeout?: number
placeholder?: string placeholder?: string
withVariableButton?: boolean withVariableButton?: boolean
label?: ReactNode
moreInfoTooltip?: string moreInfoTooltip?: string
isRequired?: boolean isRequired?: boolean
onChange: (value: string) => void onChange: (value: string) => void
@ -44,8 +41,6 @@ export const AutocompleteInput = ({
withVariableButton = true, withVariableButton = true,
value, value,
defaultValue, defaultValue,
label,
moreInfoTooltip,
isRequired, isRequired,
}: Props) => { }: Props) => {
const bg = useColorModeValue('gray.200', 'gray.700') const bg = useColorModeValue('gray.200', 'gray.700')
@ -161,14 +156,6 @@ export const AutocompleteInput = ({
return ( return (
<FormControl isRequired={isRequired}> <FormControl isRequired={isRequired}>
{label && (
<FormLabel>
{label}{' '}
{moreInfoTooltip && (
<MoreInfoTooltip>{moreInfoTooltip}</MoreInfoTooltip>
)}
</FormLabel>
)}
<HStack ref={dropdownRef} spacing={0} w="full"> <HStack ref={dropdownRef} spacing={0} w="full">
<Popover <Popover
isOpen={isOpen} isOpen={isOpen}

View File

@ -168,7 +168,7 @@ export const Select = <T extends Item>({
pr={selectedItem ? 16 : 8} pr={selectedItem ? 16 : 8}
w="full" w="full"
> >
{!isTouched && ( {!isTouched && items && (
<Text noOfLines={1} data-testid="selected-item-label"> <Text noOfLines={1} data-testid="selected-item-label">
{inputValue} {inputValue}
</Text> </Text>

View File

@ -19,12 +19,8 @@ export const userContext = createContext<{
updateUser: (newUser: Partial<User>) => void updateUser: (newUser: Partial<User>) => void
}>({ }>({
isLoading: false, isLoading: false,
logOut: () => { logOut: () => {},
console.log('logOut not implemented') updateUser: () => {},
},
updateUser: () => {
console.log('updateUser not implemented')
},
}) })
const debounceTimeout = 1000 const debounceTimeout = 1000

View File

@ -1,12 +1,13 @@
import prisma from '@typebot.io/lib/prisma' import prisma from '@typebot.io/lib/prisma'
import { authenticatedProcedure } from '@/helpers/server/trpc' import { authenticatedProcedure } from '@/helpers/server/trpc'
import { TRPCError } from '@trpc/server' import { TRPCError } from '@trpc/server'
import { PublicTypebot } from '@typebot.io/schemas'
import { z } from 'zod' import { z } from 'zod'
import { canReadTypebots } from '@/helpers/databaseRules' import { canReadTypebots } from '@/helpers/databaseRules'
import { totalAnswersInBlock } from '@typebot.io/schemas/features/analytics' import { totalAnswersSchema } from '@typebot.io/schemas/features/analytics'
import { parseGroups } from '@typebot.io/schemas'
import { isInputBlock } from '@typebot.io/lib'
export const getTotalAnswersInBlocks = authenticatedProcedure export const getTotalAnswers = authenticatedProcedure
.meta({ .meta({
openapi: { openapi: {
method: 'GET', method: 'GET',
@ -21,7 +22,7 @@ export const getTotalAnswersInBlocks = authenticatedProcedure
typebotId: z.string(), typebotId: z.string(),
}) })
) )
.output(z.object({ totalAnswersInBlocks: z.array(totalAnswersInBlock) })) .output(z.object({ totalAnswers: z.array(totalAnswersSchema) }))
.query(async ({ input: { typebotId }, ctx: { user } }) => { .query(async ({ input: { typebotId }, ctx: { user } }) => {
const typebot = await prisma.typebot.findFirst({ const typebot = await prisma.typebot.findFirst({
where: canReadTypebots(typebotId, user), where: canReadTypebots(typebotId, user),
@ -33,17 +34,17 @@ export const getTotalAnswersInBlocks = authenticatedProcedure
message: 'Published typebot not found', message: 'Published typebot not found',
}) })
const publishedTypebot = typebot.publishedTypebot as PublicTypebot
const totalAnswersPerBlock = await prisma.answer.groupBy({ const totalAnswersPerBlock = await prisma.answer.groupBy({
by: ['itemId', 'blockId'], by: ['blockId'],
where: { where: {
result: { result: {
typebotId: typebot.publishedTypebot.typebotId, typebotId: typebot.publishedTypebot.typebotId,
}, },
blockId: { blockId: {
in: publishedTypebot.groups.flatMap((group) => in: parseGroups(typebot.publishedTypebot.groups, {
group.blocks.map((block) => block.id) typebotVersion: typebot.publishedTypebot.version,
}).flatMap((group) =>
group.blocks.filter(isInputBlock).map((block) => block.id)
), ),
}, },
}, },
@ -51,10 +52,9 @@ export const getTotalAnswersInBlocks = authenticatedProcedure
}) })
return { return {
totalAnswersInBlocks: totalAnswersPerBlock.map((answer) => ({ totalAnswers: totalAnswersPerBlock.map((a) => ({
blockId: answer.blockId, blockId: a.blockId,
itemId: answer.itemId ?? undefined, total: a._count._all,
total: answer._count._all,
})), })),
} }
}) })

View File

@ -0,0 +1,55 @@
import prisma from '@typebot.io/lib/prisma'
import { authenticatedProcedure } from '@/helpers/server/trpc'
import { TRPCError } from '@trpc/server'
import { z } from 'zod'
import { canReadTypebots } from '@/helpers/databaseRules'
import { totalVisitedEdgesSchema } from '@typebot.io/schemas'
export const getTotalVisitedEdges = authenticatedProcedure
.meta({
openapi: {
method: 'GET',
path: '/typebots/{typebotId}/analytics/totalVisitedEdges',
protect: true,
summary: 'List total edges used in results',
tags: ['Analytics'],
},
})
.input(
z.object({
typebotId: z.string(),
})
)
.output(
z.object({
totalVisitedEdges: z.array(totalVisitedEdgesSchema),
})
)
.query(async ({ input: { typebotId }, ctx: { user } }) => {
const typebot = await prisma.typebot.findFirst({
where: canReadTypebots(typebotId, user),
select: { id: true },
})
if (!typebot?.id)
throw new TRPCError({
code: 'NOT_FOUND',
message: 'Published typebot not found',
})
const edges = await prisma.visitedEdge.groupBy({
by: ['edgeId'],
where: {
result: {
typebotId: typebot.id,
},
},
_count: { resultId: true },
})
return {
totalVisitedEdges: edges.map((e) => ({
edgeId: e.edgeId,
total: e._count.resultId,
})),
}
})

View File

@ -1,6 +1,8 @@
import { router } from '@/helpers/server/trpc' import { router } from '@/helpers/server/trpc'
import { getTotalAnswersInBlocks } from './getTotalAnswersInBlocks' import { getTotalAnswers } from './getTotalAnswers'
import { getTotalVisitedEdges } from './getTotalVisitedEdges'
export const analyticsRouter = router({ export const analyticsRouter = router({
getTotalAnswersInBlocks, getTotalAnswers,
getTotalVisitedEdges,
}) })

View File

@ -15,20 +15,25 @@ import { GroupsCoordinatesProvider } from '@/features/graph/providers/GroupsCoor
import { useTranslate } from '@tolgee/react' import { useTranslate } from '@tolgee/react'
import { trpc } from '@/lib/trpc' import { trpc } from '@/lib/trpc'
import { isDefined } from '@typebot.io/lib' import { isDefined } from '@typebot.io/lib'
import { EventsCoordinatesProvider } from '@/features/graph/providers/EventsCoordinateProvider'
export const AnalyticsGraphContainer = ({ stats }: { stats?: Stats }) => { export const AnalyticsGraphContainer = ({ stats }: { stats?: Stats }) => {
const { t } = useTranslate() const { t } = useTranslate()
const { isOpen, onOpen, onClose } = useDisclosure() const { isOpen, onOpen, onClose } = useDisclosure()
const { typebot, publishedTypebot } = useTypebot() const { typebot, publishedTypebot } = useTypebot()
const { data } = trpc.analytics.getTotalAnswersInBlocks.useQuery( const { data } = trpc.analytics.getTotalAnswers.useQuery(
{
typebotId: typebot?.id as string,
},
{ enabled: isDefined(publishedTypebot) }
)
const { data: edgesData } = trpc.analytics.getTotalVisitedEdges.useQuery(
{ {
typebotId: typebot?.id as string, typebotId: typebot?.id as string,
}, },
{ enabled: isDefined(publishedTypebot) } { enabled: isDefined(publishedTypebot) }
) )
const startBlockId = publishedTypebot?.groups
.find((group) => group.blocks.at(0)?.type === 'start')
?.blocks.at(0)?.id
return ( return (
<Flex <Flex
@ -44,28 +49,18 @@ export const AnalyticsGraphContainer = ({ stats }: { stats?: Stats }) => {
h="full" h="full"
justifyContent="center" justifyContent="center"
> >
{publishedTypebot && {publishedTypebot && stats ? (
data?.totalAnswersInBlocks &&
stats &&
startBlockId ? (
<GraphProvider isReadOnly> <GraphProvider isReadOnly>
<GroupsCoordinatesProvider groups={publishedTypebot?.groups}> <GroupsCoordinatesProvider groups={publishedTypebot?.groups}>
<Graph <EventsCoordinatesProvider events={publishedTypebot?.events}>
flex="1" <Graph
typebot={publishedTypebot} flex="1"
onUnlockProPlanClick={onOpen} typebot={publishedTypebot}
totalAnswersInBlocks={ onUnlockProPlanClick={onOpen}
startBlockId totalAnswers={data?.totalAnswers}
? [ totalVisitedEdges={edgesData?.totalVisitedEdges}
{ />
blockId: startBlockId, </EventsCoordinatesProvider>
total: stats.totalViews,
},
...data.totalAnswersInBlocks,
]
: []
}
/>
</GroupsCoordinatesProvider> </GroupsCoordinatesProvider>
</GraphProvider> </GraphProvider>
) : ( ) : (

View File

@ -1,96 +0,0 @@
import { isInputBlock } from '@typebot.io/lib'
import { PublicTypebot } from '@typebot.io/schemas'
import { TotalAnswersInBlock } from '@typebot.io/schemas/features/analytics'
export const computePreviousTotalAnswers = (
publishedTypebot: PublicTypebot,
currentBlockId: string,
totalAnswersInBlocks: TotalAnswersInBlock[],
visitedBlocks: string[] = []
): number => {
let totalAnswers = 0
const allBlocks = publishedTypebot.groups.flatMap((group) => group.blocks)
const currentGroup = publishedTypebot.groups.find((group) =>
group.blocks.find((block) => block.id === currentBlockId)
)
if (!currentGroup) return 0
const currentBlockIndex = currentGroup.blocks.findIndex(
(block) => block.id === currentBlockId
)
const previousBlocks = currentGroup.blocks.slice(0, currentBlockIndex + 1)
for (const block of previousBlocks.reverse()) {
if (visitedBlocks.includes(block.id)) continue
if (
currentBlockId !== block.id &&
(isInputBlock(block) || block.type === 'start')
) {
visitedBlocks.push(block.id)
return (
totalAnswersInBlocks.find(
(totalAnswersInBlock) =>
totalAnswersInBlock.blockId === block.id &&
totalAnswersInBlock.itemId === undefined
)?.total ?? 0
)
}
const connectedEdges = publishedTypebot.edges.filter(
(edge) => edge.to.blockId === block.id
)
if (connectedEdges.length) {
for (const connectedEdge of connectedEdges) {
const connectedBlock = allBlocks.find(
(block) => block.id === connectedEdge.from.blockId
)
if (connectedBlock && !visitedBlocks.includes(connectedBlock.id)) {
if (isInputBlock(connectedBlock) || connectedBlock.type === 'start') {
visitedBlocks.push(connectedBlock.id)
totalAnswers +=
totalAnswersInBlocks.find(
(totalAnswersInBlock) =>
totalAnswersInBlock.blockId === connectedEdge.from.blockId &&
totalAnswersInBlock.itemId === connectedEdge.from.itemId
)?.total ?? 0
} else {
totalAnswers += computePreviousTotalAnswers(
publishedTypebot,
connectedBlock.id,
totalAnswersInBlocks,
visitedBlocks
)
}
}
}
}
}
const edgesConnectedToGroup = publishedTypebot.edges.filter(
(edge) => edge.to.groupId === currentGroup.id
)
if (edgesConnectedToGroup.length) {
for (const connectedEdge of edgesConnectedToGroup) {
const connectedBlock = allBlocks.find(
(block) => block.id === connectedEdge.from.blockId
)
if (connectedBlock && !visitedBlocks.includes(connectedBlock.id)) {
if (isInputBlock(connectedBlock) || connectedBlock.type === 'start') {
visitedBlocks.push(connectedBlock.id)
totalAnswers +=
totalAnswersInBlocks.find(
(totalAnswersInBlock) =>
totalAnswersInBlock.blockId === connectedEdge.from.blockId &&
totalAnswersInBlock.itemId === connectedEdge.from.itemId
)?.total ?? 0
} else {
totalAnswers += computePreviousTotalAnswers(
publishedTypebot,
connectedBlock.id,
totalAnswersInBlocks,
visitedBlocks
)
}
}
}
}
return totalAnswers
}

View File

@ -0,0 +1,60 @@
import { isInputBlock, isNotDefined } from '@typebot.io/lib'
import { PublicTypebotV6 } from '@typebot.io/schemas'
import {
TotalAnswers,
TotalVisitedEdges,
} from '@typebot.io/schemas/features/analytics'
export const computeTotalUsersAtBlock = (
currentBlockId: string,
{
publishedTypebot,
totalVisitedEdges,
totalAnswers,
}: {
publishedTypebot: PublicTypebotV6
totalVisitedEdges: TotalVisitedEdges[]
totalAnswers: TotalAnswers[]
}
): number => {
let totalUsers = 0
const currentGroup = publishedTypebot.groups.find((group) =>
group.blocks.find((block) => block.id === currentBlockId)
)
if (!currentGroup) return 0
const currentBlockIndex = currentGroup.blocks.findIndex(
(block) => block.id === currentBlockId
)
const previousBlocks = currentGroup.blocks.slice(0, currentBlockIndex + 1)
for (const block of previousBlocks.reverse()) {
if (currentBlockId !== block.id && isInputBlock(block))
return totalAnswers.find((t) => t.blockId === block.id)?.total ?? 0
const incomingEdges = publishedTypebot.edges.filter(
(edge) => edge.to.blockId === block.id
)
if (!incomingEdges.length) continue
totalUsers += incomingEdges.reduce(
(acc, incomingEdge) =>
acc +
(totalVisitedEdges.find(
(totalEdge) => totalEdge.edgeId === incomingEdge.id
)?.total ?? 0),
0
)
}
const edgesConnectedToGroup = publishedTypebot.edges.filter(
(edge) =>
edge.to.groupId === currentGroup.id && isNotDefined(edge.to.blockId)
)
totalUsers += edgesConnectedToGroup.reduce(
(acc, connectedEdge) =>
acc +
(totalVisitedEdges.find(
(totalEdge) => totalEdge.edgeId === connectedEdge.id
)?.total ?? 0),
0
)
return totalUsers
}

View File

@ -0,0 +1,20 @@
import { byId } from '@typebot.io/lib'
import { PublicTypebotV6 } from '@typebot.io/schemas'
import { TotalAnswers } from '@typebot.io/schemas/features/analytics'
export const getTotalAnswersAtBlock = (
currentBlockId: string,
{
publishedTypebot,
totalAnswers,
}: {
publishedTypebot: PublicTypebotV6
totalAnswers: TotalAnswers[]
}
): number => {
const block = publishedTypebot.groups
.flatMap((g) => g.blocks)
.find(byId(currentBlockId))
if (!block) throw new Error(`Block ${currentBlockId} not found`)
return totalAnswers.find((t) => t.blockId === block.id)?.total ?? 0
}

View File

@ -1,10 +1,10 @@
import test, { expect } from '@playwright/test' import test, { expect } from '@playwright/test'
import { createTypebots } from '@typebot.io/lib/playwright/databaseActions' import { createTypebots } from '@typebot.io/lib/playwright/databaseActions'
import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers' import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers'
import { BubbleBlockType, defaultAudioBubbleContent } from '@typebot.io/schemas'
import { createId } from '@paralleldrive/cuid2' import { createId } from '@paralleldrive/cuid2'
import { getTestAsset } from '@/test/utils/playwright' import { getTestAsset } from '@/test/utils/playwright'
import { proWorkspaceId } from '@typebot.io/lib/playwright/databaseSetup' import { proWorkspaceId } from '@typebot.io/lib/playwright/databaseSetup'
import { BubbleBlockType } from '@typebot.io/schemas/features/blocks/bubbles/constants'
const audioSampleUrl = const audioSampleUrl =
'https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3' 'https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3'
@ -16,7 +16,6 @@ test('should work as expected', async ({ page }) => {
id: typebotId, id: typebotId,
...parseDefaultGroupWithBlock({ ...parseDefaultGroupWithBlock({
type: BubbleBlockType.AUDIO, type: BubbleBlockType.AUDIO,
content: defaultAudioBubbleContent,
}), }),
}, },
]) ])

View File

@ -1,16 +1,17 @@
import { Button, Flex, HStack, Stack, Text } from '@chakra-ui/react' import { Button, Flex, HStack, Stack, Text } from '@chakra-ui/react'
import { AudioBubbleContent } from '@typebot.io/schemas'
import { TextInput } from '@/components/inputs' import { TextInput } from '@/components/inputs'
import { useState } from 'react' import { useState } from 'react'
import { UploadButton } from '@/components/ImageUploadContent/UploadButton' import { UploadButton } from '@/components/ImageUploadContent/UploadButton'
import { SwitchWithLabel } from '@/components/inputs/SwitchWithLabel' import { SwitchWithLabel } from '@/components/inputs/SwitchWithLabel'
import { useTranslate } from '@tolgee/react' import { useTranslate } from '@tolgee/react'
import { FilePathUploadProps } from '@/features/upload/api/generateUploadUrl' import { FilePathUploadProps } from '@/features/upload/api/generateUploadUrl'
import { AudioBubbleBlock } from '@typebot.io/schemas'
import { defaultAudioBubbleContent } from '@typebot.io/schemas/features/blocks/bubbles/audio/constants'
type Props = { type Props = {
uploadFileProps: FilePathUploadProps uploadFileProps: FilePathUploadProps
content: AudioBubbleContent content: AudioBubbleBlock['content']
onContentChange: (content: AudioBubbleContent) => void onContentChange: (content: AudioBubbleBlock['content']) => void
} }
export const AudioBubbleForm = ({ export const AudioBubbleForm = ({
@ -64,7 +65,7 @@ export const AudioBubbleForm = ({
placeholder={t( placeholder={t(
'editor.blocks.bubbles.audio.settings.worksWith.placeholder' 'editor.blocks.bubbles.audio.settings.worksWith.placeholder'
)} )}
defaultValue={content.url ?? ''} defaultValue={content?.url ?? ''}
onChange={updateUrl} onChange={updateUrl}
/> />
<Text fontSize="sm" color="gray.400" textAlign="center"> <Text fontSize="sm" color="gray.400" textAlign="center">
@ -75,7 +76,10 @@ export const AudioBubbleForm = ({
</Stack> </Stack>
<SwitchWithLabel <SwitchWithLabel
label={t('editor.blocks.bubbles.audio.settings.autoplay.label')} label={t('editor.blocks.bubbles.audio.settings.autoplay.label')}
initialValue={content.isAutoplayEnabled ?? true} initialValue={
content?.isAutoplayEnabled ??
defaultAudioBubbleContent.isAutoplayEnabled
}
onCheckChange={updateAutoPlay} onCheckChange={updateAutoPlay}
/> />
</Stack> </Stack>

View File

@ -1,10 +1,10 @@
import { Text } from '@chakra-ui/react' import { Text } from '@chakra-ui/react'
import { AudioBubbleContent } from '@typebot.io/schemas'
import { isDefined } from '@typebot.io/lib' import { isDefined } from '@typebot.io/lib'
import { useTranslate } from '@tolgee/react' import { useTranslate } from '@tolgee/react'
import { AudioBubbleBlock } from '@typebot.io/schemas'
type Props = { type Props = {
url: AudioBubbleContent['url'] url: NonNullable<AudioBubbleBlock['content']>['url']
} }
export const AudioBubbleNode = ({ url }: Props) => { export const AudioBubbleNode = ({ url }: Props) => {

View File

@ -1,12 +1,13 @@
import { TextInput, NumberInput } from '@/components/inputs' import { TextInput, NumberInput } from '@/components/inputs'
import { Stack, Text } from '@chakra-ui/react' import { Stack, Text } from '@chakra-ui/react'
import { EmbedBubbleContent } from '@typebot.io/schemas' import { EmbedBubbleBlock } from '@typebot.io/schemas'
import { sanitizeUrl } from '@typebot.io/lib' import { sanitizeUrl } from '@typebot.io/lib'
import { useTranslate } from '@tolgee/react' import { useTranslate } from '@tolgee/react'
import { defaultEmbedBubbleContent } from '@typebot.io/schemas/features/blocks/bubbles/embed/constants'
type Props = { type Props = {
content: EmbedBubbleContent content: EmbedBubbleBlock['content']
onSubmit: (content: EmbedBubbleContent) => void onSubmit: (content: EmbedBubbleBlock['content']) => void
} }
export const EmbedUploadContent = ({ content, onSubmit }: Props) => { export const EmbedUploadContent = ({ content, onSubmit }: Props) => {
@ -18,8 +19,9 @@ export const EmbedUploadContent = ({ content, onSubmit }: Props) => {
onSubmit({ ...content, url: iframeUrl }) onSubmit({ ...content, url: iframeUrl })
} }
const handleHeightChange = (height?: EmbedBubbleContent['height']) => const handleHeightChange = (
height && onSubmit({ ...content, height }) height?: NonNullable<EmbedBubbleBlock['content']>['height']
) => height && onSubmit({ ...content, height })
return ( return (
<Stack p="2" spacing={6}> <Stack p="2" spacing={6}>
@ -38,7 +40,7 @@ export const EmbedUploadContent = ({ content, onSubmit }: Props) => {
<NumberInput <NumberInput
label="Height:" label="Height:"
defaultValue={content?.height} defaultValue={content?.height ?? defaultEmbedBubbleContent.height}
onValueChange={handleHeightChange} onValueChange={handleHeightChange}
suffix={t('editor.blocks.bubbles.embed.settings.numberInput.unit')} suffix={t('editor.blocks.bubbles.embed.settings.numberInput.unit')}
width="150px" width="150px"

View File

@ -1,8 +1,8 @@
import test, { expect } from '@playwright/test' import test, { expect } from '@playwright/test'
import { BubbleBlockType, defaultEmbedBubbleContent } from '@typebot.io/schemas'
import { createId } from '@paralleldrive/cuid2' import { createId } from '@paralleldrive/cuid2'
import { createTypebots } from '@typebot.io/lib/playwright/databaseActions' import { createTypebots } from '@typebot.io/lib/playwright/databaseActions'
import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers' import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers'
import { BubbleBlockType } from '@typebot.io/schemas/features/blocks/bubbles/constants'
const pdfSrc = 'https://www.orimi.com/pdf-test.pdf' const pdfSrc = 'https://www.orimi.com/pdf-test.pdf'
const siteSrc = 'https://app.cal.com/baptistearno/15min' const siteSrc = 'https://app.cal.com/baptistearno/15min'
@ -16,7 +16,6 @@ test.describe.parallel('Embed bubble block', () => {
id: typebotId, id: typebotId,
...parseDefaultGroupWithBlock({ ...parseDefaultGroupWithBlock({
type: BubbleBlockType.EMBED, type: BubbleBlockType.EMBED,
content: defaultEmbedBubbleContent,
}), }),
}, },
]) ])

View File

@ -7,6 +7,7 @@ import { Stack } from '@chakra-ui/react'
import { isDefined, isNotEmpty } from '@typebot.io/lib' import { isDefined, isNotEmpty } from '@typebot.io/lib'
import { ImageBubbleBlock } from '@typebot.io/schemas' import { ImageBubbleBlock } from '@typebot.io/schemas'
import React, { useState } from 'react' import React, { useState } from 'react'
import { defaultImageBubbleContent } from '@typebot.io/schemas/features/blocks/bubbles/image/constants'
type Props = { type Props = {
uploadFileProps: FilePathUploadProps uploadFileProps: FilePathUploadProps
@ -21,7 +22,7 @@ export const ImageBubbleSettings = ({
}: Props) => { }: Props) => {
const { t } = useTranslate() const { t } = useTranslate()
const [showClickLinkInput, setShowClickLinkInput] = useState( const [showClickLinkInput, setShowClickLinkInput] = useState(
isNotEmpty(block.content.clickLink?.url) isNotEmpty(block.content?.clickLink?.url)
) )
const updateImage = (url: string) => { const updateImage = (url: string) => {
@ -31,19 +32,19 @@ export const ImageBubbleSettings = ({
const updateClickLinkUrl = (url: string) => { const updateClickLinkUrl = (url: string) => {
onContentChange({ onContentChange({
...block.content, ...block.content,
clickLink: { ...block.content.clickLink, url }, clickLink: { ...block.content?.clickLink, url },
}) })
} }
const updateClickLinkAltText = (alt: string) => { const updateClickLinkAltText = (alt: string) => {
onContentChange({ onContentChange({
...block.content, ...block.content,
clickLink: { ...block.content.clickLink, alt }, clickLink: { ...block.content?.clickLink, alt },
}) })
} }
const toggleClickLink = () => { const toggleClickLink = () => {
if (isDefined(block.content.clickLink) && showClickLinkInput) { if (isDefined(block.content?.clickLink) && showClickLinkInput) {
onContentChange({ ...block.content, clickLink: undefined }) onContentChange({ ...block.content, clickLink: undefined })
} }
setShowClickLinkInput(!showClickLinkInput) setShowClickLinkInput(!showClickLinkInput)
@ -55,6 +56,7 @@ export const ImageBubbleSettings = ({
uploadFileProps={uploadFileProps} uploadFileProps={uploadFileProps}
defaultUrl={block.content?.url} defaultUrl={block.content?.url}
onSubmit={updateImage} onSubmit={updateImage}
excludedTabs={['emoji']}
/> />
<Stack> <Stack>
<SwitchWithLabel <SwitchWithLabel
@ -68,14 +70,17 @@ export const ImageBubbleSettings = ({
autoFocus autoFocus
placeholder="https://example.com" placeholder="https://example.com"
onChange={updateClickLinkUrl} onChange={updateClickLinkUrl}
defaultValue={block.content.clickLink?.url} defaultValue={block.content?.clickLink?.url}
/> />
<TextInput <TextInput
placeholder={t( placeholder={t(
'editor.blocks.bubbles.image.switchWithLabel.onClick.placeholder' 'editor.blocks.bubbles.image.switchWithLabel.onClick.placeholder'
)} )}
onChange={updateClickLinkAltText} onChange={updateClickLinkAltText}
defaultValue={block.content.clickLink?.alt} defaultValue={
block.content?.clickLink?.alt ??
defaultImageBubbleContent.clickLink.alt
}
/> />
</> </>
)} )}

View File

@ -1,10 +1,10 @@
import test, { expect } from '@playwright/test' import test, { expect } from '@playwright/test'
import { createTypebots } from '@typebot.io/lib/playwright/databaseActions' import { createTypebots } from '@typebot.io/lib/playwright/databaseActions'
import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers' import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers'
import { BubbleBlockType, defaultImageBubbleContent } from '@typebot.io/schemas'
import { createId } from '@paralleldrive/cuid2' import { createId } from '@paralleldrive/cuid2'
import { getTestAsset } from '@/test/utils/playwright' import { getTestAsset } from '@/test/utils/playwright'
import { proWorkspaceId } from '@typebot.io/lib/playwright/databaseSetup' import { proWorkspaceId } from '@typebot.io/lib/playwright/databaseSetup'
import { BubbleBlockType } from '@typebot.io/schemas/features/blocks/bubbles/constants'
const unsplashImageSrc = const unsplashImageSrc =
'https://images.unsplash.com/photo-1504297050568-910d24c426d3?ixlib=rb-1.2.1&ixid=MnwxMjA3fDF8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1287&q=80' 'https://images.unsplash.com/photo-1504297050568-910d24c426d3?ixlib=rb-1.2.1&ixid=MnwxMjA3fDF8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1287&q=80'
@ -18,7 +18,6 @@ test.describe.parallel('Image bubble block', () => {
id: typebotId, id: typebotId,
...parseDefaultGroupWithBlock({ ...parseDefaultGroupWithBlock({
type: BubbleBlockType.IMAGE, type: BubbleBlockType.IMAGE,
content: defaultImageBubbleContent,
}), }),
}, },
]) ])
@ -44,7 +43,6 @@ test.describe.parallel('Image bubble block', () => {
id: typebotId, id: typebotId,
...parseDefaultGroupWithBlock({ ...parseDefaultGroupWithBlock({
type: BubbleBlockType.IMAGE, type: BubbleBlockType.IMAGE,
content: defaultImageBubbleContent,
}), }),
}, },
]) ])
@ -66,7 +64,6 @@ test.describe.parallel('Image bubble block', () => {
id: typebotId, id: typebotId,
...parseDefaultGroupWithBlock({ ...parseDefaultGroupWithBlock({
type: BubbleBlockType.IMAGE, type: BubbleBlockType.IMAGE,
content: defaultImageBubbleContent,
}), }),
}, },
]) ])

View File

@ -8,7 +8,7 @@ type Props = {
} }
export const TextBubbleContent = ({ block }: Props) => { export const TextBubbleContent = ({ block }: Props) => {
const isEmpty = block.content.richText.length === 0 const isEmpty = (block.content?.richText?.length ?? 0) === 0
return ( return (
<Flex <Flex
w="90%" w="90%"
@ -17,7 +17,7 @@ export const TextBubbleContent = ({ block }: Props) => {
className="slate-html-container" className="slate-html-container"
color={isEmpty ? 'gray.500' : 'inherit'} color={isEmpty ? 'gray.500' : 'inherit'}
> >
{block.content.richText.map((element, idx) => ( {block.content?.richText?.map((element, idx) => (
<PlateBlock key={idx} element={element} /> <PlateBlock key={idx} element={element} />
))} ))}
</Flex> </Flex>

View File

@ -26,22 +26,32 @@ export const PlateText = ({
const PlateTextContent = ({ text }: { text: string }) => { const PlateTextContent = ({ text }: { text: string }) => {
const { typebot } = useTypebot() const { typebot } = useTypebot()
return ( return (
<> <>
{text.split(/\{\{(.*?\}\})/g).map((str, idx) => { {text.split(/\{\{=(.*?=\}\})/g).map((str, idx) => {
if (str.endsWith('}}')) { if (str.endsWith('=}}')) {
const variableName = str.trim().slice(0, -2)
const matchingVariable = typebot?.variables.find(
(variable) => variable.name === variableName
)
if (!matchingVariable) return '{{' + str
return ( return (
<span className="slate-variable" key={idx}> <span className="slate-inline-code" key={idx}>
{str.trim().slice(0, -2)} {str.trim().slice(0, -3)}
</span> </span>
) )
} }
return str return str.split(/\{\{(.*?\}\})/g).map((str, idx) => {
if (str.endsWith('}}')) {
const variableName = str.trim().slice(0, -2)
const matchingVariable = typebot?.variables.find(
(variable) => variable.name === variableName
)
if (!matchingVariable) return '{{' + str
return (
<span className="slate-variable" key={idx}>
{str.trim().slice(0, -2)}
</span>
)
}
return str
})
})} })}
</> </>
) )

View File

@ -1,8 +1,8 @@
import test, { expect } from '@playwright/test' import test, { expect } from '@playwright/test'
import { createTypebots } from '@typebot.io/lib/playwright/databaseActions' import { createTypebots } from '@typebot.io/lib/playwright/databaseActions'
import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers' import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers'
import { BubbleBlockType, defaultTextBubbleContent } from '@typebot.io/schemas'
import { createId } from '@paralleldrive/cuid2' import { createId } from '@paralleldrive/cuid2'
import { BubbleBlockType } from '@typebot.io/schemas/features/blocks/bubbles/constants'
test.describe('Text bubble block', () => { test.describe('Text bubble block', () => {
test('rich text features should work', async ({ page }) => { test('rich text features should work', async ({ page }) => {
@ -12,7 +12,6 @@ test.describe('Text bubble block', () => {
id: typebotId, id: typebotId,
...parseDefaultGroupWithBlock({ ...parseDefaultGroupWithBlock({
type: BubbleBlockType.TEXT, type: BubbleBlockType.TEXT,
content: defaultTextBubbleContent,
}), }),
}, },
]) ])

View File

@ -1,6 +1,7 @@
import { useTranslate } from '@tolgee/react' import { useTranslate } from '@tolgee/react'
import { Box, Text, Image } from '@chakra-ui/react' import { Box, Text, Image } from '@chakra-ui/react'
import { VideoBubbleBlock, VideoBubbleContentType } from '@typebot.io/schemas' import { VideoBubbleBlock } from '@typebot.io/schemas'
import { VideoBubbleContentType } from '@typebot.io/schemas/features/blocks/bubbles/video/constants'
type Props = { type Props = {
block: VideoBubbleBlock block: VideoBubbleBlock

View File

@ -1,16 +1,16 @@
import { Stack, Text } from '@chakra-ui/react' import { Stack, Text } from '@chakra-ui/react'
import { import { VariableString, VideoBubbleBlock } from '@typebot.io/schemas'
VariableString,
VideoBubbleContent,
VideoBubbleContentType,
} from '@typebot.io/schemas'
import { NumberInput, TextInput } from '@/components/inputs' import { NumberInput, TextInput } from '@/components/inputs'
import { useTranslate } from '@tolgee/react' import { useTranslate } from '@tolgee/react'
import { parseVideoUrl } from '@typebot.io/lib/parseVideoUrl' import { parseVideoUrl } from '@typebot.io/lib/parseVideoUrl'
import {
VideoBubbleContentType,
defaultVideoBubbleContent,
} from '@typebot.io/schemas/features/blocks/bubbles/video/constants'
type Props = { type Props = {
content?: VideoBubbleContent content?: VideoBubbleBlock['content']
onSubmit: (content: VideoBubbleContent) => void onSubmit: (content: VideoBubbleBlock['content']) => void
} }
export const VideoUploadContent = ({ content, onSubmit }: Props) => { export const VideoUploadContent = ({ content, onSubmit }: Props) => {
@ -47,7 +47,7 @@ export const VideoUploadContent = ({ content, onSubmit }: Props) => {
{content?.type !== VideoBubbleContentType.URL && ( {content?.type !== VideoBubbleContentType.URL && (
<NumberInput <NumberInput
label="Height:" label="Height:"
defaultValue={content?.height ?? 400} defaultValue={content?.height ?? defaultVideoBubbleContent.height}
onValueChange={updateHeight} onValueChange={updateHeight}
suffix={t('editor.blocks.bubbles.video.settings.numberInput.unit')} suffix={t('editor.blocks.bubbles.video.settings.numberInput.unit')}
width="150px" width="150px"

View File

@ -1,12 +1,9 @@
import test, { expect } from '@playwright/test' import test, { expect } from '@playwright/test'
import { createTypebots } from '@typebot.io/lib/playwright/databaseActions' import { createTypebots } from '@typebot.io/lib/playwright/databaseActions'
import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers' import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers'
import {
BubbleBlockType,
defaultVideoBubbleContent,
VideoBubbleContentType,
} from '@typebot.io/schemas'
import { createId } from '@paralleldrive/cuid2' import { createId } from '@paralleldrive/cuid2'
import { BubbleBlockType } from '@typebot.io/schemas/features/blocks/bubbles/constants'
import { VideoBubbleContentType } from '@typebot.io/schemas/features/blocks/bubbles/video/constants'
const videoSrc = const videoSrc =
'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerEscapes.mp4' 'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerEscapes.mp4'
@ -22,7 +19,6 @@ test.describe.parallel('Video bubble block', () => {
id: typebotId, id: typebotId,
...parseDefaultGroupWithBlock({ ...parseDefaultGroupWithBlock({
type: BubbleBlockType.VIDEO, type: BubbleBlockType.VIDEO,
content: defaultVideoBubbleContent,
}), }),
}, },
]) ])

View File

@ -4,13 +4,9 @@ import {
importTypebotInDatabase, importTypebotInDatabase,
} from '@typebot.io/lib/playwright/databaseActions' } from '@typebot.io/lib/playwright/databaseActions'
import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers' import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers'
import {
defaultChoiceInputOptions,
InputBlockType,
ItemType,
} from '@typebot.io/schemas'
import { createId } from '@paralleldrive/cuid2' import { createId } from '@paralleldrive/cuid2'
import { getTestAsset } from '@/test/utils/playwright' import { getTestAsset } from '@/test/utils/playwright'
import { InputBlockType } from '@typebot.io/schemas/features/blocks/inputs/constants'
test.describe.parallel('Buttons input block', () => { test.describe.parallel('Buttons input block', () => {
test('can edit button items', async ({ page }) => { test('can edit button items', async ({ page }) => {
@ -23,11 +19,8 @@ test.describe.parallel('Buttons input block', () => {
items: [ items: [
{ {
id: 'choice1', id: 'choice1',
blockId: 'block1',
type: ItemType.BUTTON,
}, },
], ],
options: { ...defaultChoiceInputOptions },
}), }),
}, },
]) ])

View File

@ -13,12 +13,12 @@ type Props = {
export const ButtonsBlockNode = ({ block, indices }: Props) => { export const ButtonsBlockNode = ({ block, indices }: Props) => {
const { typebot } = useTypebot() const { typebot } = useTypebot()
const dynamicVariableName = typebot?.variables.find( const dynamicVariableName = typebot?.variables.find(
(variable) => variable.id === block.options.dynamicVariableId (variable) => variable.id === block.options?.dynamicVariableId
)?.name )?.name
return ( return (
<Stack w="full"> <Stack w="full">
{block.options.dynamicVariableId ? ( {block.options?.dynamicVariableId ? (
<Wrap spacing={1}> <Wrap spacing={1}>
<Text>Display</Text> <Text>Display</Text>
<Tag bg="orange.400" color="white"> <Tag bg="orange.400" color="white">
@ -29,7 +29,7 @@ export const ButtonsBlockNode = ({ block, indices }: Props) => {
) : ( ) : (
<ItemNodesList block={block} indices={indices} /> <ItemNodesList block={block} indices={indices} />
)} )}
{block.options.variableId ? ( {block.options?.variableId ? (
<SetVariableLabel <SetVariableLabel
variableId={block.options.variableId} variableId={block.options.variableId}
variables={typebot?.variables} variables={typebot?.variables}

View File

@ -2,49 +2,53 @@ import { TextInput } from '@/components/inputs'
import { MoreInfoTooltip } from '@/components/MoreInfoTooltip' import { MoreInfoTooltip } from '@/components/MoreInfoTooltip'
import { VariableSearchInput } from '@/components/inputs/VariableSearchInput' import { VariableSearchInput } from '@/components/inputs/VariableSearchInput'
import { FormControl, FormLabel, Stack } from '@chakra-ui/react' import { FormControl, FormLabel, Stack } from '@chakra-ui/react'
import { import { ChoiceInputBlock, Variable } from '@typebot.io/schemas'
ChoiceInputOptions,
Variable,
defaultChoiceInputOptions,
} from '@typebot.io/schemas'
import React from 'react' import React from 'react'
import { SwitchWithRelatedSettings } from '@/components/SwitchWithRelatedSettings' import { SwitchWithRelatedSettings } from '@/components/SwitchWithRelatedSettings'
import { defaultChoiceInputOptions } from '@typebot.io/schemas/features/blocks/inputs/choice/constants'
type Props = { type Props = {
options?: ChoiceInputOptions options?: ChoiceInputBlock['options']
onOptionsChange: (options: ChoiceInputOptions) => void onOptionsChange: (options: ChoiceInputBlock['options']) => void
} }
export const ButtonsBlockSettings = ({ options, onOptionsChange }: Props) => { export const ButtonsBlockSettings = ({ options, onOptionsChange }: Props) => {
const updateIsMultiple = (isMultipleChoice: boolean) => const updateIsMultiple = (isMultipleChoice: boolean) =>
options && onOptionsChange({ ...options, isMultipleChoice }) onOptionsChange({ ...options, isMultipleChoice })
const updateIsSearchable = (isSearchable: boolean) => const updateIsSearchable = (isSearchable: boolean) =>
options && onOptionsChange({ ...options, isSearchable }) onOptionsChange({ ...options, isSearchable })
const updateButtonLabel = (buttonLabel: string) => const updateButtonLabel = (buttonLabel: string) =>
options && onOptionsChange({ ...options, buttonLabel }) onOptionsChange({ ...options, buttonLabel })
const updateSearchInputPlaceholder = (searchInputPlaceholder: string) => const updateSearchInputPlaceholder = (searchInputPlaceholder: string) =>
options && onOptionsChange({ ...options, searchInputPlaceholder }) onOptionsChange({ ...options, searchInputPlaceholder })
const updateSaveVariable = (variable?: Variable) => const updateSaveVariable = (variable?: Variable) =>
options && onOptionsChange({ ...options, variableId: variable?.id }) onOptionsChange({ ...options, variableId: variable?.id })
const updateDynamicDataVariable = (variable?: Variable) => const updateDynamicDataVariable = (variable?: Variable) =>
options && onOptionsChange({ ...options, dynamicVariableId: variable?.id }) onOptionsChange({ ...options, dynamicVariableId: variable?.id })
return ( return (
<Stack spacing={4}> <Stack spacing={4}>
<SwitchWithRelatedSettings <SwitchWithRelatedSettings
label="Multiple choice?" label="Multiple choice?"
initialValue={options?.isMultipleChoice ?? false} initialValue={
options?.isMultipleChoice ??
defaultChoiceInputOptions.isMultipleChoice
}
onCheckChange={updateIsMultiple} onCheckChange={updateIsMultiple}
> >
<TextInput <TextInput
label="Submit button label:" label="Submit button label:"
defaultValue={options?.buttonLabel ?? 'Send'} defaultValue={
options?.buttonLabel ?? defaultChoiceInputOptions.buttonLabel
}
onChange={updateButtonLabel} onChange={updateButtonLabel}
/> />
</SwitchWithRelatedSettings> </SwitchWithRelatedSettings>
<SwitchWithRelatedSettings <SwitchWithRelatedSettings
label="Is searchable?" label="Is searchable?"
initialValue={options?.isSearchable ?? false} initialValue={
options?.isSearchable ?? defaultChoiceInputOptions.isSearchable
}
onCheckChange={updateIsSearchable} onCheckChange={updateIsSearchable}
> >
<TextInput <TextInput

View File

@ -16,7 +16,7 @@ import {
} from '@chakra-ui/react' } from '@chakra-ui/react'
import { PlusIcon, SettingsIcon } from '@/components/icons' import { PlusIcon, SettingsIcon } from '@/components/icons'
import { useTypebot } from '@/features/editor/providers/TypebotProvider' import { useTypebot } from '@/features/editor/providers/TypebotProvider'
import { ButtonItem, Item, ItemIndices, ItemType } from '@typebot.io/schemas' import { ButtonItem, Item, ItemIndices } from '@typebot.io/schemas'
import React, { useRef, useState } from 'react' import React, { useRef, useState } from 'react'
import { isNotDefined } from '@typebot.io/lib' import { isNotDefined } from '@typebot.io/lib'
import { useGraph } from '@/features/graph/providers/GraphProvider' import { useGraph } from '@/features/graph/providers/GraphProvider'
@ -54,7 +54,7 @@ export const ButtonsItemNode = ({ item, indices, isMouseOver }: Props) => {
const handlePlusClick = () => { const handlePlusClick = () => {
const itemIndex = indices.itemIndex + 1 const itemIndex = indices.itemIndex + 1
createItem({ type: ItemType.BUTTON }, { ...indices, itemIndex }) createItem({}, { ...indices, itemIndex })
} }
const updateItemSettings = (settings: Omit<ButtonItem, 'content'>) => { const updateItemSettings = (settings: Omit<ButtonItem, 'content'>) => {

View File

@ -2,7 +2,8 @@ import React from 'react'
import { Stack } from '@chakra-ui/react' import { Stack } from '@chakra-ui/react'
import { SwitchWithRelatedSettings } from '@/components/SwitchWithRelatedSettings' import { SwitchWithRelatedSettings } from '@/components/SwitchWithRelatedSettings'
import { ConditionForm } from '@/features/blocks/logic/condition/components/ConditionForm' import { ConditionForm } from '@/features/blocks/logic/condition/components/ConditionForm'
import { ButtonItem, Condition, LogicalOperator } from '@typebot.io/schemas' import { ButtonItem, Condition } from '@typebot.io/schemas'
import { LogicalOperator } from '@typebot.io/schemas/features/blocks/logic/condition/constants'
type Props = { type Props = {
item: ButtonItem item: ButtonItem

View File

@ -3,12 +3,13 @@ import { TextInput } from '@/components/inputs'
import { SwitchWithLabel } from '@/components/inputs/SwitchWithLabel' import { SwitchWithLabel } from '@/components/inputs/SwitchWithLabel'
import { VariableSearchInput } from '@/components/inputs/VariableSearchInput' import { VariableSearchInput } from '@/components/inputs/VariableSearchInput'
import { FormLabel, Stack } from '@chakra-ui/react' import { FormLabel, Stack } from '@chakra-ui/react'
import { DateInputOptions, Variable } from '@typebot.io/schemas' import { DateInputBlock, Variable } from '@typebot.io/schemas'
import React from 'react' import React from 'react'
import { defaultDateInputOptions } from '@typebot.io/schemas/features/blocks/inputs/date/constants'
type Props = { type Props = {
options: DateInputOptions options: DateInputBlock['options']
onOptionsChange: (options: DateInputOptions) => void onOptionsChange: (options: DateInputBlock['options']) => void
} }
export const DateInputSettings = ({ options, onOptionsChange }: Props) => { export const DateInputSettings = ({ options, onOptionsChange }: Props) => {
@ -41,47 +42,56 @@ export const DateInputSettings = ({ options, onOptionsChange }: Props) => {
<Stack spacing={4}> <Stack spacing={4}>
<SwitchWithRelatedSettings <SwitchWithRelatedSettings
label="Is range?" label="Is range?"
initialValue={options.isRange} initialValue={options?.isRange ?? defaultDateInputOptions.isRange}
onCheckChange={updateIsRange} onCheckChange={updateIsRange}
> >
<TextInput <TextInput
label="From label:" label="From label:"
defaultValue={options.labels.from} defaultValue={options?.labels?.from}
onChange={updateFromLabel} onChange={updateFromLabel}
/> />
<TextInput <TextInput
label="To label:" label="To label:"
defaultValue={options.labels.to} defaultValue={
options?.labels?.to ?? defaultDateInputOptions.labels.to
}
onChange={updateToLabel} onChange={updateToLabel}
/> />
</SwitchWithRelatedSettings> </SwitchWithRelatedSettings>
<SwitchWithLabel <SwitchWithLabel
label="With time?" label="With time?"
initialValue={options.hasTime} initialValue={options?.hasTime ?? defaultDateInputOptions.hasTime}
onCheckChange={updateHasTime} onCheckChange={updateHasTime}
/> />
<TextInput <TextInput
label="Button label:" label="Button label:"
defaultValue={options.labels.button} defaultValue={
options?.labels?.button ?? defaultDateInputOptions.labels.button
}
onChange={updateButtonLabel} onChange={updateButtonLabel}
/> />
<TextInput <TextInput
label="Min:" label="Min:"
defaultValue={options.min} defaultValue={options?.min}
placeholder={options.hasTime ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD'} placeholder={options?.hasTime ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD'}
onChange={updateMin} onChange={updateMin}
/> />
<TextInput <TextInput
label="Max:" label="Max:"
defaultValue={options.max} defaultValue={options?.max}
placeholder={options.hasTime ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD'} placeholder={options?.hasTime ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD'}
onChange={updateMax} onChange={updateMax}
/> />
<TextInput <TextInput
label="Format:" label="Format:"
defaultValue={options.format} defaultValue={
moreInfoTooltip="Popular formats: dd/MM/yyyy, MM/dd/yy, yyyy-MM-dd" options?.format ??
placeholder={options.hasTime ? 'dd/MM/yyyy HH:mm' : 'dd/MM/yyyy'} (options?.hasTime
? defaultDateInputOptions.formatWithTime
: defaultDateInputOptions.format)
}
moreInfoTooltip="i.e dd/MM/yyyy, MM/dd/yy, yyyy-MM-dd"
placeholder={options?.hasTime ? 'dd/MM/yyyy HH:mm' : 'dd/MM/yyyy'}
onChange={updateFormat} onChange={updateFormat}
/> />
<Stack> <Stack>
@ -89,7 +99,7 @@ export const DateInputSettings = ({ options, onOptionsChange }: Props) => {
Save answer in a variable: Save answer in a variable:
</FormLabel> </FormLabel>
<VariableSearchInput <VariableSearchInput
initialVariableId={options.variableId} initialVariableId={options?.variableId}
onSelectVariable={updateVariable} onSelectVariable={updateVariable}
/> />
</Stack> </Stack>

View File

@ -1,8 +1,8 @@
import test, { expect } from '@playwright/test' import test, { expect } from '@playwright/test'
import { createTypebots } from '@typebot.io/lib/playwright/databaseActions' import { createTypebots } from '@typebot.io/lib/playwright/databaseActions'
import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers' import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers'
import { defaultDateInputOptions, InputBlockType } from '@typebot.io/schemas'
import { createId } from '@paralleldrive/cuid2' import { createId } from '@paralleldrive/cuid2'
import { InputBlockType } from '@typebot.io/schemas/features/blocks/inputs/constants'
test.describe('Date input block', () => { test.describe('Date input block', () => {
test('options should work', async ({ page }) => { test('options should work', async ({ page }) => {
@ -12,7 +12,6 @@ test.describe('Date input block', () => {
id: typebotId, id: typebotId,
...parseDefaultGroupWithBlock({ ...parseDefaultGroupWithBlock({
type: InputBlockType.DATE, type: InputBlockType.DATE,
options: defaultDateInputOptions,
}), }),
}, },
]) ])

View File

@ -2,15 +2,19 @@ import React from 'react'
import { Text } from '@chakra-ui/react' import { Text } from '@chakra-ui/react'
import { EmailInputBlock } from '@typebot.io/schemas' import { EmailInputBlock } from '@typebot.io/schemas'
import { WithVariableContent } from '@/features/graph/components/nodes/block/WithVariableContent' import { WithVariableContent } from '@/features/graph/components/nodes/block/WithVariableContent'
import { defaultEmailInputOptions } from '@typebot.io/schemas/features/blocks/inputs/email/constants'
type Props = { type Props = {
variableId?: string options: EmailInputBlock['options']
placeholder: EmailInputBlock['options']['labels']['placeholder']
} }
export const EmailInputNodeContent = ({ variableId, placeholder }: Props) => export const EmailInputNodeContent = ({
options: { variableId, labels } = {},
}: Props) =>
variableId ? ( variableId ? (
<WithVariableContent variableId={variableId} /> <WithVariableContent variableId={variableId} />
) : ( ) : (
<Text color={'gray.500'}>{placeholder}</Text> <Text color={'gray.500'}>
{labels?.placeholder ?? defaultEmailInputOptions.labels.placeholder}
</Text>
) )

View File

@ -1,23 +1,20 @@
import { TextInput } from '@/components/inputs' import { TextInput } from '@/components/inputs'
import { VariableSearchInput } from '@/components/inputs/VariableSearchInput' import { VariableSearchInput } from '@/components/inputs/VariableSearchInput'
import { FormLabel, Stack } from '@chakra-ui/react' import { FormLabel, Stack } from '@chakra-ui/react'
import { import { EmailInputBlock, Variable } from '@typebot.io/schemas'
EmailInputOptions, import { defaultEmailInputOptions } from '@typebot.io/schemas/features/blocks/inputs/email/constants'
Variable,
invalidEmailDefaultRetryMessage,
} from '@typebot.io/schemas'
import React from 'react' import React from 'react'
type Props = { type Props = {
options: EmailInputOptions options: EmailInputBlock['options']
onOptionsChange: (options: EmailInputOptions) => void onOptionsChange: (options: EmailInputBlock['options']) => void
} }
export const EmailInputSettings = ({ options, onOptionsChange }: Props) => { export const EmailInputSettings = ({ options, onOptionsChange }: Props) => {
const handlePlaceholderChange = (placeholder: string) => const handlePlaceholderChange = (placeholder: string) =>
onOptionsChange({ ...options, labels: { ...options.labels, placeholder } }) onOptionsChange({ ...options, labels: { ...options?.labels, placeholder } })
const handleButtonLabelChange = (button: string) => const handleButtonLabelChange = (button: string) =>
onOptionsChange({ ...options, labels: { ...options.labels, button } }) onOptionsChange({ ...options, labels: { ...options?.labels, button } })
const handleVariableChange = (variable?: Variable) => const handleVariableChange = (variable?: Variable) =>
onOptionsChange({ ...options, variableId: variable?.id }) onOptionsChange({ ...options, variableId: variable?.id })
const handleRetryMessageChange = (retryMessageContent: string) => const handleRetryMessageChange = (retryMessageContent: string) =>
@ -27,18 +24,24 @@ export const EmailInputSettings = ({ options, onOptionsChange }: Props) => {
<Stack spacing={4}> <Stack spacing={4}>
<TextInput <TextInput
label="Placeholder:" label="Placeholder:"
defaultValue={options.labels.placeholder} defaultValue={
options?.labels?.placeholder ??
defaultEmailInputOptions.labels.placeholder
}
onChange={handlePlaceholderChange} onChange={handlePlaceholderChange}
/> />
<TextInput <TextInput
label="Button label:" label="Button label:"
defaultValue={options.labels.button} defaultValue={
options?.labels?.button ?? defaultEmailInputOptions.labels.button
}
onChange={handleButtonLabelChange} onChange={handleButtonLabelChange}
/> />
<TextInput <TextInput
label="Retry message:" label="Retry message:"
defaultValue={ defaultValue={
options.retryMessageContent ?? invalidEmailDefaultRetryMessage options?.retryMessageContent ??
defaultEmailInputOptions.retryMessageContent
} }
onChange={handleRetryMessageChange} onChange={handleRetryMessageChange}
/> />
@ -47,7 +50,7 @@ export const EmailInputSettings = ({ options, onOptionsChange }: Props) => {
Save answer in a variable: Save answer in a variable:
</FormLabel> </FormLabel>
<VariableSearchInput <VariableSearchInput
initialVariableId={options.variableId} initialVariableId={options?.variableId}
onSelectVariable={handleVariableChange} onSelectVariable={handleVariableChange}
/> />
</Stack> </Stack>

View File

@ -1,12 +1,9 @@
import test, { expect } from '@playwright/test' import test, { expect } from '@playwright/test'
import { createTypebots } from '@typebot.io/lib/playwright/databaseActions' import { createTypebots } from '@typebot.io/lib/playwright/databaseActions'
import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers' import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers'
import {
defaultEmailInputOptions,
InputBlockType,
invalidEmailDefaultRetryMessage,
} from '@typebot.io/schemas'
import { createId } from '@paralleldrive/cuid2' import { createId } from '@paralleldrive/cuid2'
import { InputBlockType } from '@typebot.io/schemas/features/blocks/inputs/constants'
import { defaultEmailInputOptions } from '@typebot.io/schemas/features/blocks/inputs/email/constants'
test.describe('Email input block', () => { test.describe('Email input block', () => {
test('options should work', async ({ page }) => { test('options should work', async ({ page }) => {
@ -16,7 +13,6 @@ test.describe('Email input block', () => {
id: typebotId, id: typebotId,
...parseDefaultGroupWithBlock({ ...parseDefaultGroupWithBlock({
type: InputBlockType.EMAIL, type: InputBlockType.EMAIL,
options: defaultEmailInputOptions,
}), }),
}, },
]) ])
@ -39,7 +35,7 @@ test.describe('Email input block', () => {
await expect(page.locator('text=Your email...')).toBeVisible() await expect(page.locator('text=Your email...')).toBeVisible()
await page.getByLabel('Button label:').fill('Go') await page.getByLabel('Button label:').fill('Go')
await page.fill( await page.fill(
`input[value="${invalidEmailDefaultRetryMessage}"]`, `input[value="${defaultEmailInputOptions.retryMessageContent}"]`,
'Try again bro' 'Try again bro'
) )

View File

@ -1,18 +1,16 @@
import { WithVariableContent } from '@/features/graph/components/nodes/block/WithVariableContent' import { WithVariableContent } from '@/features/graph/components/nodes/block/WithVariableContent'
import { Text } from '@chakra-ui/react' import { Text } from '@chakra-ui/react'
import { FileInputOptions } from '@typebot.io/schemas' import { FileInputBlock } from '@typebot.io/schemas'
type Props = { type Props = {
options: FileInputOptions options: FileInputBlock['options']
} }
export const FileInputContent = ({ export const FileInputContent = ({ options }: Props) =>
options: { isMultipleAllowed, variableId }, options?.variableId ? (
}: Props) => <WithVariableContent variableId={options.variableId} />
variableId ? (
<WithVariableContent variableId={variableId} />
) : ( ) : (
<Text noOfLines={1} pr="6"> <Text noOfLines={1} pr="6">
Collect {isMultipleAllowed ? 'files' : 'file'} Collect {options?.isMultipleAllowed ? 'files' : 'file'}
</Text> </Text>
) )

View File

@ -1,22 +1,23 @@
import { FormLabel, Stack } from '@chakra-ui/react' import { FormLabel, Stack } from '@chakra-ui/react'
import { CodeEditor } from '@/components/inputs/CodeEditor' import { CodeEditor } from '@/components/inputs/CodeEditor'
import { FileInputOptions, Variable } from '@typebot.io/schemas' import { FileInputBlock, Variable } from '@typebot.io/schemas'
import React from 'react' import React from 'react'
import { TextInput } from '@/components/inputs' import { TextInput } from '@/components/inputs'
import { SwitchWithLabel } from '@/components/inputs/SwitchWithLabel' import { SwitchWithLabel } from '@/components/inputs/SwitchWithLabel'
import { VariableSearchInput } from '@/components/inputs/VariableSearchInput' import { VariableSearchInput } from '@/components/inputs/VariableSearchInput'
import { defaultFileInputOptions } from '@typebot.io/schemas/features/blocks/inputs/file/constants'
type Props = { type Props = {
options: FileInputOptions options: FileInputBlock['options']
onOptionsChange: (options: FileInputOptions) => void onOptionsChange: (options: FileInputBlock['options']) => void
} }
export const FileInputSettings = ({ options, onOptionsChange }: Props) => { export const FileInputSettings = ({ options, onOptionsChange }: Props) => {
const handleButtonLabelChange = (button: string) => const handleButtonLabelChange = (button: string) =>
onOptionsChange({ ...options, labels: { ...options.labels, button } }) onOptionsChange({ ...options, labels: { ...options?.labels, button } })
const handlePlaceholderLabelChange = (placeholder: string) => const handlePlaceholderLabelChange = (placeholder: string) =>
onOptionsChange({ ...options, labels: { ...options.labels, placeholder } }) onOptionsChange({ ...options, labels: { ...options?.labels, placeholder } })
const handleMultipleFilesChange = (isMultipleAllowed: boolean) => const handleMultipleFilesChange = (isMultipleAllowed: boolean) =>
onOptionsChange({ ...options, isMultipleAllowed }) onOptionsChange({ ...options, isMultipleAllowed })
@ -28,21 +29,24 @@ export const FileInputSettings = ({ options, onOptionsChange }: Props) => {
onOptionsChange({ ...options, isRequired }) onOptionsChange({ ...options, isRequired })
const updateClearButtonLabel = (clear: string) => const updateClearButtonLabel = (clear: string) =>
onOptionsChange({ ...options, labels: { ...options.labels, clear } }) onOptionsChange({ ...options, labels: { ...options?.labels, clear } })
const updateSkipButtonLabel = (skip: string) => const updateSkipButtonLabel = (skip: string) =>
onOptionsChange({ ...options, labels: { ...options.labels, skip } }) onOptionsChange({ ...options, labels: { ...options?.labels, skip } })
return ( return (
<Stack spacing={4}> <Stack spacing={4}>
<SwitchWithLabel <SwitchWithLabel
label="Required?" label="Required?"
initialValue={options.isRequired ?? true} initialValue={options?.isRequired ?? defaultFileInputOptions.isRequired}
onCheckChange={handleRequiredChange} onCheckChange={handleRequiredChange}
/> />
<SwitchWithLabel <SwitchWithLabel
label="Allow multiple files?" label="Allow multiple files?"
initialValue={options.isMultipleAllowed} initialValue={
options?.isMultipleAllowed ??
defaultFileInputOptions.isMultipleAllowed
}
onCheckChange={handleMultipleFilesChange} onCheckChange={handleMultipleFilesChange}
/> />
<Stack> <Stack>
@ -50,35 +54,44 @@ export const FileInputSettings = ({ options, onOptionsChange }: Props) => {
<CodeEditor <CodeEditor
lang="html" lang="html"
onChange={handlePlaceholderLabelChange} onChange={handlePlaceholderLabelChange}
defaultValue={options.labels.placeholder} defaultValue={
options?.labels?.placeholder ??
defaultFileInputOptions.labels.placeholder
}
height={'100px'} height={'100px'}
withVariableButton={false} withVariableButton={false}
/> />
</Stack> </Stack>
<TextInput <TextInput
label="Button label:" label="Button label:"
defaultValue={options.labels.button} defaultValue={
options?.labels?.button ?? defaultFileInputOptions.labels.button
}
onChange={handleButtonLabelChange} onChange={handleButtonLabelChange}
withVariableButton={false} withVariableButton={false}
/> />
<TextInput <TextInput
label="Clear button label:" label="Clear button label:"
defaultValue={options.labels.clear ?? ''} defaultValue={
options?.labels?.clear ?? defaultFileInputOptions.labels.clear
}
onChange={updateClearButtonLabel} onChange={updateClearButtonLabel}
withVariableButton={false} withVariableButton={false}
/> />
<TextInput <TextInput
label="Skip button label:" label="Skip button label:"
defaultValue={options.labels.skip ?? ''} defaultValue={
options?.labels?.skip ?? defaultFileInputOptions.labels.skip
}
onChange={updateSkipButtonLabel} onChange={updateSkipButtonLabel}
withVariableButton={false} withVariableButton={false}
/> />
<Stack> <Stack>
<FormLabel mb="0" htmlFor="variable"> <FormLabel mb="0" htmlFor="variable">
Save upload URL{options.isMultipleAllowed ? 's' : ''} in a variable: Save upload URL{options?.isMultipleAllowed ? 's' : ''} in a variable:
</FormLabel> </FormLabel>
<VariableSearchInput <VariableSearchInput
initialVariableId={options.variableId} initialVariableId={options?.variableId}
onSelectVariable={handleVariableChange} onSelectVariable={handleVariableChange}
/> />
</Stack> </Stack>

View File

@ -1,10 +1,10 @@
import test, { expect } from '@playwright/test' import test, { expect } from '@playwright/test'
import { createTypebots } from '@typebot.io/lib/playwright/databaseActions' import { createTypebots } from '@typebot.io/lib/playwright/databaseActions'
import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers' import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers'
import { defaultFileInputOptions, InputBlockType } from '@typebot.io/schemas'
import { createId } from '@paralleldrive/cuid2' import { createId } from '@paralleldrive/cuid2'
import { freeWorkspaceId } from '@typebot.io/lib/playwright/databaseSetup' import { freeWorkspaceId } from '@typebot.io/lib/playwright/databaseSetup'
import { getTestAsset } from '@/test/utils/playwright' import { getTestAsset } from '@/test/utils/playwright'
import { InputBlockType } from '@typebot.io/schemas/features/blocks/inputs/constants'
test.describe.configure({ mode: 'parallel' }) test.describe.configure({ mode: 'parallel' })
@ -15,7 +15,6 @@ test('options should work', async ({ page }) => {
id: typebotId, id: typebotId,
...parseDefaultGroupWithBlock({ ...parseDefaultGroupWithBlock({
type: InputBlockType.FILE, type: InputBlockType.FILE,
options: defaultFileInputOptions,
}), }),
}, },
]) ])
@ -59,8 +58,8 @@ test.describe('Free workspace', () => {
id: typebotId, id: typebotId,
...parseDefaultGroupWithBlock({ ...parseDefaultGroupWithBlock({
type: InputBlockType.FILE, type: InputBlockType.FILE,
options: defaultFileInputOptions,
}), }),
version: '6',
workspaceId: freeWorkspaceId, workspaceId: freeWorkspaceId,
}, },
]) ])

View File

@ -1,25 +1,29 @@
import { TextInput, NumberInput } from '@/components/inputs' import { TextInput, NumberInput } from '@/components/inputs'
import { VariableSearchInput } from '@/components/inputs/VariableSearchInput' import { VariableSearchInput } from '@/components/inputs/VariableSearchInput'
import { FormLabel, Stack } from '@chakra-ui/react' import { FormLabel, Stack } from '@chakra-ui/react'
import { NumberInputOptions, Variable } from '@typebot.io/schemas' import { NumberInputBlock, Variable } from '@typebot.io/schemas'
import { defaultNumberInputOptions } from '@typebot.io/schemas/features/blocks/inputs/number/constants'
import React from 'react' import React from 'react'
type Props = { type Props = {
options: NumberInputOptions options: NumberInputBlock['options']
onOptionsChange: (options: NumberInputOptions) => void onOptionsChange: (options: NumberInputBlock['options']) => void
} }
export const NumberInputSettings = ({ options, onOptionsChange }: Props) => { export const NumberInputSettings = ({ options, onOptionsChange }: Props) => {
const handlePlaceholderChange = (placeholder: string) => const handlePlaceholderChange = (placeholder: string) =>
onOptionsChange({ ...options, labels: { ...options.labels, placeholder } }) onOptionsChange({ ...options, labels: { ...options?.labels, placeholder } })
const handleButtonLabelChange = (button: string) => const handleButtonLabelChange = (button: string) =>
onOptionsChange({ ...options, labels: { ...options.labels, button } }) onOptionsChange({ ...options, labels: { ...options?.labels, button } })
const handleMinChange = (min?: NumberInputOptions['min']) => const handleMinChange = (
onOptionsChange({ ...options, min }) min?: NonNullable<NumberInputBlock['options']>['min']
const handleMaxChange = (max?: NumberInputOptions['max']) => ) => onOptionsChange({ ...options, min })
onOptionsChange({ ...options, max }) const handleMaxChange = (
const handleStepChange = (step?: NumberInputOptions['step']) => max?: NonNullable<NumberInputBlock['options']>['max']
onOptionsChange({ ...options, step }) ) => onOptionsChange({ ...options, max })
const handleStepChange = (
step?: NonNullable<NumberInputBlock['options']>['step']
) => onOptionsChange({ ...options, step })
const handleVariableChange = (variable?: Variable) => { const handleVariableChange = (variable?: Variable) => {
onOptionsChange({ ...options, variableId: variable?.id }) onOptionsChange({ ...options, variableId: variable?.id })
} }
@ -28,27 +32,32 @@ export const NumberInputSettings = ({ options, onOptionsChange }: Props) => {
<Stack spacing={4}> <Stack spacing={4}>
<TextInput <TextInput
label="Placeholder:" label="Placeholder:"
defaultValue={options.labels.placeholder} defaultValue={
options?.labels?.placeholder ??
defaultNumberInputOptions.labels.placeholder
}
onChange={handlePlaceholderChange} onChange={handlePlaceholderChange}
/> />
<TextInput <TextInput
label="Button label:" label="Button label:"
defaultValue={options?.labels?.button ?? 'Send'} defaultValue={
options?.labels?.button ?? defaultNumberInputOptions.labels.button
}
onChange={handleButtonLabelChange} onChange={handleButtonLabelChange}
/> />
<NumberInput <NumberInput
label="Min:" label="Min:"
defaultValue={options.min} defaultValue={options?.min}
onValueChange={handleMinChange} onValueChange={handleMinChange}
/> />
<NumberInput <NumberInput
label="Max:" label="Max:"
defaultValue={options.max} defaultValue={options?.max}
onValueChange={handleMaxChange} onValueChange={handleMaxChange}
/> />
<NumberInput <NumberInput
label="Step:" label="Step:"
defaultValue={options.step} defaultValue={options?.step}
onValueChange={handleStepChange} onValueChange={handleStepChange}
/> />
<Stack> <Stack>
@ -56,7 +65,7 @@ export const NumberInputSettings = ({ options, onOptionsChange }: Props) => {
Save answer in a variable: Save answer in a variable:
</FormLabel> </FormLabel>
<VariableSearchInput <VariableSearchInput
initialVariableId={options.variableId} initialVariableId={options?.variableId}
onSelectVariable={handleVariableChange} onSelectVariable={handleVariableChange}
/> />
</Stack> </Stack>

View File

@ -2,15 +2,19 @@ import React from 'react'
import { Text } from '@chakra-ui/react' import { Text } from '@chakra-ui/react'
import { NumberInputBlock } from '@typebot.io/schemas' import { NumberInputBlock } from '@typebot.io/schemas'
import { WithVariableContent } from '@/features/graph/components/nodes/block/WithVariableContent' import { WithVariableContent } from '@/features/graph/components/nodes/block/WithVariableContent'
import { defaultNumberInputOptions } from '@typebot.io/schemas/features/blocks/inputs/number/constants'
type Props = { type Props = {
variableId?: string options: NumberInputBlock['options']
placeholder: NumberInputBlock['options']['labels']['placeholder']
} }
export const NumberNodeContent = ({ variableId, placeholder }: Props) => export const NumberNodeContent = ({
options: { variableId, labels } = {},
}: Props) =>
variableId ? ( variableId ? (
<WithVariableContent variableId={variableId} /> <WithVariableContent variableId={variableId} />
) : ( ) : (
<Text color={'gray.500'}>{placeholder}</Text> <Text color={'gray.500'}>
{labels?.placeholder ?? defaultNumberInputOptions.labels.placeholder}
</Text>
) )

View File

@ -1,8 +1,9 @@
import test, { expect } from '@playwright/test' import test, { expect } from '@playwright/test'
import { createTypebots } from '@typebot.io/lib/playwright/databaseActions' import { createTypebots } from '@typebot.io/lib/playwright/databaseActions'
import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers' import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers'
import { defaultNumberInputOptions, InputBlockType } from '@typebot.io/schemas'
import { createId } from '@paralleldrive/cuid2' import { createId } from '@paralleldrive/cuid2'
import { InputBlockType } from '@typebot.io/schemas/features/blocks/inputs/constants'
import { defaultNumberInputOptions } from '@typebot.io/schemas/features/blocks/inputs/number/constants'
test.describe('Number input block', () => { test.describe('Number input block', () => {
test('options should work', async ({ page }) => { test('options should work', async ({ page }) => {
@ -12,7 +13,6 @@ test.describe('Number input block', () => {
id: typebotId, id: typebotId,
...parseDefaultGroupWithBlock({ ...parseDefaultGroupWithBlock({
type: InputBlockType.NUMBER, type: InputBlockType.NUMBER,
options: defaultNumberInputOptions,
}), }),
}, },
]) ])

View File

@ -7,7 +7,7 @@ type Props = {
export const PaymentInputContent = ({ block }: Props) => { export const PaymentInputContent = ({ block }: Props) => {
if ( if (
!block.options.amount || !block.options?.amount ||
!block.options.credentialsId || !block.options.credentialsId ||
!block.options.currency !block.options.currency
) )

View File

@ -11,11 +11,7 @@ import {
AccordionPanel, AccordionPanel,
} from '@chakra-ui/react' } from '@chakra-ui/react'
import { DropdownList } from '@/components/DropdownList' import { DropdownList } from '@/components/DropdownList'
import { import { PaymentAddress, PaymentInputBlock } from '@typebot.io/schemas'
PaymentAddress,
PaymentInputOptions,
PaymentProvider,
} from '@typebot.io/schemas'
import React, { ChangeEvent } from 'react' import React, { ChangeEvent } from 'react'
import { currencies } from '../currencies' import { currencies } from '../currencies'
import { StripeConfigModal } from './StripeConfigModal' import { StripeConfigModal } from './StripeConfigModal'
@ -23,10 +19,14 @@ import { CredentialsDropdown } from '@/features/credentials/components/Credentia
import { TextInput } from '@/components/inputs' import { TextInput } from '@/components/inputs'
import { useWorkspace } from '@/features/workspace/WorkspaceProvider' import { useWorkspace } from '@/features/workspace/WorkspaceProvider'
import { PaymentAddressSettings } from './PaymentAddressSettings' import { PaymentAddressSettings } from './PaymentAddressSettings'
import {
PaymentProvider,
defaultPaymentInputOptions,
} from '@typebot.io/schemas/features/blocks/inputs/payment/constants'
type Props = { type Props = {
options: PaymentInputOptions options: PaymentInputBlock['options']
onOptionsChange: (options: PaymentInputOptions) => void onOptionsChange: (options: PaymentInputBlock['options']) => void
} }
export const PaymentSettings = ({ options, onOptionsChange }: Props) => { export const PaymentSettings = ({ options, onOptionsChange }: Props) => {
@ -62,43 +62,43 @@ export const PaymentSettings = ({ options, onOptionsChange }: Props) => {
const updateName = (name: string) => const updateName = (name: string) =>
onOptionsChange({ onOptionsChange({
...options, ...options,
additionalInformation: { ...options.additionalInformation, name }, additionalInformation: { ...options?.additionalInformation, name },
}) })
const updateEmail = (email: string) => const updateEmail = (email: string) =>
onOptionsChange({ onOptionsChange({
...options, ...options,
additionalInformation: { ...options.additionalInformation, email }, additionalInformation: { ...options?.additionalInformation, email },
}) })
const updatePhoneNumber = (phoneNumber: string) => const updatePhoneNumber = (phoneNumber: string) =>
onOptionsChange({ onOptionsChange({
...options, ...options,
additionalInformation: { ...options.additionalInformation, phoneNumber }, additionalInformation: { ...options?.additionalInformation, phoneNumber },
}) })
const updateButtonLabel = (button: string) => const updateButtonLabel = (button: string) =>
onOptionsChange({ onOptionsChange({
...options, ...options,
labels: { ...options.labels, button }, labels: { ...options?.labels, button },
}) })
const updateSuccessLabel = (success: string) => const updateSuccessLabel = (success: string) =>
onOptionsChange({ onOptionsChange({
...options, ...options,
labels: { ...options.labels, success }, labels: { ...options?.labels, success },
}) })
const updateDescription = (description: string) => const updateDescription = (description: string) =>
onOptionsChange({ onOptionsChange({
...options, ...options,
additionalInformation: { ...options.additionalInformation, description }, additionalInformation: { ...options?.additionalInformation, description },
}) })
const updateAddress = (address: PaymentAddress) => const updateAddress = (address: PaymentAddress) =>
onOptionsChange({ onOptionsChange({
...options, ...options,
additionalInformation: { ...options.additionalInformation, address }, additionalInformation: { ...options?.additionalInformation, address },
}) })
return ( return (
@ -108,7 +108,7 @@ export const PaymentSettings = ({ options, onOptionsChange }: Props) => {
<DropdownList <DropdownList
onItemSelect={updateProvider} onItemSelect={updateProvider}
items={Object.values(PaymentProvider)} items={Object.values(PaymentProvider)}
currentItem={options.provider} currentItem={options?.provider ?? defaultPaymentInputOptions.provider}
/> />
</Stack> </Stack>
<Stack> <Stack>
@ -117,7 +117,7 @@ export const PaymentSettings = ({ options, onOptionsChange }: Props) => {
<CredentialsDropdown <CredentialsDropdown
type="stripe" type="stripe"
workspaceId={workspace.id} workspaceId={workspace.id}
currentCredentialsId={options.credentialsId} currentCredentialsId={options?.credentialsId}
onCredentialsSelect={updateCredentials} onCredentialsSelect={updateCredentials}
onCreateNewClick={onOpen} onCreateNewClick={onOpen}
credentialsName="Stripe account" credentialsName="Stripe account"
@ -128,14 +128,14 @@ export const PaymentSettings = ({ options, onOptionsChange }: Props) => {
<TextInput <TextInput
label="Price amount:" label="Price amount:"
onChange={updateAmount} onChange={updateAmount}
defaultValue={options.amount ?? ''} defaultValue={options?.amount}
placeholder="30.00" placeholder="30.00"
/> />
<Stack> <Stack>
<Text>Currency:</Text> <Text>Currency:</Text>
<Select <Select
placeholder="Select option" placeholder="Select option"
value={options.currency} value={options?.currency ?? defaultPaymentInputOptions.currency}
onChange={updateCurrency} onChange={updateCurrency}
> >
{currencies.map((currency) => ( {currencies.map((currency) => (
@ -149,14 +149,16 @@ export const PaymentSettings = ({ options, onOptionsChange }: Props) => {
<TextInput <TextInput
label="Button label:" label="Button label:"
onChange={updateButtonLabel} onChange={updateButtonLabel}
defaultValue={options.labels.button} defaultValue={
placeholder="Pay" options?.labels?.button ?? defaultPaymentInputOptions.labels.button
}
/> />
<TextInput <TextInput
label="Success message:" label="Success message:"
onChange={updateSuccessLabel} onChange={updateSuccessLabel}
defaultValue={options.labels.success ?? 'Success'} defaultValue={
placeholder="Success" options?.labels?.success ?? defaultPaymentInputOptions.labels.success
}
/> />
<Accordion allowToggle> <Accordion allowToggle>
<AccordionItem> <AccordionItem>
@ -167,30 +169,30 @@ export const PaymentSettings = ({ options, onOptionsChange }: Props) => {
<AccordionPanel py={4} as={Stack} spacing="6"> <AccordionPanel py={4} as={Stack} spacing="6">
<TextInput <TextInput
label="Description:" label="Description:"
defaultValue={options.additionalInformation?.description ?? ''} defaultValue={options?.additionalInformation?.description}
onChange={updateDescription} onChange={updateDescription}
placeholder="A digital product" placeholder="A digital product"
/> />
<TextInput <TextInput
label="Name:" label="Name:"
defaultValue={options.additionalInformation?.name ?? ''} defaultValue={options?.additionalInformation?.name}
onChange={updateName} onChange={updateName}
placeholder="John Smith" placeholder="John Smith"
/> />
<TextInput <TextInput
label="Email:" label="Email:"
defaultValue={options.additionalInformation?.email ?? ''} defaultValue={options?.additionalInformation?.email}
onChange={updateEmail} onChange={updateEmail}
placeholder="john@gmail.com" placeholder="john@gmail.com"
/> />
<TextInput <TextInput
label="Phone number:" label="Phone number:"
defaultValue={options.additionalInformation?.phoneNumber ?? ''} defaultValue={options?.additionalInformation?.phoneNumber}
onChange={updatePhoneNumber} onChange={updatePhoneNumber}
placeholder="+33XXXXXXXXX" placeholder="+33XXXXXXXXX"
/> />
<PaymentAddressSettings <PaymentAddressSettings
address={options.additionalInformation?.address} address={options?.additionalInformation?.address}
onAddressChange={updateAddress} onAddressChange={updateAddress}
/> />
</AccordionPanel> </AccordionPanel>

View File

@ -1,10 +1,10 @@
import test, { expect } from '@playwright/test' import test, { expect } from '@playwright/test'
import { createTypebots } from '@typebot.io/lib/playwright/databaseActions' import { createTypebots } from '@typebot.io/lib/playwright/databaseActions'
import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers' import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers'
import { defaultPaymentInputOptions, InputBlockType } from '@typebot.io/schemas'
import { createId } from '@paralleldrive/cuid2' import { createId } from '@paralleldrive/cuid2'
import { stripePaymentForm } from '@/test/utils/selectorUtils' import { stripePaymentForm } from '@/test/utils/selectorUtils'
import { env } from '@typebot.io/env' import { env } from '@typebot.io/env'
import { InputBlockType } from '@typebot.io/schemas/features/blocks/inputs/constants'
test.describe('Payment input block', () => { test.describe('Payment input block', () => {
test('Can configure Stripe account', async ({ page }) => { test('Can configure Stripe account', async ({ page }) => {
@ -14,7 +14,6 @@ test.describe('Payment input block', () => {
id: typebotId, id: typebotId,
...parseDefaultGroupWithBlock({ ...parseDefaultGroupWithBlock({
type: InputBlockType.PAYMENT, type: InputBlockType.PAYMENT,
options: defaultPaymentInputOptions,
}), }),
}, },
]) ])

View File

@ -1,20 +1,21 @@
import { TextInput } from '@/components/inputs' import { TextInput } from '@/components/inputs'
import { VariableSearchInput } from '@/components/inputs/VariableSearchInput' import { VariableSearchInput } from '@/components/inputs/VariableSearchInput'
import { FormLabel, Stack } from '@chakra-ui/react' import { FormLabel, Stack } from '@chakra-ui/react'
import { PhoneNumberInputOptions, Variable } from '@typebot.io/schemas' import { PhoneNumberInputBlock, Variable } from '@typebot.io/schemas'
import React from 'react' import React from 'react'
import { CountryCodeSelect } from './CountryCodeSelect' import { CountryCodeSelect } from './CountryCodeSelect'
import { defaultPhoneInputOptions } from '@typebot.io/schemas/features/blocks/inputs/phone/constants'
type Props = { type Props = {
options: PhoneNumberInputOptions options: PhoneNumberInputBlock['options']
onOptionsChange: (options: PhoneNumberInputOptions) => void onOptionsChange: (options: PhoneNumberInputBlock['options']) => void
} }
export const PhoneInputSettings = ({ options, onOptionsChange }: Props) => { export const PhoneInputSettings = ({ options, onOptionsChange }: Props) => {
const handlePlaceholderChange = (placeholder: string) => const handlePlaceholderChange = (placeholder: string) =>
onOptionsChange({ ...options, labels: { ...options.labels, placeholder } }) onOptionsChange({ ...options, labels: { ...options?.labels, placeholder } })
const handleButtonLabelChange = (button: string) => const handleButtonLabelChange = (button: string) =>
onOptionsChange({ ...options, labels: { ...options.labels, button } }) onOptionsChange({ ...options, labels: { ...options?.labels, button } })
const handleVariableChange = (variable?: Variable) => const handleVariableChange = (variable?: Variable) =>
onOptionsChange({ ...options, variableId: variable?.id }) onOptionsChange({ ...options, variableId: variable?.id })
const handleRetryMessageChange = (retryMessageContent: string) => const handleRetryMessageChange = (retryMessageContent: string) =>
@ -26,12 +27,17 @@ export const PhoneInputSettings = ({ options, onOptionsChange }: Props) => {
<Stack spacing={4}> <Stack spacing={4}>
<TextInput <TextInput
label="Placeholder:" label="Placeholder:"
defaultValue={options.labels.placeholder} defaultValue={
options?.labels?.placeholder ??
defaultPhoneInputOptions.labels.placeholder
}
onChange={handlePlaceholderChange} onChange={handlePlaceholderChange}
/> />
<TextInput <TextInput
label="Button label:" label="Button label:"
defaultValue={options.labels.button} defaultValue={
options?.labels?.button ?? defaultPhoneInputOptions.labels.button
}
onChange={handleButtonLabelChange} onChange={handleButtonLabelChange}
/> />
<Stack> <Stack>
@ -40,12 +46,15 @@ export const PhoneInputSettings = ({ options, onOptionsChange }: Props) => {
</FormLabel> </FormLabel>
<CountryCodeSelect <CountryCodeSelect
onSelect={handleDefaultCountryChange} onSelect={handleDefaultCountryChange}
countryCode={options.defaultCountryCode} countryCode={options?.defaultCountryCode}
/> />
</Stack> </Stack>
<TextInput <TextInput
label="Retry message:" label="Retry message:"
defaultValue={options.retryMessageContent} defaultValue={
options?.retryMessageContent ??
defaultPhoneInputOptions.retryMessageContent
}
onChange={handleRetryMessageChange} onChange={handleRetryMessageChange}
/> />
<Stack> <Stack>
@ -53,7 +62,7 @@ export const PhoneInputSettings = ({ options, onOptionsChange }: Props) => {
Save answer in a variable: Save answer in a variable:
</FormLabel> </FormLabel>
<VariableSearchInput <VariableSearchInput
initialVariableId={options.variableId} initialVariableId={options?.variableId}
onSelectVariable={handleVariableChange} onSelectVariable={handleVariableChange}
/> />
</Stack> </Stack>

View File

@ -1,16 +1,20 @@
import React from 'react' import React from 'react'
import { Text } from '@chakra-ui/react' import { Text } from '@chakra-ui/react'
import { PhoneNumberInputOptions } from '@typebot.io/schemas'
import { WithVariableContent } from '@/features/graph/components/nodes/block/WithVariableContent' import { WithVariableContent } from '@/features/graph/components/nodes/block/WithVariableContent'
import { PhoneNumberInputBlock } from '@typebot.io/schemas'
import { defaultPhoneInputOptions } from '@typebot.io/schemas/features/blocks/inputs/phone/constants'
type Props = { type Props = {
variableId?: string options: PhoneNumberInputBlock['options']
placeholder: PhoneNumberInputOptions['labels']['placeholder']
} }
export const PhoneNodeContent = ({ variableId, placeholder }: Props) => export const PhoneNodeContent = ({
options: { variableId, labels } = {},
}: Props) =>
variableId ? ( variableId ? (
<WithVariableContent variableId={variableId} /> <WithVariableContent variableId={variableId} />
) : ( ) : (
<Text color={'gray.500'}>{placeholder}</Text> <Text color={'gray.500'}>
{labels?.placeholder ?? defaultPhoneInputOptions.labels.placeholder}
</Text>
) )

View File

@ -1,8 +1,9 @@
import test, { expect } from '@playwright/test' import test, { expect } from '@playwright/test'
import { createTypebots } from '@typebot.io/lib/playwright/databaseActions' import { createTypebots } from '@typebot.io/lib/playwright/databaseActions'
import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers' import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers'
import { defaultPhoneInputOptions, InputBlockType } from '@typebot.io/schemas'
import { createId } from '@paralleldrive/cuid2' import { createId } from '@paralleldrive/cuid2'
import { InputBlockType } from '@typebot.io/schemas/features/blocks/inputs/constants'
import { defaultPhoneInputOptions } from '@typebot.io/schemas/features/blocks/inputs/phone/constants'
test.describe('Phone input block', () => { test.describe('Phone input block', () => {
test('options should work', async ({ page }) => { test('options should work', async ({ page }) => {
@ -12,7 +13,6 @@ test.describe('Phone input block', () => {
id: typebotId, id: typebotId,
...parseDefaultGroupWithBlock({ ...parseDefaultGroupWithBlock({
type: InputBlockType.PHONE, type: InputBlockType.PHONE,
options: defaultPhoneInputOptions,
}), }),
}, },
]) ])

View File

@ -14,7 +14,7 @@ import {
} from '@chakra-ui/react' } from '@chakra-ui/react'
import { ImageIcon, PlusIcon } from '@/components/icons' import { ImageIcon, PlusIcon } from '@/components/icons'
import { useTypebot } from '@/features/editor/providers/TypebotProvider' import { useTypebot } from '@/features/editor/providers/TypebotProvider'
import { ItemIndices, ItemType } from '@typebot.io/schemas' import { ItemIndices } from '@typebot.io/schemas'
import React, { useRef } from 'react' import React, { useRef } from 'react'
import { PictureChoiceItem } from '@typebot.io/schemas/features/blocks/inputs/pictureChoice' import { PictureChoiceItem } from '@typebot.io/schemas/features/blocks/inputs/pictureChoice'
import { useGraph } from '@/features/graph/providers/GraphProvider' import { useGraph } from '@/features/graph/providers/GraphProvider'
@ -40,7 +40,7 @@ export const PictureChoiceItemNode = ({
const handlePlusClick = (e: React.MouseEvent) => { const handlePlusClick = (e: React.MouseEvent) => {
e.stopPropagation() e.stopPropagation()
const itemIndex = indices.itemIndex + 1 const itemIndex = indices.itemIndex + 1
createItem({ type: ItemType.PICTURE_CHOICE }, { ...indices, itemIndex }) createItem({}, { ...indices, itemIndex })
} }
const handleMouseDown = (e: React.MouseEvent) => e.stopPropagation() const handleMouseDown = (e: React.MouseEvent) => e.stopPropagation()

View File

@ -13,7 +13,8 @@ import {
import { ImageUploadContent } from '@/components/ImageUploadContent' import { ImageUploadContent } from '@/components/ImageUploadContent'
import { SwitchWithRelatedSettings } from '@/components/SwitchWithRelatedSettings' import { SwitchWithRelatedSettings } from '@/components/SwitchWithRelatedSettings'
import { ConditionForm } from '@/features/blocks/logic/condition/components/ConditionForm' import { ConditionForm } from '@/features/blocks/logic/condition/components/ConditionForm'
import { Condition, LogicalOperator } from '@typebot.io/schemas' import { Condition } from '@typebot.io/schemas'
import { LogicalOperator } from '@typebot.io/schemas/features/blocks/logic/condition/constants'
type Props = { type Props = {
workspaceId: string workspaceId: string

View File

@ -15,12 +15,12 @@ export const PictureChoiceNode = ({ block, indices }: Props) => {
const { typebot } = useTypebot() const { typebot } = useTypebot()
const dynamicVariableName = typebot?.variables.find( const dynamicVariableName = typebot?.variables.find(
(variable) => (variable) =>
variable.id === block.options.dynamicItems?.pictureSrcsVariableId variable.id === block.options?.dynamicItems?.pictureSrcsVariableId
)?.name )?.name
return ( return (
<Stack w="full"> <Stack w="full">
{block.options.dynamicItems?.isEnabled && dynamicVariableName ? ( {block.options?.dynamicItems?.isEnabled && dynamicVariableName ? (
<Wrap spacing={1}> <Wrap spacing={1}>
<Text>Display</Text> <Text>Display</Text>
<Tag bg="orange.400" color="white"> <Tag bg="orange.400" color="white">
@ -31,7 +31,7 @@ export const PictureChoiceNode = ({ block, indices }: Props) => {
) : ( ) : (
<ItemNodesList block={block} indices={indices} /> <ItemNodesList block={block} indices={indices} />
)} )}
{block.options.variableId ? ( {block.options?.variableId ? (
<SetVariableLabel <SetVariableLabel
variableId={block.options.variableId} variableId={block.options.variableId}
variables={typebot?.variables} variables={typebot?.variables}

View File

@ -3,11 +3,9 @@ import { VariableSearchInput } from '@/components/inputs/VariableSearchInput'
import { FormLabel, Stack } from '@chakra-ui/react' import { FormLabel, Stack } from '@chakra-ui/react'
import { Variable } from '@typebot.io/schemas' import { Variable } from '@typebot.io/schemas'
import React from 'react' import React from 'react'
import { import { PictureChoiceBlock } from '@typebot.io/schemas/features/blocks/inputs/pictureChoice'
PictureChoiceBlock,
defaultPictureChoiceOptions,
} from '@typebot.io/schemas/features/blocks/inputs/pictureChoice'
import { SwitchWithRelatedSettings } from '@/components/SwitchWithRelatedSettings' import { SwitchWithRelatedSettings } from '@/components/SwitchWithRelatedSettings'
import { defaultPictureChoiceOptions } from '@typebot.io/schemas/features/blocks/inputs/pictureChoice/constants'
type Props = { type Props = {
options?: PictureChoiceBlock['options'] options?: PictureChoiceBlock['options']
@ -16,52 +14,48 @@ type Props = {
export const PictureChoiceSettings = ({ options, onOptionsChange }: Props) => { export const PictureChoiceSettings = ({ options, onOptionsChange }: Props) => {
const updateIsMultiple = (isMultipleChoice: boolean) => const updateIsMultiple = (isMultipleChoice: boolean) =>
options && onOptionsChange({ ...options, isMultipleChoice }) onOptionsChange({ ...options, isMultipleChoice })
const updateButtonLabel = (buttonLabel: string) => const updateButtonLabel = (buttonLabel: string) =>
options && onOptionsChange({ ...options, buttonLabel }) onOptionsChange({ ...options, buttonLabel })
const updateSaveVariable = (variable?: Variable) => const updateSaveVariable = (variable?: Variable) =>
options && onOptionsChange({ ...options, variableId: variable?.id }) onOptionsChange({ ...options, variableId: variable?.id })
const updateSearchInputPlaceholder = (searchInputPlaceholder: string) => const updateSearchInputPlaceholder = (searchInputPlaceholder: string) =>
options && onOptionsChange({ ...options, searchInputPlaceholder }) onOptionsChange({ ...options, searchInputPlaceholder })
const updateIsSearchable = (isSearchable: boolean) => const updateIsSearchable = (isSearchable: boolean) =>
options && onOptionsChange({ ...options, isSearchable }) onOptionsChange({ ...options, isSearchable })
const updateIsDynamicItemsEnabled = (isEnabled: boolean) => const updateIsDynamicItemsEnabled = (isEnabled: boolean) =>
options &&
onOptionsChange({ onOptionsChange({
...options, ...options,
dynamicItems: { dynamicItems: {
...options.dynamicItems, ...options?.dynamicItems,
isEnabled, isEnabled,
}, },
}) })
const updateDynamicItemsPictureSrcsVariable = (variable?: Variable) => const updateDynamicItemsPictureSrcsVariable = (variable?: Variable) =>
options &&
onOptionsChange({ onOptionsChange({
...options, ...options,
dynamicItems: { dynamicItems: {
...options.dynamicItems, ...options?.dynamicItems,
pictureSrcsVariableId: variable?.id, pictureSrcsVariableId: variable?.id,
}, },
}) })
const updateDynamicItemsTitlesVariable = (variable?: Variable) => const updateDynamicItemsTitlesVariable = (variable?: Variable) =>
options &&
onOptionsChange({ onOptionsChange({
...options, ...options,
dynamicItems: { dynamicItems: {
...options.dynamicItems, ...options?.dynamicItems,
titlesVariableId: variable?.id, titlesVariableId: variable?.id,
}, },
}) })
const updateDynamicItemsDescriptionsVariable = (variable?: Variable) => const updateDynamicItemsDescriptionsVariable = (variable?: Variable) =>
options &&
onOptionsChange({ onOptionsChange({
...options, ...options,
dynamicItems: { dynamicItems: {
...options.dynamicItems, ...options?.dynamicItems,
descriptionsVariableId: variable?.id, descriptionsVariableId: variable?.id,
}, },
}) })
@ -70,7 +64,9 @@ export const PictureChoiceSettings = ({ options, onOptionsChange }: Props) => {
<Stack spacing={4}> <Stack spacing={4}>
<SwitchWithRelatedSettings <SwitchWithRelatedSettings
label="Is searchable?" label="Is searchable?"
initialValue={options?.isSearchable ?? false} initialValue={
options?.isSearchable ?? defaultPictureChoiceOptions.isSearchable
}
onCheckChange={updateIsSearchable} onCheckChange={updateIsSearchable}
> >
<TextInput <TextInput
@ -84,19 +80,27 @@ export const PictureChoiceSettings = ({ options, onOptionsChange }: Props) => {
</SwitchWithRelatedSettings> </SwitchWithRelatedSettings>
<SwitchWithRelatedSettings <SwitchWithRelatedSettings
label="Multiple choice?" label="Multiple choice?"
initialValue={options?.isMultipleChoice ?? false} initialValue={
options?.isMultipleChoice ??
defaultPictureChoiceOptions.isMultipleChoice
}
onCheckChange={updateIsMultiple} onCheckChange={updateIsMultiple}
> >
<TextInput <TextInput
label="Submit button label:" label="Submit button label:"
defaultValue={options?.buttonLabel ?? 'Send'} defaultValue={
options?.buttonLabel ?? defaultPictureChoiceOptions.buttonLabel
}
onChange={updateButtonLabel} onChange={updateButtonLabel}
/> />
</SwitchWithRelatedSettings> </SwitchWithRelatedSettings>
<SwitchWithRelatedSettings <SwitchWithRelatedSettings
label="Dynamic items?" label="Dynamic items?"
initialValue={options?.dynamicItems?.isEnabled ?? false} initialValue={
options?.dynamicItems?.isEnabled ??
defaultPictureChoiceOptions.dynamicItems.isEnabled
}
onCheckChange={updateIsDynamicItemsEnabled} onCheckChange={updateIsDynamicItemsEnabled}
> >
<Stack> <Stack>

View File

@ -1,9 +1,8 @@
import test, { expect } from '@playwright/test' import test, { expect } from '@playwright/test'
import { createTypebots } from '@typebot.io/lib/playwright/databaseActions' import { createTypebots } from '@typebot.io/lib/playwright/databaseActions'
import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers' import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers'
import { InputBlockType, ItemType } from '@typebot.io/schemas'
import { createId } from '@paralleldrive/cuid2' import { createId } from '@paralleldrive/cuid2'
import { defaultPictureChoiceOptions } from '@typebot.io/schemas/features/blocks/inputs/pictureChoice' import { InputBlockType } from '@typebot.io/schemas/features/blocks/inputs/constants'
const firstImageSrc = const firstImageSrc =
'https://images.unsplash.com/flagged/photo-1575517111839-3a3843ee7f5d?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2940&q=80' 'https://images.unsplash.com/flagged/photo-1575517111839-3a3843ee7f5d?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2940&q=80'
@ -25,10 +24,8 @@ test.describe.parallel('Picture choice input block', () => {
items: [ items: [
{ {
id: 'choice1', id: 'choice1',
type: ItemType.PICTURE_CHOICE,
}, },
], ],
options: { ...defaultPictureChoiceOptions },
}), }),
}, },
]) ])

View File

@ -1,6 +1,7 @@
import { WithVariableContent } from '@/features/graph/components/nodes/block/WithVariableContent' import { WithVariableContent } from '@/features/graph/components/nodes/block/WithVariableContent'
import { Text } from '@chakra-ui/react' import { Text } from '@chakra-ui/react'
import { RatingInputBlock } from '@typebot.io/schemas' import { RatingInputBlock } from '@typebot.io/schemas'
import { defaultRatingInputOptions } from '@typebot.io/schemas/features/blocks/inputs/rating/constants'
type Props = { type Props = {
variableId?: string variableId?: string
@ -12,7 +13,7 @@ export const RatingInputContent = ({ variableId, block }: Props) =>
<WithVariableContent variableId={variableId} /> <WithVariableContent variableId={variableId} />
) : ( ) : (
<Text noOfLines={1} pr="6"> <Text noOfLines={1} pr="6">
Rate from {block.options.buttonType === 'Icons' ? 1 : 0} to{' '} Rate from {block.options?.buttonType === 'Icons' ? 1 : 0} to{' '}
{block.options.length} {block.options?.length ?? defaultRatingInputOptions.length}
</Text> </Text>
) )

View File

@ -1,14 +1,15 @@
import { FormLabel, Stack } from '@chakra-ui/react' import { FormLabel, Stack } from '@chakra-ui/react'
import { DropdownList } from '@/components/DropdownList' import { DropdownList } from '@/components/DropdownList'
import { RatingInputOptions, Variable } from '@typebot.io/schemas' import { RatingInputBlock, Variable } from '@typebot.io/schemas'
import React from 'react' import React from 'react'
import { SwitchWithLabel } from '@/components/inputs/SwitchWithLabel' import { SwitchWithLabel } from '@/components/inputs/SwitchWithLabel'
import { TextInput } from '@/components/inputs' import { TextInput } from '@/components/inputs'
import { VariableSearchInput } from '@/components/inputs/VariableSearchInput' import { VariableSearchInput } from '@/components/inputs/VariableSearchInput'
import { defaultRatingInputOptions } from '@typebot.io/schemas/features/blocks/inputs/rating/constants'
type Props = { type Props = {
options: RatingInputOptions options: RatingInputBlock['options']
onOptionsChange: (options: RatingInputOptions) => void onOptionsChange: (options: RatingInputBlock['options']) => void
} }
export const RatingInputSettings = ({ options, onOptionsChange }: Props) => { export const RatingInputSettings = ({ options, onOptionsChange }: Props) => {
@ -21,20 +22,20 @@ export const RatingInputSettings = ({ options, onOptionsChange }: Props) => {
const handleCustomIconCheck = (isEnabled: boolean) => const handleCustomIconCheck = (isEnabled: boolean) =>
onOptionsChange({ onOptionsChange({
...options, ...options,
customIcon: { ...options.customIcon, isEnabled }, customIcon: { ...options?.customIcon, isEnabled },
}) })
const handleIconSvgChange = (svg: string) => const handleIconSvgChange = (svg: string) =>
onOptionsChange({ ...options, customIcon: { ...options.customIcon, svg } }) onOptionsChange({ ...options, customIcon: { ...options?.customIcon, svg } })
const handleLeftLabelChange = (left: string) => const handleLeftLabelChange = (left: string) =>
onOptionsChange({ ...options, labels: { ...options.labels, left } }) onOptionsChange({ ...options, labels: { ...options?.labels, left } })
const handleRightLabelChange = (right: string) => const handleRightLabelChange = (right: string) =>
onOptionsChange({ ...options, labels: { ...options.labels, right } }) onOptionsChange({ ...options, labels: { ...options?.labels, right } })
const handleButtonLabelChange = (button: string) => const handleButtonLabelChange = (button: string) =>
onOptionsChange({ ...options, labels: { ...options.labels, button } }) onOptionsChange({ ...options, labels: { ...options?.labels, button } })
const handleVariableChange = (variable?: Variable) => const handleVariableChange = (variable?: Variable) =>
onOptionsChange({ ...options, variableId: variable?.id }) onOptionsChange({ ...options, variableId: variable?.id })
@ -42,6 +43,11 @@ export const RatingInputSettings = ({ options, onOptionsChange }: Props) => {
const handleOneClickSubmitChange = (isOneClickSubmitEnabled: boolean) => const handleOneClickSubmitChange = (isOneClickSubmitEnabled: boolean) =>
onOptionsChange({ ...options, isOneClickSubmitEnabled }) onOptionsChange({ ...options, isOneClickSubmitEnabled })
const length = options?.length ?? defaultRatingInputOptions.length
const isOneClickSubmitEnabled =
options?.isOneClickSubmitEnabled ??
defaultRatingInputOptions.isOneClickSubmitEnabled
return ( return (
<Stack spacing={4}> <Stack spacing={4}>
<Stack> <Stack>
@ -51,7 +57,7 @@ export const RatingInputSettings = ({ options, onOptionsChange }: Props) => {
<DropdownList <DropdownList
onItemSelect={handleLengthChange} onItemSelect={handleLengthChange}
items={[3, 4, 5, 6, 7, 8, 9, 10]} items={[3, 4, 5, 6, 7, 8, 9, 10]}
currentItem={options.length} currentItem={length}
/> />
</Stack> </Stack>
@ -62,18 +68,23 @@ export const RatingInputSettings = ({ options, onOptionsChange }: Props) => {
<DropdownList <DropdownList
onItemSelect={handleTypeChange} onItemSelect={handleTypeChange}
items={['Icons', 'Numbers'] as const} items={['Icons', 'Numbers'] as const}
currentItem={options.buttonType} currentItem={
options?.buttonType ?? defaultRatingInputOptions.buttonType
}
/> />
</Stack> </Stack>
{options.buttonType === 'Icons' && ( {options?.buttonType === 'Icons' && (
<SwitchWithLabel <SwitchWithLabel
label="Custom icon?" label="Custom icon?"
initialValue={options.customIcon.isEnabled} initialValue={
options?.customIcon?.isEnabled ??
defaultRatingInputOptions.customIcon.isEnabled
}
onCheckChange={handleCustomIconCheck} onCheckChange={handleCustomIconCheck}
/> />
)} )}
{options.buttonType === 'Icons' && options.customIcon.isEnabled && ( {options?.buttonType === 'Icons' && options.customIcon?.isEnabled && (
<TextInput <TextInput
label="Icon SVG:" label="Icon SVG:"
defaultValue={options.customIcon.svg} defaultValue={options.customIcon.svg}
@ -82,27 +93,29 @@ export const RatingInputSettings = ({ options, onOptionsChange }: Props) => {
/> />
)} )}
<TextInput <TextInput
label={`${options.buttonType === 'Icons' ? '1' : '0'} label:`} label={`${options?.buttonType === 'Icons' ? '1' : '0'} label:`}
defaultValue={options.labels.left} defaultValue={options?.labels?.left}
onChange={handleLeftLabelChange} onChange={handleLeftLabelChange}
placeholder="Not likely at all" placeholder="Not likely at all"
/> />
<TextInput <TextInput
label={`${options.length} label:`} label={`${length} label:`}
defaultValue={options.labels.right} defaultValue={options?.labels?.right}
onChange={handleRightLabelChange} onChange={handleRightLabelChange}
placeholder="Extremely likely" placeholder="Extremely likely"
/> />
<SwitchWithLabel <SwitchWithLabel
label="One click submit" label="One click submit"
moreInfoContent='If enabled, the answer will be submitted as soon as the user clicks on a rating instead of showing the "Send" button.' moreInfoContent='If enabled, the answer will be submitted as soon as the user clicks on a rating instead of showing the "Send" button.'
initialValue={options.isOneClickSubmitEnabled ?? false} initialValue={isOneClickSubmitEnabled}
onCheckChange={handleOneClickSubmitChange} onCheckChange={handleOneClickSubmitChange}
/> />
{!options.isOneClickSubmitEnabled && ( {!isOneClickSubmitEnabled && (
<TextInput <TextInput
label="Button label:" label="Button label:"
defaultValue={options.labels.button} defaultValue={
options?.labels?.button ?? defaultRatingInputOptions.labels.button
}
onChange={handleButtonLabelChange} onChange={handleButtonLabelChange}
/> />
)} )}
@ -111,7 +124,7 @@ export const RatingInputSettings = ({ options, onOptionsChange }: Props) => {
Save answer in a variable: Save answer in a variable:
</FormLabel> </FormLabel>
<VariableSearchInput <VariableSearchInput
initialVariableId={options.variableId} initialVariableId={options?.variableId}
onSelectVariable={handleVariableChange} onSelectVariable={handleVariableChange}
/> />
</Stack> </Stack>

View File

@ -1,8 +1,8 @@
import test, { expect } from '@playwright/test' import test, { expect } from '@playwright/test'
import { createTypebots } from '@typebot.io/lib/playwright/databaseActions' import { createTypebots } from '@typebot.io/lib/playwright/databaseActions'
import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers' import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers'
import { defaultRatingInputOptions, InputBlockType } from '@typebot.io/schemas'
import { createId } from '@paralleldrive/cuid2' import { createId } from '@paralleldrive/cuid2'
import { InputBlockType } from '@typebot.io/schemas/features/blocks/inputs/constants'
const boxSvg = `<svg const boxSvg = `<svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
@ -24,7 +24,6 @@ test('options should work', async ({ page }) => {
id: typebotId, id: typebotId,
...parseDefaultGroupWithBlock({ ...parseDefaultGroupWithBlock({
type: InputBlockType.RATING, type: InputBlockType.RATING,
options: defaultRatingInputOptions,
}), }),
}, },
]) ])

View File

@ -1,29 +1,25 @@
import React from 'react' import React from 'react'
import { Text } from '@chakra-ui/react' import { Text } from '@chakra-ui/react'
import { TextInputOptions } from '@typebot.io/schemas'
import { WithVariableContent } from '@/features/graph/components/nodes/block/WithVariableContent' import { WithVariableContent } from '@/features/graph/components/nodes/block/WithVariableContent'
import { TextInputBlock } from '@typebot.io/schemas'
import { defaultTextInputOptions } from '@typebot.io/schemas/features/blocks/inputs/text/constants'
type Props = { type Props = {
placeholder: TextInputOptions['labels']['placeholder'] options: TextInputBlock['options']
isLong: TextInputOptions['isLong']
variableId?: string
} }
export const TextInputNodeContent = ({ export const TextInputNodeContent = ({ options }: Props) => {
placeholder, if (options?.variableId)
isLong,
variableId,
}: Props) => {
if (variableId)
return ( return (
<WithVariableContent <WithVariableContent
variableId={variableId} variableId={options?.variableId}
h={isLong ? '100px' : 'auto'} h={options.isLong ? '100px' : 'auto'}
/> />
) )
return ( return (
<Text color={'gray.500'} h={isLong ? '100px' : 'auto'}> <Text color={'gray.500'} h={options?.isLong ? '100px' : 'auto'}>
{placeholder} {options?.labels?.placeholder ??
defaultTextInputOptions.labels.placeholder}
</Text> </Text>
) )
} }

View File

@ -2,19 +2,20 @@ import { TextInput } from '@/components/inputs'
import { SwitchWithLabel } from '@/components/inputs/SwitchWithLabel' import { SwitchWithLabel } from '@/components/inputs/SwitchWithLabel'
import { VariableSearchInput } from '@/components/inputs/VariableSearchInput' import { VariableSearchInput } from '@/components/inputs/VariableSearchInput'
import { FormLabel, Stack } from '@chakra-ui/react' import { FormLabel, Stack } from '@chakra-ui/react'
import { TextInputOptions, Variable } from '@typebot.io/schemas' import { TextInputBlock, Variable } from '@typebot.io/schemas'
import { defaultTextInputOptions } from '@typebot.io/schemas/features/blocks/inputs/text/constants'
import React from 'react' import React from 'react'
type Props = { type Props = {
options: TextInputOptions options: TextInputBlock['options']
onOptionsChange: (options: TextInputOptions) => void onOptionsChange: (options: TextInputBlock['options']) => void
} }
export const TextInputSettings = ({ options, onOptionsChange }: Props) => { export const TextInputSettings = ({ options, onOptionsChange }: Props) => {
const handlePlaceholderChange = (placeholder: string) => const handlePlaceholderChange = (placeholder: string) =>
onOptionsChange({ ...options, labels: { ...options.labels, placeholder } }) onOptionsChange({ ...options, labels: { ...options?.labels, placeholder } })
const handleButtonLabelChange = (button: string) => const handleButtonLabelChange = (button: string) =>
onOptionsChange({ ...options, labels: { ...options.labels, button } }) onOptionsChange({ ...options, labels: { ...options?.labels, button } })
const handleLongChange = (isLong: boolean) => const handleLongChange = (isLong: boolean) =>
onOptionsChange({ ...options, isLong }) onOptionsChange({ ...options, isLong })
const handleVariableChange = (variable?: Variable) => const handleVariableChange = (variable?: Variable) =>
@ -24,17 +25,22 @@ export const TextInputSettings = ({ options, onOptionsChange }: Props) => {
<Stack spacing={4}> <Stack spacing={4}>
<SwitchWithLabel <SwitchWithLabel
label="Long text?" label="Long text?"
initialValue={options?.isLong ?? false} initialValue={options?.isLong ?? defaultTextInputOptions.isLong}
onCheckChange={handleLongChange} onCheckChange={handleLongChange}
/> />
<TextInput <TextInput
label="Placeholder:" label="Placeholder:"
defaultValue={options.labels.placeholder} defaultValue={
options?.labels?.placeholder ??
defaultTextInputOptions.labels.placeholder
}
onChange={handlePlaceholderChange} onChange={handlePlaceholderChange}
/> />
<TextInput <TextInput
label="Button label:" label="Button label:"
defaultValue={options.labels.button} defaultValue={
options?.labels?.button ?? defaultTextInputOptions.labels.button
}
onChange={handleButtonLabelChange} onChange={handleButtonLabelChange}
/> />
<Stack> <Stack>
@ -42,7 +48,7 @@ export const TextInputSettings = ({ options, onOptionsChange }: Props) => {
Save answer in a variable: Save answer in a variable:
</FormLabel> </FormLabel>
<VariableSearchInput <VariableSearchInput
initialVariableId={options.variableId} initialVariableId={options?.variableId}
onSelectVariable={handleVariableChange} onSelectVariable={handleVariableChange}
/> />
</Stack> </Stack>

View File

@ -1,8 +1,9 @@
import test, { expect } from '@playwright/test' import test, { expect } from '@playwright/test'
import { createTypebots } from '@typebot.io/lib/playwright/databaseActions' import { createTypebots } from '@typebot.io/lib/playwright/databaseActions'
import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers' import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers'
import { defaultTextInputOptions, InputBlockType } from '@typebot.io/schemas'
import { createId } from '@paralleldrive/cuid2' import { createId } from '@paralleldrive/cuid2'
import { InputBlockType } from '@typebot.io/schemas/features/blocks/inputs/constants'
import { defaultTextInputOptions } from '@typebot.io/schemas/features/blocks/inputs/text/constants'
test.describe.parallel('Text input block', () => { test.describe.parallel('Text input block', () => {
test('options should work', async ({ page }) => { test('options should work', async ({ page }) => {
@ -12,7 +13,6 @@ test.describe.parallel('Text input block', () => {
id: typebotId, id: typebotId,
...parseDefaultGroupWithBlock({ ...parseDefaultGroupWithBlock({
type: InputBlockType.TEXT, type: InputBlockType.TEXT,
options: defaultTextInputOptions,
}), }),
}, },
]) ])

View File

@ -1,19 +1,20 @@
import { TextInput } from '@/components/inputs' import { TextInput } from '@/components/inputs'
import { VariableSearchInput } from '@/components/inputs/VariableSearchInput' import { VariableSearchInput } from '@/components/inputs/VariableSearchInput'
import { FormLabel, Stack } from '@chakra-ui/react' import { FormLabel, Stack } from '@chakra-ui/react'
import { UrlInputOptions, Variable } from '@typebot.io/schemas' import { UrlInputBlock, Variable } from '@typebot.io/schemas'
import { defaultUrlInputOptions } from '@typebot.io/schemas/features/blocks/inputs/url/constants'
import React from 'react' import React from 'react'
type Props = { type Props = {
options: UrlInputOptions options: UrlInputBlock['options']
onOptionsChange: (options: UrlInputOptions) => void onOptionsChange: (options: UrlInputBlock['options']) => void
} }
export const UrlInputSettings = ({ options, onOptionsChange }: Props) => { export const UrlInputSettings = ({ options, onOptionsChange }: Props) => {
const handlePlaceholderChange = (placeholder: string) => const handlePlaceholderChange = (placeholder: string) =>
onOptionsChange({ ...options, labels: { ...options.labels, placeholder } }) onOptionsChange({ ...options, labels: { ...options?.labels, placeholder } })
const handleButtonLabelChange = (button: string) => const handleButtonLabelChange = (button: string) =>
onOptionsChange({ ...options, labels: { ...options.labels, button } }) onOptionsChange({ ...options, labels: { ...options?.labels, button } })
const handleVariableChange = (variable?: Variable) => const handleVariableChange = (variable?: Variable) =>
onOptionsChange({ ...options, variableId: variable?.id }) onOptionsChange({ ...options, variableId: variable?.id })
const handleRetryMessageChange = (retryMessageContent: string) => const handleRetryMessageChange = (retryMessageContent: string) =>
@ -23,17 +24,25 @@ export const UrlInputSettings = ({ options, onOptionsChange }: Props) => {
<Stack spacing={4}> <Stack spacing={4}>
<TextInput <TextInput
label="Placeholder:" label="Placeholder:"
defaultValue={options.labels.placeholder} defaultValue={
options?.labels?.placeholder ??
defaultUrlInputOptions.labels.placeholder
}
onChange={handlePlaceholderChange} onChange={handlePlaceholderChange}
/> />
<TextInput <TextInput
label="Button label:" label="Button label:"
defaultValue={options.labels.button} defaultValue={
options?.labels?.button ?? defaultUrlInputOptions.labels.button
}
onChange={handleButtonLabelChange} onChange={handleButtonLabelChange}
/> />
<TextInput <TextInput
label="Retry message:" label="Retry message:"
defaultValue={options.retryMessageContent} defaultValue={
options?.retryMessageContent ??
defaultUrlInputOptions.retryMessageContent
}
onChange={handleRetryMessageChange} onChange={handleRetryMessageChange}
/> />
<Stack> <Stack>
@ -41,7 +50,7 @@ export const UrlInputSettings = ({ options, onOptionsChange }: Props) => {
Save answer in a variable: Save answer in a variable:
</FormLabel> </FormLabel>
<VariableSearchInput <VariableSearchInput
initialVariableId={options.variableId} initialVariableId={options?.variableId}
onSelectVariable={handleVariableChange} onSelectVariable={handleVariableChange}
/> />
</Stack> </Stack>

View File

@ -1,18 +1,19 @@
import React from 'react' import React from 'react'
import { Text } from '@chakra-ui/react' import { Text } from '@chakra-ui/react'
import { UrlInputOptions } from '@typebot.io/schemas'
import { WithVariableContent } from '@/features/graph/components/nodes/block/WithVariableContent' import { WithVariableContent } from '@/features/graph/components/nodes/block/WithVariableContent'
import { UrlInputBlock } from '@typebot.io/schemas'
import { defaultUrlInputOptions } from '@typebot.io/schemas/features/blocks/inputs/url/constants'
type Props = { type Props = {
variableId?: string options: UrlInputBlock['options']
placeholder: UrlInputOptions['labels']['placeholder']
} }
export const UrlNodeContent = ({ placeholder, variableId }: Props) => export const UrlNodeContent = ({ options }: Props) =>
variableId ? ( options?.variableId ? (
<WithVariableContent variableId={variableId} /> <WithVariableContent variableId={options.variableId} />
) : ( ) : (
<Text color={'gray.500'} w="90%"> <Text color={'gray.500'} w="90%">
{placeholder} {options?.labels?.placeholder ??
defaultUrlInputOptions.labels.placeholder}
</Text> </Text>
) )

View File

@ -1,8 +1,9 @@
import test, { expect } from '@playwright/test' import test, { expect } from '@playwright/test'
import { createTypebots } from '@typebot.io/lib/playwright/databaseActions' import { createTypebots } from '@typebot.io/lib/playwright/databaseActions'
import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers' import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers'
import { defaultUrlInputOptions, InputBlockType } from '@typebot.io/schemas'
import { createId } from '@paralleldrive/cuid2' import { createId } from '@paralleldrive/cuid2'
import { InputBlockType } from '@typebot.io/schemas/features/blocks/inputs/constants'
import { defaultUrlInputOptions } from '@typebot.io/schemas/features/blocks/inputs/url/constants'
test.describe('Url input block', () => { test.describe('Url input block', () => {
test('options should work', async ({ page }) => { test('options should work', async ({ page }) => {
@ -12,7 +13,6 @@ test.describe('Url input block', () => {
id: typebotId, id: typebotId,
...parseDefaultGroupWithBlock({ ...parseDefaultGroupWithBlock({
type: InputBlockType.URL, type: InputBlockType.URL,
options: defaultUrlInputOptions,
}), }),
}, },
]) ])

View File

@ -2,10 +2,8 @@ import test, { expect } from '@playwright/test'
import { createTypebots } from '@typebot.io/lib/playwright/databaseActions' import { createTypebots } from '@typebot.io/lib/playwright/databaseActions'
import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers' import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers'
import { createId } from '@paralleldrive/cuid2' import { createId } from '@paralleldrive/cuid2'
import { import { IntegrationBlockType } from '@typebot.io/schemas/features/blocks/integrations/constants'
defaultChatwootOptions, import { defaultChatwootOptions } from '@typebot.io/schemas/features/blocks/integrations/chatwoot/constants'
IntegrationBlockType,
} from '@typebot.io/schemas'
const typebotId = createId() const typebotId = createId()
@ -18,7 +16,6 @@ test.describe('Chatwoot block', () => {
id: typebotId, id: typebotId,
...parseDefaultGroupWithBlock({ ...parseDefaultGroupWithBlock({
type: IntegrationBlockType.CHATWOOT, type: IntegrationBlockType.CHATWOOT,
options: defaultChatwootOptions,
}), }),
}, },
]) ])

View File

@ -6,9 +6,9 @@ type Props = {
} }
export const ChatwootNodeBody = ({ block }: Props) => export const ChatwootNodeBody = ({ block }: Props) =>
block.options.task === 'Close widget' ? ( block.options?.task === 'Close widget' ? (
<Text>Close Chatwoot</Text> <Text>Close Chatwoot</Text>
) : block.options.websiteToken.length === 0 ? ( ) : (block.options?.websiteToken?.length ?? 0) === 0 ? (
<Text color="gray.500">Configure...</Text> <Text color="gray.500">Configure...</Text>
) : ( ) : (
<Text>Open Chatwoot</Text> <Text>Open Chatwoot</Text>

View File

@ -8,12 +8,16 @@ import {
AccordionPanel, AccordionPanel,
Stack, Stack,
} from '@chakra-ui/react' } from '@chakra-ui/react'
import { ChatwootOptions, chatwootTasks } from '@typebot.io/schemas' import { ChatwootBlock } from '@typebot.io/schemas'
import {
chatwootTasks,
defaultChatwootOptions,
} from '@typebot.io/schemas/features/blocks/integrations/chatwoot/constants'
import React from 'react' import React from 'react'
type Props = { type Props = {
options: ChatwootOptions options: ChatwootBlock['options']
onOptionsChange: (options: ChatwootOptions) => void onOptionsChange: (options: ChatwootBlock['options']) => void
} }
export const ChatwootSettings = ({ options, onOptionsChange }: Props) => { export const ChatwootSettings = ({ options, onOptionsChange }: Props) => {
@ -21,96 +25,97 @@ export const ChatwootSettings = ({ options, onOptionsChange }: Props) => {
onOptionsChange({ ...options, task }) onOptionsChange({ ...options, task })
} }
const task = options?.task ?? defaultChatwootOptions.task
return ( return (
<Stack spacing={4}> <Stack spacing={4}>
<DropdownList <DropdownList
currentItem={options.task ?? 'Show widget'} currentItem={options?.task ?? defaultChatwootOptions.task}
onItemSelect={updateTask} onItemSelect={updateTask}
items={chatwootTasks} items={chatwootTasks}
/> />
{!options.task || {task === 'Show widget' && (
(options.task === 'Show widget' && ( <>
<> <TextInput
<TextInput isRequired
isRequired label="Base URL"
label="Base URL" defaultValue={options?.baseUrl ?? defaultChatwootOptions.baseUrl}
defaultValue={options.baseUrl} onChange={(baseUrl: string) => {
onChange={(baseUrl: string) => { onOptionsChange({ ...options, baseUrl })
onOptionsChange({ ...options, baseUrl }) }}
}} withVariableButton={false}
withVariableButton={false} />
/> <TextInput
<TextInput isRequired
isRequired label="Website token"
label="Website token" defaultValue={options?.websiteToken}
defaultValue={options.websiteToken} onChange={(websiteToken) =>
onChange={(websiteToken) => onOptionsChange({ ...options, websiteToken })
onOptionsChange({ ...options, websiteToken }) }
} moreInfoTooltip="Can be found in Chatwoot under Settings > Inboxes > Settings > Configuration, in the code snippet."
moreInfoTooltip="Can be found in Chatwoot under Settings > Inboxes > Settings > Configuration, in the code snippet." />
/> <Accordion allowMultiple>
<Accordion allowMultiple> <AccordionItem>
<AccordionItem> <AccordionButton justifyContent="space-between">
<AccordionButton justifyContent="space-between"> Set user details
Set user details <AccordionIcon />
<AccordionIcon /> </AccordionButton>
</AccordionButton> <AccordionPanel pb={4} as={Stack} spacing="4">
<AccordionPanel pb={4} as={Stack} spacing="4"> <TextInput
<TextInput label="ID"
label="ID" defaultValue={options?.user?.id}
defaultValue={options.user?.id} onChange={(id: string) => {
onChange={(id: string) => { onOptionsChange({
onOptionsChange({ ...options,
...options, user: { ...options?.user, id },
user: { ...options.user, id }, })
}) }}
}} />
/> <TextInput
<TextInput label="Name"
label="Name" defaultValue={options?.user?.name}
defaultValue={options.user?.name} onChange={(name: string) => {
onChange={(name: string) => { onOptionsChange({
onOptionsChange({ ...options,
...options, user: { ...options?.user, name },
user: { ...options.user, name }, })
}) }}
}} />
/> <TextInput
<TextInput label="Email"
label="Email" defaultValue={options?.user?.email}
defaultValue={options.user?.email} onChange={(email: string) => {
onChange={(email: string) => { onOptionsChange({
onOptionsChange({ ...options,
...options, user: { ...options?.user, email },
user: { ...options.user, email }, })
}) }}
}} />
/> <TextInput
<TextInput label="Avatar URL"
label="Avatar URL" defaultValue={options?.user?.avatarUrl}
defaultValue={options.user?.avatarUrl} onChange={(avatarUrl: string) => {
onChange={(avatarUrl: string) => { onOptionsChange({
onOptionsChange({ ...options,
...options, user: { ...options?.user, avatarUrl },
user: { ...options.user, avatarUrl }, })
}) }}
}} />
/> <TextInput
<TextInput label="Phone number"
label="Phone number" defaultValue={options?.user?.phoneNumber}
defaultValue={options.user?.phoneNumber} onChange={(phoneNumber: string) => {
onChange={(phoneNumber: string) => { onOptionsChange({
onOptionsChange({ ...options,
...options, user: { ...options?.user, phoneNumber },
user: { ...options.user, phoneNumber }, })
}) }}
}} />
/> </AccordionPanel>
</AccordionPanel> </AccordionItem>
</AccordionItem> </Accordion>
</Accordion> </>
</> )}
))}
</Stack> </Stack>
) )
} }

View File

@ -1,9 +1,9 @@
import React from 'react' import React from 'react'
import { Text } from '@chakra-ui/react' import { Text } from '@chakra-ui/react'
import { GoogleAnalyticsOptions } from '@typebot.io/schemas' import { GoogleAnalyticsBlock } from '@typebot.io/schemas'
type Props = { type Props = {
action: GoogleAnalyticsOptions['action'] action: NonNullable<GoogleAnalyticsBlock['options']>['action']
} }
export const GoogleAnalyticsNodeBody = ({ action }: Props) => ( export const GoogleAnalyticsNodeBody = ({ action }: Props) => (

View File

@ -8,12 +8,12 @@ import {
Box, Box,
Stack, Stack,
} from '@chakra-ui/react' } from '@chakra-ui/react'
import { GoogleAnalyticsOptions } from '@typebot.io/schemas' import { GoogleAnalyticsBlock } from '@typebot.io/schemas'
import React from 'react' import React from 'react'
type Props = { type Props = {
options?: GoogleAnalyticsOptions options?: GoogleAnalyticsBlock['options']
onOptionsChange: (options: GoogleAnalyticsOptions) => void onOptionsChange: (options: GoogleAnalyticsBlock['options']) => void
} }
export const GoogleAnalyticsSettings = ({ export const GoogleAnalyticsSettings = ({
@ -48,13 +48,13 @@ export const GoogleAnalyticsSettings = ({
<TextInput <TextInput
label="Measurement ID:" label="Measurement ID:"
moreInfoTooltip="Can be found by clicking on your data stream in Google Analytics dashboard" moreInfoTooltip="Can be found by clicking on your data stream in Google Analytics dashboard"
defaultValue={options?.trackingId ?? ''} defaultValue={options?.trackingId}
placeholder="G-123456..." placeholder="G-123456..."
onChange={updateTrackingId} onChange={updateTrackingId}
/> />
<TextInput <TextInput
label="Event action:" label="Event action:"
defaultValue={options?.action ?? ''} defaultValue={options?.action}
placeholder="Example: conversion" placeholder="Example: conversion"
onChange={updateAction} onChange={updateAction}
/> />
@ -71,13 +71,13 @@ export const GoogleAnalyticsSettings = ({
<AccordionPanel pb={4} as={Stack} spacing="6"> <AccordionPanel pb={4} as={Stack} spacing="6">
<TextInput <TextInput
label="Event category:" label="Event category:"
defaultValue={options?.category ?? ''} defaultValue={options?.category}
placeholder="Example: Typebot" placeholder="Example: Typebot"
onChange={updateCategory} onChange={updateCategory}
/> />
<TextInput <TextInput
label="Event label:" label="Event label:"
defaultValue={options?.label ?? ''} defaultValue={options?.label}
placeholder="Example: Campaign Z" placeholder="Example: Campaign Z"
onChange={updateLabel} onChange={updateLabel}
/> />
@ -91,7 +91,7 @@ export const GoogleAnalyticsSettings = ({
<TextInput <TextInput
label="Send to:" label="Send to:"
moreInfoTooltip="Useful to send a conversion event to Google Ads" moreInfoTooltip="Useful to send a conversion event to Google Ads"
defaultValue={options?.sendTo?.toString() ?? ''} defaultValue={options?.sendTo?.toString()}
placeholder="Example: AW-123456789" placeholder="Example: AW-123456789"
onChange={updateSendTo} onChange={updateSendTo}
/> />

View File

@ -1,11 +1,8 @@
import test from '@playwright/test' import test from '@playwright/test'
import { createTypebots } from '@typebot.io/lib/playwright/databaseActions' import { createTypebots } from '@typebot.io/lib/playwright/databaseActions'
import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers' import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers'
import {
defaultGoogleAnalyticsOptions,
IntegrationBlockType,
} from '@typebot.io/schemas'
import { createId } from '@paralleldrive/cuid2' import { createId } from '@paralleldrive/cuid2'
import { IntegrationBlockType } from '@typebot.io/schemas/features/blocks/integrations/constants'
test.describe('Google Analytics block', () => { test.describe('Google Analytics block', () => {
test('its configuration should work', async ({ page }) => { test('its configuration should work', async ({ page }) => {
@ -15,7 +12,6 @@ test.describe('Google Analytics block', () => {
id: typebotId, id: typebotId,
...parseDefaultGroupWithBlock({ ...parseDefaultGroupWithBlock({
type: IntegrationBlockType.GOOGLE_ANALYTICS, type: IntegrationBlockType.GOOGLE_ANALYTICS,
options: defaultGoogleAnalyticsOptions,
}), }),
}, },
]) ])

View File

@ -1,11 +1,12 @@
import React from 'react' import React from 'react'
import { Stack, Text } from '@chakra-ui/react' import { Stack, Text } from '@chakra-ui/react'
import { GoogleSheetsAction, GoogleSheetsOptions } from '@typebot.io/schemas'
import { useTypebot } from '@/features/editor/providers/TypebotProvider' import { useTypebot } from '@/features/editor/providers/TypebotProvider'
import { SetVariableLabel } from '@/components/SetVariableLabel' import { SetVariableLabel } from '@/components/SetVariableLabel'
import { GoogleSheetsBlock } from '@typebot.io/schemas'
import { GoogleSheetsAction } from '@typebot.io/schemas/features/blocks/integrations/googleSheets/constants'
type Props = { type Props = {
options?: GoogleSheetsOptions options?: GoogleSheetsBlock['options']
} }
export const GoogleSheetsNodeContent = ({ options }: Props) => { export const GoogleSheetsNodeContent = ({ options }: Props) => {
@ -18,7 +19,7 @@ export const GoogleSheetsNodeContent = ({ options }: Props) => {
{typebot && {typebot &&
options?.action === GoogleSheetsAction.GET && options?.action === GoogleSheetsAction.GET &&
options?.cellsToExtract options?.cellsToExtract
.map((mapping) => mapping.variableId) ?.map((mapping) => mapping.variableId)
.map((variableId, idx) => .map((variableId, idx) =>
variableId ? ( variableId ? (
<SetVariableLabel <SetVariableLabel

View File

@ -12,16 +12,12 @@ import { DropdownList } from '@/components/DropdownList'
import { useTypebot } from '@/features/editor/providers/TypebotProvider' import { useTypebot } from '@/features/editor/providers/TypebotProvider'
import { import {
Cell, Cell,
defaultGoogleSheetsGetOptions,
defaultGoogleSheetsInsertOptions,
defaultGoogleSheetsUpdateOptions,
ExtractingCell, ExtractingCell,
GoogleSheetsAction, GoogleSheetsBlock,
GoogleSheetsGetOptions, GoogleSheetsGetOptions,
GoogleSheetsGetOptionsV6,
GoogleSheetsInsertRowOptions, GoogleSheetsInsertRowOptions,
GoogleSheetsOptions, GoogleSheetsUpdateRowOptionsV6,
GoogleSheetsUpdateRowOptions,
totalRowsToExtractOptions,
} from '@typebot.io/schemas' } from '@typebot.io/schemas'
import React, { useMemo } from 'react' import React, { useMemo } from 'react'
import { isDefined } from '@typebot.io/lib' import { isDefined } from '@typebot.io/lib'
@ -33,14 +29,18 @@ import { GoogleSheetConnectModal } from './GoogleSheetsConnectModal'
import { TableListItemProps, TableList } from '@/components/TableList' import { TableListItemProps, TableList } from '@/components/TableList'
import { CredentialsDropdown } from '@/features/credentials/components/CredentialsDropdown' import { CredentialsDropdown } from '@/features/credentials/components/CredentialsDropdown'
import { RowsFilterTableList } from './RowsFilterTableList' import { RowsFilterTableList } from './RowsFilterTableList'
import { createId } from '@paralleldrive/cuid2'
import { useWorkspace } from '@/features/workspace/WorkspaceProvider' import { useWorkspace } from '@/features/workspace/WorkspaceProvider'
import { useSheets } from '../hooks/useSheets' import { useSheets } from '../hooks/useSheets'
import { Sheet } from '../types' import { Sheet } from '../types'
import {
GoogleSheetsAction,
defaultGoogleSheetsOptions,
totalRowsToExtractOptions,
} from '@typebot.io/schemas/features/blocks/integrations/googleSheets/constants'
type Props = { type Props = {
options: GoogleSheetsOptions options: GoogleSheetsBlock['options']
onOptionsChange: (options: GoogleSheetsOptions) => void onOptionsChange: (options: GoogleSheetsBlock['options']) => void
blockId: string blockId: string
} }
@ -70,36 +70,13 @@ export const GoogleSheetsSettings = ({
const handleSheetIdChange = (sheetId: string | undefined) => const handleSheetIdChange = (sheetId: string | undefined) =>
onOptionsChange({ ...options, sheetId }) onOptionsChange({ ...options, sheetId })
const handleActionChange = (action: GoogleSheetsAction) => { const handleActionChange = (action: GoogleSheetsAction) =>
const baseOptions = { onOptionsChange({
credentialsId: options.credentialsId, credentialsId: options?.credentialsId,
spreadsheetId: options.spreadsheetId, spreadsheetId: options?.spreadsheetId,
sheetId: options.sheetId, sheetId: options?.sheetId,
} action,
switch (action) { })
case GoogleSheetsAction.GET: {
const newOptions: GoogleSheetsGetOptions = {
...baseOptions,
...defaultGoogleSheetsGetOptions(createId),
}
return onOptionsChange({ ...newOptions })
}
case GoogleSheetsAction.INSERT_ROW: {
const newOptions: GoogleSheetsInsertRowOptions = {
...baseOptions,
...defaultGoogleSheetsInsertOptions(createId),
}
return onOptionsChange({ ...newOptions })
}
case GoogleSheetsAction.UPDATE_ROW: {
const newOptions: GoogleSheetsUpdateRowOptions = {
...baseOptions,
...defaultGoogleSheetsUpdateOptions(createId),
}
return onOptionsChange({ ...newOptions })
}
}
}
const handleCreateNewClick = async () => { const handleCreateNewClick = async () => {
await save() await save()
@ -148,7 +125,7 @@ export const GoogleSheetsSettings = ({
placeholder="Select an operation" placeholder="Select an operation"
/> />
)} )}
{options.action && ( {options?.action && (
<ActionOptions <ActionOptions
options={options} options={options}
sheet={sheet} sheet={sheet}
@ -165,31 +142,40 @@ const ActionOptions = ({
onOptionsChange, onOptionsChange,
}: { }: {
options: options:
| GoogleSheetsGetOptions | GoogleSheetsGetOptionsV6
| GoogleSheetsInsertRowOptions | GoogleSheetsInsertRowOptions
| GoogleSheetsUpdateRowOptions | GoogleSheetsUpdateRowOptionsV6
sheet?: Sheet sheet?: Sheet
onOptionsChange: (options: GoogleSheetsOptions) => void onOptionsChange: (options: GoogleSheetsBlock['options']) => void
}) => { }) => {
const handleInsertColumnsChange = (cellsToInsert: Cell[]) => const handleInsertColumnsChange = (cellsToInsert: Cell[]) =>
onOptionsChange({ ...options, cellsToInsert } as GoogleSheetsOptions) onOptionsChange({
...options,
cellsToInsert,
} as GoogleSheetsBlock['options'])
const handleUpsertColumnsChange = (cellsToUpsert: Cell[]) => const handleUpsertColumnsChange = (cellsToUpsert: Cell[]) =>
onOptionsChange({ ...options, cellsToUpsert } as GoogleSheetsOptions) onOptionsChange({
...options,
const handleReferenceCellChange = (referenceCell: Cell) => cellsToUpsert,
onOptionsChange({ ...options, referenceCell } as GoogleSheetsOptions) } as GoogleSheetsBlock['options'])
const handleExtractingCellsChange = (cellsToExtract: ExtractingCell[]) => const handleExtractingCellsChange = (cellsToExtract: ExtractingCell[]) =>
onOptionsChange({ ...options, cellsToExtract } as GoogleSheetsOptions) onOptionsChange({
...options,
cellsToExtract,
} as GoogleSheetsBlock['options'])
const handleFilterChange = (filter: GoogleSheetsGetOptions['filter']) => const handleFilterChange = (filter: GoogleSheetsGetOptions['filter']) =>
onOptionsChange({ ...options, filter } as GoogleSheetsOptions) onOptionsChange({ ...options, filter } as GoogleSheetsBlock['options'])
const updateTotalRowsToExtract = ( const updateTotalRowsToExtract = (
totalRowsToExtract: GoogleSheetsGetOptions['totalRowsToExtract'] totalRowsToExtract: GoogleSheetsGetOptions['totalRowsToExtract']
) => ) =>
onOptionsChange({ ...options, totalRowsToExtract } as GoogleSheetsOptions) onOptionsChange({
...options,
totalRowsToExtract,
} as GoogleSheetsBlock['options'])
const UpdatingCellItem = useMemo( const UpdatingCellItem = useMemo(
() => () =>
@ -222,42 +208,22 @@ const ActionOptions = ({
case GoogleSheetsAction.UPDATE_ROW: case GoogleSheetsAction.UPDATE_ROW:
return ( return (
<Accordion allowMultiple> <Accordion allowMultiple>
{options.referenceCell && ( <AccordionItem>
<AccordionItem> <AccordionButton>
<AccordionButton> <Text w="full" textAlign="left">
<Text w="full" textAlign="left"> Row(s) to update
Row to update </Text>
</Text> <AccordionIcon />
<AccordionIcon /> </AccordionButton>
</AccordionButton>
<AccordionPanel pt="4"> <AccordionPanel pt="4">
<CellWithValueStack <RowsFilterTableList
columns={sheet?.columns ?? []} columns={sheet?.columns ?? []}
item={options.referenceCell ?? { id: 'reference' }} filter={options.filter}
onItemChange={handleReferenceCellChange} onFilterChange={handleFilterChange}
/> />
</AccordionPanel> </AccordionPanel>
</AccordionItem> </AccordionItem>
)}
{!options.referenceCell && (
<AccordionItem>
<AccordionButton>
<Text w="full" textAlign="left">
Row(s) to update
</Text>
<AccordionIcon />
</AccordionButton>
<AccordionPanel pt="4">
<RowsFilterTableList
columns={sheet?.columns ?? []}
filter={options.filter}
onFilterChange={handleFilterChange}
/>
</AccordionPanel>
</AccordionItem>
)}
<AccordionItem> <AccordionItem>
<AccordionButton> <AccordionButton>
<Text w="full" textAlign="left"> <Text w="full" textAlign="left">
@ -281,49 +247,32 @@ const ActionOptions = ({
return ( return (
<Accordion allowMultiple> <Accordion allowMultiple>
<Stack> <Stack>
{options.referenceCell && ( <>
<AccordionItem> <AccordionItem>
<AccordionButton> <AccordionButton>
<Text w="full" textAlign="left"> <Text w="full" textAlign="left">
Rows to select Select row(s)
</Text> </Text>
<AccordionIcon /> <AccordionIcon />
</AccordionButton> </AccordionButton>
<AccordionPanel pt="4"> <AccordionPanel pt="4" as={Stack}>
<CellWithValueStack <DropdownList
items={totalRowsToExtractOptions}
currentItem={
options.totalRowsToExtract ??
defaultGoogleSheetsOptions.totalRowsToExtract
}
onItemSelect={updateTotalRowsToExtract}
/>
<RowsFilterTableList
columns={sheet?.columns ?? []} columns={sheet?.columns ?? []}
item={options.referenceCell ?? { id: 'reference' }} filter={options.filter}
onItemChange={handleReferenceCellChange} onFilterChange={handleFilterChange}
/> />
</AccordionPanel> </AccordionPanel>
</AccordionItem> </AccordionItem>
)} </>
{!options.referenceCell && (
<>
<AccordionItem>
<AccordionButton>
<Text w="full" textAlign="left">
Select row(s)
</Text>
<AccordionIcon />
</AccordionButton>
<AccordionPanel pt="4" as={Stack}>
<DropdownList
items={totalRowsToExtractOptions}
currentItem={options.totalRowsToExtract ?? 'All'}
onItemSelect={updateTotalRowsToExtract}
/>
<RowsFilterTableList
columns={sheet?.columns ?? []}
filter={options.filter}
onFilterChange={handleFilterChange}
/>
</AccordionPanel>
</AccordionItem>
</>
)}
<AccordionItem> <AccordionItem>
<AccordionButton> <AccordionButton>
@ -339,6 +288,7 @@ const ActionOptions = ({
onItemsChange={handleExtractingCellsChange} onItemsChange={handleExtractingCellsChange}
Item={ExtractingCellItem} Item={ExtractingCellItem}
addLabel="Add a value" addLabel="Add a value"
hasDefaultItem
/> />
</AccordionPanel> </AccordionPanel>
</AccordionItem> </AccordionItem>

View File

@ -2,7 +2,8 @@ import { DropdownList } from '@/components/DropdownList'
import { TextInput } from '@/components/inputs' import { TextInput } from '@/components/inputs'
import { TableListItemProps } from '@/components/TableList' import { TableListItemProps } from '@/components/TableList'
import { Stack } from '@chakra-ui/react' import { Stack } from '@chakra-ui/react'
import { ComparisonOperators, RowsFilterComparison } from '@typebot.io/schemas' import { RowsFilterComparison } from '@typebot.io/schemas'
import { ComparisonOperators } from '@typebot.io/schemas/features/blocks/logic/condition/constants'
import React from 'react' import React from 'react'
export const RowsFilterComparisonItem = ({ export const RowsFilterComparisonItem = ({

View File

@ -3,11 +3,11 @@ import { TableList, TableListItemProps } from '@/components/TableList'
import { Flex } from '@chakra-ui/react' import { Flex } from '@chakra-ui/react'
import { import {
GoogleSheetsGetOptions, GoogleSheetsGetOptions,
LogicalOperator,
RowsFilterComparison, RowsFilterComparison,
} from '@typebot.io/schemas' } from '@typebot.io/schemas'
import React, { useCallback } from 'react' import React, { useCallback } from 'react'
import { RowsFilterComparisonItem } from './RowsFilterComparisonItem' import { RowsFilterComparisonItem } from './RowsFilterComparisonItem'
import { LogicalOperator } from '@typebot.io/schemas/features/blocks/logic/condition/constants'
type Props = { type Props = {
filter: GoogleSheetsGetOptions['filter'] filter: GoogleSheetsGetOptions['filter']

View File

@ -7,7 +7,7 @@ type Props = {
} }
export const MakeComContent = ({ block }: Props) => { export const MakeComContent = ({ block }: Props) => {
const webhook = block.options.webhook const webhook = block.options?.webhook
if (isNotDefined(webhook?.body)) if (isNotDefined(webhook?.body))
return <Text color="gray.500">Configure...</Text> return <Text color="gray.500">Configure...</Text>

View File

@ -1,12 +1,12 @@
import { Alert, AlertIcon, Button, Link, Stack, Text } from '@chakra-ui/react' import { Alert, AlertIcon, Button, Link, Stack, Text } from '@chakra-ui/react'
import { ExternalLinkIcon } from '@/components/icons' import { ExternalLinkIcon } from '@/components/icons'
import { MakeComBlock, Webhook, WebhookOptions } from '@typebot.io/schemas' import { MakeComBlock, Webhook } from '@typebot.io/schemas'
import React from 'react' import React from 'react'
import { WebhookAdvancedConfigForm } from '../../webhook/components/WebhookAdvancedConfigForm' import { WebhookAdvancedConfigForm } from '../../webhook/components/WebhookAdvancedConfigForm'
type Props = { type Props = {
block: MakeComBlock block: MakeComBlock
onOptionsChange: (options: WebhookOptions) => void onOptionsChange: (options: MakeComBlock['options']) => void
} }
export const MakeComSettings = ({ export const MakeComSettings = ({
@ -14,14 +14,13 @@ export const MakeComSettings = ({
onOptionsChange, onOptionsChange,
}: Props) => { }: Props) => {
const setLocalWebhook = async (newLocalWebhook: Webhook) => { const setLocalWebhook = async (newLocalWebhook: Webhook) => {
if (!options.webhook) return
onOptionsChange({ onOptionsChange({
...options, ...options,
webhook: newLocalWebhook, webhook: newLocalWebhook,
}) })
} }
const url = options.webhook?.url const url = options?.webhook?.url
return ( return (
<Stack spacing={4}> <Stack spacing={4}>
@ -43,15 +42,13 @@ export const MakeComSettings = ({
</Stack> </Stack>
)} )}
</Alert> </Alert>
{options.webhook && ( <WebhookAdvancedConfigForm
<WebhookAdvancedConfigForm blockId={blockId}
blockId={blockId} webhook={options?.webhook}
webhook={options.webhook as Webhook} options={options}
options={options} onWebhookChange={setLocalWebhook}
onWebhookChange={setLocalWebhook} onOptionsChange={onOptionsChange}
onOptionsChange={onOptionsChange} />
/>
)}
</Stack> </Stack>
) )
} }

View File

@ -4,12 +4,10 @@ import { TRPCError } from '@trpc/server'
import { z } from 'zod' import { z } from 'zod'
import { isReadWorkspaceFobidden } from '@/features/workspace/helpers/isReadWorkspaceFobidden' import { isReadWorkspaceFobidden } from '@/features/workspace/helpers/isReadWorkspaceFobidden'
import { decrypt } from '@typebot.io/lib/api/encryption/decrypt' import { decrypt } from '@typebot.io/lib/api/encryption/decrypt'
import { import { OpenAICredentials } from '@typebot.io/schemas/features/blocks/integrations/openai'
OpenAICredentials,
defaultBaseUrl,
} from '@typebot.io/schemas/features/blocks/integrations/openai'
import { isNotEmpty } from '@typebot.io/lib/utils' import { isNotEmpty } from '@typebot.io/lib/utils'
import { OpenAI, ClientOptions } from 'openai' import { OpenAI, ClientOptions } from 'openai'
import { defaultOpenAIOptions } from '@typebot.io/schemas/features/blocks/integrations/openai/constants'
export const listModels = authenticatedProcedure export const listModels = authenticatedProcedure
.meta({ .meta({
@ -25,7 +23,7 @@ export const listModels = authenticatedProcedure
z.object({ z.object({
credentialsId: z.string(), credentialsId: z.string(),
workspaceId: z.string(), workspaceId: z.string(),
baseUrl: z.string().default(defaultBaseUrl), baseUrl: z.string(),
apiVersion: z.string().optional(), apiVersion: z.string().optional(),
}) })
) )
@ -81,7 +79,7 @@ export const listModels = authenticatedProcedure
const config = { const config = {
apiKey: data.apiKey, apiKey: data.apiKey,
baseURL: baseUrl, baseURL: baseUrl ?? defaultOpenAIOptions.baseUrl,
defaultHeaders: { defaultHeaders: {
'api-key': data.apiKey, 'api-key': data.apiKey,
}, },

View File

@ -8,7 +8,7 @@ import {
} from '@typebot.io/schemas/features/blocks/integrations/openai' } from '@typebot.io/schemas/features/blocks/integrations/openai'
type Props = { type Props = {
task: OpenAIBlock['options']['task'] task: NonNullable<OpenAIBlock['options']>['task']
responseMapping: responseMapping:
| ChatCompletionOpenAIOptions['responseMapping'] | ChatCompletionOpenAIOptions['responseMapping']
| CreateImageOpenAIOptions['responseMapping'] | CreateImageOpenAIOptions['responseMapping']
@ -24,7 +24,7 @@ export const OpenAINodeBody = ({ task, responseMapping }: Props) => {
</Text> </Text>
{typebot && {typebot &&
responseMapping responseMapping
.map((mapping) => mapping.variableId) ?.map((mapping) => mapping.variableId)
.map((variableId, idx) => .map((variableId, idx) =>
variableId ? ( variableId ? (
<SetVariableLabel <SetVariableLabel

View File

@ -13,17 +13,17 @@ import { CredentialsDropdown } from '@/features/credentials/components/Credentia
import { import {
ChatCompletionOpenAIOptions, ChatCompletionOpenAIOptions,
CreateImageOpenAIOptions, CreateImageOpenAIOptions,
defaultBaseUrl,
defaultChatCompletionOptions,
OpenAIBlock, OpenAIBlock,
openAITasks,
} from '@typebot.io/schemas/features/blocks/integrations/openai' } from '@typebot.io/schemas/features/blocks/integrations/openai'
import { OpenAICredentialsModal } from './OpenAICredentialsModal' import { OpenAICredentialsModal } from './OpenAICredentialsModal'
import { useWorkspace } from '@/features/workspace/WorkspaceProvider' import { useWorkspace } from '@/features/workspace/WorkspaceProvider'
import { DropdownList } from '@/components/DropdownList' import { DropdownList } from '@/components/DropdownList'
import { OpenAIChatCompletionSettings } from './createChatCompletion/OpenAIChatCompletionSettings' import { OpenAIChatCompletionSettings } from './createChatCompletion/OpenAIChatCompletionSettings'
import { createId } from '@paralleldrive/cuid2'
import { TextInput } from '@/components/inputs' import { TextInput } from '@/components/inputs'
import {
defaultOpenAIOptions,
openAITasks,
} from '@typebot.io/schemas/features/blocks/integrations/openai/constants'
type OpenAITask = (typeof openAITasks)[number] type OpenAITask = (typeof openAITasks)[number]
@ -51,7 +51,7 @@ export const OpenAISettings = ({
case 'Create chat completion': { case 'Create chat completion': {
onOptionsChange({ onOptionsChange({
credentialsId: options?.credentialsId, credentialsId: options?.credentialsId,
...defaultChatCompletionOptions(createId), task,
}) })
break break
} }
@ -72,6 +72,8 @@ export const OpenAISettings = ({
}) })
} }
const baseUrl = options?.baseUrl ?? defaultOpenAIOptions.baseUrl
return ( return (
<Stack> <Stack>
{workspace && ( {workspace && (
@ -91,7 +93,7 @@ export const OpenAISettings = ({
/> />
</> </>
)} )}
{options.credentialsId && ( {options?.credentialsId && (
<> <>
<Accordion allowToggle> <Accordion allowToggle>
<AccordionItem> <AccordionItem>
@ -104,10 +106,10 @@ export const OpenAISettings = ({
<AccordionPanel as={Stack} spacing={4}> <AccordionPanel as={Stack} spacing={4}>
<TextInput <TextInput
label="Base URL" label="Base URL"
defaultValue={options.baseUrl} defaultValue={baseUrl}
onChange={updateBaseUrl} onChange={updateBaseUrl}
/> />
{options.baseUrl !== defaultBaseUrl && ( {baseUrl !== defaultOpenAIOptions.baseUrl && (
<TextInput <TextInput
label="API version" label="API version"
defaultValue={options.apiVersion} defaultValue={options.apiVersion}

View File

@ -1,16 +1,19 @@
import { DropdownList } from '@/components/DropdownList' import { DropdownList } from '@/components/DropdownList'
import { Textarea, TextInput } from '@/components/inputs' import { Textarea } from '@/components/inputs'
import { VariableSearchInput } from '@/components/inputs/VariableSearchInput' import { VariableSearchInput } from '@/components/inputs/VariableSearchInput'
import { TableListItemProps } from '@/components/TableList' import { TableListItemProps } from '@/components/TableList'
import { Stack } from '@chakra-ui/react' import { HStack, Stack, Text } from '@chakra-ui/react'
import { Variable } from '@typebot.io/schemas' import { Variable } from '@typebot.io/schemas'
import { ChatCompletionOpenAIOptions } from '@typebot.io/schemas/features/blocks/integrations/openai'
import { import {
chatCompletionMessageCustomRoles, chatCompletionMessageCustomRoles,
chatCompletionMessageRoles, chatCompletionMessageRoles,
ChatCompletionOpenAIOptions, deprecatedRoles,
} from '@typebot.io/schemas/features/blocks/integrations/openai' } from '@typebot.io/schemas/features/blocks/integrations/openai/constants'
type Props = TableListItemProps<ChatCompletionOpenAIOptions['messages'][number]> type Props = TableListItemProps<
NonNullable<ChatCompletionOpenAIOptions['messages']>[number]
>
const roles = [ const roles = [
...chatCompletionMessageCustomRoles, ...chatCompletionMessageCustomRoles,
@ -27,75 +30,88 @@ export const ChatCompletionMessageItem = ({ item, onItemChange }: Props) => {
} }
const changeSingleMessageContent = (content: string) => { const changeSingleMessageContent = (content: string) => {
if (item.role === 'Messages sequence ✨') return if (item.role === 'Messages sequence ✨' || item.role === 'Dialogue') return
onItemChange({ ...item, content }) onItemChange({ ...item, content })
} }
const changeAssistantVariableId = ( const updateDialogueVariableId = (
variable: Pick<Variable, 'id'> | undefined variable: Pick<Variable, 'id'> | undefined
) => { ) => {
if (item.role !== 'Messages sequence ✨') return if (item.role !== 'Dialogue') return
onItemChange({ onItemChange({ ...item, dialogueVariableId: variable?.id })
...item,
content: {
...item.content,
assistantMessagesVariableId: variable?.id,
},
})
} }
const changeUserVariableId = (variable: Pick<Variable, 'id'> | undefined) => { const updateStartsBy = (startsBy: 'user' | 'assistant') => {
if (item.role !== 'Messages sequence ✨') return if (item.role !== 'Dialogue') return
onItemChange({ onItemChange({ ...item, startsBy })
...item,
content: {
...item.content,
userMessagesVariableId: variable?.id,
},
})
}
const updateName = (name: string) => {
if (item.role === 'Messages sequence ✨') return
onItemChange({ ...item, name })
} }
return ( return (
<Stack p="4" rounded="md" flex="1" borderWidth="1px"> <Stack p="4" rounded="md" flex="1" borderWidth="1px">
<DropdownList <DropdownList
currentItem={item.role} currentItem={item.role}
items={roles} items={roles.filter(
(role) =>
!deprecatedRoles.includes(role as (typeof deprecatedRoles)[number])
)}
onItemSelect={changeRole} onItemSelect={changeRole}
placeholder="Select type" placeholder="Select type"
/> />
{item.role === 'Messages sequence ✨' ? ( <ChatCompletionMessageItemContent
<> item={item}
<VariableSearchInput onChangeSingleMessageContent={changeSingleMessageContent}
initialVariableId={item.content?.userMessagesVariableId} onChangeDialogueVariableId={updateDialogueVariableId}
onSelectVariable={changeUserVariableId} onStartsByChange={updateStartsBy}
placeholder="User messages variable" />
/>
<VariableSearchInput
initialVariableId={item.content?.assistantMessagesVariableId}
onSelectVariable={changeAssistantVariableId}
placeholder="Assistant messages variable"
/>
</>
) : (
<>
<Textarea
defaultValue={item.content}
onChange={changeSingleMessageContent}
placeholder="Content"
minH="150px"
/>
<TextInput
defaultValue={item.name}
onChange={updateName}
placeholder="Name (Optional)"
/>
</>
)}
</Stack> </Stack>
) )
} }
const ChatCompletionMessageItemContent = ({
onChangeSingleMessageContent,
onChangeDialogueVariableId,
onStartsByChange,
item,
}: {
onChangeSingleMessageContent: (content: string) => void
onChangeDialogueVariableId: (
variable: Pick<Variable, 'id'> | undefined
) => void
onStartsByChange: (startsBy: 'user' | 'assistant') => void
item: NonNullable<ChatCompletionOpenAIOptions['messages']>[number]
}) => {
switch (item.role) {
case 'assistant':
case 'user':
case 'system':
return (
<Textarea
defaultValue={item.content}
onChange={onChangeSingleMessageContent}
placeholder="Content"
minH="150px"
/>
)
case 'Dialogue':
return (
<Stack alignItems="flex-end">
<VariableSearchInput
initialVariableId={item.dialogueVariableId}
onSelectVariable={onChangeDialogueVariableId}
placeholder="Dialogue variable"
/>
<HStack>
<Text>starts by</Text>
<DropdownList
size="sm"
currentItem={item.startsBy ?? 'user'}
onItemSelect={onStartsByChange}
items={['user', 'assistant'] as const}
/>
</HStack>
</Stack>
)
case 'Messages sequence ✨':
return null
}
}

View File

@ -3,13 +3,14 @@ import { VariableSearchInput } from '@/components/inputs/VariableSearchInput'
import { TableListItemProps } from '@/components/TableList' import { TableListItemProps } from '@/components/TableList'
import { Stack } from '@chakra-ui/react' import { Stack } from '@chakra-ui/react'
import { Variable } from '@typebot.io/schemas' import { Variable } from '@typebot.io/schemas'
import { ChatCompletionOpenAIOptions } from '@typebot.io/schemas/features/blocks/integrations/openai'
import { import {
ChatCompletionOpenAIOptions,
chatCompletionResponseValues, chatCompletionResponseValues,
} from '@typebot.io/schemas/features/blocks/integrations/openai' defaultOpenAIResponseMappingItem,
} from '@typebot.io/schemas/features/blocks/integrations/openai/constants'
type Props = TableListItemProps< type Props = TableListItemProps<
ChatCompletionOpenAIOptions['responseMapping'][number] NonNullable<ChatCompletionOpenAIOptions['responseMapping']>[number]
> >
export const ChatCompletionResponseItem = ({ item, onItemChange }: Props) => { export const ChatCompletionResponseItem = ({ item, onItemChange }: Props) => {
@ -26,7 +27,9 @@ export const ChatCompletionResponseItem = ({ item, onItemChange }: Props) => {
return ( return (
<Stack p="4" rounded="md" flex="1" borderWidth="1px"> <Stack p="4" rounded="md" flex="1" borderWidth="1px">
<DropdownList <DropdownList
currentItem={item.valueToExtract ?? 'Message content'} currentItem={
item.valueToExtract ?? defaultOpenAIResponseMappingItem.valueToExtract
}
items={chatCompletionResponseValues} items={chatCompletionResponseValues}
onItemSelect={changeValueToExtract} onItemSelect={changeValueToExtract}
/> />

View File

@ -2,12 +2,13 @@ import { Select } from '@/components/inputs/Select'
import { useWorkspace } from '@/features/workspace/WorkspaceProvider' import { useWorkspace } from '@/features/workspace/WorkspaceProvider'
import { useToast } from '@/hooks/useToast' import { useToast } from '@/hooks/useToast'
import { trpc } from '@/lib/trpc' import { trpc } from '@/lib/trpc'
import { defaultOpenAIOptions } from '@typebot.io/schemas/features/blocks/integrations/openai/constants'
type Props = { type Props = {
baseUrl: string baseUrl?: string
apiVersion?: string apiVersion?: string
credentialsId: string credentialsId: string
defaultValue: string defaultValue?: string
onChange: (model: string | undefined) => void onChange: (model: string | undefined) => void
} }
@ -24,7 +25,7 @@ export const ModelsDropdown = ({
const { data } = trpc.openAI.listModels.useQuery( const { data } = trpc.openAI.listModels.useQuery(
{ {
credentialsId, credentialsId,
baseUrl, baseUrl: baseUrl ?? defaultOpenAIOptions.baseUrl,
workspaceId: workspace?.id as string, workspaceId: workspace?.id as string,
apiVersion, apiVersion,
}, },

View File

@ -96,6 +96,7 @@ export const OpenAIChatCompletionSettings = ({
Item={ChatCompletionMessageItem} Item={ChatCompletionMessageItem}
onItemsChange={updateMessages} onItemsChange={updateMessages}
isOrdered isOrdered
hasDefaultItem
addLabel="Add message" addLabel="Add message"
/> />
</AccordionPanel> </AccordionPanel>
@ -132,6 +133,7 @@ export const OpenAIChatCompletionSettings = ({
Item={ChatCompletionResponseItem} Item={ChatCompletionResponseItem}
onItemsChange={updateResponseMapping} onItemsChange={updateResponseMapping}
newItemDefaultProps={{ valueToExtract: 'Message content' }} newItemDefaultProps={{ valueToExtract: 'Message content' }}
hasDefaultItem
/> />
</AccordionPanel> </AccordionPanel>
</AccordionItem> </AccordionItem>

View File

@ -1,9 +1,8 @@
import test, { expect } from '@playwright/test' import test, { expect } from '@playwright/test'
import { createTypebots } from '@typebot.io/lib/playwright/databaseActions' import { createTypebots } from '@typebot.io/lib/playwright/databaseActions'
import { createId } from '@paralleldrive/cuid2' import { createId } from '@paralleldrive/cuid2'
import { IntegrationBlockType } from '@typebot.io/schemas'
import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers' import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers'
import { defaultBaseUrl } from '@typebot.io/schemas/features/blocks/integrations/openai' import { IntegrationBlockType } from '@typebot.io/schemas/features/blocks/integrations/constants'
const typebotId = createId() const typebotId = createId()
@ -13,9 +12,6 @@ test('should be configurable', async ({ page }) => {
id: typebotId, id: typebotId,
...parseDefaultGroupWithBlock({ ...parseDefaultGroupWithBlock({
type: IntegrationBlockType.OPEN_AI, type: IntegrationBlockType.OPEN_AI,
options: {
baseUrl: defaultBaseUrl,
},
}), }),
}, },
]) ])

View File

@ -7,7 +7,7 @@ type Props = {
} }
export const PabblyConnectContent = ({ block }: Props) => { export const PabblyConnectContent = ({ block }: Props) => {
const webhook = block.options.webhook const webhook = block.options?.webhook
if (isNotDefined(webhook?.body)) if (isNotDefined(webhook?.body))
return <Text color="gray.500">Configure...</Text> return <Text color="gray.500">Configure...</Text>

Some files were not shown because too many files have changed in this diff Show More