Summary
When the Architect detects a workflow requires an integration that doesn't exist (e.g., HubSpot, Salesforce), spawn a sub-workflow to create the custom node.
Context
During cross-examination (Step2), the LLM may find:
"This workflow needs hubspot_api node, but it doesn't exist."
Currently: Route to error node, human intervention required.
Future: Spawn custom node creation workflow automatically.
Custom Node Creation Workflow
Step1: node_spec.yaml
- component_type, inputs, outputs
- credential_tool_type (uses existing ToolCredential)
Step2: node_behavior.feature (Gherkin)
- Scenarios describing node behavior
Step3: Generate 3 files
- components/{name}.py
- + node_type_defs.py entry
- + components/__init__.py import
Step4: Validate (syntax, ports match, tests)
Files to Generate
| File |
Content |
components/{name}.py |
@register factory + node function |
node_type_defs.py |
register_node_type(NodeTypeSpec(...)) |
components/__init__.py |
Import statement |
Credential Handling
Uses existing ToolCredential with flexible JSON config - no credential type creation needed.
tool_type = "hubspot"
config = {"api_key": "...", "portal_id": "..."}
References
- Node registration pattern:
platform/schemas/node_type_defs.py
- Component examples:
platform/components/ (see ai_model.py for minimal, switch.py for complex)
- Credential access:
services/web_search.py for ToolCredential pattern
Summary
When the Architect detects a workflow requires an integration that doesn't exist (e.g., HubSpot, Salesforce), spawn a sub-workflow to create the custom node.
Context
During cross-examination (Step2), the LLM may find:
Currently: Route to error node, human intervention required.
Future: Spawn custom node creation workflow automatically.
Custom Node Creation Workflow
Files to Generate
components/{name}.py@registerfactory + node functionnode_type_defs.pyregister_node_type(NodeTypeSpec(...))components/__init__.pyCredential Handling
Uses existing
ToolCredentialwith flexible JSON config - no credential type creation needed.References
platform/schemas/node_type_defs.pyplatform/components/(seeai_model.pyfor minimal,switch.pyfor complex)services/web_search.pyfor ToolCredential pattern