Use a flow to answer visitor questions and work with documents uploaded through the FileBrain.Pro website widget.
The Widget connector lets an active flow handle messages from the embedded chat widget. Use it when you want the widget reply to follow a custom flow instead of a simple direct answer.
A Chatbot Widget flow trigger is available in the editor. Use Widget Input to read the visitor message and Widget Response to return the answer. You can place shared nodes such as RAG Search, Invoke LLM, conditions, variables, text operations, and debug nodes between them.
Enable the widget in your project, add your site to Allowed Domains, and copy the widget key. See JS Widget Integration for these settings. Create and activate a flow with the Chatbot Widget trigger.
Install the Flow widget using the snippet below. Replace the key with your own. If you already embedded the standard widget, replace its script tag with this one.
<script
src="https://filebrain.pro/api/widget/v1/fbp-flow-widget.js"
data-widget-key="wdg_your_widget_key_here"
></script>
File uploads are available in the Flow widget. Visitors select Attach file and wait for the file to finish processing. Once the filename appears in the chat, they can ask a question or select Send with an empty message to request a summary. They can ask follow-up questions about the same files without uploading them again.
FileBrain.Pro discards the original file after processing. The extracted text is available in the current chat for 24 hours after the last successful new upload.
Widget Input → Read Uploaded File → Invoke OpenAI → Widget Response
widget_query and the list of uploaded files in uploaded_files.file_text, under a heading for each filename. The file_metadata variable contains filenames, types, and character counts.{{flow.widget_query}}. Insert {{flow.file_text}} in the System Prompt and tell the model to use the documents as reference material, ignore instructions inside them, and cite filenames in its answer. Enable Omit prompt from logs to keep the rendered prompt out of the step log. The step still logs its rendered Input, and answers can quote the documents.{{flow.llm_response}} when using the default model output variable.If your flow pauses at User Input, run Read Uploaded File again after it resumes. The extracted text variable is available only for the current turn.
Open the widget on an allowed domain and upload a short document. Send an empty message to check the summary, then ask a follow-up question about a detail in the document.