BroxiAI
  • Welcome
  • Account
    • Quickstart
    • Password
    • Team
      • Create team
      • Join team
      • Payment & Billing
      • Payment Policy
    • Global Variables
    • API Keys
  • Workflow
    • Overview
    • Quickstart
    • Components
    • Playground
    • Publish Workflow
    • File Manager
    • Webhook
  • Components
    • Input & Output
    • Agents
    • AI Models
    • Data
    • Embeddings
    • Helper
    • Loader
    • Logic
    • Memories
    • Processing
    • Prompt
    • Tools
    • Vector database
  • Advanced
    • Use Agent in flow
    • MCP Connect
    • MCP Astra DB
  • Integration
    • Apify
    • AssemblyAI
    • Composio
    • Google
      • Google Auth
      • Vertex AI
    • Notion
      • Setup
      • Notion Conversational Agent
      • Notion Meeting Notes Agent
Powered by GitBook
On this page
  • API Access
  • Embed into site​
  • Shareable playground​
  1. Workflow

Publish Workflow

PreviousPlaygroundNextFile Manager

Last updated 12 days ago

BroxiAI provides several ways to publish and integrate your flows into external applications. Whether you want to expose your flow via API endpoints, embed it as a chat widget in your website, or share it as a public playground, this guide covers the options available for making your flows accessible to users

API Access

The API panel presents code templates for integrating your flow into external applications.

The Python tab displays code to interact with your flow using the Python requests library.

  1. Copy and paste the code into a Python script.

  2. Run the script.

python3 python-test-script.py --message="tell me about something interesting"

The response content depends on your flow. Make sure the endpoint returns a successful response.

The Temporary overrides tab displays the available parameters for your flow. Modifying the parameters changes the code parameters across all windows. For example, changing the Chat Input component's input_value changes that value across all API calls to the /run endpoint of this flow.

When a Webhook component is added to the workspace, a new Webhook cURL tab becomes available in the API pane that contains an HTTP POST request for triggering the webhook component. For example:

curl -X POST \
  "https://use.broxi.ai/api/v1/webhook/**YOUR_FLOW_ID**" \
  -H 'Content-Type: application/json'\
  -d '{"any": "data"}'

The Embed into site tab displays code that can be inserted in the <body> of your HTML to interact with your flow.

<script src="https://use.broxi.ai/bundle.min.js"></script>
<broxi-widget
    window_title="Simple Flow"
    flow_id="1ede06c1-4514-4216-bb5f-8d6dbffb17d1"
    host_url="https://use.broxi.ai"
    api_key="...">
</broxi-widget>

To embed the Chat Widget using React, add this <script> tag to the React index.html file inside a <body>tag.

<script src="https://use.broxi.ai/bundle.min.js"></script>
  1. Declare your web component and encapsulate it in a React component.

declare global {
  namespace JSX {
    interface IntrinsicElements {
      "broxi-widget": any;
    }
  }
}

export default function ChatWidget({ className }) {
  return (
    <div className={className}>
      <broxi-widget
        chat_inputs='{"your_key":"value"}'
        chat_input_field="your_chat_key"
        flow_id="your_flow_id"
        host_url="https://use.broxi.ai"
      ></broxi-widget>
    </div>
  );
}

2. Place the component anywhere in your code to display the chat widget.

To use the chat widget in Angular, add this <script> tag to the Angular index.html file inside a <body> tag.

<script src="https://use.broxi.ai/bundle.min.js"></script>

When you use a custom web component in an Angular template, the Angular compiler might show a warning when it doesn't recognize the custom elements by default. To suppress this warning, add CUSTOM_ELEMENTS_SCHEMA to the module's @NgModule.schemas. CUSTOM_ELEMENTS_SCHEMA is a built-in schema that allows custom elements in your Angular templates, and suppresses warnings related to unknown elements like langflow-chat.

  1. Open the module file .module.ts where you want to add the broxi-widget web component.

  2. Import CUSTOM_ELEMENTS_SCHEMA at the top of the .module.ts file:

import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';

  1. Add CUSTOM_ELEMENTS_SCHEMA to the 'schemas' array inside the '@NgModule' decorator:

@NgModule({
  declarations: [
    // ... Other components and directives ...
  ],
  imports: [
    // ... Other imported modules ...
  ],
  schemas: [
    CUSTOM_ELEMENTS_SCHEMA  // Add the CUSTOM_ELEMENTS_SCHEMA here
  ]
})
export class YourModule { }
  1. In your Angular project, find the component belonging to the module where CUSTOM_ELEMENTS_SCHEMA was added. Inside the template, add the langflow-chat tag to include the chat widget in your component's view:

<broxi-widget  chat_inputs='{"your_key":"value"}'  chat_input_field="your_chat_key"  flow_id="your_flow_id"  host_url="https://use.broxi.ai"></broxi-widget>

Use the widget API to customize your Chat Widget.

Props with the type JSON need to be passed as stringified JSONs, with the format {"key":"value"}.

Prop
Type
Required
Description

bot_message_style

JSON

No

Applies custom formatting to bot messages.

chat_input_field

String

Yes

Defines the type of the input field for chat messages.

chat_inputs

JSON

Yes

Determines the chat input elements and their respective values.

chat_output_key

String

No

Specifies which output to display if multiple outputs are available.

chat_position

String

No

Positions the chat window on the screen (options include: top-left, top-center, top-right, center-left, center-right, bottom-right, bottom-center, bottom-left).

chat_trigger_style

JSON

No

Styles the chat trigger button.

chat_window_style

JSON

No

Customizes the overall appearance of the chat window.

error_message_style

JSON

No

Sets the format for error messages within the chat window.

flow_id

String

Yes

Identifies the flow that the component is associated with.

height

Number

No

Sets the height of the chat window in pixels.

host_url

String

Yes

Specifies the URL of the host for chat component communication.

input_container_style

JSON

No

Applies styling to the container where chat messages are entered.

input_style

JSON

No

Sets the style for the chat input field.

online

Boolean

No

Toggles the online status of the chat component.

online_message

String

No

Sets a custom message to display when the chat component is online.

placeholder

String

No

Sets the placeholder text for the chat input field.

placeholder_sending

String

No

Sets the placeholder text to display while a message is being sent.

send_button_style

JSON

No

Sets the style for the send button in the chat window.

send_icon_style

JSON

No

Sets the style for the send icon in the chat window.

tweaks

JSON

No

Applies additional custom adjustments for the associated flow.

user_message_style

JSON

No

Determines the formatting for user messages in the chat window.

width

Number

No

Sets the width of the chat window in pixels.

window_title

String

No

Sets the title displayed in the chat window's header or title bar.

The Shareable playground exposes your BroxiAI workflow's Playground at the public access.

Temporary overrides

Webhook cURL

Embed into site

Embed the chat widget with React

Embed the chat widget with Angular

Chat widget configuration

Shareable playground

​
​
​
​
​
​
​