Hi there,
converting JSON to .csv seems to be a lot less easier than assumed.
Null values, “weird” formatings, complex types, … reality proves there is quite some things to consider.
There is a nice javascript function doing most of the magic within google sheets:
- this delivers .csv data from nearly any json API directly)
- I believe they modified this script to get there.
- Here is the related site/guide they provide.
Does anyone in this community got the skills to create such a function in n8n - or a module?
Mock APIs:
- Complex: https://api.mocki.io/v1/6ae23b5b (example I took from brandfetch and made available using mocki to avoid my API limits get killed )
- Simple: https://my.api.mockaroo.com/profile.json?key=57cca900
UseCases:
- Taking shopData from shop X coming in as json to update shopdata from shop Y (requiring .csv and with no further (or at least easier) roundtrip through other modules
- generating .csv from orders to import into other tools (e.g. for tax,…)
- Gathering/merging Data (e.g. from a webhook on order) to directly feed a spreadsheet for further magic
If I had the skills, I´d carve out time to do it myself.