diff --git a/docs/user-guide/workflows/images/workflows-overview/workflow-chat-file-attachment.png b/docs/user-guide/workflows/images/workflows-overview/workflow-chat-file-attachment.png new file mode 100644 index 0000000..a80cb8b Binary files /dev/null and b/docs/user-guide/workflows/images/workflows-overview/workflow-chat-file-attachment.png differ diff --git a/docs/user-guide/workflows/images/workflows-overview/workflow-execution-multi-file-result.png b/docs/user-guide/workflows/images/workflows-overview/workflow-execution-multi-file-result.png new file mode 100644 index 0000000..83bd372 Binary files /dev/null and b/docs/user-guide/workflows/images/workflows-overview/workflow-execution-multi-file-result.png differ diff --git a/docs/user-guide/workflows/workflows-overview.md b/docs/user-guide/workflows/workflows-overview.md index b25d0ae..262beff 100644 --- a/docs/user-guide/workflows/workflows-overview.md +++ b/docs/user-guide/workflows/workflows-overview.md @@ -127,6 +127,45 @@ Launch workflows within a chat interface, preserving conversational context and [Workflow Interruption](./configuration/advanced-features#74-workflow-interruption) is currently not available in chat mode. This feature is only supported when running workflows in execution mode. ::: +### Attaching Files in Chat Mode + +When running a workflow in chat mode, you can attach up to **10 files** to your message. +**To attach files:** + +1. In the chat input area, attach files using any of these methods: + - Click the **paperclip** icon in the input toolbar to open a file picker + - Drag and drop files directly into the chat window +2. Each uploaded file appears as a chip with options to preview, download, or remove it. +3. Send your message to start the workflow execution. + +![Chat input with multiple files attached before sending](./images/workflows-overview/workflow-chat-file-attachment.png) + +After execution completes, you can view the results in the **Workflow Execution History**: + +![Workflow execution results showing analysis of multiple attached files](./images/workflows-overview/workflow-execution-multi-file-result.png) + +**Supported file types and limits:** + +| Parameter | Value | +| ------------- | ----------------------------------- | +| Max files | 10 per execution | +| Max file size | 100 MB per file | +| File formats | CSV, PDF, JPEG, JPG, PNG, GIF, PPTX | + +**How files are available in workflow steps:** + +Each attached file is appended to the task description of every state: + +``` +File attached: filename.ext +``` + +The full list of file names is also accessible via the `{{file_names}}` context variable in YAML task templates or tool arguments. + +:::tip Referencing a specific file +Mention a file by name (e.g., `@report.pdf`) to direct a step to focus on that specific file rather than processing all attached files. +::: + ### Chat History Workflow chat history works the same way as with regular assistants. You can always review your workflow conversations in the Chats tab that started in a chat mode, where you'll find: diff --git a/faq/can-i-upload-files-in-a-workflow-prompt.md b/faq/can-i-upload-files-in-a-workflow-prompt.md index 1d5c13a..110e4c8 100644 --- a/faq/can-i-upload-files-in-a-workflow-prompt.md +++ b/faq/can-i-upload-files-in-a-workflow-prompt.md @@ -1,29 +1,42 @@ # Can I upload files in a workflow prompt? How to use file as prompt? -## Supported File Types and Limitations +Yes. File upload is supported when running a workflow in **chat mode** (via the **Start Chat** button). +You can attach up to **10 files** per execution. -The following file formats are supported for workflow uploads: +## Supported File Types and Limits -- Images: jpeg, png, jpg, gif -- Documents: pdf, pptx -- Data: csv -- Maximum file size: 50MB +| Parameter | Value | +| ------------- | ----------------------------------- | +| Max files | 10 per execution | +| Max file size | 100 MB per file | +| File formats | CSV, PDF, JPEG, JPG, PNG, GIF, PPTX | -## How to Configure File Uploads in Workflows +## How to Attach Files to a Workflow in Chat Mode -1. Create a workflow with a user prompt step that requires file input -2. Configure the state with `interrupt_before: true` -3. In the task description, specify that file upload is expected -4. Add appropriate handling for the uploaded file in subsequent states +1. Open the workflow and click **Start Chat**. +2. In the chat input area, click the **paperclip** icon to open a file picker, or drag and drop files into the window. +3. Each file appears as a chip — you can preview, download, or remove it before sending. +4. Send your message to start the workflow execution. -How to use file as prompt +All attached files are included in the context of every workflow step. -1. Open Workflow -2. Click 'Execute' button -3. Click 'Attach File' button -4. Choose file -5. Execute +## How to Configure File Input in YAML + +To design a workflow that explicitly waits for file input from the user, configure a state with +`interrupt_before: true`. This pauses execution before the state runs, allowing the user to +provide files and additional input: + +```yaml +states: + - id: await-files + assistant_id: file-processor + interrupt_before: true + task: | + Process the attached files. + Files: {{file_names}} +``` ## Sources -- [Workflow Advanced Features](https://docs.codemie.ai/user-guide/workflows/configuration/advanced-features) +- [Workflows Overview — Attaching Files in Chat Mode](https://docs.codemie.ai/user-guide/workflows/workflows-overview#attaching-files-in-chat-mode) +- [Advanced Features — Workflow Interruption](https://docs.codemie.ai/user-guide/workflows/configuration/advanced-features) diff --git a/faq/can-i-use-different-types-of-files-in-the-same-workflow-execution.md b/faq/can-i-use-different-types-of-files-in-the-same-workflow-execution.md index e7b3046..e112853 100644 --- a/faq/can-i-use-different-types-of-files-in-the-same-workflow-execution.md +++ b/faq/can-i-use-different-types-of-files-in-the-same-workflow-execution.md @@ -1,14 +1,13 @@ # Can I use different types of files in the same workflow execution? -Currently, only one file can be attached as input while executing a workflow. Ensure the file is appropriate for the workflow's context to provide accurate and relevant results. +Yes. When running a workflow in **chat mode** (via the **Start Chat** button), you can attach up to +**10 files** of different types in a single execution. Supported formats are CSV, PDF, JPEG, JPG, +PNG, GIF, and PPTX, with a maximum size of 100 MB per file. -### 1.3.12. Is it possible to delete a CodeMie project using the UI console for the admin user? Is it possible to delete a CodeMie project via API? - -No, it is not possible for the current release to delete a project via the UI console and api even for admin users. - -### +All attached files are included in the context of every workflow step, so you can, for example, +attach a CSV with data alongside a PDF report and have the workflow process both. ## Sources -- [Supported File Formats And Csv Handling In Chat Assistant](https://docs.codemie.ai/user-guide/assistants/supported-file-formats-and-csv-handling-in-chat-assistant) +- [Workflows Overview — Attaching Files in Chat Mode](https://docs.codemie.ai/user-guide/workflows/workflows-overview#attaching-files-in-chat-mode) - [Advanced Features](https://docs.codemie.ai/user-guide/workflows/configuration/advanced-features) diff --git a/faq/how-are-attached-files-accessible-in-workflow-steps.md b/faq/how-are-attached-files-accessible-in-workflow-steps.md new file mode 100644 index 0000000..8cf06ff --- /dev/null +++ b/faq/how-are-attached-files-accessible-in-workflow-steps.md @@ -0,0 +1,25 @@ +# How are attached files accessible in workflow steps? + +When you attach files to a workflow execution in chat mode, each step in the workflow receives +the files in two ways: + +1. **Task description**: Each attached file is appended to the task description as + `File attached: filename.ext`, so the AI assistant in that step is aware of all files. + +2. **Context variable**: The full list of file names is available as `{{file_names}}` in the + context store. You can reference this in YAML task templates or tool arguments: + +```yaml +states: + - id: process-files + assistant_id: analyzer + task: | + Analyze the following files: {{file_names}} + Provide a summary for each file. +``` + +Files are included in every step automatically — no additional YAML configuration is required. + +## Sources + +- [Workflows Overview — Attaching Files in Chat Mode](https://docs.codemie.ai/user-guide/workflows/workflows-overview#attaching-files-in-chat-mode) diff --git a/faq/how-many-files-can-i-attach-to-a-workflow-execution.md b/faq/how-many-files-can-i-attach-to-a-workflow-execution.md new file mode 100644 index 0000000..056e4ec --- /dev/null +++ b/faq/how-many-files-can-i-attach-to-a-workflow-execution.md @@ -0,0 +1,13 @@ +# How many files can I attach to a workflow execution? + +You can attach up to **10 files** per workflow execution in chat mode (via the **Start Chat** button), +with a maximum size of **100 MB per file**. + +Supported file formats: CSV, PDF, JPEG, JPG, PNG, GIF, PPTX. + +All attached files are included in the context of every step in the workflow. To attach files, +click the paperclip icon in the chat input area to open a file picker, or drag and drop files into the chat window. + +## Sources + +- [Workflows Overview — Attaching Files in Chat Mode](https://docs.codemie.ai/user-guide/workflows/workflows-overview#attaching-files-in-chat-mode) diff --git a/faq/how-to-execute-workflows-with-file-attachments.md b/faq/how-to-execute-workflows-with-file-attachments.md index 56607a7..4091491 100644 --- a/faq/how-to-execute-workflows-with-file-attachments.md +++ b/faq/how-to-execute-workflows-with-file-attachments.md @@ -1,13 +1,20 @@ # How to execute workflows with file attachments? -To execute workflows with file attachments: +File attachments are supported when running a workflow in **chat mode** (via the **Start Chat** button). -1. Initiate the workflow execution from the system prompt. -2. Click on the paperclip (📎) icon on the system prompt to attach a file. -3. Select the desired file from your system (supported types include CSV, PDF, JPEG, JPG, GIF, PNG, and PPTX). -4. Ensure the file is successfully attached. -5. Proceed with workflow execution. The workflow supervisor will include the attached file in the context for each step in the workflow. +To execute a workflow with file attachments: + +1. Open the workflow and click **Start Chat**. +2. In the chat input area, click the **paperclip** icon in the toolbar to open a file picker, + or drag and drop files directly into the chat window. +3. Select one or more files (up to **10 files**, max **100 MB** each). Each file appears as a chip + with preview, download, and remove options. +4. Send your message to start the workflow execution. + +All attached files are automatically included in the context of every workflow step. Supported +file types: CSV, PDF, JPEG, JPG, PNG, GIF, PPTX. ## Sources +- [Workflows Overview — Attaching Files in Chat Mode](https://docs.codemie.ai/user-guide/workflows/workflows-overview#attaching-files-in-chat-mode) - [Advanced Features](https://docs.codemie.ai/user-guide/workflows/configuration/advanced-features)