githubEdit

Data Mapper

Transform and map data between flow steps in Fastn. Route outputs from connectors, variables, and secrets into the format your next step needs.

The Data Mapper component lets you reshape and route data between flow steps. You can map outputs from previous steps, variables, or secrets into a new object structure that downstream steps require. Unlike the Converter, which changes data formats (for example, JSON to CSV), the Data Mapper restructures fields within the same format — renaming keys, combining values, or extracting nested properties.

Data Mapper component in the Fastn flow editor

For example,

This example mapping step titled "Content" can be used when you need to map data (usually text) from a previous step and ensure it's passed forward as a string.

Content mapping step with res field mapped from ChatGPT connector output

Params mapped in configuration

  • Here, res is the variable inside the Content step.

  • It is mapped directly from the ChatGPT connector's output: steps.chatGPT.output.choices[0].message.content.

  • The mapped value must always resolve to a string type, since Content steps are designed to pass textual data forward.

Example

  • Pass the response from ChatGPT as plain text into another step (e.g., a database insert, a file generator, or a Slack notification).

To make this easier, the AI agent in the top-right corner offers smart suggestions for mapping your data. It helps you quickly pull values from previous steps or any flow data. You can simply drag and drop items like Headers, Inputs, Steps, Secrets, or App Config into the field you want to configure; making your mappings faster, more accurate, and less manual.

AI agent suggestions panel with drag-and-drop mapping for headers, inputs, steps, and secrets

You can map values either in JSON, JavaScript, C#, Form, or Python Lambda.

Example JSON Mapping

You can learn more about Data Mapping in Flows herearrow-up-right.

Last updated

Was this helpful?