# Automate post requests with a json body

**URL:** <https://community.postman.com/t/automate-post-requests-with-a-json-body/28181>\
**Category:** Help Hub\
**Tags:** monitors, collections, json\
**Created:** [September 27, 2021, 6:40pm UTC](https://community.postman.com/t/automate-post-requests-with-a-json-body/28181 "2021-09-27T18:40:24Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![gemici](https://avatars.discourse-cdn.com/v4/letter/g/7ab992/32.png) [@gemici](https://community.postman.com/u/gemici)\
**Post date:** [September 27, 2021, 6:40pm UTC](https://community.postman.com/t/automate-post-requests-with-a-json-body/28181/1 "2021-09-27T18:40:24Z")

</div>

I have thousands of different json text documents. I make a post request with a json body every 45 minutes and I wondered if I can make this automated? I searched online and it looks like it can be done with Collections and Monitors? I’m not sure.  
I tried to create collections and monitors on postman but I don’t know how postman is going to get json text documents from my pc.

Can someone give me some information about this please?

---

<div class="post-metadata">

**Author:** ![hannah.neil](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/hannah.neil/32/4477_2.png) [@hannah.neil](https://community.postman.com/u/hannah.neil)\
**Post date:** [September 27, 2021, 10:57pm UTC](https://community.postman.com/t/automate-post-requests-with-a-json-body/28181/2 "2021-09-27T22:57:55Z")

</div>

Hi @gemici - welcome to the Postman community 🚀

How are you currently generating those json text documents?

---

<div class="post-metadata">

**Author:** ![praveendvd](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/praveendvd/32/6796_2.png) [@praveendvd](https://community.postman.com/u/praveendvd)\
**Post date:** [September 28, 2021, 7:29am UTC](https://community.postman.com/t/automate-post-requests-with-a-json-body/28181/3 "2021-09-28T07:29:32Z")

</div>

🎉🎉🎉😍 If you are using monitor , then you can achieve this by two ways:

1. save json files to github or any remote system . Then access it through api
2. store the contents as environment variable

if you are not using monitor , then you can use windows task scheduler or something , and for each iteration read a different csv.

```auto
> $a= Get-Content -raw .\1.csv
> newman run .\test.postman_collection.json -e .\test.postman_environment.json -k -r "cli,htmlextra" --env-var data=$a

```

---

<div class="post-metadata">

**Author:** ![gemici](https://avatars.discourse-cdn.com/v4/letter/g/7ab992/32.png) [@gemici](https://community.postman.com/u/gemici)\
**Post date:** [September 28, 2021, 8:27am UTC](https://community.postman.com/t/automate-post-requests-with-a-json-body/28181/4 "2021-09-28T08:27:47Z")

</div>

> [@hannah.neil](#):
>
> How are you currently generating those json text documents?

They were originally excel files. Json text documents are being generated by a macro that formats excel to json.

---

<div class="post-metadata">

**Author:** ![gemici](https://avatars.discourse-cdn.com/v4/letter/g/7ab992/32.png) [@gemici](https://community.postman.com/u/gemici)\
**Post date:** [September 28, 2021, 11:55am UTC](https://community.postman.com/t/automate-post-requests-with-a-json-body/28181/5 "2021-09-28T11:55:33Z")

</div>

> [@praveendvd](#):
>
> 1. save json files to github or any remote system . Then access it through api

Am I going to add an integration between postman and GitHub?

> [@praveendvd](#):
>
> ```auto
> > $a= Get-Content -raw .\1.csv
> > newman run .\test.postman_collection.json -e .\test.postman_environment.json -k -r "cli,htmlextra" --env-var data=$a
> 
> ```

And can you tell me what this is for?

---

<div class="post-metadata">

**Author:** ![praveendvd](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/praveendvd/32/6796_2.png) [@praveendvd](https://community.postman.com/u/praveendvd)\
**Post date:** [September 29, 2021, 6:23am UTC](https://community.postman.com/t/automate-post-requests-with-a-json-body/28181/6 "2021-09-29T06:23:37Z")

</div>

No , you are just making the file available online instead of from local file system

---

<div class="post-metadata">

**Author:** ![kitty-garrison](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/kitty-garrison/32/27117_2.png) [@kitty-garrison](https://community.postman.com/u/kitty-garrison)\
**Post date:** [September 29, 2021, 4:46pm UTC](https://community.postman.com/t/automate-post-requests-with-a-json-body/28181/7 "2021-09-29T16:46:49Z")

</div>

If you were able to concatenate the json files together into one json file you could use the collection runner to run each of the object of the base array with a 45 min delay.
