Update Data
The Update Data component lets you take an existing record (or a list of records) and add new fields to it. You can also set a special field that will be used as the text content for the record and optionally check that this field exists.
How it Works
When you drop the component into your workflow, you first provide the data you want to change.
- Number of Fields – tells the component how many new fields you want to add. The component will automatically create that many input slots (e.g.,
field_1_key
,field_2_key
, …). - Field Keys – for each field you created, you enter the key name (e.g.,
email
,phone
). The component will copy the value you provide for that key into every record. - Text Key – if you set this, the component will mark that key as the record’s text content.
- Text Key Validator – when checked, the component verifies that the key you set in Text Key actually exists in the data. If it doesn’t, the component stops with an error.
The component works entirely inside Nappai; it does not call any external services. After processing, it outputs the updated record(s) as Processed Data, which you can feed into other components.
Inputs
- Data: The record to update. You can provide a single record or a list of records.
- Number of Fields: Number of fields to be added to the record. The maximum is 15.
- Text Key: Key that identifies the field to be used as the text content.
- Text Key Validator: If enabled, checks if the given Text Key is present in the given Data.
Outputs
- Processed Data: The updated record(s). If you supplied a list, the output will also be a list; if you supplied a single record, the output will be a single record wrapped in a list.
Usage Example
-
Add a phone number and email to a customer record
- Drag Update Data into the canvas.
- Connect the output of a Data Input component (containing the customer record) to the Data input.
- Set Number of Fields to
2
. - For
field_1_key
, enterphone
and provide a value (e.g.,+1-555-1234
). - For
field_2_key
, enteremail
and provide a value (e.g.,customer@example.com
). - Leave Text Key empty (or set it to a field that already exists, like
name
). - Leave Text Key Validator unchecked.
- Run the workflow. The output Processed Data will contain the original record plus the new
phone
andemail
fields.
-
Validate that a required field exists
- Use the same setup as above.
- Set Text Key to
name
. - Check Text Key Validator.
- If the record does not have a
name
field, the component will raise an error and stop the workflow.
Related Components
- Data Input – to bring data into the workflow.
- Data Output – to send the processed data to another system or component.
- Merge Data – to combine two data objects before updating.
Tips and Best Practices
- Keep the number of fields below 15 to avoid errors.
- Use Text Key Validator when the text key is critical for downstream components.
- If you need to update many records, connect a List of Data to the Data input and the component will update each one automatically.
- Remember that the output is always a list, even if you start with a single record.
Security Considerations
The component only manipulates data that is already in your workflow; it does not send data outside of Nappai. Ensure that any sensitive fields you add are handled according to your organization’s data‑privacy policies.