Skip to main content

Edit Fields (Set)

Use the Edit Fields node to set workflow data. This node can set new data as well as overwrite data that already exists. This node is crucial in workflows which expect incoming data from previous nodes, such as when inserting values to Google Sheets or databases.

Node parameters

These are the settings and options available in the Edit Fields node.

Mode

You can either use Manual Mapping to edit fields using the GUI or JSON Output to write JSON that DeepOpinion adds to the input data.

Fields to Set

If you select Mode > Manual Mapping, you can configure the fields by dragging and dropping values from INPUT.

The default behavior when you drag a value is:

  • DeepOpinion sets the value's name as the field name.
  • The field value contains an expression which accesses the value.

If you don't want to use expressions:

  1. Hover over a field. DeepOpinion displays the Fixed | Expressions toggle.
  2. Select Fixed.

You can do this for both the name and value of the field.

A gif showing the drag and drop action, as well as changing a field to fixed

Keep Only Set Fields

Enable this to discard any input data that you don't use in Fields to Set.

Include in Output

Choose which input data to include in the node's output data.

Node options

Use these options to customize the behavior of the node.

Include Binary Data

If the input data includes binary data, choose whether to include it in the Edit Fields node's output data.

Ignore Type Conversion Errors

Manual Mapping only.

Enabling this allows DeepOpinion to ignore some data type errors when mapping fields.

Support Dot Notation

By default, DeepOpinion supports dot notation.

For example, when using manual mapping, the node follows the dot notation for the Name field. That means if you set the name in the Name field as number.one and the value in the Value field as 20, the resulting JSON is:

{ "number": { "one": 20} }

You can prevent this behavior by selecting Add Option > Support Dot Notation, and setting the Dot Notion field to off. Now the resulting JSON is:

{ "number.one": 20 }

Arrays and expressions in JSON Output mode

You can use arrays and expressions when creating your JSON Output.

For example, given this input data generated by the Customer Datastore node:

[
{
"id": "23423532",
"name": "Jay Gatsby",
"email": "[email protected]",
"notes": "Keeps asking about a green light??",
"country": "US",
"created": "1925-04-10"
},
{
"id": "23423533",
"name": "José Arcadio Buendía",
"email": "[email protected]",
"notes": "Lots of people named after him. Very confusing",
"country": "CO",
"created": "1967-05-05"
},
{
"id": "23423534",
"name": "Max Sendak",
"email": "[email protected]",
"notes": "Keeps rolling his terrible eyes",
"country": "US",
"created": "1963-04-09"
},
{
"id": "23423535",
"name": "Zaphod Beeblebrox",
"email": "[email protected]",
"notes": "Felt like I was talking to more than one person",
"country": null,
"created": "1979-10-12"
},
{
"id": "23423536",
"name": "Edmund Pevensie",
"email": "[email protected]",
"notes": "Passionate sailor",
"country": "UK",
"created": "1950-10-16"
}
]

Add the following JSON in the JSON Output field, with Include in Output set to All Input Fields:

{
"newKey": "new value",
"array": [{{ $json.id }},"{{ $json.name }}"],
"object": {
"innerKey1": "new value",
"innerKey2": "{{ $json.id }}",
"innerKey3": "{{ $json.name }}",
}
}

You get this output:

[
{
"id": "23423532",
"name": "Jay Gatsby",
"email": "[email protected]",
"notes": "Keeps asking about a green light??",
"country": "US",
"created": "1925-04-10",
"newKey": "new value",
"array": [
23423532,
"Jay Gatsby"
],
"object": {
"innerKey1": "new value",
"innerKey2": "23423532",
"innerKey3": "Jay Gatsby"
}
},
{
"id": "23423533",
"name": "José Arcadio Buendía",
"email": "[email protected]",
"notes": "Lots of people named after him. Very confusing",
"country": "CO",
"created": "1967-05-05",
"newKey": "new value",
"array": [
23423533,
"José Arcadio Buendía"
],
"object": {
"innerKey1": "new value",
"innerKey2": "23423533",
"innerKey3": "José Arcadio Buendía"
}
},
{
"id": "23423534",
"name": "Max Sendak",
"email": "[email protected]",
"notes": "Keeps rolling his terrible eyes",
"country": "US",
"created": "1963-04-09",
"newKey": "new value",
"array": [
23423534,
"Max Sendak"
],
"object": {
"innerKey1": "new value",
"innerKey2": "23423534",
"innerKey3": "Max Sendak"
}
},
{
"id": "23423535",
"name": "Zaphod Beeblebrox",
"email": "[email protected]",
"notes": "Felt like I was talking to more than one person",
"country": null,
"created": "1979-10-12",
"newKey": "new value",
"array": [
23423535,
"Zaphod Beeblebrox"
],
"object": {
"innerKey1": "new value",
"innerKey2": "23423535",
"innerKey3": "Zaphod Beeblebrox"
}
},
{
"id": "23423536",
"name": "Edmund Pevensie",
"email": "[email protected]",
"notes": "Passionate sailor",
"country": "UK",
"created": "1950-10-16",
"newKey": "new value",
"array": [
23423536,
"Edmund Pevensie"
],
"object": {
"innerKey1": "new value",
"innerKey2": "23423536",
"innerKey3": "Edmund Pevensie"
}
}
]