Encode (JSON to GCF)
AI-generatedSummary
Convert JSON to GCF format and store the result in a configurable output field.
Inputs
- inputData (required) — The JSON data to encode to GCF; can be a literal string, a field reference (e.g.,
{{ $json }}) or a path expression. - outputField (required) — Name of the field in the node's output where the converted GCF string will be placed.
- additionalOptions — Optional settings such as 'Include Token Metrics' to embed token comparison data in the output.
Output shape
Object containing the converted GCF string under the configured outputField, optionally with a tokenMetrics sub‑object.
The operation emits a single JSON object per input item; tokenMetrics is added only when Include Token Metrics is enabled.
Examples
Example 1: Encode incoming JSON payload and write result to field 'gcfData'
operation=encode, inputData={{ $json }}, outputField=gcfData, additionalOptions={includeTokenMetrics:true}