# Automation with datafiles

**URL:** <https://community.postman.com/t/automation-with-datafiles/3440>\
**Category:** Help Hub\
**Tags:** newman-project, automation, collections, csvdatafile\
**Created:** [November 29, 2018, 6:34pm UTC](https://community.postman.com/t/automation-with-datafiles/3440 "2018-11-29T18:34:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![C\_Tag\_Trapeze](https://avatars.discourse-cdn.com/v4/letter/c/90db22/32.png) [@C\_Tag\_Trapeze](https://community.postman.com/u/C_Tag_Trapeze)\
**Post date:** [November 29, 2018, 6:34pm UTC](https://community.postman.com/t/automation-with-datafiles/3440/1 "2018-11-29T18:34:22Z")

</div>

> **Archived topic — this may be out of date.**  
> Newman has been replaced by the **[Postman CLI](https://learning.postman.com/docs/postman-cli/postman-cli-overview/)**, Postman’s official, signed command-line tool. It runs collections as Newman did, and also lints API specs, runs mocks and monitors, and syncs local files with Postman from your terminal, CI/CD pipeline or coding agent.  
> Working with an AI coding agent? The [Postman plugin](https://github.com/postmanlabs/postman-plugin) lets agents in Claude Code, Cursor, Codex and others design, mock, test and ship APIs with Postman.  
> For current help, see the [Postman docs](https://learning.postman.com/docs/), try the free [Postman tools](https://www.postman.com/tools) (no account needed), or join us on [Discord](https://discord.gg/58aNNsRBGR).

Hi all,

I was wondering if Newman is able to use a parsed JSON response to load a data file to be used. My scenario currently involves using 3-5 different data files that can change based on the JSON response. Is there a method to parse the JSON to set that response to an Env var then use that Env Var as input to use a different CSV.

My scenario is using CSV’s that are labeled with a series of numbers, each CSV corresponds to a specific path to take (point A to Point B, typically 600+ LAT,LON coordinate pairs ). This is to simulate driving a predetermined path. After each coordinate pair is sent as a location i have a status request that sends as well and this gives me information reagrding where i’m at, and other general information including the path that I am currently on. At the end the path a value in the status request will change to a new path.

I would like to be able to parse the JSON value from the Status Request for this Path then load the file with the same name. Is this possible?

---

<div class="post-metadata">

**Author:** ![tmccann](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/tmccann/32/3550_2.png) [@tmccann](https://community.postman.com/u/tmccann)\
**Post date:** [November 29, 2018, 8:00pm UTC](https://community.postman.com/t/automation-with-datafiles/3440/2 "2018-11-29T20:00:02Z")

</div>

@C_Tag_Trapeze I am sure this would be entirely possible but I think you would need to do most of this work in a shell script of some sort to process things and then pass that value into the newman command line.

I cant think of a way you would be able to do this otherwise.

---

<div class="post-metadata">

**Author:** ![C\_Tag\_Trapeze](https://avatars.discourse-cdn.com/v4/letter/c/90db22/32.png) [@C\_Tag\_Trapeze](https://community.postman.com/u/C_Tag_Trapeze)\
**Post date:** [November 30, 2018, 3:45pm UTC](https://community.postman.com/t/automation-with-datafiles/3440/3 "2018-11-30T15:45:12Z")

</div>

Thanks, we were assuming this to be the only method. Just kind of hoping to not have to write and debug a shell script if PM had an inherent method to perform these actions.
