Mintplex-Labs/anything-llm · warning · Error

This flow includes unsupported blocks. They may not be…

Error message

This flow includes unsupported blocks. They may not be supported by your version of AnythingLLM or are not available on this platform.

What it means

Thrown by AgentFlows.saveFlow when any step in config.steps has a type not present in this build's FLOW_TYPES — the same allowlist the executor dispatches on. It guards both the flow builder save path and flow import, deliberately blocking flows that use blocks unavailable on this platform (the comment cites file-writing/code-execution blocks on Desktop importing to Docker). The throw is caught immediately and returned as { success: false, error } — nothing is written to disk.

Solutions

  1. Edit the flow JSON and delete/replace the steps with unsupported types, keeping only blocks your UI palette offers.
  2. Recreate the workflow natively in your instance's flow builder instead of importing.
  3. Align versions: upgrade the importing instance to the version that exported the flow.
  4. Check the response body's error field after save/import — a failure here is non-destructive, the old file (if any) is untouched.
Defensive patterns

Strategy: validation

Validate before calling

const { FLOW_TYPES } = require("../utils/agentFlows/executor");

function flowImportable(config) {
  const supported = Object.values(FLOW_TYPES).map((d) => d.type);
  const bad = config.steps.filter((s) => !supported.includes(s.type)).map((s) => s.type);
  return { ok: bad.length === 0, unsupportedTypes: bad };
}

// before calling saveFlow/import:
const check = flowImportable(flowConfig);
if (!check.ok) throw new Error(`Flow uses unsupported blocks: ${check.unsupportedTypes.join(", ")}`);

Try / catch

const res = AgentFlows.saveFlow(name, config, uuid);
if (!res.success && /unsupported blocks/.test(res.error)) {
  // surface which step types to remove; the previous file on disk is untouched
  return reportUnsupportedBlocks(config);
}

Prevention

When it happens

Trigger: Saving or importing a flow whose steps include a block type compiled out of this edition: importing a Desktop-exported flow JSON containing file_write/code_execution style blocks into Docker, importing a flow from a newer version, or POSTing a hand-crafted flow config with an unknown type to the flows API.

Common situations: Sharing flow files across AnythingLLM editions (Desktop vs Docker) or versions; downgrading the app while reusing exported flows; community flow templates containing blocks your instance doesn't show in the builder palette.

Related errors


AI-assisted analysis of Mintplex-Labs/anything-llm@f92433b4ea (2026-08-18). Data as JSON: /api/errors/22bdd0eb1154b0ca. Report an issue: GitHub.

Appendix: source

Thrown at server/utils/agentFlows/index.js:119

  static saveFlow(name, config, uuid = null) {
    try {
      AgentFlows.createOrCheckFlowsDir();

      if (!uuid) uuid = uuidv4();
      const normalizedUuid = normalizePath(`${uuid}.json`);
      const filePath = path.join(AgentFlows.flowsDir, normalizedUuid);
      if (!isWithin(AgentFlows.flowsDir, filePath)) return null;

      // Prevent saving flows with unsupported blocks or importing
      // flows with unsupported blocks (eg: file writing or code execution on Desktop importing to Docker)
      const supportedFlowTypes = Object.values(FLOW_TYPES).map(
        (definition) => definition.type
      );
      const supportsAllBlocks = config.steps.every((step) =>
        supportedFlowTypes.includes(step.type)
      );
      if (!supportsAllBlocks)
        throw new Error(
          "This flow includes unsupported blocks. They may not be supported by your version of AnythingLLM or are not available on this platform."
        );

      fs.writeFileSync(filePath, JSON.stringify({ ...config, name }, null, 2));
      return { success: true, uuid };
    } catch (error) {
      console.error("Failed to save flow:", error);
      return { success: false, error: error.message };
    }
  }

  /**
   * List all available flows
   * @returns {Array} Array of flow summaries
   */
  static listFlows() {
    try {
      const flows = AgentFlows.getAllFlows();

View on GitHub (pinned to f92433b4ea)