Skip to content

feat: Add API endpoints for chatflow import and export#6080

Open
manishrawal95 wants to merge 3 commits intoFlowiseAI:mainfrom
manishrawal95:contrib/feature-FlowiseAI-Flowise
Open

feat: Add API endpoints for chatflow import and export#6080
manishrawal95 wants to merge 3 commits intoFlowiseAI:mainfrom
manishrawal95:contrib/feature-FlowiseAI-Flowise

Conversation

@manishrawal95
Copy link
Copy Markdown

This PR introduces new API endpoints to programmatically import and export chatflows, resolving issue #1377. This is a critical feature for enabling MLOps and BizOps workflows, allowing teams to version control their chatflows, automate backups, and migrate agent configurations between different environments.

As the creator of open-source tools for AI agent observability like agent-profiler and retrace, I understand the importance of robust operational tooling for managing AI systems at scale. This API provides a foundational building block for more automated and reliable agent deployment pipelines.

Changes Implemented:

  • Added GET /api/v1/chatflows/export/:id to export a specific chatflow as a JSON object.
  • Added POST /api/v1/chatflows/import to create a new chatflow from a JSON file, with validation.
  • Protected the new endpoints with authentication middleware.
  • Included API documentation and unit tests for the new functionality.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces export and import functionality for chatflows, adding new API endpoints and service-level logic for data validation and ID remapping. It also refactors the chatflows controller by introducing helper functions for common parameter and context validation tasks, reducing code duplication. Additionally, unit tests were added for the new import validation logic. Feedback was provided to correct mismatched error message expectations in the new unit tests, as the current assertions would cause the tests to fail.

manishrawal95 and others added 2 commits March 29, 2026 15:01
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant