# How we can use faker in Postman v 7.2

**URL:** <https://community.postman.com/t/how-we-can-use-faker-in-postman-v-7-2/5916>\
**Category:** Help Hub\
**Tags:** data\
**Created:** [June 14, 2019, 1:37pm UTC](https://community.postman.com/t/how-we-can-use-faker-in-postman-v-7-2/5916 "2019-06-14T13:37:06Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![christianbaumann](https://avatars.discourse-cdn.com/v4/letter/c/e19b73/32.png) [@christianbaumann](https://community.postman.com/u/christianbaumann)\
**Post date:** [July 29, 2020, 1:04pm UTC](https://community.postman.com/t/how-we-can-use-faker-in-postman-v-7-2/5916/8 "2020-07-29T13:04:01Z")

</div>

Hi all,

a bit late to the party, but since I found a working solution, I wanted to share with you.

The `faker.js` file needs to be on a webserver accessible by postman.  
So what I did is to create a public Bitbucket repo (guess github would work as well), and put all files and subdirectories from [https://github.com/Marak/faker.js/tree/master/build/build](https://github.com/Marak/faker.js/tree/master/build/build) into it.  
I then viewed the faker.js file in RAW mode in Bitbucket and copied the URL, this is what I will be using as `faker_js_url` in the Postman pre-request-sccript.

And this is a snippet to be used in the pre-request-Script, of course you can easily save the generated values in an environment variable for later re-use:

```
pm.sendRequest(faker_js_url, (err, res) => {
const faker = res.text();
(new Function(faker))();
    var name = window.faker.name.findName();
    console.log (name);
});

```

(Inspired by [Adding external libraries to postman](https://community.postman.com/t/adding-external-libraries-to-postman/1971/4))

What I´m currently struggling with, is setting the faker locale.  
Any help with that is much appreciated.

---

_[View the full topic](https://community.postman.com/t/how-we-can-use-faker-in-postman-v-7-2/5916)._
