Skip to content

Adding a node

A node is a single action on a third-party service (slack_send_message, deepl_translate). Adding one is mostly writing the provider call; the UI form, validation, the LLM tool description, the MCP tool and this site’s reference page are all generated from the node’s descriptor. This page is the whole recipe. If you use Claude Code, the repository ships a node-create skill that walks through the same steps interactively.

apps/platform-api/internal/modules/nodeengine/internal/
├── nodes/<provider>/
│ ├── helpers/client.go # one HTTP client per provider (base URL + auth header)
│ ├── <action>/node.go # the descriptor: metadata, JSON schemas, annotations
│ ├── <action>/executor.go # the runtime call
│ └── register.go # one providers.Register(...) call per provider
├── nodes/nodes.go # the provider list (new providers only)
└── credentials/<provider>_(api|oauth2).go # the credential the node consumes

A new action on an existing provider touches node.go, executor.go and one line in register.go. A new provider adds helpers/client.go, register.go, a line in nodes/nodes.go, a credential file, and two icon files in the UI.

package translate
func NewDeeplTranslateNode(nodeID string) *DeeplTranslateNode {
return &DeeplTranslateNode{
ID: nodeID, // "<provider>_<action>", set by register.go
Kind: nodes.NodeKindAction,
Version: "0.0.1",
Name: "DeepL Translate",
Description: "Translate text using DeepL.",
Icon: nodes.NodeIcon{Brand: "deepl", Glyph: "translate"},
Inputs: []nodes.NodeHandle{{Key: "in"}},
Outputs: []nodes.NodeHandle{{Key: "out"}},
Categories: []string{"AI"},
SubCategories: []string{"DeepL"},
Tags: []string{"translation", "translate", "language"},
SupportedCredentials: []string{"deepl_api"},
InputSchema: &gjs.Schema{ /* the parameters the user fills in */ },
OutputSchema: &gjs.Schema{ /* array of the records the executor returns */ },
HasNaturalLanguage: true,
Annotations: nodes.NodeAnnotations{ReadOnly: true, Idempotent: true, Destructive: new(false)},
}
}

What each part drives:

  • InputSchema becomes the editor form, the runtime validation, the LLM function-calling schema and the MCP tool input. Use Title and Description on every property; Default fills in when the user leaves a field empty; Required lists what the executor may assume is present.
  • OutputSchema is always an array of records (type: "array", items: {type: "object", ...}) — a node fed ten items returns ten records, and downstream nodes reference fields as $<node>.<field>.
  • SupportedCredentials names the credential IDs the executor reads. The reverse link (credential → nodes) is derived at startup; an ID that does not exist makes the API fail on boot, on purpose.
  • HasNaturalLanguage exposes the node to “describe it, don’t configure it” and to the workflow generator. Leave it true unless the node is a control-flow helper.
  • Annotations are the MCP behaviour hints: read-only lookups (ReadOnly, Idempotent), additive writes (neither), destructive ones (Destructive: new(true)). Clients use them to decide what needs confirmation.
  • Icon — Brand is the provider (see icons), Glyph is the action shape from public/assets/icons/glyphs/ (send, search, translate, list, …).
type DeeplTranslateExecutorInput struct {
Text string `schema:"text"`
SourceLanguage string `schema:"sourceLanguage"`
TargetLanguage string `schema:"targetLanguage"`
}
func (e *DeeplTranslateExecutor) ExecuteWithContext(ctx context.Context, credentials map[string]any, data []map[string]any) ([]map[string]any, error) {
credential := nodeEngineDomainCredentials.GetCredentials(credentials, "deepl_api")
client := helpers.CreateClient(ctx, credential.String("apiKey"))
results := make([]map[string]any, 0)
for _, item := range data {
input, err := e.validator.Parse(item) // validates against InputSchema and applies defaults
if err != nil {
return nil, err
}
// call the provider through client (go-packages/httpclient), append one record per result
}
return results, nil
}

The contract is fixed: credentials arrive already decrypted and keyed by credential ID, data is the batch of input records, and the return value is the list of output records. Errors are apperror sentinels (apperror.Internal, apperror.Validation, …) — never raw strings. Respect ctx: it carries the per-call timeout.

One call wires everything. The node and executor registries, function calling (for nodes with HasNaturalLanguage), any webhook trigger adapters and the provider’s MCP server are all derived from it:

func Register() {
nodeID := "deepl"
translateNodeID := nodeID + "_translate"
translateNode := translate.NewDeeplTranslateNode(translateNodeID)
translateValidator := jsonschema.New[translate.DeeplTranslateExecutorInput](translateNode.GetInputSchema())
translateExecutor := translate.NewDeeplTranslateExecutor(translateNodeID, translateValidator)
providers.Register(providers.Provider{
Server: mcp.Server{
ID: nodeID,
Name: "DeepL",
Description: "Tools for translation via DeepL.",
Icon: mcp.ServerIcon{Brand: "deepl"},
Version: "0.0.1",
},
Actions: []providers.Action{
{Node: translateNode, Executor: translateExecutor},
},
})
}

Adding an action to an existing provider is one more providers.Action. A new provider also needs its Register() appended to nodes/nodes.go (pass the file gateway there only if an executor uploads or downloads files).

If the node needs a credential that does not exist yet, add credentials/<provider>_api.go (or _oauth2.go) with the credential’s own JSON schema — secret fields set WriteOnly: true — and register it in credentials/credentials.go. The credential form in the UI and the credential catalog are generated from that schema.

The UI looks for apps/platform/public/assets/icons/brands/<brand>/light.svg and dark.svg — a 24×24 monochrome mark of the provider, one per theme. Reuse the provider’s own brand mark; do not draw one. Glyphs are shared and already exist.

Terminal window
make node-run # lists every registered node id
make node-run node=deepl_translate \
input='{"text":"hello","sourceLanguage":"auto","targetLanguage":"de"}' \
credentials='{"deepl_api":{"apiKey":"..."}}'

This runs the executor once on the host — no database, no containers — validates the input the same way the platform does, and prints the output records. Nodes that upload or download files also need FILE_GATEWAY_BASE_URL / FILE_GATEWAY_AUTH_SERVICE_KEY in the environment.

Then make go-fmt && make go-lint && make go-build from the repo root, and open a pull request. The node reference page for your provider is generated at the next docs build; nothing to write.

  • Node ID is <provider>_<action>, lowercase, underscore-separated.
  • Every input property has Title and Description; Required is accurate; defaults are set where the API has one.
  • OutputSchema is an array of objects and matches what the executor appends.
  • SupportedCredentials names an existing credential ID.
  • Annotations reflect what the action does to the outside world.
  • make node-run succeeds against the real provider with your own credentials.