Flow Studio
Create Entity Node
Creating a new business entity record — the EntityCreateNode input map, validation, and using the returned entityId in downstream nodes.
Node Configuration
{
"nodeType": "EntityCreate",
"name": "createExpense",
"config": {
"entityType": "expense",
"data": {
"submittedBy": "$context.actorId",
"submittedAt": "$now.toISOString()",
"amount": "$json.totalAmount",
"currency": "$json.currency ?? 'GBP'",
"description": "$json.description",
"category": "$json.category",
"lineItems": "$json.lineItems",
"status": "draft"
}
}
}
Configuration Fields
| Field | Type | Description |
|---|---|---|
entityType | string | Entity type key resolved by IEntitySchemaRegistry. |
data | object | Key-value map of fields to set on the new entity. Values are expression-evaluated. |
Node Output
{
"entityId": "exp-00789",
"entityType": "expense",
"data": {
"submittedBy": "usr-a1b2c3",
"submittedAt": "2026-05-25T10:00:00.000Z",
"amount": 1250.00,
"currency": "GBP",
"description": "Q1 Travel Expenses",
"category": "travel",
"status": "draft"
}
}
Using the New Entity ID
// Pass new entity ID to an update node
"entityId": "$output.createExpense.entityId"
// Use in a Slack notification
"text": "Expense $output.createExpense.entityId has been created for review."
// Use in an email link
"body": "Review at $context.appUrl/expenses/$output.createExpense.entityId"
EntityCreateExecutor
protected override async Task<NodeExecutionResult> ExecuteAsync(
EntityCreateConfig config,
NodeDataContext ctx,
CancellationToken ct)
{
var data = _evaluator.EvaluateObject(config.Data, ctx);
var result = await _entityClient.CreateAsync(new CreateEntityRequest
{
EntityType = config.EntityType,
Data = data,
TenantId = ctx.TenantId,
ActorId = ctx.ActorId
}, ct);
return NodeExecutionResult.Success(new
{
result.EntityId,
result.EntityType,
result.Data
});
}
Idempotency: The
EntityCreateNode does not guarantee idempotency by default. If the workflow retries (after a transient error), it may create duplicate entities. For critical records, include a unique business key in the data map and configure the entity service to enforce uniqueness on that field.