Skip to content

Service

The service node sends an operation to a Smartunit internal service through the platform flow-completion hook.

Early-stage behavior: Service execution depends on the surrounding Smartunit runtime. Treat this node as platform-specific rather than a general Node-RED database node.

  • Users (UserService)
  • Roles (RoleService)
  • Subscriptions (SubscriptionService)
  • list
  • count
  • getOne
  • create
  • update
  • delete
  • deleteMany

msg.payload is passed to the selected service operation as its options or data. The required shape depends on the service and operation.

Examples include filtering options for list/getOne and entity data or criteria for create/update/delete.

The Smartunit platform resolves the hook and routes the service result back into the flow, normally in msg.payload.

  • Prefer the Data Store node for direct managed-store operations.
  • Validate payloads before create, update, or delete operations.
  • Apply authorization before exposing internal service operations to user or agent-controlled input.
  • Test the exact service payload shape in the target Smartunit environment because this surface is still evolving.