External JSON
You can use this type of Parameter (called Custom Variable in older guides) to access a value from an external JSON file. If you want to use your own JSON file from within your domain, it needs to be whitelisted from our end so Machinations can access the file securely. Please contact customer service who can help you with that.


Name – You need to give the variable a name to reference it in the Formula field of nodes and connections throughout your diagrams.
URL – Is the location of your JSON file (e.g.: https://api.jsonbin.io/v3/b/64b52aa69d312622a380c500).
Path value – This is the path of the value you want to retrieve from the JSON file (e.g.: playtime_avg)
If the content of your JSON file has an object property like in the following example:
{"someGame":{"playtime_avg":[30,60,15o,200],"playerHealth":33}}
the correct path for retrieving the value for playerHealth is someGame.playerHealth
The Value box next to Path value shows the value the app reads from the path you typed.
To prevent CORS issues, ensure the server configuration supports that the data is accessible by another domain.
Description – Describe the purpose or origin of the variable, no need to write a book though.
Want to try it yourself? No problem! We have whitelisted jsonbin.io so you can get started right away. All you need to do is to create a free account on their website and create your own JSON file.
Reading values from a JSON file
- Open the Data tab at the top of the editor and press JSON under Add connector.
- Give it a proper name.
- Add the path to the JSON file. In this example, we are using https://api.jsonbin.io/v3/b/64b52aa69d312622a380c500.
- To read any value, specify the element you are looking for. For example, let’s look at the playtime_avg, which contains an array. The path value needs to be record.playtime_avg. This will return the complete array.
- The Value box shows what the app read from your file, so you can check the path before you press Add.
- You should tick the box “Use in current diagram as well” if you are creating this variable as a Private or Team Variable, so you can immediately use it in your current diagram.
If the element in the JSON file is an Array it and you don’t specify which of the values you want to retrieve, then the variable will return the complete Array. In the above case [30,60,150]. You can find out more about how to work with Arrays in our documentation article Using Arrays.
If the element you are looking at only contains one value, then the number will be returned as such.
Remember that if you are hosting the JSON file on your server, its URL must be whitelisted by Machinations before you can fetch data from it. Please get in touch with us using the chat option in the bottom left corner or send us an email support@machinations.io.