Input: {"body":{"maxTokens":2000,"messages":[{"content":"You are summarizing a text. The text is split into 1 parts, and you are currently working on part 1.\nAt every step, you will receive the current summary and a new part of the text. You need to amend the summary to include the new information (if needed).\nThe summary needs to cover the main points of the text and must be concise.\n\nIMPORTANT INSTRUCTIONS:\n- At each step, you will receive a part of the text to summarize. Make sure to reply with the new summary in the tags ■START■ and ■END■.\n- Summarize the text and make sure that the main points are included.\n- Ignore any unnecessary details and focus on the main points.\n- Use short and concise sentences to increase readability and information density.\n- When looking at the new information, focus on: Extract the Table of Contents for the Botpress Documentation. Pay special attention to all the different features. Focus on horizontal coverage of features rather than going in depth into one feature. The goal is to have a complete overview of what the documentation covers.\n- The current summary is empty. You need to generate a summary that covers the main points of the text.\n- This is the last part you will have to summarize. Make sure the summary is complete and covers all the main points.\n- The current summary is 0 tokens long. You need to make sure it is 2000 tokens or less.\n\nFORMAT OF THE SUMMARY:\nA normal text with multiple sentences and paragraphs. Use markdown to format the text into sections. Use headings, lists, and other markdown features to make the text more readable. Do not include links, images, or other non-text elements.","role":"system"},{"content":"■START■\n<summary still empty>\n■END■\n\nPlease amend the summary between the ■START■ and ■END■ tags to accurately reflect the prompt and the additional text below.\n\n<|start_new_information|>\n [Debugger, Logs & JSON](/docs/debugger-logs-json)  \n   * [Emulator](/docs/emulator)  \n   * [Keyboard Shortcuts](/docs/keyboard-shortcuts)  \n   * [Commands](/docs/studio-commands)  \n   * [Studio Preferences](/docs/studio-preferences)  \n   * [Import & Export](/docs/import-export-bots)\n* [Cards](/docs/cards)  \n   * [Send Messages](/docs/send-messages)  \n   * [Execute](/docs/execute)  \n   * [Webchat](/docs/webchat-2)  \n   * [Flow Logic](/docs/flow-logic)  \n   * [AI](/docs/ai)  \n        \n* [Webchat](/docs/webchat-2)  \n   * [Flow Logic](/docs/flow-logic)  \n   * [AI](/docs/ai)  \n         * [AI Task](/docs/ai-task-1)  \n         * [AI Transition](/docs/ai-transition)  \n         * [AI Generate Text](/docs/ai-generate-text)  \n   * [Capture Information](/docs/capture-information)  \n   * [Events](/docs/events-3)  \n   * [Agents](/docs/agents-2)  \n   * [Utilities](/docs/utilities)\n## integrations\n* [Usage](/docs/using-integrations)  \n   * [Asana](/docs/asana-integration)  \n   * [HITL](/docs/hitl-1)  \n   * [Instagram](/docs/instagram)  \n   * [Intercom](/docs/intercom)  \n   * [Line](/docs/line)  \n   * [Messenger](/docs/messenger)  \n   * [Microsoft Teams](/docs/microsoft-teams)  \n   * [Notion](/docs/notion)  \n   * [Slack](/docs/slack)  \n   * [Sunshine Conversations](/docs/sunshine-conversations)  \n   * [Telegram](/docs/telegram)  \n   * [Trello](/docs/trello)  \n   * [Twilio](/docs/twilio)  \n   * [Viber](/docs/viber)  \n   * [Vonage](/docs/vonage)  \n   * [Webhook](/docs/webhook)  \n   * [WhatsApp](/docs/whatsapp)  \n         * [Manual Configuration](/docs/manual-configuration)  \n   * [Zapier](/docs/zapier)  \n   * [Zendesk](/docs/zendesk)\n* [Building](/docs/building-integrations)  \n   * [Getting Started](/docs/getting-started-1)  \n         * [Getting Started](/docs/getting-started-1)  \n         * [Adding Messaging Channel Capabilities](/docs/adding-messaging-channel-capabilities)  \n         * [Adding Actions & Triggers to Botpress Studio](/docs/adding-actions-triggers-to-botpress-studio)  \n         * [Publish your integration on Botpress Hub](/docs/publish-your-integration-on-botpress-hub)  \n   * [Use Your Own LLM](/docs/llm-interfaces)  \n   * [Connect a live agent platform with Botpress](/docs/hitl)  \n   * [Moving Parts](/docs/moving-parts)  \n   * [CLI](/docs/cli)  \n   * [SDK](/docs/sdk)  \n   * [Key Concepts](/docs/key-concepts)  \n         * [Architecture](/docs/architecture)\n/docs/sdk)  \n   * [Key Concepts](/docs/key-concepts)  \n         * [Architecture](/docs/architecture)  \n         * [Tags](/docs/tags)  \n         * [Channels](/docs/channels)  \n         * [Configuration](/docs/configuration)  \n         * [User](/docs/user)  \n         * [Conversations](/docs/conversations-1)  \n         * [Messages](/docs/messages)  \n         * [Event](/docs/event)  \n         * [States](/docs/states-1)  \n         * [Actions](/docs/actions)  \n         * [Definitions](/docs/definitions)  \n         * [Secrets](/docs/secrets)  \n         * [ZUI - Zod schema UI components in Botpress \\[BETA\\]](/docs/zui-zod-schema-ui-components-in-botpress)  \n   * [How to](/docs/states)  \n         * [States](/docs/states)  \n         * [Register & Unregister](/docs/register-unregister)  \n         * [Integrations Actions](/docs/integrations)  \n         * [Integration Events](/docs/integration-events)  \n         * [Handler](/docs/handler)  \n         * [Logging](/docs/logging)  \n         * [Building a Custom Integration](/docs/building-a-custom-integration)\n## Webchat\n* [Webchat](/docs/webchat)  \n   * [Webflow](/docs/webflow)  \n   * [Wix](/docs/wix)  \n   * [Wordpress](/docs/wordpress)\n* [Webchat v1 (deprecated)](/docs/web-chat-v1old)  \n   * [Controlling Web Chat using JavaScript](/docs/controlling-web-chat-using-javascript)  \n   * [Styling your webchat](/docs/chatbot-button)  \n         * [Chatbot Button](/docs/chatbot-button)  \n         * [Chat Header](/docs/chat-header)  \n         * [User Input Area](/docs/user-input-area)  \n         * [Show Bot Info](/docs/show-bot-info)  \n   * [Embedding Webchat](/docs/react-app)  \n         * [React App](/docs/react-app)  \n         * [React Native App](/docs/react-native-app)  \n         * [Web Chat Iframe](/docs/web-chat-iframe)  \n         * [Full Screen Chatbot](/docs/full-screen-chatbot)\n* [Webchat v2](/docs/embedded-webchat)  \n   * [Embedded Webchat](/docs/embedded-webchat)  \n         * [Custom CSS Reference](/docs/custom-css-reference)  \n   * [React Components](/docs/react-js)  \n   * [Webchat Client](/docs/webchat-client)\n## Botpress APIs\n* [Files API](/docs/files-api)\n* [Chat API](/docs/chat-api)\n## Appendix\n* [Safety](/docs/safety)  \n   * [Preventing Abuse](/docs/preventing-abuse)  \n   * [Brand Safety Framework](/docs/brand-safety-framework)\n* [Exporting Data](/docs/exporting-data)  \n   * [Raw Conversations](/docs/exporting-raw-conversations-with-the-botpress-api)  \n   * [Conversation History](/docs/getting-the-conversation-history-from-within-your-bot)  \n   * [Streaming Analytics](/docs/streaming-analytics-from-within-your-bot-with-hooks)  \n   * [Compiled Bot Analytics](/docs/exporting-compiled-bot-analytics-with-the-botpress-api)\nPowered by\n# Notion\n[ Suggest Edits](/edit/notion)\n![](https://files.readme.io/5295aaf-image.png)\nThe Notion Integration with Botpress enables seamless integration to boost productivity, allowing interactions such as commenting on discussions or pages and database manipulations right from your Botpress bot.\nEnhance your workflows and experience a streamlined interaction between Botpress and Notion.\nPrerequisites\n[](#prerequisites)\n* A [Notion Account](https://www.notion.so/signup) and a [Notion Workspace](https://www.notion.so/onboarding)\n* A [Botpress Cloud account](https://sso.botpress.cloud) and a [Botpress Bot](https://botpress.com/docs/cloud/getting-started/create-and-publish-your-chatbot/)\nSetting up the Notion integration in Botpress\n[](#setting-up-the-notion-integration-in-botpress)\n1. Go to the [Integration Hub](https://app.botpress.cloud/hub) in Botpress Cloud (if you don't have the integration installed yet).\n2. Find and open the Notion integration then click on the \"Install to Bot\" button, now go back to your bot settings.\nThe Notion integration has the following settings:\n* **Enabled**: Whether Botpress will communicate with Telegram\n* **Webhook URL**: The URL for receiving data in Botpress\n* **Auth Token**: The token for authenticating requests from Notion\nSetting up Notion\n[](#setting-up-notion)\n1. To get the **Auth Token**, visit [My Integrations](https://www.notion.so/my-integrations) in Notion. Initiate a new integration, associate it with a workspace, and note down the `Internal Integration Secret`. Insert this secret in the `Auth Token` field under the **Integrations** tab of your bot.\n![](https://files.readme.io/ba1af96-image.png)\n2. Enable Notion Comment Capabilities under the **Capabilities** tab of your bot.\n![](https://files.readme.io/bc4dec2-image.png)\nThat's it! Now the Notion integration is operational and ready for use within your bot.\n> ## ���\n>\n> Info\n>\n> To execute certain actions, identification of Notion entities like pages or databases is essential. These IDs can be derived from the URL while viewing the entity or by choosing \"Copy Link\" from the options menu. For more details, refer to [Get a Database Id - NotionDevelopers](https://developers.notion.com/docs/create-a-notion-integration#step-3-save-the-database-id) .\nFunctionality\n[](#functionality)\nCards\n[](#cards)\nThe integration offers various actions encapsulated in cards, providing an interactive way to communicate between Botpress and Notion.\nAdd Comment to a Discussion\n[](#add-comment-to-a-discussion)\nAllows the bot to append a comment to an existing discussion in Notion.\n| Input             | Description                                                                                |\n| ----------------- | -------------------------------------------------------------------------------------------------------------------------------- |\n| **Discussion ID** | To get the Discussion ID, look for the d parameter in the URL. The format is notion.so/pageTitle-pageID?d=**DiscussionID**&pvs=4 |\n| **Comment Body**  | The comment body can be a simple text that you want to add as a comment.                                                         |\nAdd Comment to a Page\n[](#add-comment-to-a-page)\nFacilitates adding comments at the page level in Notion.\n| Input            | Description                                                                                |\n| ---------------- | ------------------------------------------------------------------------------------------------------------------- |\n| **Page ID**      | To get the Page ID, go to the page and copy the ID from the URL. The format is often notion.so/pageTitle-**pageID** |\n| **Comment Body** | The comment body can be a simple text that you want to add as a comment.                                            |\nGet a Database\n[](#get-a-database)\nRetrieve details of a specific database to synchronize with `Add Page to a Database` action.\n| Input           | Description                                                                         | Format                   |\n| --------------- | ----------------------------------------------------------------------------------- | ------------------------ |\n| **Database ID** | To retrieve the Database ID, navigate to the database and copy the ID from the URL. | notion.so/**databaseID** |\nAdd Page to a Database\n[](#add-page-to-a-database)\nDesigned to work in combination with `Get a Database` to guide an [AI task](../docs/ai-task) in generating payloads.\n| Input           | Description                                                                         | Format                         |\n| --------------- | ----------------------------------------------------------------------------------- | ------------------------------ |\n| **Database ID** | To retrieve the Database ID, navigate to the database and copy the ID from the URL. | notion.so/**databaseID**       |\n| **Page ID**     | To get the Page ID, go to the page and copy the ID from the URL.                    | notion.so/pageTitle-**pageID** |\nDelete a block\n[](#delete-a-block)\nPermits deletion of entities like pages, blocks, or pages within a database.\n| Input        | Description                                                                                | Format                                       |\n| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------- |\n| **Block ID** | Blocks also have unique IDs. To find the Block ID, right-click on the block and choose \"Copy Link\". The ID is often at the end of the link. | notion.so/pageTitle-pageID?pvs=4#**BlockID** |\nUpdated 4 months ago\n---\n* [Table of Contents](#)\n* * [Prerequisites](#prerequisites)  \n   * [Setting up the Notion integration in Botpress](#setting-up-the-notion-integration-in-botpress)  \n   * [Setting up Notion](#setting-up-notion)  \n   * [Functionality](#functionality)  \n         * [Cards](#cards)[Jump to Content](#content)\n[![Botpress](https://files.readme.io/c8cb63b6d586cd66085b4c960570959a424c7050c5ffeb0aeaf31711e2e1b2ac-small-BPLOGO_new_dark_1.png)](https://botpress.com)\n[Guides](/docs)[API Reference](/reference)[Changelog](/changelog)\n---\n[![Botpress](https://files.readme.io/c8cb63b6d586cd66085b4c960570959a424c7050c5ffeb0aeaf31711e2e1b2ac-small-BPLOGO_new_dark_1.png)](https://botpress.com)\nGuides\nMoon (Dark Mode)Sun (Light Mode)\n[Guides](/docs)[API Reference](/reference)[Changelog](/changelog)\nSafety\nSearch\n## Home\n* [Botpress Documentation](/docs/home)\n## Getting Started\n* [Build](/docs/build)\n* [Deploy](/docs/deploy)\n* [Monitor](/docs/monitor)\n## DASHBOARD\n* [Workspace](/docs/workspace)  \n   * [Home](/docs/home-1)  \n   * [Members](/docs/members)  \n   * [Audits](/docs/audits)  \n   * [Your integrations](/docs/your-integrations)  \n   * [Usage](/docs/usage-2)  \n   * [Settings](/docs/settings)  \n   * [Profile Setting](/docs/user-profile)\n* [Bot](/docs/bot)  \n   * [Overview](/docs/overview-1)  \n   * [Integrations](/docs/integrations-1)  \n   * [Webchat](/docs/webchat-1)  \n   * [Logs](/docs/logs)  \n   * [Conversations](/docs/conversations)  \n   * [Analytics](/docs/analytics-1)  \n   * [Events](/docs/events-2)  \n   * [Issues](/docs/issues)  \n   * [Configuration variables](/docs/configuration-variables-1)\n## STUDIO\n* [Interface](/docs/interface)  \n   * [Nodes](/docs/nodes)  \n   * [Home](/docs/home-2)  \n   * [Flows](/docs/studio-interface-flows)  \n   * [Knowledge Base](/docs/knowledge-base)  \n   * [Tables](/docs/tables)  \n   * [Agents](/docs/agents)  \n         * [Summary Agent](/docs/summary-agent)  \n         * [Personality Agent](/docs/personality-agent)  \n         * [Policy Agent](/docs/policy-agent)  \n         * [Translator Agent](/docs/translator-agent)  \n         * [Knowledge Agent](/docs/knowledge-agent)  \n         * [HITL Agent](/docs/hitl-agent)  \n         * [Vision Agent](/docs/vision-agent)  \n         * [Analytics Agent](/docs/analytics-agent)  \n   * [Library](/docs/library)  \n   * [Hooks](/docs/hooks)  \n   * [Integrations](/docs/integrations-3)  \n   * [Schemas](/docs/schemas)  \n   * [Card Hub](/docs/card-hub)  \n   * [Versions](/docs/versions-1)  \n   * [Chatbot Settings](/docs/chatbot-settings-1)  \n   * [Find](/docs/find)  \n   * [Variables](/docs/variables)  \n   * [Card Tray](/docs/card-tray)  \n   * [Debugger, Logs & JSON](/docs/debugger-logs-json)  \n   * [Emulator](/docs/emulator)  \n   * [Keyboard Shortcuts](/docs/keyboard-shortcuts)  \n   * [Commands](/docs/studio-commands)  \n   * [Studio Preferences](/docs/studio-preferences)  \n   * [Import & Export](/docs/import-export-bots)\n* [Cards](/docs/cards)  \n   * [Send Messages](/docs/send-messages)  \n   * [Execute](/docs/execute)  \n   * [Webchat](/docs/webchat-2)  \n   * [Flow Logic](/docs/flow-logic)  \n   * [AI](/docs/ai)  \n        \n* [Webchat](/docs/webchat-2)  \n   * [Flow Logic](/docs/flow-logic)  \n   * [AI](/docs/ai)  \n         * [AI Task](/docs/ai-task-1)  \n         * [AI Transition](/docs/ai-transition)  \n         * [AI Generate Text](/docs/ai-generate-text)  \n   * [Capture Information](/docs/capture-information)  \n   * [Events](/docs/events-3)  \n   * [Agents](/docs/agents-2)  \n   * [Utilities](/docs/utilities)\n## integrations\n* [Usage](/docs/using-integrations)  \n   * [Asana](/docs/asana-integration)  \n   * [HITL](/docs/hitl-1)  \n   * [Instagram](/docs/instagram)  \n   * [Intercom](/docs/intercom)  \n   * [Line](/docs/line)  \n   * [Messenger](/docs/messenger)  \n   * [Microsoft Teams](/docs/microsoft-teams)  \n   * [Notion](/docs/notion)  \n   * [Slack](/docs/slack)  \n   * [Sunshine Conversations](/docs/sunshine-conversations)  \n   * [Telegram](/docs/telegram)  \n   * [Trello](/docs/trello)  \n   * [Twilio](/docs/twilio)  \n   * [Viber](/docs/viber)  \n   * [Vonage](/docs/vonage)  \n   * [Webhook](/docs/webhook)  \n   * [WhatsApp](/docs/whatsapp)  \n         * [Manual Configuration](/docs/manual-configuration)  \n   * [Zapier](/docs/zapier)  \n   * [Zendesk](/docs/zendesk)\n* [Building](/docs/building-integrations)  \n   * [Getting Started](/docs/getting-started-1)  \n         * [Getting Started](/docs/getting-started-1)  \n         * [Adding Messaging Channel Capabilities](/docs/adding-messaging-channel-capabilities)  \n         * [Adding Actions & Triggers to Botpress Studio](/docs/adding-actions-triggers-to-botpress-studio)  \n         * [Publish your integration on Botpress Hub](/docs/publish-your-integration-on-botpress-hub)  \n   * [Use Your Own LLM](/docs/llm-interfaces)  \n   * [Connect a live agent platform with Botpress](/docs/hitl)  \n   * [Moving Parts](/docs/moving-parts)  \n   * [CLI](/docs/cli)  \n   * [SDK](/docs/sdk)  \n   * [Key Concepts](/docs/key-concepts)  \n         * [Architecture](/docs/architecture)\n/docs/sdk)  \n   * [Key Concepts](/docs/key-concepts)  \n         * [Architecture](/docs/architecture)  \n         * [Tags](/docs/tags)  \n         * [Channels](/docs/channels)  \n         * [Configuration](/docs/configuration)  \n         * [User](/docs/user)  \n         * [Conversations](/docs/conversations-1)  \n         * [Messages](/docs/messages)  \n         * [Event](/docs/event)  \n         * [States](/docs/states-1)  \n         * [Actions](/docs/actions)  \n         * [Definitions](/docs/definitions)  \n         * [Secrets](/docs/secrets)  \n         * [ZUI - Zod schema UI components in Botpress \\[BETA\\]](/docs/zui-zod-schema-ui-components-in-botpress)  \n   * [How to](/docs/states)  \n         * [States](/docs/states)  \n         * [Register & Unregister](/docs/register-unregister)  \n         * [Integrations Actions](/docs/integrations)  \n         * [Integration Events](/docs/integration-events)  \n         * [Handler](/docs/handler)  \n         * [Logging](/docs/logging)  \n         * [Building a Custom Integration](/docs/building-a-custom-integration)\n## Webchat\n* [Webchat](/docs/webchat)  \n   * [Webflow](/docs/webflow)  \n   * [Wix](/docs/wix)  \n   * [Wordpress](/docs/wordpress)\n* [Webchat v1 (deprecated)](/docs/web-chat-v1old)  \n   * [Controlling Web Chat using JavaScript](/docs/controlling-web-chat-using-javascript)  \n   * [Styling your webchat](/docs/chatbot-button)  \n         * [Chatbot Button](/docs/chatbot-button)  \n         * [Chat Header](/docs/chat-header)  \n         * [User Input Area](/docs/user-input-area)  \n         * [Show Bot Info](/docs/show-bot-info)  \n   * [Embedding Webchat](/docs/react-app)  \n         * [React App](/docs/react-app)  \n         * [React Native App](/docs/react-native-app)  \n         * [Web Chat Iframe](/docs/web-chat-iframe)  \n         * [Full Screen Chatbot](/docs/full-screen-chatbot)\n* [Webchat v2](/docs/embedded-webchat)  \n   * [Embedded Webchat](/docs/embedded-webchat)  \n         * [Custom CSS Reference](/docs/custom-css-reference)  \n   * [React Components](/docs/react-js)  \n   * [Webchat Client](/docs/webchat-client)\n## Botpress APIs\n* [Files API](/docs/files-api)\n* [Chat API](/docs/chat-api)\n## Appendix\n* [Safety](/docs/safety)  \n   * [Preventing Abuse](/docs/preventing-abuse)  \n   * [Brand Safety Framework](/docs/brand-safety-framework)\n* [Exporting Data](/docs/exporting-data)  \n   * [Raw Conversations](/docs/exporting-raw-conversations-with-the-botpress-api)  \n   * [Conversation History](/docs/getting-the-conversation-history-from-within-your-bot)  \n   * [Streaming Analytics](/docs/streaming-analytics-from-within-your-bot-with-hooks)  \n   * [Compiled Bot Analytics](/docs/exporting-compiled-bot-analytics-with-the-botpress-api)\nPowered by\n# Safety\nBotpress provides a robust feature set that ensure AI-driven interactions are safe, controlled, and compliant.\n[ Suggest Edits](/edit/safety)\nOverview\n[](#overview)\nEnsuring the safety of AI-driven interactions is a core priority for our team, and for bot builders. The Botpress platform is designed to empower developers while maintaining strict safety standards, giving you the tools needed to build reliable and controlled AI solutions. This overview covers the key safety aspects of Botpress, including constraint management, data privacy, access control, and mitigation of AI-related risks like hallucinations.\nKey Safety Features\n[](#key-safety-features)\n1. **Policy Agent**: Control AI behavior with predefined rules and constraints to ensure responses align with your organization’s standards. The Policy Agent acts as a gatekeeper, enforcing guardrails and mitigating hallucinations by filtering outputs against customizable policies.\n2. **Access Control & Permissions**: Secure your environment with granular access control. Define roles and permissions to regulate who can view, edit, and deploy AI models, ensuring that only authorized users can make changes.\n3. **Data Privacy & Security**: Botpress prioritizes data security with encryption, anonymization, and secure API connections. Our platform helps you comply with privacy regulations, safeguarding sensitive information across all interactions.\n4. **Monitoring & Analytics**: Gain insights into AI behavior and performance through monitoring and analytics tools. Track usage patterns, detect anomalies, and adjust policies in real time to maintain optimal safety levels.\n5. **Error Mitigation & Recovery**: Implement fallback mechanisms that catch errors or misbehaviors, redirecting interactions to human agents or predefined safe states. This ensures continuity and reliability even when the AI is uncertain or encounters edge cases.\n**Why Safety Matters**\n[](#why-safety-matters)\nBuilding trust in AI systems starts with safety. By implementing robust safety measures, Botpress ensures your AI solutions are not only effective but also secure and compliant with industry standards. Our commitment to safety helps you deploy AI with confidence, knowing that you are in control of every interaction.\nUpdated 27 days ago\n---\n* [Table of Contents](#)\n* * [Overview](#overview)  \n         * [Key Safety Features](#key-safety-features)[Jump to Content](#content)\n[![Botpress](https://files.readme.io/c8cb63b6d586cd66085b4c960570959a424c7050c5ffeb0aeaf31711e2e1b2ac-small-BPLOGO_new_dark_1.png)](https://botpress.com)\n[Guides](/docs)[API Reference](/reference)[Changelog](/changelog)\n---\n[![Botpress](https://files.readme.io/c8cb63b6d586cd66085b4c960570959a424c7050c5ffeb0aeaf31711e2e1b2ac-small-BPLOGO_new_dark_1.png)](https://botpress.com)\nGuides\nMoon (Dark Mode)Sun (Light Mode)\n[Guides](/docs)[API Reference](/reference)[Changelog](/changelog)\nSchemas\nSearch\n## Home\n* [Botpress Documentation](/docs/home)\n## Getting Started\n* [Build](/docs/build)\n* [Deploy](/docs/deploy)\n* [Monitor](/docs/monitor)\n## DASHBOARD\n* [Workspace](/docs/workspace)  \n   * [Home](/docs/home-1)  \n   * [Members](/docs/members)  \n   * [Audits](/docs/audits)  \n   * [Your integrations](/docs/your-integrations)  \n   * [Usage](/docs/usage-2)  \n   * [Settings](/docs/settings)  \n   * [Profile Setting](/docs/user-profile)\n* [Bot](/docs/bot)  \n   * [Overview](/docs/overview-1)  \n   * [Integrations](/docs/integrations-1)  \n   * [Webchat](/docs/webchat-1)  \n   * [Logs](/docs/logs)  \n   * [Conversations](/docs/conversations)  \n   * [Analytics](/docs/analytics-1)  \n   * [Events](/docs/events-2)  \n   * [Issues](/docs/issues)  \n   * [Configuration variables](/docs/configuration-variables-1)\n## STUDIO\n* [Interface](/docs/interface)  \n   * [Nodes](/docs/nodes)  \n   * [Home](/docs/home-2)  \n   * [Flows](/docs/studio-interface-flows)  \n   * [Knowledge Base](/docs/knowledge-base)  \n   * [Tables](/docs/tables)  \n   * [Agents](/docs/agents)  \n         * [Summary Agent](/docs/summary-agent)  \n         * [Personality Agent](/docs/personality-agent)  \n         * [Policy Agent](/docs/policy-agent)  \n         * [Translator Agent](/docs/translator-agent)  \n         * [Knowledge Agent](/docs/knowledge-agent)  \n         * [HITL Agent](/docs/hitl-agent)  \n         * [Vision Agent](/docs/vision-agent)  \n         * [Analytics Agent](/docs/analytics-agent)  \n   * [Library](/docs/library)  \n   * [Hooks](/docs/hooks)  \n   * [Integrations](/docs/integrations-3)  \n   * [Schemas](/docs/schemas)  \n   * [Card Hub](/docs/card-hub)  \n   * [Versions](/docs/versions-1)  \n   * [Chatbot Settings](/docs/chatbot-settings-1)  \n   * [Find](/docs/find)  \n   * [Variables](/docs/variables)  \n   * [Card Tray](/docs/card-tray)  \n   * [Debugger, Logs & JSON](/docs/debugger-logs-json)  \n   * [Emulator](/docs/emulator)  \n   * [Keyboard Shortcuts](/docs/keyboard-shortcuts)  \n   * [Commands](/docs/studio-commands)  \n   * [Studio Preferences](/docs/studio-preferences)  \n   * [Import & Export](/docs/import-export-bots)\n* [Cards](/docs/cards)  \n   * [Send Messages](/docs/send-messages)  \n   * [Execute](/docs/execute)  \n   * [Webchat](/docs/webchat-2)  \n   * [Flow Logic](/docs/flow-logic)  \n   * [AI](/docs/ai)  \n        \n* [Webchat](/docs/webchat-2)  \n   * [Flow Logic](/docs/flow-logic)  \n   * [AI](/docs/ai)  \n         * [AI Task](/docs/ai-task-1)  \n         * [AI Transition](/docs/ai-transition)  \n         * [AI Generate Text](/docs/ai-generate-text)  \n   * [Capture Information](/docs/capture-information)  \n   * [Events](/docs/events-3)  \n   * [Agents](/docs/agents-2)  \n   * [Utilities](/docs/utilities)\n## integrations\n* [Usage](/docs/using-integrations)  \n   * [Asana](/docs/asana-integration)  \n   * [HITL](/docs/hitl-1)  \n   * [Instagram](/docs/instagram)  \n   * [Intercom](/docs/intercom)  \n   * [Line](/docs/line)  \n   * [Messenger](/docs/messenger)  \n   * [Microsoft Teams](/docs/microsoft-teams)  \n   * [Notion](/docs/notion)  \n   * [Slack](/docs/slack)  \n   * [Sunshine Conversations](/docs/sunshine-conversations)  \n   * [Telegram](/docs/telegram)  \n   * [Trello](/docs/trello)  \n   * [Twilio](/docs/twilio)  \n   * [Viber](/docs/viber)  \n   * [Vonage](/docs/vonage)  \n   * [Webhook](/docs/webhook)  \n   * [WhatsApp](/docs/whatsapp)  \n         * [Manual Configuration](/docs/manual-configuration)  \n   * [Zapier](/docs/zapier)  \n   * [Zendesk](/docs/zendesk)\n* [Building](/docs/building-integrations)  \n   * [Getting Started](/docs/getting-started-1)  \n         * [Getting Started](/docs/getting-started-1)  \n         * [Adding Messaging Channel Capabilities](/docs/adding-messaging-channel-capabilities)  \n         * [Adding Actions & Triggers to Botpress Studio](/docs/adding-actions-triggers-to-botpress-studio)  \n         * [Publish your integration on Botpress Hub](/docs/publish-your-integration-on-botpress-hub)  \n   * [Use Your Own LLM](/docs/llm-interfaces)  \n   * [Connect a live agent platform with Botpress](/docs/hitl)  \n   * [Moving Parts](/docs/moving-parts)  \n   * [CLI](/docs/cli)  \n   * [SDK](/docs/sdk)  \n   * [Key Concepts](/docs/key-concepts)  \n         * [Architecture](/docs/architecture)\n/docs/sdk)  \n   * [Key Concepts](/docs/key-concepts)  \n         * [Architecture](/docs/architecture)  \n         * [Tags](/docs/tags)  \n         * [Channels](/docs/channels)  \n         * [Configuration](/docs/configuration)  \n         * [User](/docs/user)  \n         * [Conversations](/docs/conversations-1)  \n         * [Messages](/docs/messages)  \n         * [Event](/docs/event)  \n         * [States](/docs/states-1)  \n         * [Actions](/docs/actions)  \n         * [Definitions](/docs/definitions)  \n         * [Secrets](/docs/secrets)  \n         * [ZUI - Zod schema UI components in Botpress \\[BETA\\]](/docs/zui-zod-schema-ui-components-in-botpress)  \n   * [How to](/docs/states)  \n         * [States](/docs/states)  \n         * [Register & Unregister](/docs/register-unregister)  \n         * [Integrations Actions](/docs/integrations)  \n         * [Integration Events](/docs/integration-events)  \n         * [Handler](/docs/handler)  \n         * [Logging](/docs/logging)  \n         * [Building a Custom Integration](/docs/building-a-custom-integration)\n## Webchat\n* [Webchat](/docs/webchat)  \n   * [Webflow](/docs/webflow)  \n   * [Wix](/docs/wix)  \n   * [Wordpress](/docs/wordpress)\n* [Webchat v1 (deprecated)](/docs/web-chat-v1old)  \n   * [Controlling Web Chat using JavaScript](/docs/controlling-web-chat-using-javascript)  \n   * [Styling your webchat](/docs/chatbot-button)  \n         * [Chatbot Button](/docs/chatbot-button)  \n         * [Chat Header](/docs/chat-header)  \n         * [User Input Area](/docs/user-input-area)  \n         * [Show Bot Info](/docs/show-bot-info)  \n   * [Embedding Webchat](/docs/react-app)  \n         * [React App](/docs/react-app)  \n         * [React Native App](/docs/react-native-app)  \n         * [Web Chat Iframe](/docs/web-chat-iframe)  \n         * [Full Screen Chatbot](/docs/full-screen-chatbot)\n* [Webchat v2](/docs/embedded-webchat)  \n   * [Embedded Webchat](/docs/embedded-webchat)  \n         * [Custom CSS Reference](/docs/custom-css-reference)  \n   * [React Components](/docs/react-js)  \n   * [Webchat Client](/docs/webchat-client)\n## Botpress APIs\n* [Files API](/docs/files-api)\n* [Chat API](/docs/chat-api)\n## Appendix\n* [Safety](/docs/safety)  \n   * [Preventing Abuse](/docs/preventing-abuse)  \n   * [Brand Safety Framework](/docs/brand-safety-framework)\n* [Exporting Data](/docs/exporting-data)  \n   * [Raw Conversations](/docs/exporting-raw-conversations-with-the-botpress-api)  \n   * [Conversation History](/docs/getting-the-conversation-history-from-within-your-bot)  \n   * [Streaming Analytics](/docs/streaming-analytics-from-within-your-bot-with-hooks)  \n   * [Compiled Bot Analytics](/docs/exporting-compiled-bot-analytics-with-the-botpress-api)\nPowered by\n# Schemas\nBlueprint that defines the structure, format, and validation rules for data.\n[ Suggest Edits](/edit/schemas)\nA schema is a blueprint that defines the structure, required fields, data types, and validation rules for a piece of data. In Botpress, schemas are primarily used to ensure that data passed between various components—such as actions, modules, or API requests—meets the expected format and constraints.\nSchemas are useful for:\n* **Data Validation**: Preventing errors by ensuring that data adheres to the expected format.\n* **Consistency**: Enforcing a consistent structure for data across different components.\n* **Error Reduction**: Reducing the likelihood of runtime errors caused by unexpected or malformed data.\n* **Ease of Maintenance**: Making it easier to understand and manage data flow within your Botpress application.\nCreating and Using Schemas\n[](#creating-and-using-schemas)\nJSON Schema Basics\n[](#json-schema-basics)\nBotpress uses JSON Schema, a standard for describing the structure and validation constraints of JSON documents.\nA JSON Schema can define:\n* **Types**: The type of data (e.g., string, number, object, array).\n* **Required Fields**: Fields that must be present in the data.\n* **Enum Values**: Specific allowed values for a field.\n* **Nested Structures**: Complex data structures with multiple levels.\nCreating a schema\n[](#creating-a-schema)\nYou can create a new schema by navigating to the Schema menu in the left-hand menu. You can also create a new schema when adding a new variable through the Variables menu.\nUsing schemas\n[](#using-schemas)\nYou can use schemas instead of selecting a variable type like String or Number. This means that the variable will contain the information in the structure you've defined in your schema.\nFor example, you might use a variable to contain information about your end user. This variable can use a schema to contain information like email, age, name, and home address, all contained in a single variable and structured by your schema.\nTesting Schemas\n[](#testing-schemas)\nHere's a simple demo schema you can create to familiarize yourself with them.\n1. Create a schema for a user object with the following properties:\nJavaScript\n`zui.object({\nname: zui.string(),\nage: zui.number(),\nemail: zui.string().email(),\naddress: zui.object({\nstreet: zui.string(),\ncity: zui.string(),\nzip: zui.string().length(5)\n})\n})\n`\n1. Create a Variable of the user schema type and name it `UserInformation`.\n2. \\[optionally\\] you can use these variables as inputs for workflows, allowing the user to fill in the schema as though it were a form.\nUsage in AI Task\n[](#usage-in-ai-task)\n* Task Instructions:\n`Fetch name, age, email and address from the provided input\n`\n* AI Task Input:\n`Rohan Kokkula, 26, at [[email protected]](/cdn-cgi/l/email-protection), received a mysterious parcel at his doorstep:\n42 Emerald Lane, Mystic Falls, 560078.\nInside, a map beckoned him to a hidden world beneath Mumbai's bustling streets,\nwhere history and magic intertwined.\n`\n* Store result in variables: Select the Variable we created above.\nConditionally Show Inputs - Input trees\n[](#conditionally-show-inputs---input-trees)\nWe'll show you how to use discriminated unions in Zod to conditionally include fields in an object schema. We'll go through two examples:\n1. Changing the type of a variable based on user input.\n2. Conditionally showing an extra setting when an \"Advanced Setting\" toggle is activated.\n![selecting input type text, with no advanced settings](https://files.readme.io/4015772fa59ea2e70290e5c00ed8a78cde7aa3c0d229d5ead1543671f73a90e7-image.png)\nselecting input type text, with no advanced settings\n![selecting input type number, with advanced settings](https://files.readme.io/71423052c8b254a3d97bc8f02b00b488f5996817d0313c862d62548b7a8cc27b-image.png)\nselecting input type number, with advanced settings\nExample 1: Changing the Type of a Variable\n[](#example-1-changing-the-type-of-a-variable)\nIn this example, we'll create a schema that allows a variable (`value`) to be either a string or a number, depending on the user's choice.\nTypeScript\n`z.object({\ninputData: z.discriminatedUnion('inputType', [\nz.object({\ninputType: z.literal('Text'),\n// When inputType is 'Text', value is a string\nvalue: z.string().title('Text Value').placeholder('Enter text')\n}),\nz.object({\ninputType: z.literal('Number'),\n// When inputType is 'Number', value is a number\nvalue: z.number().title('Numeric Value').placeholder('Enter a number')\n})\n])\n});\n`\nHow It Works\n[](#how-it-works)\n* **`inputType`**: Acts as the discriminator that determines the type of the `value` field.\n* **Discriminated Union**:  \n   * If `inputType` is `\"Text\"`, the schema expects `value` to be a string.  \n   * If `inputType` is `\"Number\"`, the schema expects `value` to be a number.\nThis approach is useful when you want to change the type of a variable based on a user's selection.\nExample 2: Conditionally Showing Extra Settings\n[](#example-2-conditionally-showing-extra-settings)\nThis example demonstrates how to include an extra field when an \"Advanced Setting\" toggle is turned on.\nTypeScript\n`z.object({\n// ... your other inputs\n// Using discriminated union to handle the advanced setting toggle with Yes/No options\nsettings: z.discriminatedUnion('advancedSetting', [\nz.object({\nadvancedSetting: z.literal('No').describe('Advanced setting is disabled'),\n// No extra settings when advancedSetting is \"No\"\n}),\nz.object({\nadvancedSetting: z.literal('Yes').describe('Advanced setting is enabled'),\n// Extra setting when advancedSetting is \"Yes\"\nextraSetting: z.string()\n.title('Extra Setting')\n.placeholder('Enter extra setting')\n.describe('Additional setting enabled when the advanced setting is turned on')\n})\n])\n});\n`\nHow It Works\n[](#how-it-works-1)\n* **`advancedSetting`**: Acts as the discriminator that determines whether to include the `extraSetting` field.\n* **Discriminated Union**:  \n   * If `advancedSetting` is `\"No\"`, the schema does not include `extraSetting`.  \n   * If `advancedSetting` is `\"Yes\"`, the schema requires `extraSetting` to be provided.\nThis pattern is useful when you want to include additional settings only when an \"Advanced Setting\" option is enabled.\nTrying it out\n[](#trying-it-out)\nTrying it out is very easy!\n1. Open Botpress Studio\n2. Create and save the schema with discriminatedUnion fields\n3. Create a variable in a workflow other than main, set its type to the schema's saved name.\n4. Click on the input node for the workflow, then toggle the variable as an input.\n5. Go to another workflow and add a card that points to the one with the schema input.\n6. You'll now be able to able to see your input tree in all it's glory!\nSummary\n[](#summary)\n* **Discriminated Unions** in Zod allow you to conditionally change the shape of an object.\n* They are useful for:\n1. Changing the type of a variable based on user input.\n2. Conditionally including fields based on a toggle or option.\nBy using discriminated unions, you can build dynamic and flexible schemas that adapt based on user selections, making your form validation and UI more intuitive and responsive.\nUpdated 17 days ago\n---\n* [Table of Contents](#)\n* * [Creating and Using Schemas](#creating-and-using-schemas)  \n         * [JSON Schema Basics](#json-schema-basics)  \n         * [Creating a schema](#creating-a-schema)  \n         * [Using schemas](#using-schemas)  \n   * [Testing Schemas](#testing-schemas)  \n         * [Usage in AI Task](#usage-in-ai-task)  \n   * [Conditionally Show Inputs - Input trees](#conditionally-show-inputs---input-trees)[Jump to Content](#content)\n[![Botpress](https://files.readme.io/c8cb63b6d586cd66085b4c960570959a424c7050c5ffeb0aeaf31711e2e1b2ac-small-BPLOGO_new_dark_1.png)](https://botpress.com)\n[Guides](/docs)[API Reference](/reference)[Changelog](/changelog)\n---\n[![Botpress](https://files.readme.io/c8cb63b6d586cd66085b4c960570959a424c7050c5ffeb0aeaf31711e2e1b2ac-small-BPLOGO_new_dark_1.png)](https://botpress.com)\nGuides\nMoon (Dark Mode)Sun (Light Mode)\n[Guides](/docs)[API Reference](/reference)[Changelog](/changelog)\nLine\nSearch\n## Home\n* [Botpress Documentation](/docs/home)\n## Getting Started\n* [Build](/docs/build)\n* [Deploy](/docs/deploy)\n* [Monitor](/docs/monitor)\n## DASHBOARD\n* [Workspace](/docs/workspace)  \n   * [Home](/docs/home-1)  \n   * [Members](/docs/members)  \n   * [Audits](/docs/audits)  \n   * [Your integrations](/docs/your-integrations)  \n   * [Usage](/docs/usage-2)  \n   * [Settings](/docs/settings)  \n   * [Profile Setting](/docs/user-profile)\n* [Bot](/docs/bot)  \n   * [Overview](/docs/overview-1)  \n   * [Integrations](/docs/integrations-1)  \n   * [Webchat](/docs/webchat-1)  \n   * [Logs](/docs/logs)  \n   * [Conversations](/docs/conversations)  \n   * [Analytics](/docs/analytics-1)  \n   * [Events](/docs/events-2)  \n   * [Issues](/docs/issues)  \n   * [Configuration variables](/docs/configuration-variables-1)\n## STUDIO\n* [Interface](/docs/interface)  \n   * [Nodes](/docs/nodes)  \n   * [Home](/docs/home-2)  \n   * [Flows](/docs/studio-interface-flows)  \n   * [Knowledge Base](/docs/knowledge-base)  \n   * [Tables](/docs/tables)  \n   * [Agents](/docs/agents)  \n         * [Summary Agent](/docs/summary-agent)  \n         * [Personality Agent](/docs/personality-agent)  \n         * [Policy Agent](/docs/policy-agent)  \n         * [Translator Agent](/docs/translator-agent)  \n         * [Knowledge Agent](/docs/knowledge-agent)  \n         * [HITL Agent](/docs/hitl-agent)  \n         * [Vision Agent](/docs/vision-agent)  \n         * [Analytics Agent](/docs/analytics-agent)  \n   * [Library](/docs/library)  \n   * [Hooks](/docs/hooks)  \n   * [Integrations](/docs/integrations-3)  \n   * [Schemas](/docs/schemas)  \n   * [Card Hub](/docs/card-hub)  \n   * [Versions](/docs/versions-1)  \n   * [Chatbot Settings](/docs/chatbot-settings-1)  \n   * [Find](/docs/find)  \n   * [Variables](/docs/variables)  \n   * [Card Tray](/docs/card-tray)  \n   * [Debugger, Logs & JSON](/docs/debugger-logs-json)  \n   * [Emulator](/docs/emulator)  \n   * [Keyboard Shortcuts](/docs/keyboard-shortcuts)  \n   * [Commands](/docs/studio-commands)  \n   * [Studio Preferences](/docs/studio-preferences)  \n   * [Import & Export](/docs/import-export-bots)\n* [Cards](/docs/cards)  \n   * [Send Messages](/docs/send-messages)  \n   * [Execute](/docs/execute)  \n   * [Webchat](/docs/webchat-2)  \n   * [Flow Logic](/docs/flow-logic)  \n   * [AI](/docs/ai)  \n        \n* [Webchat](/docs/webchat-2)  \n   * [Flow Logic](/docs/flow-logic)  \n   * [AI](/docs/ai)  \n         * [AI Task](/docs/ai-task-1)  \n         * [AI Transition](/docs/ai-transition)  \n         * [AI Generate Text](/docs/ai-generate-text)  \n   * [Capture Information](/docs/capture-information)  \n   * [Events](/docs/events-3)  \n   * [Agents](/docs/agents-2)  \n   * [Utilities](/docs/utilities)\n## integrations\n* [Usage](/docs/using-integrations)  \n   * [Asana](/docs/asana-integration)  \n   * [HITL](/docs/hitl-1)  \n   * [Instagram](/docs/instagram)  \n   * [Intercom](/docs/intercom)  \n   * [Line](/docs/line)  \n   * [Messenger](/docs/messenger)  \n   * [Microsoft Teams](/docs/microsoft-teams)  \n   * [Notion](/docs/notion)  \n   * [Slack](/docs/slack)  \n   * [Sunshine Conversations](/docs/sunshine-conversations)  \n   * [Telegram](/docs/telegram)  \n   * [Trello](/docs/trello)  \n   * [Twilio](/docs/twilio)  \n   * [Viber](/docs/viber)  \n   * [Vonage](/docs/vonage)  \n   * [Webhook](/docs/webhook)  \n   * [WhatsApp](/docs/whatsapp)  \n         * [Manual Configuration](/docs/manual-configuration)  \n   * [Zapier](/docs/zapier)  \n   * [Zendesk](/docs/zendesk)\n* [Building](/docs/building-integrations)  \n   * [Getting Started](/docs/getting-started-1)  \n         * [Getting Started](/docs/getting-started-1)  \n         * [Adding Messaging Channel Capabilities](/docs/adding-messaging-channel-capabilities)  \n         * [Adding Actions & Triggers to Botpress Studio](/docs/adding-actions-triggers-to-botpress-studio)  \n         * [Publish your integration on Botpress Hub](/docs/publish-your-integration-on-botpress-hub)  \n   * [Use Your Own LLM](/docs/llm-interfaces)  \n   * [Connect a live agent platform with Botpress](/docs/hitl)  \n   * [Moving Parts](/docs/moving-parts)  \n   * [CLI](/docs/cli)  \n   * [SDK](/docs/sdk)  \n   * [Key Concepts](/docs/key-concepts)  \n         * [Architecture](/docs/architecture)\n/docs/sdk)  \n   * [Key Concepts](/docs/key-concepts)  \n         * [Architecture](/docs/architecture)  \n         * [Tags](/docs/tags)  \n         * [Channels](/docs/channels)  \n         * [Configuration](/docs/configuration)  \n         * [User](/docs/user)  \n         * [Conversations](/docs/conversations-1)  \n         * [Messages](/docs/messages)  \n         * [Event](/docs/event)  \n         * [States](/docs/states-1)  \n         * [Actions](/docs/actions)  \n         * [Definitions](/docs/definitions)  \n         * [Secrets](/docs/secrets)  \n         * [ZUI - Zod schema UI components in Botpress \\[BETA\\]](/docs/zui-zod-schema-ui-components-in-botpress)  \n   * [How to](/docs/states)  \n         * [States](/docs/states)  \n         * [Register & Unregister](/docs/register-unregister)  \n         * [Integrations Actions](/docs/integrations)  \n         * [Integration Events](/docs/integration-events)  \n         * [Handler](/docs/handler)  \n         * [Logging](/docs/logging)  \n         * [Building a Custom Integration](/docs/building-a-custom-integration)\n## Webchat\n* [Webchat](/docs/webchat)  \n   * [Webflow](/docs/webflow)  \n   * [Wix](/docs/wix)  \n   * [Wordpress](/docs/wordpress)\n* [Webchat v1 (deprecated)](/docs/web-chat-v1old)  \n   * [Controlling Web Chat using JavaScript](/docs/controlling-web-chat-using-javascript)  \n   * [Styling your webchat](/docs/chatbot-button)  \n         * [Chatbot Button](/docs/chatbot-button)  \n         * [Chat Header](/docs/chat-header)  \n         * [User Input Area](/docs/user-input-area)  \n         * [Show Bot Info](/docs/show-bot-info)  \n   * [Embedding Webchat](/docs/react-app)  \n         * [React App](/docs/react-app)  \n         * [React Native App](/docs/react-native-app)  \n         * [Web Chat Iframe](/docs/web-chat-iframe)  \n         * [Full Screen Chatbot](/docs/full-screen-chatbot)\n* [Webchat v2](/docs/embedded-webchat)  \n   * [Embedded Webchat](/docs/embedded-webchat)  \n         * [Custom CSS Reference](/docs/custom-css-reference)  \n   * [React Components](/docs/react-js)  \n   * [Webchat Client](/docs/webchat-client)\n## Botpress APIs\n* [Files API](/docs/files-api)\n* [Chat API](/docs/chat-api)\n## Appendix\n* [Safety](/docs/safety)  \n   * [Preventing Abuse](/docs/preventing-abuse)  \n   * [Brand Safety Framework](/docs/brand-safety-framework)\n* [Exporting Data](/docs/exporting-data)  \n   * [Raw Conversations](/docs/exporting-raw-conversations-with-the-botpress-api)  \n   * [Conversation History](/docs/getting-the-conversation-history-from-within-your-bot)  \n   * [Streaming Analytics](/docs/streaming-analytics-from-within-your-bot-with-hooks)  \n   * [Compiled Bot Analytics](/docs/exporting-compiled-bot-analytics-with-the-botpress-api)\nPowered by\n# Line\n[ Suggest Edits](/edit/line)\n![](https://files.readme.io/b9e5817-image.png)\nPrerequisites\n[](#prerequisites)\n* A channel created on the [LINE Developers Console](https://developers.line.biz/).\n* The same channel added to your LINE official account\nSetting up the LINE integration in Botpress\n[](#setting-up-the-line-integration-in-botpress)\n1. Go to the [Integration Hub](https://app.botpress.cloud/hub) in Botpress Cloud (if you don't have the integration installed yet).\n2. Find and open the LINE integration then click on the \"Install to Bot\" button, now go back to your bot settings.\nThe LINE integration has the following settings:\n* **Enabled**: Whether Botpress will communicate with LINE\n* **Webhook URL**: The URL for receiving data in Botpress\n* **Channel Access Token**: The token used to authenticate the channel\n* **Channel Secret**: The secret used to verify the signature between LINE and Botpress\nSetting up Line\n[](#setting-up-line)\nChannel Access Token\n[](#channel-access-token)\nTo get this token, open the **Messaging API** tab in your channel settings in LINE, scroll to the bottom to the **Channel Access Token** section, and then generate a new one or copy it if the Channel access token was already issued, then paste it in Botpress.\nFor Long-Lived Channel Access Token: read this [LINE documentation](https://developers.line.biz/en/docs/messaging-api/channel-access-tokens/#long-lived-channel-access-tokens).\nChannel Secret\n[](#channel-secret)\nThe **Channel Secret** is used to [verify the signature](https://developers.line.biz/en/docs/messaging-api/receiving-messages/#verifying-signatures) between LINE and Botpress.\nTo get the secret, open the **Basic settings** tab in your channel configuration in LINE, scroll to the bottom to the **Channel Secret** section, and then copy the secret.\nFinalizing Channel Configuration\n[](#finalizing-channel-configuration)\nThe next step is to **Enable** the channel from the top of the screen and copy the webhook URL from the button below the webhook URL. Then click **Save**.\nNow, we proceed to the last step by [setting your webhook URL](https://developers.line.biz/en/docs/messaging-api/building-bot/#setting-webhook-url) in LINE.\nThat's it, you may now start chatting with your bot on LINE!\nContent Types Mapping\n[](#content-types-mapping)\nFrom Botpress to LINE\n[](#from-botpress-to-line)\n* **Text** is mapped to [Text Object](https://developers.line.biz/en/docs/messaging-api/message-types/#text-messages)\n* Text with **Markdown** is mapped to [Text Object](https://developers.line.biz/en/docs/messaging-api/message-types/#text-messages)\n* **Image** is mapped to [Image Object](https://developers.line.biz/en/docs/messaging-api/message-types/#image-messages)\n* **Audio** is mapped to [Audio Object](https://developers.line.biz/en/docs/messaging-api/message-types/#audio-messages)\n* **Video** is mapped to [Video Object](https://developers.line.biz/en/docs/messaging-api/message-types/#video-messages)\n* **File** is **NOT** supported in LINE [Message Types](https://developers.line.biz/en/docs/messaging-api/message-types/)\n* **Location** is mapped to [Location Object](https://developers.line.biz/en/docs/messaging-api/message-types/#location-messages)\n* **Carousel** is mapped to [Flex Object](https://developers.line.biz/en/docs/messaging-api/message-types/#flex-messages)\n* **Card** is mapped to [Flex Object](https://developers.line.biz/en/docs/messaging-api/message-types/#flex-messages)\n* **Dropdown** is mapped to [Flex Object](https://developers.line.biz/en/docs/messaging-api/message-types/#flex-messages)\n* **Choice** is mapped to [Flex Object](https://developers.line.biz/en/docs/messaging-api/message-types/#flex-messages)\nFrom LINE to Botpress\n[](#from-line-to-botpress)\n* **Text** is mapped to **Text Object**\n* The rest of the types are not currently processed by Botpress\nUpdated 4 months ago\n---\n* [Table of Contents](#)\n* * [Prerequisites](#prerequisites)  \n   * [Setting up the LINE integration in Botpress](#setting-up-the-line-integration-in-botpress)  \n   * [Setting up Line](#setting-up-line)  \n         * [Channel Access Token](#channel-access-token)  \n         * [Channel Secret](#channel-secret)  \n   * [Finalizing Channel Configuration](#finalizing-channel-configuration)  \n   * [Content Types Mapping](#content-types-mapping)  \n         * [From Botpress to LINE](#from-botpress-to-line)  \n         * [From LINE to Botpress](#from-line-to-botpress)[Jump to Content](#content)\n[![Botpress](https://files.readme.io/c8cb63b6d586cd66085b4c960570959a424c7050c5ffeb0aeaf31711e2e1b2ac-small-BPLOGO_new_dark_1.png)](https://botpress.com)\n[Guides](/docs)[API Reference](/reference)[Changelog](/changelog)\n---\n[![Botpress](https://files.readme.io/c8cb63b6d586cd66085b4c960570959a424c7050c5ffeb0aeaf31711e2e1b2ac-small-BPLOGO_new_dark_1.png)](https://botpress.com)\nGuides\nMoon (Dark Mode)Sun (Light Mode)\n[Guides](/docs)[API Reference](/reference)[Changelog](/changelog)\nMessenger\nSearch\n## Home\n* [Botpress Documentation](/docs/home)\n## Getting Started\n* [Build](/docs/build)\n* [Deploy](/docs/deploy)\n* [Monitor](/docs/monitor)\n## DASHBOARD\n* [Workspace](/docs/workspace)  \n   * [Home](/docs/home-1)  \n   * [Members](/docs/members)  \n   * [Audits](/docs/audits)  \n   * [Your integrations](/docs/your-integrations)  \n   * [Usage](/docs/usage-2)  \n   * [Settings](/docs/settings)  \n   * [Profile Setting](/docs/user-profile)\n* [Bot](/docs/bot)  \n   * [Overview](/docs/overview-1)  \n   * [Integrations](/docs/integrations-1)  \n   * [Webchat](/docs/webchat-1)  \n   * [Logs](/docs/logs)  \n   * [Conversations](/docs/conversations)  \n   * [Analytics](/docs/analytics-1)  \n   * [Events](/docs/events-2)  \n   * [Issues](/docs/issues)  \n   * [Configuration variables](/docs/configuration-variables-1)\n## STUDIO\n* [Interface](/docs/interface)  \n   * [Nodes](/docs/nodes)  \n   * [Home](/docs/home-2)  \n   * [Flows](/docs/studio-interface-flows)  \n   * [Knowledge Base](/docs/knowledge-base)  \n   * [Tables](/docs/tables)  \n   * [Agents](/docs/agents)  \n         * [Summary Agent](/docs/summary-agent)  \n         * [Personality Agent](/docs/personality-agent)  \n         * [Policy Agent](/docs/policy-agent)  \n         * [Translator Agent](/docs/translator-agent)  \n         * [Knowledge Agent](/docs/knowledge-agent)  \n         * [HITL Agent](/docs/hitl-agent)  \n         * [Vision Agent](/docs/vision-agent)  \n         * [Analytics Agent](/docs/analytics-agent)  \n   * [Library](/docs/library)  \n   * [Hooks](/docs/hooks)  \n   * [Integrations](/docs/integrations-3)  \n   * [Schemas](/docs/schemas)  \n   * [Card Hub](/docs/card-hub)  \n   * [Versions](/docs/versions-1)  \n   * [Chatbot Settings](/docs/chatbot-settings-1)  \n   * [Find](/docs/find)  \n   * [Variables](/docs/variables)  \n   * [Card Tray](/docs/card-tray)  \n   * [Debugger, Logs & JSON](/docs/debugger-logs-json)  \n   * [Emulator](/docs/emulator)  \n   * [Keyboard Shortcuts](/docs/keyboard-shortcuts)  \n   * [Commands](/docs/studio-commands)  \n   * [Studio Preferences](/docs/studio-preferences)  \n   * [Import & Export](/docs/import-export-bots)\n* [Cards](/docs/cards)  \n   * [Send Messages](/docs/send-messages)  \n   * [Execute](/docs/execute)  \n   * [Webchat](/docs/webchat-2)  \n   * [Flow Logic](/docs/flow-logic)  \n   * [AI](/docs/ai)  \n        \n* [Webchat](/docs/webchat-2)  \n   * [Flow Logic](/docs/flow-logic)  \n   * [AI](/docs/ai)  \n         * [AI Task](/docs/ai-task-1)  \n         * [AI Transition](/docs/ai-transition)  \n         * [AI Generate Text](/docs/ai-generate-text)  \n   * [Capture Information](/docs/capture-information)  \n   * [Events](/docs/events-3)  \n   * [Agents](/docs/agents-2)  \n   * [Utilities](/docs/utilities)\n## integrations\n* [Usage](/docs/using-integrations)  \n   * [Asana](/docs/asana-integration)  \n   * [HITL](/docs/hitl-1)  \n   * [Instagram](/docs/instagram)  \n   * [Intercom](/docs/intercom)  \n   * [Line](/docs/line)  \n   * [Messenger](/docs/messenger)  \n   * [Microsoft Teams](/docs/microsoft-teams)  \n   * [Notion](/docs/notion)  \n   * [Slack](/docs/slack)  \n   * [Sunshine Conversations](/docs/sunshine-conversations)  \n   * [Telegram](/docs/telegram)  \n   * [Trello](/docs/trello)  \n   * [Twilio](/docs/twilio)  \n   * [Viber](/docs/viber)  \n   * [Vonage](/docs/vonage)  \n   * [Webhook](/docs/webhook)  \n   * [WhatsApp](/docs/whatsapp)  \n         * [Manual Configuration](/docs/manual-configuration)  \n   * [Zapier](/docs/zapier)  \n   * [Zendesk](/docs/zendesk)\n* [Building](/docs/building-integrations)  \n   * [Getting Started](/docs/getting-started-1)  \n         * [Getting Started](/docs/getting-started-1)  \n         * [Adding Messaging Channel Capabilities](/docs/adding-messaging-channel-capabilities)  \n         * [Adding Actions & Triggers to Botpress Studio](/docs/adding-actions-triggers-to-botpress-studio)  \n         * [Publish your integration on Botpress Hub](/docs/publish-your-integration-on-botpress-hub)  \n   * [Use Your Own LLM](/docs/llm-interfaces)  \n   * [Connect a live agent platform with Botpress](/docs/hitl)  \n   * [Moving Parts](/docs/moving-parts)  \n   * [CLI](/docs/cli)  \n   * [SDK](/docs/sdk)  \n   * [Key Concepts](/docs/key-concepts)  \n         * [Architecture](/docs/architecture)\n/docs/sdk)  \n   * [Key Concepts](/docs/key-concepts)  \n         * [Architecture](/docs/architecture)  \n         * [Tags](/docs/tags)  \n         * [Channels](/docs/channels)  \n         * [Configuration](/docs/configuration)  \n         * [User](/docs/user)  \n         * [Conversations](/docs/conversations-1)  \n         * [Messages](/docs/messages)  \n         * [Event](/docs/event)  \n         * [States](/docs/states-1)  \n         * [Actions](/docs/actions)  \n         * [Definitions](/docs/definitions)  \n         * [Secrets](/docs/secrets)  \n         * [ZUI - Zod schema UI components in Botpress \\[BETA\\]](/docs/zui-zod-schema-ui-components-in-botpress)  \n   * [How to](/docs/states)  \n         * [States](/docs/states)  \n         * [Register & Unregister](/docs/register-unregister)  \n         * [Integrations Actions](/docs/integrations)  \n         * [Integration Events](/docs/integration-events)  \n         * [Handler](/docs/handler)  \n         * [Logging](/docs/logging)  \n         * [Building a Custom Integration](/docs/building-a-custom-integration)\n## Webchat\n* [Webchat](/docs/webchat)  \n   * [Webflow](/docs/webflow)  \n   * [Wix](/docs/wix)  \n   * [Wordpress](/docs/wordpress)\n* [Webchat v1 (deprecated)](/docs/web-chat-v1old)  \n   * [Controlling Web Chat using JavaScript](/docs/controlling-web-chat-using-javascript)  \n   * [Styling your webchat](/docs/chatbot-button)  \n         * [Chatbot Button](/docs/chatbot-button)  \n         * [Chat Header](/docs/chat-header)  \n         * [User Input Area](/docs/user-input-area)  \n         * [Show Bot Info](/docs/show-bot-info)  \n   * [Embedding Webchat](/docs/react-app)  \n         * [React App](/docs/react-app)  \n         * [React Native App](/docs/react-native-app)  \n         * [Web Chat Iframe](/docs/web-chat-iframe)  \n         * [Full Screen Chatbot](/docs/full-screen-chatbot)\n* [Webchat v2](/docs/embedded-webchat)  \n   * [Embedded Webchat](/docs/embedded-webchat)  \n         * [Custom CSS Reference](/docs/custom-css-reference)  \n   * [React Components](/docs/react-js)  \n   * [Webchat Client](/docs/webchat-client)\n## Botpress APIs\n* [Files API](/docs/files-api)\n* [Chat API](/docs/chat-api)\n## Appendix\n* [Safety](/docs/safety)  \n   * [Preventing Abuse](/docs/preventing-abuse)  \n   * [Brand Safety Framework](/docs/brand-safety-framework)\n* [Exporting Data](/docs/exporting-data)  \n   * [Raw Conversations](/docs/exporting-raw-conversations-with-the-botpress-api)  \n   * [Conversation History](/docs/getting-the-conversation-history-from-within-your-bot)  \n   * [Streaming Analytics](/docs/streaming-analytics-from-within-your-bot-with-hooks)  \n   * [Compiled Bot Analytics](/docs/exporting-compiled-bot-analytics-with-the-botpress-api)\nPowered by\n# Messenger\n[ Suggest Edits](/edit/messenger)\n![](https://files.readme.io/281dbea-image.png)\nPrerequisites\n[](#prerequisites)\n* A [Meta developer app](https://developers.facebook.com/apps/create/) that will serve as the primary platform for managing connection between Messenger and Botpress, including the configuration of webhooks and access tokens.\n* A [Facebook page](https://www.facebook.com/pages/create/) that you own or has the developer role, this is needed to use the Messenger API.\n* A [Botpress Cloud account](https://sso.botpress.cloud) and a [Botpress Bot](https://botpress.com/docs/cloud/getting-started/create-and-publish-your-chatbot/)\nSetting up the Messenger integration in Botpress\n[](#setting-up-the-messenger-integration-in-botpress)\n1. Go to the [Integration Hub](https://app.botpress.cloud/hub) in Botpress Cloud (if you don't have the integration installed yet).\n2. Find and open the Messenger integration then click on the \"Install to Bot\" button, now go back to your bot settings.\nThe Messenger integration has the following settings:\n* **Enabled**: Whether Botpress will communicate with Messenger\n* **Webhook URL**: The URL for receiving data in Botpress\n* **App Id**: The id of your Meta App\n* **App Secret**: The secret of your Meta App\n* **Verify Token**: The token used to verify the webhook requests\n* **Page Id**: The id of your Facebook page\n* **Access Token**: The access token used to send messages to the Messenger API\nSetting up Messenger\n[](#setting-up-messenger)\nCreate a Facebook Page\n[](#create-a-facebook-page)\nIf you do not already have a Facebook page you will need to create one. You can find details on how to create a new Facebook page [here](https://www.facebook.com/pages/create/). To link your chatbot to a pre-existing page, you must have an administrator or developer role.\nMessenger API version\n[](#messenger-api-version)\nBotpress can only interact with the version 15.0 or higher of the Messenger API. It is not the default version in the app settings so it must be changed.\n1. Go to your Meta app start page\n2. In the left sidebar, expand the **Settings** menu and select **Advanced**\n3. In the **Upgrade API version** section, select v15.0 or higher as the API version\n4. Click on **Save changes**\nAdd Messenger Product\n[](#add-messenger-product)\nMessenger is not added by default in your Meta app, so it must be added manually\n1. In the left sidebar, click on **Add Product**\n2. In the Facebook Messenger section click **Set Up**\nApp Id and Secret\n[](#app-id-and-secret)\n1. In the left sidebar, expand the **Settings** menu and select **Basic**. Here you can find the App ID and App Secret\n2. Click on the **Show** button in the **App Secret** text box. Copy the App Id and App Secret to your channel configuration\nVerify Token\n[](#verify-token)\nThe verify token is used by Facebook to verify that you are the real owner of the provided webhook\nYou can generate any random alphanumerical string for this configuration. Paste it in your **Verify Token** channel configuration\nPage Id and Access Token\n[](#page-id-and-access-token)\n1. In the left sidebar, expand the **Messenger** menu and select **Messenger API Settings**\n2. In the **Access Tokens** section, click **Add or remove Pages** and add your Facebook page\n3. Copy the number under your page name and paste it in your **Page Id** channel configuration\n4. Click on **Generate token**. Copy this token and paste it in the **Access Token** channel configuration\nSave Configuration\n[](#save-configuration)\nChannel configuration is completed, you can now click **Save**. It is important to save your configuration in Botpress before updating the webhook in the Meta app settings, otherwise Meta will be unable to validate the webhook URL.\nWebhook Configuration\n[](#webhook-configuration)\nTo receive messages from Messenger in your Botpress bot, you will need to setup a webhook.\n1. Go to your Meta app.\n2. In the left sidebar, expand the **Messenger** menu and select **Messenger API Settings**\n3. In the **Webhooks** section, click **Add Callback URL**\n4. Copy paste the **Webhook URL** provided in the integration configuration page in Botpress.\n5. Copy and paste the **Verify Token** that you generated earlier in the integration configuration page in Botpress.\n6. Click on **Verify and save**. Make sure your channel configuration was saved before doing this step, otherwise the webhook validation will fail\n7. Click on **Add Subscriptions**, then select `messages` and `messaging_postbacks`. Then click **Save**.\nYou may now start chatting with your bot on Messenger!\n**Note**: If the bot does not answer to some people, that's probably because your app has not been reviewed by Meta yet (see [this section](../docs/instagram#submit-your-app-for-meta-review)). But don't worry, this is not mandatory to test your bot.\nSubmit your App for Meta Review\n[](#submit-your-app-for-meta-review)\nWhen your app is in Development Mode, your bot will work for admins, developers, and testers of the app only. After your app is approved and made public, it will work for the general public.\nRead more about the App Review process on [the official documentation](https://developers.facebook.com/docs/app-review/submission-guide) and find some help if necessary [in this Github issue](https://github.com/microsoft/botframework-sdk/issues/1465).\nYou can find some troubleshooting [in this documentation](https://developers.facebook.com/docs/app-review/support/rejection-guides/messenger) in case you app get rejected.\nSend Greeting/Welcome Message\n[](#send-greetingwelcome-message)\nYou can create a customized greeting from your Page that will appear in Facebook messages and in the Messenger app when someone begins a conversation with your Page for the first time. Your Page's greeting will appear before any messages are sent.\nRead more about the [Messenger Greeting/Welcome Message](https://www.facebook.com/help/1698046970464236)\nUpdated 4 months ago\n---\n* [Table of Contents](#)\n* * [Prerequisites](#prerequisites)  \n   * [Setting up the Messenger integration in Botpress](#setting-up-the-messenger-integration-in-botpress)  \n   * [Setting up Messenger](#setting-up-messenger)  \n         * [Create a Facebook Page](#create-a-facebook-page)  \n         * [Messenger API version](#messenger-api-version)  \n         * [Add Messenger Product](#add-messenger-product)  \n         * [App Id and Secret](#app-id-and-secret)  \n         * [Verify Token](#verify-token)  \n         * [Page Id and Access Token](#page-id-and-access-token)  \n         * [Save Configuration](#save-configuration)  \n   * [Webhook Configuration](#webhook-configuration)  \n   * [Submit your App for Meta Review](#submit-your-app-for-meta-review)  \n   * [Send Greeting/Welcome Message](#send-greetingwelcome-message)[Jump to Content](#content)\n[![Botpress](https://files.readme.io/c8cb63b6d586cd66085b4c960570959a424c7050c5ffeb0aeaf31711e2e1b2ac-small-BPLOGO_new_dark_1.png)](https://botpress.com)\n[Guides](/docs)[API Reference](/reference)[Changelog](/changelog)\n---\n[![Botpress](https://files.readme.io/c8cb63b6d586cd66085b4c960570959a424c7050c5ffeb0aeaf31711e2e1b2ac-small-BPLOGO_new_dark_1.png)](https://botpress.com)\nGuides\nMoon (Dark Mode)Sun (Light Mode)\n[Guides](/docs)[API Reference](/reference)[Changelog](/changelog)\nMicrosoft Teams\nSearch\n## Home\n* [Botpress Documentation](/docs/home)\n## Getting Started\n* [Build](/docs/build)\n* [Deploy](/docs/deploy)\n* [Monitor](/docs/monitor)\n## DASHBOARD\n* [Workspace](/docs/workspace)  \n   * [Home](/docs/home-1)  \n   * [Members](/docs/members)  \n   * [Audits](/docs/audits)  \n   * [Your integrations](/docs/your-integrations)  \n   * [Usage](/docs/usage-2)  \n   * [Settings](/docs/settings)  \n   * [Profile Setting](/docs/user-profile)\n* [Bot](/docs/bot)  \n   * [Overview](/docs/overview-1)  \n   * [Integrations](/docs/integrations-1)  \n   * [Webchat](/docs/webchat-1)  \n   * [Logs](/docs/logs)  \n   * [Conversations](/docs/conversations)  \n   * [Analytics](/docs/analytics-1)  \n   * [Events](/docs/events-2)  \n   * [Issues](/docs/issues)  \n   * [Configuration variables](/docs/configuration-variables-1)\n## STUDIO\n* [Interface](/docs/interface)  \n   * [Nodes](/docs/nodes)  \n   * [Home](/docs/home-2)  \n   * [Flows](/docs/studio-interface-flows)  \n   * [Knowledge Base](/docs/knowledge-base)  \n   * [Tables](/docs/tables)  \n   * [Agents](/docs/agents)  \n         * [Summary Agent](/docs/summary-agent)  \n         * [Personality Agent](/docs/personality-agent)  \n         * [Policy Agent](/docs/policy-agent)  \n         * [Translator Agent](/docs/translator-agent)  \n         * [Knowledge Agent](/docs/knowledge-agent)  \n         * [HITL Agent](/docs/hitl-agent)  \n         * [Vision Agent](/docs/vision-agent)  \n         * [Analytics Agent](/docs/analytics-agent)  \n   * [Library](/docs/library)  \n   * [Hooks](/docs/hooks)  \n   * [Integrations](/docs/integrations-3)  \n   * [Schemas](/docs/schemas)  \n   * [Card Hub](/docs/card-hub)  \n   * [Versions](/docs/versions-1)  \n   * [Chatbot Settings](/docs/chatbot-settings-1)  \n   * [Find](/docs/find)  \n   * [Variables](/docs/variables)  \n   * [Card Tray](/docs/card-tray)  \n   * [Debugger, Logs & JSON](/docs/debugger-logs-json)  \n   * [Emulator](/docs/emulator)  \n   * [Keyboard Shortcuts](/docs/keyboard-shortcuts)  \n   * [Commands](/docs/studio-commands)  \n   * [Studio Preferences](/docs/studio-preferences)  \n   * [Import & Export](/docs/import-export-bots)\n* [Cards](/docs/cards)  \n   * [Send Messages](/docs/send-messages)  \n   * [Execute](/docs/execute)  \n   * [Webchat](/docs/webchat-2)  \n   * [Flow Logic](/docs/flow-logic)  \n   * [AI](/docs/ai)  \n        \n* [Webchat](/docs/webchat-2)  \n   * [Flow Logic](/docs/flow-logic)  \n   * [AI](/docs/ai)  \n         * [AI Task](/docs/ai-task-1)  \n         * [AI Transition](/docs/ai-transition)  \n         * [AI Generate Text](/docs/ai-generate-text)  \n   * [Capture Information](/docs/capture-information)  \n   * [Events](/docs/events-3)  \n   * [Agents](/docs/agents-2)  \n   * [Utilities](/docs/utilities)\n## integrations\n* [Usage](/docs/using-integrations)  \n   * [Asana](/docs/asana-integration)  \n   * [HITL](/docs/hitl-1)  \n   * [Instagram](/docs/instagram)  \n   * [Intercom](/docs/intercom)  \n   * [Line](/docs/line)  \n   * [Messenger](/docs/messenger)  \n   * [Microsoft Teams](/docs/microsoft-teams)  \n   * [Notion](/docs/notion)  \n   * [Slack](/docs/slack)  \n   * [Sunshine Conversations](/docs/sunshine-conversations)  \n   * [Telegram](/docs/telegram)  \n   * [Trello](/docs/trello)  \n   * [Twilio](/docs/twilio)  \n   * [Viber](/docs/viber)  \n   * [Vonage](/docs/vonage)  \n   * [Webhook](/docs/webhook)  \n   * [WhatsApp](/docs/whatsapp)  \n         * [Manual Configuration](/docs/manual-configuration)  \n   * [Zapier](/docs/zapier)  \n   * [Zendesk](/docs/zendesk)\n* [Building](/docs/building-integrations)  \n   * [Getting Started](/docs/getting-started-1)  \n         * [Getting Started](/docs/getting-started-1)  \n         * [Adding Messaging Channel Capabilities](/docs/adding-messaging-channel-capabilities)  \n         * [Adding Actions & Triggers to Botpress Studio](/docs/adding-actions-triggers-to-botpress-studio)  \n         * [Publish your integration on Botpress Hub](/docs/publish-your-integration-on-botpress-hub)  \n   * [Use Your Own LLM](/docs/llm-interfaces)  \n   * [Connect a live agent platform with Botpress](/docs/hitl)  \n   * [Moving Parts](/docs/moving-parts)  \n   * [CLI](/docs/cli)  \n   * [SDK](/docs/sdk)  \n   * [Key Concepts](/docs/key-concepts)  \n         * [Architecture](/docs/architecture)\n/docs/sdk)  \n   * [Key Concepts](/docs/key-concepts)  \n         * [Architecture](/docs/architecture)  \n         * [Tags](/docs/tags)  \n         * [Channels](/docs/channels)  \n         * [Configuration](/docs/configuration)  \n         * [User](/docs/user)  \n         * [Conversations](/docs/conversations-1)  \n         * [Messages](/docs/messages)  \n         * [Event](/docs/event)  \n         * [States](/docs/states-1)  \n         * [Actions](/docs/actions)  \n         * [Definitions](/docs/definitions)  \n         * [Secrets](/docs/secrets)  \n         * [ZUI - Zod schema UI components in Botpress \\[BETA\\]](/docs/zui-zod-schema-ui-components-in-botpress)  \n   * [How to](/docs/states)  \n         * [States](/docs/states)  \n         * [Register & Unregister](/docs/register-unregister)  \n         * [Integrations Actions](/docs/integrations)  \n         * [Integration Events](/docs/integration-events)  \n         * [Handler](/docs/handler)  \n         * [Logging](/docs/logging)  \n         * [Building a Custom Integration](/docs/building-a-custom-integration)\n## Webchat\n* [Webchat](/docs/webchat)  \n   * [Webflow](/docs/webflow)  \n   * [Wix](/docs/wix)  \n   * [Wordpress](/docs/wordpress)\n* [Webchat v1 (deprecated)](/docs/web-chat-v1old)  \n   * [Controlling Web Chat using JavaScript](/docs/controlling-web-chat-using-javascript)  \n   * [Styling your webchat](/docs/chatbot-button)  \n         * [Chatbot Button](/docs/chatbot-button)  \n         * [Chat Header](/docs/chat-header)  \n         * [User Input Area](/docs/user-input-area)  \n         * [Show Bot Info](/docs/show-bot-info)  \n   * [Embedding Webchat](/docs/react-app)  \n         * [React App](/docs/react-app)  \n         * [React Native App](/docs/react-native-app)  \n         * [Web Chat Iframe](/docs/web-chat-iframe)  \n         * [Full Screen Chatbot](/docs/full-screen-chatbot)\n* [Webchat v2](/docs/embedded-webchat)  \n   * [Embedded Webchat](/docs/embedded-webchat)  \n         * [Custom CSS Reference](/docs/custom-css-reference)  \n   * [React Components](/docs/react-js)  \n   * [Webchat Client](/docs/webchat-client)\n## Botpress APIs\n* [Files API](/docs/files-api)\n* [Chat API](/docs/chat-api)\n## Appendix\n* [Safety](/docs/safety)  \n   * [Preventing Abuse](/docs/preventing-abuse)  \n   * [Brand Safety Framework](/docs/brand-safety-framework)\n* [Exporting Data](/docs/exporting-data)  \n   * [Raw Conversations](/docs/exporting-raw-conversations-with-the-botpress-api)  \n   * [Conversation History](/docs/getting-the-conversation-history-from-within-your-bot)  \n   * [Streaming Analytics](/docs/streaming-analytics-from-within-your-bot-with-hooks)  \n   * [Compiled Bot Analytics](/docs/exporting-compiled-bot-analytics-with-the-botpress-api)\nPowered by\n# Microsoft Teams\n[ Suggest Edits](/edit/microsoft-teams)\n![](https://files.readme.io/2871c4d-image.png)\nPrerequisites\n[](#prerequisites)\n* A [Microsoft 365 Business account](https://www.microsoft.com/en-us/microsoft-365/business/)\n* A [Botpress Cloud account](https://sso.botpress.cloud) and a [Botpress bot](https://botpress.com/docs/cloud/getting-started/create-and-publish-your-chatbot/)\nSetting up the Microsoft Teams integration in Botpress\n[](#setting-up-the-microsoft-teams-integration-in-botpress)\n1. Go to the [Integration Hub](https://app.botpress.cloud/hub) in Botpress Cloud (if you don't have the integration installed yet).\n2. Find and open the Microsoft Teams integration then click on the \"Install to Bot\" button, now go back to your bot settings.\nThe Microsoft Teams integration has the following settings:\n* **Enabled**: Whether Botpress will communicate with Microsoft Teams\n* **Webhook URL**: The URL for receiving data in Botpress.\n* **App Id**: The App Id of your bot in Azure\n* **App Password**: The App Secret of your bot in Azure\nSetting up Microsoft Teams\n[](#setting-up-microsoft-teams)\nRegister App\n[](#register-app)\n1. In the Azure portal, open the [App registrations](https://portal.azure.com#blade/Microsoft%5FAAD%5FRegisteredApps/ApplicationsListBlade) page\n2. Click **New registration**, then choose a name for your application\n3. In the section **Supported account types**, choose the type that's most appropriate for your use case. We support Single and Multi Tenant accounts. Check out [this article](https://learn.microsoft.com/en-us/security/zero-trust/develop/identity-supported-account-types) to learn more (in short, Single Tenant means the app will be available for your org only, and Multi Tenant will make it public). After selecting, click **Register**\n4. Copy paste the value of `Application (client) ID` to the **App Id** channel configuration in Botpress\nApp Password\n[](#app-password)\n1. Find the **Certificates & secrets** page in the sidebar, click **New client secret**, then fill in the required fields\n2. Copy the value from the **Value** column and paste it in the **App Secret** channel configuration in Botpress\n3. Save the settings by clicking the \"Save configuration\" button\nCreate Your Microsoft Bot\n[](#create-your-microsoft-bot)\n1. Navigate to the [Bot Framework Creation page](https://dev.botframework.com/bots/new)\n2. Fill the **Display name** and **Bot handle** fields with whatever value\n3. Copy paste you **App Id** to the app id field\n4. Copy the Webhook URL provided in Botpress to the **Messaging endpoint** field\n5. Choose a tenant for the **App type**. Follow the same type you chose in the **Register App** section\n6. Paste the App ID from the Azure bot in the **Microsoft App ID** field\n7. Read and agree to the terms then click **Register**\n8. On the next page (**Connect to channels**), under the section, **Add a featured channel**, click **Configure Microsoft Teams Channel**, then click **Save**\nAccessing the Bot in MS Teams\n[](#accessing-the-bot-in-ms-teams)\n1. Navigate to the [My Bots page](https://dev.botframework.com/bots/)\n2. Click on your bot's name\n3. Under the **Connect to channels** section, click on **Microsoft Teams**\n4. The bot should open in your MS Teams\nThat's it, you may now start chatting with your bot on Microsoft Teams!\n> ## ���\n>\n> The bot will only be available to you if you have a Microsoft 365 Business account and if you are logged in to MS Teams with that account.\nMaking the bot available in your Organization\n[](#making-the-bot-available-in-your-organization)\n1. Add the Developer Portal App to your Teams (or do it via the website)\n![](https://files.readme.io/cdcfaf0-image.png)\n2. Click the **Developer Portal App** tab in the sidebar, then **Apps**. Now click the **New app** button\n![](https://files.readme.io/493d192-image.png)\n3. In the left-side menu of the App, go to the **App Features** page under the **Configure** section then click \"Bot\"\n![](https://files.readme.io/593ef2c-image.png)\n4. Select your existing bot from BotFramework in the dropdown. Check the desired scopes (at least **Personal** for 1:1 conversations)\n![](https://files.readme.io/d12308e-image.png)\n5. Fill out all the required fields in the Basic Information page of the Configure section\n![](https://files.readme.io/89ab3e5-image.png)\n6. Click **Publish**, then **Publish to your Org**\n![](https://files.readme.io/cb6c80c-image.png)\n7. Go to your Team App store, search for your app, then add it\n![](https://files.readme.io/ee8ccd2-image.png)\n8. The bot is now available in the **App** section to all members of your organization!\n> ## ���\n>\n> Info\n>\n> In order to update your bot's behavior, just **Publish** the new version in Botpress. The changes will then be reflected in MS Teams, there's no need to change any settings in the Microsoft apps.\n> ## ���\n>\n> Note\n>\n> Botpress verifies the signature of the requests coming to the Webhook URL so that only Microsoft Teams can send data to your bot. Requests made from Postman or any other means will be rejected.\nSetting up policies\n[](#setting-up-policies)\n![](https://files.readme.io/72c6394-image.png)\nIf you're unable to send message to the bot (App), make sure you've enabled the policy to upload custom apps.\nGo to Setup Policies -> Turn on **Upload custom apps**\nUpdated 4 months ago\n---\n* [Table of Contents](#)\n* * [Prerequisites](#prerequisites)  \n   * [Setting up the Microsoft Teams integration in Botpress](#setting-up-the-microsoft-teams-integration-in-botpress)  \n         * [Setting up Microsoft Teams](#setting-up-microsoft-teams)  \n         * [Create Your Microsoft Bot](#create-your-microsoft-bot)  \n         * [Accessing the Bot in MS Teams](#accessing-the-bot-in-ms-teams)  \n         * [Making the bot available in your Organization](#making-the-bot-available-in-your-organization)  \n   * [Setting up policies](#setting-up-policies)[Jump to Content](#content)\n[![Botpress](https://files.readme.io/c8cb63b6d586cd66085b4c960570959a424c7050c5ffeb0aeaf31711e2e1b2ac-small-BPLOGO_new_dark_1.png)](https://botpress.com)\n[Guides](/docs)[API Reference](/reference)[Changelog](/changelog)\n---\n[![Botpress](https://files.readme.io/c8cb63b6d586cd66085b4c960570959a424c7050c5ffeb0aeaf31711e2e1b2ac-small-BPLOGO_new_dark_1.png)](https://botpress.com)\nGuides\nMoon (Dark Mode)Sun (Light Mode)\n[Guides](/docs)[API Reference](/reference)[Changelog](/changelog)\nMembers\nSearch\n## Home\n* [Botpress Documentation](/docs/home)\n## Getting Started\n* [Build](/docs/build)\n* [Deploy](/docs/deploy)\n* [Monitor](/docs/monitor)\n## DASHBOARD\n* [Workspace](/docs/workspace)  \n   * [Home](/docs/home-1)  \n   * [Members](/docs/members)  \n   * [Audits](/docs/audits)  \n   * [Your integrations](/docs/your-integrations)  \n   * [Usage](/docs/usage-2)  \n   * [Settings](/docs/settings)  \n   * [Profile Setting](/docs/user-profile)\n* [Bot](/docs/bot)  \n   * [Overview](/docs/overview-1)  \n   * [Integrations](/docs/integrations-1)  \n   * [Webchat](/docs/webchat-1)  \n   * [Logs](/docs/logs)  \n   * [Conversations](/docs/conversations)  \n   * [Analytics](/docs/analytics-1)  \n   * [Events](/docs/events-2)  \n   * [Issues](/docs/issues)  \n   * [Configuration variables](/docs/configuration-variables-1)\n## STUDIO\n* [Interface](/docs/interface)  \n   * [Nodes](/docs/nodes)  \n   * [Home](/docs/home-2)  \n   * [Flows](/docs/studio-interface-flows)  \n   * [Knowledge Base](/docs/knowledge-base)  \n   * [Tables](/docs/tables)  \n   * [Agents](/docs/agents)  \n         * [Summary Agent](/docs/summary-agent)  \n         * [Personality Agent](/docs/personality-agent)  \n         * [Policy Agent](/docs/policy-agent)  \n         * [Translator Agent](/docs/translator-agent)  \n         * [Knowledge Agent](/docs/knowledge-agent)  \n         * [HITL Agent](/docs/hitl-agent)  \n         * [Vision Agent](/docs/vision-agent)  \n         * [Analytics Agent](/docs/analytics-agent)  \n   * [Library](/docs/library)  \n   * [Hooks](/docs/hooks)  \n   * [Integrations](/docs/integrations-3)  \n   * [Schemas](/docs/schemas)  \n   * [Card Hub](/docs/card-hub)  \n   * [Versions](/docs/versions-1)  \n   * [Chatbot Settings](/docs/chatbot-settings-1)  \n   * [Find](/docs/find)  \n   * [Variables](/docs/variables)  \n   * [Card Tray](/docs/card-tray)  \n   * [Debugger, Logs & JSON](/docs/debugger-logs-json)  \n   * [Emulator](/docs/emulator)  \n   * [Keyboard Shortcuts](/docs/keyboard-shortcuts)  \n   * [Commands](/docs/studio-commands)  \n   * [Studio Preferences](/docs/studio-preferences)  \n   * [Import & Export](/docs/import-export-bots)\n* [Cards](/docs/cards)  \n   * [Send Messages](/docs/send-messages)  \n   * [Execute](/docs/execute)  \n   * [Webchat](/docs/webchat-2)  \n   * [Flow Logic](/docs/flow-logic)  \n   * [AI](/docs/ai)  \n        \n* [Webchat](/docs/webchat-2)  \n   * [Flow Logic](/docs/flow-logic)  \n   * [AI](/docs/ai)  \n         * [AI Task](/docs/ai-task-1)  \n         * [AI Transition](/docs/ai-transition)  \n         * [AI Generate Text](/docs/ai-generate-text)  \n   * [Capture Information](/docs/capture-information)  \n   * [Events](/docs/events-3)  \n   * [Agents](/docs/agents-2)  \n   * [Utilities](/docs/utilities)\n## integrations\n* [Usage](/docs/using-integrations)  \n   * [Asana](/docs/asana-integration)  \n   * [HITL](/docs/hitl-1)  \n   * [Instagram](/docs/instagram)  \n   * [Intercom](/docs/intercom)  \n   * [Line](/docs/line)  \n   * [Messenger](/docs/messenger)  \n   * [Microsoft Teams](/docs/microsoft-teams)  \n   * [Notion](/docs/notion)  \n   * [Slack](/docs/slack)  \n   * [Sunshine Conversations](/docs/sunshine-conversations)  \n   * [Telegram](/docs/telegram)  \n   * [Trello](/docs/trello)  \n   * [Twilio](/docs/twilio)  \n   * [Viber](/docs/viber)  \n   * [Vonage](/docs/vonage)  \n   * [Webhook](/docs/webhook)  \n   * [WhatsApp](/docs/whatsapp)  \n         * [Manual Configuration](/docs/manual-configuration)  \n   * [Zapier](/docs/zapier)  \n   * [Zendesk](/docs/zendesk)\n* [Building](/docs/building-integrations)  \n   * [Getting Started](/docs/getting-started-1)  \n         * [Getting Started](/docs/getting-started-1)  \n         * [Adding Messaging Channel Capabilities](/docs/adding-messaging-channel-capabilities)  \n         * [Adding Actions & Triggers to Botpress Studio](/docs/adding-actions-triggers-to-botpress-studio)  \n         * [Publish your integration on Botpress Hub](/docs/publish-your-integration-on-botpress-hub)  \n   * [Use Your Own LLM](/docs/llm-interfaces)  \n   * [Connect a live agent platform with Botpress](/docs/hitl)  \n   * [Moving Parts](/docs/moving-parts)  \n   * [CLI](/docs/cli)  \n   * [SDK](/docs/sdk)  \n   * [Key Concepts](/docs/key-concepts)  \n         * [Architecture](/docs/architecture)\n/docs/sdk)  \n   * [Key Concepts](/docs/key-concepts)  \n         * [Architecture](/docs/architecture)  \n         * [Tags](/docs/tags)  \n         * [Channels](/docs/channels)  \n         * [Configuration](/docs/configuration)  \n         * [User](/docs/user)  \n         * [Conversations](/docs/conversations-1)  \n         * [Messages](/docs/messages)  \n         * [Event](/docs/event)  \n         * [States](/docs/states-1)  \n         * [Actions](/docs/actions)  \n         * [Definitions](/docs/definitions)  \n         * [Secrets](/docs/secrets)  \n         * [ZUI - Zod schema UI components in Botpress \\[BETA\\]](/docs/zui-zod-schema-ui-components-in-botpress)  \n   *\n<|new_information|>","role":"user","type":"text"}],"meta":{"integrationName":"zai","promptCategory":"zai:summarize","promptSource":"zai:summarize:default"},"model":"fast","signal":{},"stopSequences":["■END■"]},"method":"POST","url":"https://api.botpress.cloud/v2/cognitive/generate-text"}

Output:
**■START■
# Botpress Documentation – Table of Contents Overview

## 1. Home & Getting Started
- **Home** – entry point to the docs.
- **Build**, **Deploy**, **Monitor** – core guides to create, launch, and observe bots.

## 2. Dashboard
- **Workspace** – overall console view.
  - Home, Members, Audits, Your integrations, Usage, Settings, Profile.
- **Bot** – bot‑specific panels.
  - Overview, Integrations, Webchat, Logs, Conversations, Analytics, Events, Issues, Configuration variables.

## 3. Studio (Bot Design UI)
- **Interface** – main navigation.
  - Nodes, Home, Flows, Knowledge Base, Tables.
- **Agents** – pre‑built AI assistants.
  - Summary, Personality, Policy, Translator, Knowledge, HITL, Vision, Analytics.
- **Library & Hooks** – reusable components & lifecycle hooks.
- **Integrations, Schemas, Card Hub, Versions, Chatbot Settings** – project management tools.
- **Utilities** – Find, Variables, Card Tray, Debugger / Logs / JSON, Emulator, Keyboard Shortcuts, Commands, Studio Preferences, Import & Export.

## 4. Cards (Reusable Building Blocks)
- **Send Messages** – basic text, media, rich content.
- **Execute** – call actions or external services.
- **Webchat** – embed interactive chat UI.
- **Flow Logic** – conditionals, loops, transitions.
- **AI** – AI‑related cards (Task, Transition, Generate Text).

## 5. Webchat (Customer‑Facing Interface)
- **Webchat v2 (Embedded)** – modern embed with custom CSS, React components, Webchat client.
- **Webchat v1 (Deprecated)** – legacy JS control, styling (button, header, user input, bot info), embedding options (React app, React Native, iframe, full‑screen).
- Core features shared across versions:
  - Flow Logic, AI (Task/Transition/Generate Text), Capture Information, Events, Agents, Utilities.

## 6. Integrations
### 6.1 Usage (pre‑built channel connectors)
- **Asana**, **HITL**, **Instagram**, **Intercom**, **Line**, **Messenger**, **Microsoft Teams**, **Notion**, **Slack**, **Sunshine Conversations**, **Telegram**, **Trello**, **Twilio**, **Viber**, **Vonage**, **Webhook**, **WhatsApp** (Manual configuration), **Zapier**, **Zendesk**.

### 6.2 Building (custom integration development)
- **Getting Started** – overview, adding messaging channel capabilities, actions & triggers, publishing on Botpress Hub.
- **LLM Interfaces** – use your own large language model.
- **Live Agent (HITL)** – connect human‑agent platforms.
- **Moving Parts**, **CLI**, **SDK** – tooling for integration creation.
- **Key Concepts** – Architecture, Tags, Channels, Configuration, Users, Conversations, Messages, Events, States, Actions, Definitions, Secrets, ZUI (Zod UI components).
- **How‑to** – managing states, registering/unregistering, integration actions & events, handlers, logging, building a custom integration.

## 7. Botpress APIs
- **Files API** – manage file uploads/downloads.
- **Chat API** – programmatic message exchange with bots.

## 8. Appendix
- **Safety** – preventing abuse, brand‑safety framework.
- **Exporting Data** – raw conversations, conversation history, streaming analytics, compiled bot analytics.

### Quick Navigation Highlights
- **Debugger, Logs & JSON** → troubleshooting.
- **Keyboard Shortcuts** → productivity.
- **Studio Preferences** → UI customization.
- **Import & Export** → bot portability.

> This outline provides a horizontal view of every major feature area covered in the Botpress documentation, enabling rapid discovery of relevant guides without diving into deep technical detail.

**