I need to create a question in google forms with images attached to the question options. to do this I need to pass on an “options” array to google forms, the array should contain the name of the question option and the image url.
This is the array taken from the API response as as example.
“options”: [
{
“value”: “NAME_1”,
“image”: {
“contentUri”: “IMAGE_1_ULR”,
“properties”: {
“alignment”: “LEFT”,
“width”: 260
}
}
},
{
“value”: “NAME_2”,
“image”: {
“contentUri”: “IMAGE_2_ULR”,
“properties”: {
“alignment”: “LEFT”,
“width”: 260
}
}
},
{
“value”: “NAME_3”,
“image”: {
“contentUri”: “IMAGE_3_ULR”,
“properties”: {
“alignment”: “LEFT”,
“width”: 260
}
}
}
]
I’m grabbing the data to pass from a notion DB. What I tried was:
1-Notion API call to grab the data from DB
2-Iterator to get each result individually
3-text aggregator to make the collections separated by “,”
4-set variable to put brackets around the result from the text aggregator.
5-Update a form I map the variable on the options field
in the 4th block I also tried those two:
[{{3.text}}]
“options”:[{{3.text}}]
This is the error I get:
Validation failed for 1 parameter(s).
- Invalid collection in parameter ‘options’.
I tried the same thing with the aggregate to json module and it did not work either.
I get a different error using json, the object passed is called JSON string and the error says it did not find the key JSON.