> ## Documentation Index
> Fetch the complete documentation index at: https://chatbotx.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Data From JSON

> Extract a value from JSON data in a ChatbotX Flow and use it in the next step of your automation.

**Get Data From JSON** extracts a value from JSON data available in your Flow. Use it after an integration or an earlier Flow step returns JSON and you need one field for the next action.

For example, an external system returns a customer's membership level, order status, or product name in JSON. This action lets the Flow pick the needed value instead of using the entire response.

## Add Get Data From JSON to a Flow

<Steps>
  <Step title="Open the Flow">
    Open the Flow where the JSON data is available.
  </Step>

  <Step title="Add a Perform Action node">
    Add a **Perform Action** node at the point where the Flow needs to read a value from JSON.
  </Step>

  <Step title="Choose Get Data From JSON">
    Open the node, click **Create**, then select **Tools > Get Data From JSON**.

    <Frame>
      <img src="https://mintcdn.com/chatbotx/GMkdbZ1eGBhC4VPX/images/select_get_data_from_json_in_tools_menu.png?fit=max&auto=format&n=GMkdbZ1eGBhC4VPX&q=85&s=090e0c8e4e975f58c101364100936607" alt="Select Get Data From Json In Tools Menu" width="2862" height="1885" data-path="images/select_get_data_from_json_in_tools_menu.png" />
    </Frame>
  </Step>

  <Step title="Configure the JSON value">
    Select the **Input Custom Field** that stores the JSON data. In **Output Custom Field**, enter the JSON path and select the Custom Field that will receive the extracted value. Click **Add** when you need another mapping, then click **Save**.
  </Step>
</Steps>

<Frame>
  <img src="https://mintcdn.com/chatbotx/GMkdbZ1eGBhC4VPX/images/get_data_from_json_action.png?fit=max&auto=format&n=GMkdbZ1eGBhC4VPX&q=85&s=a92501dfd641501e1a3377fc13d41783" alt="Get Data From Json Action" width="2861" height="1890" data-path="images/get_data_from_json_action.png" />
</Frame>

## Map JSON data to Custom Fields

The **Input Custom Field** must contain the JSON data that the Action will read. For every value you need, add one mapping:

1. Enter the JSON path in the first field under **Output Custom Field**.
2. Select the destination Custom Field in the second field.
3. Click **Add** to map another value, or click **Save** when the mapping is complete.

Use the property name from the JSON data. For nested data, follow the structure until you reach the value you need.

```json theme={null}
{
  "customer": {
    "name": "Mai",
    "membership": "Gold"
  }
}
```

In this example, use the `membership` value when the Flow needs to continue differently for Gold members.

## Example: personalize a membership message

An earlier step in the Flow receives customer data in JSON. **Get Data From JSON** extracts the membership value, then the Flow uses that value in a Condition or message.

<Note>
  Check the exact property names in the JSON response. A property name that does not exist cannot return a value to the Flow.
</Note>
