Overview
The Plugins API provides endpoints to discover and retrieve information about loaded plugins. Plugins extend AutoMFlows with custom node types, actions, and functionality.
List All Plugins
Retrieve metadata for all loaded plugins.
Endpoint
Example Request
curl http://localhost:3003/api/plugins
Response
Returns an array of plugin metadata objects.
Plugin directory name (unique identifier)
Plugin manifest containing metadata and configuration Human-readable plugin name
Array of node type definitions provided by this plugin
Plugin dependencies (npm packages)
Absolute path to plugin directory on the filesystem
Whether the plugin was successfully loaded
Error message if plugin failed to load
Response Example
[
{
"id" : "example-plugin" ,
"manifest" : {
"name" : "Example Plugin" ,
"version" : "1.0.0" ,
"description" : "Example plugin demonstrating custom node types" ,
"author" : "AutoMFlows Team" ,
"nodes" : [
{
"type" : "customAction" ,
"name" : "Custom Action" ,
"category" : "actions" ,
"icon" : "bolt" ,
"description" : "Perform a custom action"
}
],
"dependencies" : {
"axios" : "^1.6.0"
}
},
"path" : "/absolute/path/to/plugins/example-plugin" ,
"loaded" : true
},
{
"id" : "api-integration" ,
"manifest" : {
"name" : "API Integration Plugin" ,
"version" : "2.1.0" ,
"description" : "Advanced API integration nodes" ,
"author" : "Community" ,
"nodes" : [
{
"type" : "apiRequest" ,
"name" : "API Request" ,
"category" : "integration" ,
"icon" : "globe" ,
"description" : "Make HTTP API requests"
},
{
"type" : "jsonParse" ,
"name" : "Parse JSON" ,
"category" : "data" ,
"icon" : "code" ,
"description" : "Parse and extract JSON data"
}
]
},
"path" : "/absolute/path/to/plugins/api-integration" ,
"loaded" : true
},
{
"id" : "broken-plugin" ,
"manifest" : {
"name" : "Broken Plugin" ,
"version" : "1.0.0"
},
"path" : "/absolute/path/to/plugins/broken-plugin" ,
"loaded" : false ,
"error" : "Failed to load plugin: Missing required field 'main' in manifest"
}
]
Get Plugin Details
Retrieve detailed metadata for a specific plugin by ID.
Endpoint
GET /api/plugins/{pluginId}
Path Parameters
Plugin ID (directory name)
Example Request
curl http://localhost:3003/api/plugins/example-plugin
Response
Returns a single plugin metadata object (same structure as list endpoint).
{
"id" : "example-plugin" ,
"manifest" : {
"name" : "Example Plugin" ,
"version" : "1.0.0" ,
"description" : "Example plugin demonstrating custom node types" ,
"author" : "AutoMFlows Team" ,
"main" : "index.js" ,
"nodes" : [
{
"type" : "customAction" ,
"name" : "Custom Action" ,
"category" : "actions" ,
"icon" : "bolt" ,
"description" : "Perform a custom action" ,
"inputs" : [
{
"name" : "target" ,
"type" : "string" ,
"required" : true ,
"description" : "Target element"
},
{
"name" : "value" ,
"type" : "string" ,
"required" : false ,
"description" : "Value to use"
}
],
"outputs" : [
{
"name" : "result" ,
"type" : "string" ,
"description" : "Action result"
}
]
}
],
"dependencies" : {
"axios" : "^1.6.0"
},
"scripts" : {
"install" : "npm install"
}
},
"path" : "/absolute/path/to/plugins/example-plugin" ,
"loaded" : true
}
Error Response (404)
{
"error" : "Plugin not found"
}
Plugin Manifest Structure
The plugin manifest (manifest.json) defines plugin metadata, node types, and configuration:
Required Fields
Plugin version (semantic versioning)
Entry point file (e.g., index.js)
Optional Fields
Plugin author name or email
License identifier (e.g., MIT, Apache-2.0)
Array of node type definitions Unique node type identifier
Display name for the node
Node category: actions, navigation, data, logic, integration
Array of input field definitions
Array of output field definitions
Example Manifest
{
"name" : "My Custom Plugin" ,
"version" : "1.0.0" ,
"description" : "Custom nodes for AutoMFlows" ,
"author" : "Your Name" ,
"license" : "MIT" ,
"main" : "index.js" ,
"nodes" : [
{
"type" : "customClick" ,
"name" : "Custom Click" ,
"category" : "actions" ,
"icon" : "hand-pointer" ,
"description" : "Advanced click with custom options" ,
"inputs" : [
{
"name" : "selector" ,
"type" : "string" ,
"required" : true ,
"description" : "CSS selector"
},
{
"name" : "clickCount" ,
"type" : "number" ,
"default" : 1 ,
"description" : "Number of clicks"
}
]
}
],
"dependencies" : {
"lodash" : "^4.17.21"
}
}
Plugin Loading
Plugins are automatically loaded from the plugins directory at server startup:
Server scans the plugins directory
Reads manifest.json from each plugin subdirectory
Validates manifest structure
Loads plugin entry point file
Registers node types with the plugin registry
Plugin Directory Structure
plugins/
├── example-plugin/
│ ├── manifest.json
│ ├── index.js
│ ├── package.json
│ └── node_modules/
├── api-integration/
│ ├── manifest.json
│ ├── index.js
│ └── package.json
└── custom-nodes/
├── manifest.json
└── index.js
Plugin Lifecycle
Discovery
Server discovers plugins in the plugins directory
Validation
Validates manifest.json structure and required fields
Loading
Loads plugin entry point and initializes
Registration
Registers node types with the plugin registry
Availability
Plugin nodes become available in the workflow editor
Error Handling
Plugins that fail to load are included in the API response with loaded: false and an error message:
{
"id" : "broken-plugin" ,
"manifest" : {
"name" : "Broken Plugin" ,
"version" : "1.0.0"
},
"path" : "/absolute/path/to/plugins/broken-plugin" ,
"loaded" : false ,
"error" : "Failed to load plugin: Missing required field 'main' in manifest"
}
Common Load Errors
Missing or invalid manifest.json
Missing required fields (name, version, main)
Invalid node type definitions
Entry point file not found
JavaScript syntax errors in plugin code
Missing dependencies
Creating Plugins
To create a custom plugin:
Create Plugin Directory
mkdir plugins/my-plugin
cd plugins/my-plugin
Create Manifest
{
"name" : "My Plugin" ,
"version" : "1.0.0" ,
"main" : "index.js" ,
"nodes" : [
{
"type" : "myNode" ,
"name" : "My Custom Node" ,
"category" : "actions"
}
]
}
Create Entry Point
module . exports = {
nodes: {
myNode: {
async execute ( context , nodeData ) {
// Node implementation
console . log ( 'Executing custom node' );
return { success: true };
}
}
}
};
Verify Plugin Loaded
curl http://localhost:3003/api/plugins
Next Steps
Workflow Execution Execute workflows using plugin nodes
Plugin Development Learn how to develop custom plugins