Dashboard/Issues/AI-2026-CONV-001
Confirmed

[Bug]: N8nWorkflowConverter maps httpRequest to COMPONENT_TYPE_PLUGIN but raises NotImplementedError instead of calling the existing implementation

View Upstream Issuegitcode.com/openJiuwen/agent-studio/issues/815
CWE:
Repository:agent-studio
Date:2026-05-19
Affected Version:*
Component:converter_n8n
Reporter:Toan
Affected Files
converter_n8n.py

Summary

N8nWorkflowConverter maps n8n-nodes-base.httpRequest to COMPONENT_TYPE_PLUGIN, but _convert_node() at line 704 raises NotImplementedError instead of calling the fully implemented _convert_plugin_node() method at line 2612. The implementation exists — it is simply never reached.

Vulnerable Code

The dispatch that blocks it (converter_n8n.py:704-709):

elif component_type == ComponentType.COMPONENT_TYPE_PLUGIN:
    node_name = n8n_node.get("name", "unknown")
    raise NotImplementedError(
        f"Conversion of PLUGIN nodes is not supported. "
        f"Node '{node_name}' (id: {node_id}) cannot be converted."
    )

The implementation that exists but is never called (converter_n8n.py:2612-2666):

def _convert_plugin_node(self, n8n_node: Dict, node_id: str, x_pos: int) -> Dict:
    """Convert n8n HTTP Request or App node to OpenJiuwen Plugin component."""
    # ... 55 lines of complete implementation ...
    return {
        "id": node_id,
        "type": str(ComponentType.COMPONENT_TYPE_PLUGIN),
        "data": {
            "title": node_name,
            "inputs": {
                "pluginParam": plugin_param,
                "inputParameters": self._build_predecessor_input_ref(node_name),
                "_n8n_type": node_type,
                "_n8n_params": params
            },
            "outputs": { ... }
        }
    }

The mapping that routes into the dead end (n8n_mappings.py:130):

"n8n-nodes-base.httpRequest": ComponentType.COMPONENT_TYPE_PLUGIN,

Trigger Conditions

  1. Import an n8n workflow containing an HTTP Request node (or Slack, GitHub, etc.)
  2. The node type maps to COMPONENT_TYPE_PLUGIN
  3. _convert_node() hits the elif branch at line 704
  4. NotImplementedError is raised instead of calling _convert_plugin_node()
  5. Workflow import fails

Impact

  • Cannot import n8n workflows with HTTP Request nodes
  • Cannot import n8n workflows with app nodes (Slack, GitHub, etc.)
  • 6 existing tests fail:
    • test_http_maps_to_plugin
    • test_plugin_has_plugin_param
    • test_plugin_raw_params_stored
    • test_plugin_outputs_structure
    • test_plugin_connected_to_end
    • test_slack_app_node_maps_to_plugin

Suggested Fix

One-line change — call the existing method instead of raising:

elif component_type == ComponentType.COMPONENT_TYPE_PLUGIN:
    return self._convert_plugin_node(n8n_node, node_id, x_pos)