Skip to content
Agentic Workflowdocs
v0.8.2Install free

nodes / builtin / datatransformation

Rename Keys

Rename and move keys on an item

Data ExtensionWeb app

Rename fields on your items, one by one or all at once with a pattern, without touching their values.

Rename Keys changes field names on every incoming item. It has two modes:

  • Named keys: you list each rename as From and To. Dots reach nested fields, and a dot path in To moves the value there. user.firstName to first_name both renames the field and lifts it to the top level.
  • Pattern: a regular expression is run on every field name and the matched part is replaced with Replacement. ^data_ with an empty replacement strips that prefix from every field.

Values never change, only names and positions. A field that an item does not have is skipped, not treated as an error. Renames are worked out against the original item, so swapping a and b keeps both values.

  • Fix one badly named field on a large scraped object without rebuilding the rest.
  • Strip or change a prefix on every field, such as data_ or prop_.
  • Match the field names another service expects before you send data to it.
  • To add, change or remove fields, use Edit Fields. To keep only one field, use Pick Field.
SettingTypeWhat it does
Mode ChoiceRename keys you name, or every key matching a pattern. Options: Named keys, Pattern. Default: Named keys
Renames List of entriesKeys to rename, and what to rename them to.
Renames (each entry) › From (required)TextCurrent key. Dots address nested keys.
Renames (each entry) › To (required)TextNew key. Dots move the value to a different place.
Pattern TextRegular expression matched against each key name.
Replacement TextWhat the matched part becomes. Use $1 for groups. Empty removes it.
Ignore Case ToggleMatch the pattern regardless of case. Default: Off
Apply To Nested Keys ToggleRewrite keys inside nested objects too. Default: Off
On Collision ChoiceWhat to do when the new name is already taken. Options: Fail, Overwrite, Keep the existing key. Default: Fail
  • Pattern replaces every match inside a name, not just the first. If the result would be an empty name, the field keeps its old name.
  • Apply To Nested Keys is for Pattern mode. Off, only top-level names change. On, names at every depth change, including inside lists of objects.
  • On Collision decides what happens when the new name already exists: Fail stops the run (the default, so no value is lost by accident), Overwrite replaces the existing value, and Keep the existing key skips that rename.
  • Output

The same items with the new field names. A single incoming item comes out as a single item; a list comes out as a list of the same length.

None. This node needs no connection and has no slots for other nodes.

  1. HTML Extract returns items with fields data_title, data_price and data_url.
  2. Rename Keys with Mode Pattern, Pattern ^data_ and an empty Replacement. The fields become title, price and url.
  3. A second Rename Keys with Mode Named keys and one rename, From url To link, to match your sheet’s column.
  4. A Google Sheets node (Data, Append Values into Worksheet) adds the items to your sheet.
  • “Renaming “…” to “…” would overwrite a value that is already there.“ The new name is already used on the item. Pick another name, or set On Collision to Overwrite or Keep the existing key.
  • “Renaming “…” to “…” would overwrite a key of that name produced by another rename.“ In Pattern mode, two names become the same, for example data_id and id after stripping data_. Make the pattern more specific, or change On Collision.
  • “No renames configured. Add at least one, or switch to the Pattern mode.” Named keys mode needs at least one rename with both From and To filled.
  • “The Pattern mode needs a pattern. Add one, for example ^data_ .” Fill Pattern.
  • A field did not change. Names are case sensitive: turn on Ignore Case in Pattern mode, or check the spelling in From. For nested fields in Pattern mode, turn on Apply To Nested Keys.
Edit page

Last updated:

Was this page useful?
Ask Aria about Rename Keys