n8n Migration Guide π‘ BETA
This guide maps n8n workflows to BASIC scripts and scheduled jobs in General Bots.
Overview
This guide maps n8n workflow ideas to BASIC scripts and scheduled jobs; there is no n8n importer in the repository.
Why Migrate
The reason is to keep automation logic in the bot repository and to run it beside a private knowledge base rather than in a hosted workflow service.
Workflow Mapping
| n8n concept | General Bots counterpart |
|---|---|
| Trigger | ON handler or a scheduled job |
| Node | A BASIC statement or registered keyword |
| HTTP request node | GET / POST keywords where registered |
| Function node | A tool .bas script |
| Credential store | Vault |
Triggers
Use only triggers present in the keyword registry; an unregistered trigger name is not a feature.
Common Nodes
Map each node to a keyword, then check the generated BASIC reference before writing the script.
Migration Examples
Start with a scheduled sync, then a webhook-driven workflow, then error handling.
Scheduled Data Sync
Use a registered scheduling keyword to run a tool that reads a source and writes to a bot table.
Webhook Processing
Chat cannot call raw REST; a webhook workflow belongs to the API side of the full platform (root AGENTS.md).
Multi-Step API Orchestration
Split the workflow into small tools so each step can be tested and retried independently.
Error Handling
Use ON ERROR handling where registered and log the failing step; never silence an error with a default value.
Exporting n8n Workflows
Export the workflow JSON to /tmp and use it as a checklist; no converter reads it.
Export Process
Use the source platform's export function and keep the file outside the repository.
JSON Structure Analysis
List nodes, triggers and credentials by hand; those are the items to recreate.
Feature Comparison
| Feature | General Bots |
|---|---|
| Visual editor | Not part of the desktop edition |
| Script logic | BASIC in the bot repository |
| Credentials | Vault |
| Chat access | Keywords, tools and app commands |
What You Gain
Versioned scripts, Vault-held credentials and direct access from chat through tools.
What Changes
Visual flows become text scripts; a node library becomes a keyword registry.
Credentials Migration
Store each credential in Vault under the documented path; nothing is copied from an n8n credential store automatically.
n8n Credentials
Export names, not values; re-enter values into Vault through the CLI.
Migration Checklist
- Export workflows and list nodes, triggers and credentials.
- Write one tool script per workflow using registered keywords.
- Store credentials in Vault.
- Run each workflow against test data.
- Verify the scheduled or webhook trigger.
Pre-Migration
Record the product version 7.1.2 from the root Cargo.toml.
Migration
Keep scripts in the bot repository; the work-dir .ast files are build artifacts.
Post-Migration
Compare outputs from the old and new workflows on a fixed input.
Common Patterns
| Pattern | Handling |
|---|---|
| Batch processing | A tool that iterates a table |
| Conditional branching | IF / ELSE in BASIC |
| Data transformation | String and table keywords that are registered |
Batch Processing
Process one batch per run so a failure is isolated.
Conditional Branching
Use BASIC IF blocks with registered comparison syntax.
Data Transformation
Check the generated BASIC reference for the exact keyword before using it.
Best Practices
Keep tools small, never hardcode a credential, and test with the LLM mock rather than a paid model.
See Also
Authority: root AGENTS.md (Bot Scripts Architecture, Adding New Features Workflow) and the generated BASIC reference.
Limits
- No n8n import tool or node-for-node compatibility layer exists.
- No keyword is assumed to exist without the generated reference.
- The desktop edition exposes Chat and Drive; workflow APIs belong to the full platform.