Hey fellow makers,
My automation is based around a an API call made to a recipe generator and stores it in a google sheet cell, in which I have used the HTTP module to make a GET call to the API with the following parameters:
timeFrame - week
targetCalories - <caloriemap
diet - <dietmap
exclude <foodallergymap
The output is a JSON string, and my main goal is to have it formatted and easily readable. The next step that I took with JSON string output was to JSON parse it, so instead of parsing it with a separate JSON parser module, I parsed it within the HTTP module as there is an option for it. Here is the output:
I was one step closer to my goal in order for me to have a formatted output in my google sheet, I done some research online and came to the conclusion that once a JSON has been parsed it needs to be reiterated using the iterator module in order for you to map certain values in a string output or so. I click the iterator module, and in the array I mapped it to “week” the output seemed successful is what I thought:
Then when I went to go create a final template for the formatted output and map the values, the iterator only showed two values which was “Total number of bundles” and “Bundle order position”. There was a solution to this issue on the iterator info/doc on make.com which was to do with the data structure in the JSON parser, I then attempted to try a separate JSON parser and create data structure which still did not work, I tried fiddling with values etc, still the same result.
Although when I map the array parameter in the iterator to “meals” of one of the days, it returned the single values correctly, although I was far from my end goal because I need to get the single values of all “meals” and “nutrients” from Monday to Sunday
- I tried ChatGPT to format the JSON string raw, but it was to much data to analyse at once and would cut the response short
- I also tried to use multiple iterators to see if that would work but ended up taking 1000s of my operations
I’ve been stuck for multiple hours now, yes this is the reality of creating automations sometimes and i’m well aware, I just need a hand out of the mud.