How to Handle Raw JSON Response in Zapier Instead of Auto-Formatted Fields

I’m struggling with a Zapier workflow where I need to process raw JSON data but Zapier keeps converting it into separate fields automatically.

My Setup:
I’m making an API call to get data and want to pass the complete JSON response to the next step for custom processing. However, Zapier transforms my response into individual fields instead of keeping it as structured JSON.

API Request Code:

var requestHeaders = {
    'Authorization': 'Token xyz123',
    'Content-Type': 'application/json'
};
var config = {
  method: 'GET',
  headers: requestHeaders
};

fetch('api.example.com/data', config)
  .then(function(response) {
    return response.json();
  })
  .then(function (data) {
    callback(null, data)
  })
  .catch(callback);

API Returns This:

{
  "users": [
    {"username": "alice", "status": "active"},
    {"username": "charlie", "status": "inactive"},
    {"username": "diana", "status": "active"},
    {"username": "frank", "status": "active"}
  ]
}

But Zapier Shows:

input.username === alice,charlie,diana
input.status === active, inactive, active

What I Need:
I want to filter the original JSON structure like this:

users.filter(function(user){
  return user.status === 'active'
})

How can I prevent Zapier from auto-formatting my response and get the raw JSON instead? I’ve tried different callback approaches but Zapier ignores them and still processes the data its own way.

try wrapping your entire response in a single field and use the ‘raw’ output mode if your webhook supports it. some apis let you bypass zapiers parsing by adding a special header or parameter. alternatively, you could stringify just the users array part like {users_raw: JSON.stringify(data.users)} then parse it later for filtering

You’re hitting one of Zapier’s core limitations where it flattens nested JSON structures by default. The trick is to stringify your JSON response before returning it to prevent Zapier’s automatic parsing. Modify your callback to wrap the data in JSON.stringify() like this:

callback(null, {rawJson: JSON.stringify(data)});

This way Zapier will treat it as a simple string field instead of trying to parse the structure. In your next step, you can access the complete JSON string via input.rawJson and then use JSON.parse() to convert it back to an object for your filtering operations. I’ve used this approach multiple times when dealing with complex API responses that needed custom processing rather than Zapier’s standard field mapping.

Another approach that works well is returning the JSON nested within a wrapper object that Zapier won’t automatically flatten. Instead of returning the data directly, structure your callback like this:

callback(null, {
  payload: data,
  timestamp: new Date().toISOString()
});

This prevents Zapier from breaking apart your users array since it becomes a property of a parent object. You can then access input.payload in subsequent steps and work with the original JSON structure intact. The timestamp field helps ensure Zapier sees this as a valid response object. I’ve found this method particularly useful when the JSON structure varies between API calls, as it preserves the original format without requiring string manipulation.