Skip to main content
Use masking to protect sensitive information in your agentic workflows. Masking obscures data such as Social Security Numbers, credit card numbers, authentication tokens, and other confidential information in logs, user interfaces, and outputs while maintaining the data’s usability within the workflow.
Important restrictions:
  • Only STRING properties can be masked. Arrays, objects, numbers, and booleans cannot be masked.
  • Flow output properties cannot be masked directly. Only flow input, flow private, and node output properties can be masked.
Configure masking by using the mask_property() method on your flow object:
Parameters:
property_path
string
required
Dot-notation path to the property to mask. The path uses a hierarchical structure to identify the exact location of the sensitive data within the flow.Supports masking properties in:
  • Flow input schema: flow.input.property_name
  • Flow private schema: flow.private.property_name
  • Node output schemas: flow.node_name.output.property_name
  • Nested flow node outputs: flow.nested_flow.node.output.property_name
  • Nested properties: flow.input.user.emailstructures.
masking_policy
MaskingPolicy
required
The masking strategy to apply. Supported values:
  • MASK_ALL: Completely masks the entire value with asterisks. Example: 123-45-6789 becomes ***********
  • MASK_LAST4: Masks all characters except the last 4. Example: 123-45-6789 becomes *******6789
  • MASK_FIRST4: Masks all characters except the first 4. Example: AUTH-TOKEN-12345 becomes AUTH***********
  • MASK_VIA_REGEX: Uses custom regex patterns for advanced masking scenarios. Requires regex_config parameter. Example: 1234-5678-9012-3456 with pattern ^(\\d{4})-(\\d{4})-(\\d{4})-(\\d{4})$ and masking XXXX-XXXX-XXXX-$4 becomes XXXX-XXXX-XXXX-3456
regex_config
dict
Required when using MaskingPolicy.MASK_VIA_REGEX.
input_policy
InputPolicy
Optional input masking behavior. Supported values:
  • MASK_WHILE_TYPING: Masks the value in real-time as you type. If omitted, data is masked only on output, not during input.
The following example demonstrates masking across multiple node types in a single workflow:
Python