Description
Shape an object by setting, renaming and removing MULTIPLE fields in one node — the n8n Set/Edit Fields equivalent, in pure JavaScript with dot-path support for nested fields.
action_set_fields · action · Data & Transform · Available · v1.0.0
Shape an object by setting, renaming and removing MULTIPLE fields in one node — the n8n Set/Edit Fields equivalent, in pure JavaScript with dot-path support for nested fields.
Fields shown in the editor when configuring the node. Generated directly from the NodeDefconfigFields.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
sourceOggetto sorgente | expression | no | input | L'oggetto da modellare. Vuoto = usa l'input del nodo. |
assignmentsImposta campi (percorso → valore) | key-value | no | — | Ogni riga crea/sovrascrive un campo (dot-path supportato). Es. cliente.stato → attivo. |
coerceTypesConverti tipi automaticamente | boolean | no | true | "42"→numero, "true"→booleano, JSON→oggetto. Disattiva per tenere tutto come stringa. |
renameFieldsRinomina campi (da → a) | key-value | no | — | Sposta un campo da un percorso a un altro. Es. Email → email. |
removeFieldsRimuovi campi | chip-list | no | — | Percorsi dei campi da eliminare (separati da virgola). |
keepOnlyTieni solo i campi impostati | boolean | no | — | Parte da un oggetto vuoto: il risultato contiene SOLO i campi che imposti (whitelist). |
Fields available to downstream nodes via $node.<alias>.json.<field>:
defaultJSON snippet of the node as it appears in the workflow. Values are derived fromdefaultValue and from required parameters.
{
"id": "node-action_set_fields-1",
"defId": "action_set_fields",
"label": "Set Fields",
"config": {
"source": "input",
"coerceTypes": true
}
}Available now on all FlowForge plans. Try it free without a credit card.
Start freeBrowse all nodes