githubEdit

Data Mapper

This lets you transform data between steps. You can map data from previous steps, variables, or secrets into a new object format you need later in the flow.

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?