Skip to main content

Overview

Data fields are variables that store information during task execution. They act as the database for your workflow, holding everything from user inputs to calculated values.

Data Storage

Store values collected during tasks

Multiple Types

Text, numbers, dates, images, and more

Bind to Components

Connect UI components to data fields

Use in Logic

Reference in conditions and automations

Types of Data Fields

TypeDescription
System Data FieldsPredefined fields common to all workflows (task info, user info)
User Data FieldsCustom fields you define for your workflow

Data Field Properties

Each data field has these properties:
PropertyDescription
NameUnique identifier for the field
Data TypeType of data stored (text, number, etc.)
Default ValueInitial value when task is created
Create Time FieldWhether this field is required at task creation
MandatoryWhether the field must have a value

Data Types

Data TypeCategoryDescription
TextSimpleText or string value
NumberSimpleNumerical value
BooleanSimpleTrue or false
DateSimpleDate and time value
List of TextSimpleArray of text values
ImageSimpleList of uploaded images
SignatureSimpleDigital signature
FileSimpleList of uploaded files
LocationCompositeAddress with latitude & longitude
ListCompositeCollection of sub-fields

Using Data Fields

1. Bind to Components

Connect data fields to UI components to display or collect data:
  • Display components: Show data field values (labels, text displays)
  • Input components: Save user input to data fields (text input, camera)

2. Use in Conditions

Reference data fields in decision nodes and automation conditions:
// Check if order amount exceeds limit
task.data.order_amount > 1000

3. Use in Actions

Include data field values in automation actions:
// Send notification with customer name
"New order from {{task.data.customer_name}}"

For AI Agents

Data Field Structure

interface DataField {
  fieldId: string;
  name: string;
  displayName: string;
  type: DataFieldType;
  defaultValue?: any;
  isCreateTimeField: boolean;
  isMandatory: boolean;
  config?: DataFieldConfig;
}

type DataFieldType =
  | 'TEXT'
  | 'NUMBER'
  | 'BOOLEAN'
  | 'DATE'
  | 'LIST_OF_TEXT'
  | 'IMAGE'
  | 'SIGNATURE'
  | 'FILE'
  | 'LOCATION'
  | 'LIST';

interface LocationField {
  address: string;
  latitude: number;
  longitude: number;
}

API: Get Data Fields

GET /api/v1/workflows/:workflowId/datafields
Authorization: Bearer {token}

API: Update Task Data

PATCH /api/v1/tasks/:taskId
Authorization: Bearer {token}
Content-Type: application/json

{
  "data": {
    "customer_name": "John Doe",
    "order_amount": 150
  }
}

Accessing Data in Scripts

// User-defined data fields
task.data.field_name

// System data fields
task.taskId
task.status
task.assignedTo
loggedInUser.name
loggedInUser.role

UI Components

ComponentLocationPurpose
DataFieldManager/src/views/workflows/datafields/Data field configuration
DataFieldPicker/src/components/DataFieldPicker/Field selection modal
DataFieldEditor/src/views/workflows/datafields/Editor/Field properties editor