# FlowiseChatEmbed **Repository Path**: at1943/FlowiseChatEmbed ## Basic Information - **Project Name**: FlowiseChatEmbed - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-09-08 - **Last Updated**: 2025-09-09 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Flowise Embed Javascript library to display flowise chatbot on your website ![Flowise](https://github.com/FlowiseAI/FlowiseChatEmbed/blob/main/images/ChatEmbed.gif?raw=true) Install: ```bash yarn install ``` Dev: ```bash yarn dev ``` A development server will be running on http://localhost:5678 automatically. Update `public/index.html` to connect directly to Flowise: ```html ``` Build: ```bash yarn build ``` ## Embed in your HTML ### PopUp ```html ``` ### FullPage ```html ``` To enable full screen, add `margin: 0` to body style, and confirm you don't set height and width ```html ``` ## Configuration You can also customize chatbot with different configuration ```html ``` ## (Experimental) Proxy Server Setup The Flowise Embed Proxy Server enhances the security of your chatbot implementation by acting as a protective intermediary layer. This server eliminates the need to expose sensitive Flowise instance details in your frontend code and provides several key security benefits: ![Proxy Server](https://github.com/FlowiseAI/FlowiseChatEmbed/blob/main/images/proxyserver.png?raw=true) - **Enhanced Security**: Conceals your Flowise API host and chatflow IDs from client-side exposure - **Access Control**: Implements strict domain-based restrictions for chatbot embedding - **Secure Communication**: Acts as a secure gateway for all interactions between your website and Flowise instance - **Authentication Management**: Handles API key authentication securely on the server side, away from client exposure This proxy server can be deployed to any Node.js hosting platform. ## Quick Start 1. Configure environment: ```bash # Copy .env.example to .env and configure required settings: API_HOST=https://your-flowise-instance.com FLOWISE_API_KEY=your-api-key # Configure your chatflows: # Format: [identifier]=[chatflowId],[allowedDomain1],[allowedDomain2],... # # identifier: Any name you choose (e.g., agent1, support, salesbot) # chatflowId: The UUID of your Flowise chatflow # allowedDomains: Comma-separated list of domains where this chat can be embedded # # Examples: support=abc123-def456,https://example.com agent1=xyz789-uvw456,https://sales.example.com helpdesk=ghi123-jkl456,https://help.example.com,https://support.example.com ``` 2. Install dependencies: (assuming you did not run `yarn install` yet) ```bash yarn install ``` 3. Start proxy server: ```bash yarn start # Server will be available at: # - Local: http://localhost:3001 # - Cloud: [Your Platform URL] (e.g., https://your-app.herokuapp.com) ``` 4. Once the proxy server is running in production, you will be able to embed your chatbots safely without exposing your Flowise API host and chatflow IDs as below: ```html ``` 5. (optional) If you want to test any identifier in public/index.html, you can update it as below: ```html chatflowid: 'your-identifier-here' // Must match an identifier from your .env ``` **Important Notes:** - To ensure secure embedding, you must explicitly whitelist the websites authorized to embed each chatbot. This configuration is done within the .env file. Note that this also applies to your server's URL when deployed to a cloud environment, or http://localhost:3001 for local development, if needed you must whitelist it as well. - Wildcard domains (\*) are not supported for security reasons - Identifiers are case-insensitive (e.g., 'Support' and 'support' are treated the same) ## Cloud Deployment Requirements When deploying to cloud platforms, you must configure the environment variables directly in your platform. The proxy server will not start without these variables being properly set. Compatible with Nixpacks for automatic deployment configuration. ## Development Mode (For Local Testing) 1. Configure your environment variables (see above) 2. Start the proxy server: ```bash yarn start # Server will be available at: # - Local: http://localhost:3001 ``` 3. Update the test page configuration: - Open `public/index.html` in your code editor - Modify the `chatflowid` and `apiHost` to match your `.env` settings: ```html ``` For full page testing, use this configuration instead: ```html ``` 4. While the proxy server is running, open a new terminal and start the development server: ```bash yarn dev # This will serve the test page on http://localhost:5678 automatically ``` 5. Test the chatbot: - Navigate to http://localhost:5678 - The chatbot should now be visible and functional **Note:** The development URL (http://localhost:5678) is automatically added to allowed domains in development mode. You don't need to add it manually. ## License Source code in this repository is made available under the [MIT License](https://github.com/FlowiseAI/Flowise/blob/master/LICENSE.md).