Adapt "Create a JSON" with multiple blocks

Hi,

I’ve been struggling with a JSON structure since this morning…

The objective of my scenario is to analyze content in Gemini to return a value from a list.

My scenario is like this:

  1. (Trigger) Webhook detecting the creation of a new recording in the Airfocus software
  2. (Action) “Parse JSON” to pass on a JSON structure
  3. Gemini: for content analysis
  4. Create JSON: to generate the JSON to send
  5. “Make an HTTP request”: to make a call to the Airfocus API and update the corresponding field

I can do the whole scenario well when the JSON sent in step 5 is simple.

But I’m stuck on the Description field: it’s a text area that can contain an indeterminate number of blocks with rich text.

It works when I have a simple block of text in Description. But I don’t know how to deal with the indeterminate number of blocks.

I also would like to ignore empty value, because I don’t want to update with ‘null’ field that are not populated in JSON.

Thank you for your help.

Here is the JSON structure for this field, with all possible block types:

"description": {
	"blocks": [
		{
			"level": 1,
			"content": [
				{
					"content": "Titre 1",
					"type": "text"
				}
			],
			"type": "headline"
		},
		{
			"level": 2,
			"content": [
				{
					"content": "Titre 2",
					"type": "text"
				}
			],
			"type": "headline"
		},
		{
			"level": 3,
			"content": [
				{
					"content": "Titre 3",
					"type": "text"
				}
			],
			"type": "headline"
		},
		{
			"ordered": true,
			"items": [
				{
					"content": [
					{
						"content": [
							{
								"content": "Liste numéroté",
								"type": "text"
							}
						],
						"type": "paragraph"
					}
					]
				},
				{
					"content": [
						{
							"content": [
								{
									"content": "Liste numéroté",
									"type": "text"
								}
							],
							"type": "paragraph"
						}
					]
				}
			],
			"type": "list"
		},
		{
			"ordered": false,
			"items": [
				{
					"content": [
						{
							"content": [
								{
									"content": "Liste à puce",
									"type": "text"
								}
							],
							"type": "paragraph"
						}
					]
				},
				{
					"content": [
						{
							"content": [
								{
									"content": "Liste à puce",
									"type": "text"
								}
							],
							"type": "paragraph"
						}
					]
				}
			],
			"type": "list"
		},
		{
			"content": [
				{
					"content": "Texte simple",
					"type": "text"
				}
			],
			"type": "paragraph"
		},
		{
			"content": [
				{
					"content": [
						{
							"content": "Texte gras",
							"type": "text"
						}
					],
					"type": "bold"
				}
			],
			"type": "paragraph"
		},
		{
			"content": [
				{
					"content": [
						{
							"content": "Texte souligné",
							"type": "text"
						}
					],
					"type": "underline"
				}
			],
			"type": "paragraph"
		},
		{
			"content": [
				{
					"content": [
						{
							"content": "Texte italique",
							"type": "text"
						}
					],
					"type": "italic"
				}
			],
			"type": "paragraph"
		},
		{
			"content": [
				{
					"content": "[ ] Checklist",
					"type": "text"
				}
			],
			"type": "paragraph"
		},
		{
			"content": [
				{
					"content": "[ ] Checklist",
					"type": "text"
				}
			],
			"type": "paragraph"
		},
		{
			"content": [
				{
					"content": "Citation\nCitation",
					"type": "text"
				}
			],
			"type": "blockquote"
		},
		{
			"content": "Code block",
			"type": "code"
		},
		{
			"content": [
				{
					"userId": "0a7f6eb7-d782-4d3a-930c-746a30a825f4",
					"type": "mention"
				}
			],
			"type": "paragraph"
		},
		{
			"content": [
				{
					"url": "https://incotec.airfocus.com/w/7bbd45f3-3c97-403f-9c1b-3db7b55051c6/items/8662c185-14b1-4a9a-8bc0-eabb09c49b30",
					"content": [
						{
							"content": "airfocus item",
							"type": "text"
						}
					],
					"type": "link"
				},
				{
					"content": " ",
					"type": "text"
				}
			],
			"type": "paragraph"
		},
		{
			"attachmentId": "f96b5515-7c3f-4d41-a765-0dd635204df4",
			"width": 985,
			"contentType": "image/png",
			"caption": "1.png",
			"type": "attachment"
		},
		{
			"attachmentId": "eeb29816-6a5e-408b-92bf-9c39bb42f6b9",
			"contentType": "application/octet-stream",
			"caption": "INCOVAR+V2-Synthese_annuelle.docx",
			"type": "attachment"
		},
		{
			"content": [
				{
					"url": "https://zeroheight.com/47157657b/p/435cc9-echo-design-system",
					"content": [
						{
							"content": "Echo Zeroheight",
							"type": "text"
						}
					],
					"type": "link"
				}
			],
			"type": "paragraph"
		}
	],
	"richText": true
}

Webhook output :

{"event":{"id":"dec7ba31-6414-4a08-8208-05f46e7f6f07","initiator":{"userId":"0a7f6eb7-d782-4d3a-930c-746a30a825f4"},"data":{"itemId":"00f50769-75ef-473b-8f1e-6f7cb42468f0","status":{"next":"988fcefb-e684-4ece-9a40-d0ce074d382f"},"color":{"next":"amber"},"assigneeUserIds":{"next":["0a7f6eb7-d782-4d3a-930c-746a30a825f4","0dae97a6-5493-422d-a8cd-87d7f9bd4a22"]},"assigneeUserGroupIds":{"next":[]},"name":{"next":"TEST RHK (copy)"},"description":{"next":{"blocks":[{"level":1,"content":[{"content":"Titre 1","type":"text"}],"type":"headline"},{"level":2,"content":[{"content":"Titre 2","type":"text"}],"type":"headline"},{"level":3,"content":[{"content":"Titre 3","type":"text"}],"type":"headline"},{"ordered":true,"items":[{"content":[{"content":[{"content":"Liste numéroté","type":"text"}],"type":"paragraph"}]},{"content":[{"content":[{"content":"Liste numéroté","type":"text"}],"type":"paragraph"}]}],"type":"list"},{"ordered":false,"items":[{"content":[{"content":[{"content":"Liste à puce","type":"text"}],"type":"paragraph"}]},{"content":[{"content":[{"content":"Liste à puce","type":"text"}],"type":"paragraph"}]}],"type":"list"},{"content":[{"content":"Texte simple","type":"text"}],"type":"paragraph"},{"content":[{"content":[{"content":"Texte gras","type":"text"}],"type":"bold"}],"type":"paragraph"},{"content":[{"content":[{"content":"Texte souligné","type":"text"}],"type":"underline"}],"type":"paragraph"},{"content":[{"content":[{"content":"Texte italique","type":"text"}],"type":"italic"}],"type":"paragraph"},{"content":[{"content":"[ ] Checklist","type":"text"}],"type":"paragraph"},{"content":[{"content":"[ ] Checklist","type":"text"}],"type":"paragraph"},{"content":[{"content":"Citation\nCitation","type":"text"}],"type":"blockquote"},{"content":"Code block","type":"code"},{"content":[{"userId":"0a7f6eb7-d782-4d3a-930c-746a30a825f4","type":"mention"}],"type":"paragraph"},{"content":[{"url":"https://incotec.airfocus.com/w/7bbd45f3-3c97-403f-9c1b-3db7b55051c6/items/8662c185-14b1-4a9a-8bc0-eabb09c49b30","content":[{"content":"airfocus item","type":"text"}],"type":"link"},{"content":" ","type":"text"}],"type":"paragraph"},{"attachmentId":"f96b5515-7c3f-4d41-a765-0dd635204df4","width":985,"contentType":"image/png","caption":"1.png","type":"attachment"},{"attachmentId":"eeb29816-6a5e-408b-92bf-9c39bb42f6b9","contentType":"application/octet-stream","caption":"INCOVAR+V2-Synthese_annuelle.docx","type":"attachment"},{"content":[{"url":"https://zeroheight.com/47157657b/p/435cc9-echo-design-system","content":[{"content":"Echo Zeroheight","type":"text"}],"type":"link"}],"type":"paragraph"}],"richText":true}},"fields":{"cd401dea-5438-43be-abf7-e94e49b6e37b":{"next":{"text":"Ceci est le lien"}},"ef6eb46f-4716-4d59-9a35-550f1aee7d4a":{"next":{"selection":["4d1d5c1c-bf70-4405-9f26-65af955af6d6"]}},"01ce4824-98e6-42fc-b3ca-d05b6aa98f49":{"next":{"selection":["09ffea7e-586e-402f-b447-7deae34ad7aa"]}},"f60329a0-4318-4de9-a3b5-c340a9ab31bc":{"next":{"selection":["67c4e29e-f5f6-41e2-88dd-63391fa8f324","79d59da3-31be-4fdf-bfc6-757c08ba9924"]}},"0fc3157b-c658-4325-ac5f-ea1295356e82":{"next":{"selection":["38c3ce2d-53bb-4575-ba77-5bb525fcf20c"]}},"e300eb7f-e6c7-4789-9e3e-c37c0d4e35c9":{"next":{"selection":["43c31da4-a12d-4e0e-bd19-bbb046ac073d","b3d44785-d9a8-4aca-a007-c20fabcbbf30"]}},"0f6c72a7-5255-4853-b36b-81d2e482a448":{"next":{"selection":["7892f73a-010b-443b-97ff-4b88259b2e8c"]}},"6cf5e58f-fb8f-4df0-bd2b-204db5a47d90":{"next":{"userIds":["0a7f6eb7-d782-4d3a-930c-746a30a825f4"],"userGroupIds":[]}},"670955af-1f55-4e12-a6c9-e43e2faca743":{"next":{"selection":["7999de80-0476-369e-8067-d2caa039bd50","8998824b-3c9b-4e45-b8e2-7d910395c50c"]}},"e1f90e90-2783-44c8-a286-8d4a93d74b62":{"next":{"selection":["0684dd84-2dc6-4989-8fa6-94241cb2e1ab"]}},"c7f583a0-583a-417b-9746-ada5160ff789":{"next":{"text":"Ceci est l'établissement"}},"f14acc12-d440-4f19-9ab1-bd5d45ee2e5d":{"next":{"selection":["1f44ceb4-6a60-4ac8-8de4-4dc09cc8892c","5c47cdba-969f-48e7-8af3-384067dfe49b"]}},"18a0f782-22cb-400d-96cf-3725c9801927":{"next":{"selection":["1be3f014-9aa2-4a01-854f-47799f626803"]}},"f86a9bb7-be26-41e7-9c43-d7e1b4ff267d":{"next":{"selection":["57d8fe40-2de8-4b11-b001-cc6cae895402","a08be32c-9b6c-4f1b-85a9-5d7eac14aed4"]}},"68a52adb-a6b8-43cf-9891-aedfd31794e1":{"next":{"selection":["56f18144-6f36-4154-80f6-ae421ebe0d3d","d5d54b09-34da-4847-8fe0-d305a85e64c1"]}},"fe30c17c-1ea3-44b5-b088-c2b7139b1653":{"next":{"selection":["71454848-bf7b-41b2-84c6-5a3d6dc0a68b","fab80cd9-7455-4092-942b-ca0049ffc93e"]}}},"archived":{"next":false},"reason":{"type":"copied"},"type":"createdItem"},"createdAt":"2025-10-31T13:54:43.777011333Z"},"embed":{"watchers":["0a7f6eb7-d782-4d3a-930c-746a30a825f4"],"teams":{"8c110fff-ae36-4569-99bb-f4c308c1ec0b":{"name":"Incotec","slug":"incotec","baseUrl":"https://…"}},"users":{"0a7f6eb7-d782-4d3a-930c-746a30a825f4":{"teamId":"8c110fff-ae36-4569-99bb-f4c308c1ec0b","fullName":"Romain"}},"userGroups":{"4e77b4f4-6642-4e99-906b-ee5d8a0e785f":{"teamId":"8c110fff-ae36-4569-99bb-f4c308c1ec0b","name":"Roadmap - Full permission"},"6c0510ec-cd30-4188-acc5-a0be68c6e71b":{"teamId":"8c110fff-ae36-4569-99bb-f4c308c1ec0b","name":"Planification - Full permission"},"02f4fb4e-aa1a-41bd-8a21-a5b6dd818971":{"teamId":"8c110fff-ae36-4569-99bb-f4c308c1ec0b","name":"Gestion des temps - Full permission"}},"workspaces":{"29172f9c-a0dc-4d81-98d8-39634e0c31d8":{"teamId":"8c110fff-ae36-4569-99bb-f4c308c1ec0b","name":"Test Romain","alias":"FD"}},"statuses":{"988fcefb-e684-4ece-9a40-d0ce074d382f":{"workspaceId":"29172f9c-a0dc-4d81-98d8-39634e0c31d8","name":"Nouveau","category":"draft","color":"daulphine"}},"items":{"00f50769-75ef-473b-8f1e-6f7cb42468f0":{"workspaceId":"29172f9c-a0dc-4d81-98d8-39634e0c31d8","statusId":"988fcefb-e684-4ece-9a40-d0ce074d382f","name":"TEST RHK (copy)","aliasNumber":310,"description":{"blocks":[{"level":1,"content":[{"content":"Titre 1","type":"text"}],"type":"headline"},{"level":2,"content":[{"content":"Titre 2","type":"text"}],"type":"headline"},{"level":3,"content":[{"content":"Titre 3","type":"text"}],"type":"headline"},{"ordered":true,"items":[{"content":[{"content":[{"content":"Liste numéroté","type":"text"}],"type":"paragraph"}]},{"content":[{"content":[{"content":"Liste numéroté","type":"text"}],"type":"paragraph"}]}],"type":"list"},{"ordered":false,"items":[{"content":[{"content":[{"content":"Liste à puce","type":"text"}],"type":"paragraph"}]},{"content":[{"content":[{"content":"Liste à puce","type":"text"}],"type":"paragraph"}]}],"type":"list"},{"content":[{"content":"Texte simple","type":"text"}],"type":"paragraph"},{"content":[{"content":[{"content":"Texte gras","type":"text"}],"type":"bold"}],"type":"paragraph"},{"content":[{"content":[{"content":"Texte souligné","type":"text"}],"type":"underline"}],"type":"paragraph"},{"content":[{"content":[{"content":"Texte italique","type":"text"}],"type":"italic"}],"type":"paragraph"},{"content":[{"content":"[ ] Checklist","type":"text"}],"type":"paragraph"},{"content":[{"content":"[ ] Checklist","type":"text"}],"type":"paragraph"},{"content":[{"content":"Citation\nCitation","type":"text"}],"type":"blockquote"},{"content":"Code block","type":"code"},{"content":[{"userId":"0a7f6eb7-d782-4d3a-930c-746a30a825f4","type":"mention"}],"type":"paragraph"},{"content":[{"url":"https://…","content":[{"content":"airfocus item","type":"text"}],"type":"link"},{"content":" ","type":"text"}],"type":"paragraph"},{"attachmentId":"f96b5515-7c3f-4d41-a765-0dd635204df4","width":985,"contentType":"image/png","caption":"1.png","type":"attachment"},{"attachmentId":"eeb29816-6a5e-408b-92bf-9c39bb42f6b9","contentType":"application/octet-stream","caption":"INCOVAR+V2-Synthese_annuelle.docx","type":"attachment"},{"content":[{"url":"https://…","content":[{"content":"Echo Zeroheight","type":"text"}],"type":"link"}],"type":"paragraph"}],"richText":true}}}},"matchedFilter":{"type":"itemCreated"}}
1 Like

Hi @Marketing_Incotec,

The first key:value pair listed after description is “blocks” and you’ll notice that immediately after blocks a square bracket [ appears. This indicates “blocks” is an array or a list of objects that can be indeterminate in number. Make can identify this array/list and perform actions on each object within the “blocks". You’ll need to iterate on each object within “block” to perform some action like parsing the description, updating each block…..etc

This is a very high level answer but I can provide more details if needed! Please describe what you’re trying to do with each block.

-@Trainward_Consulting

Hi,

The goal of my automation is to analyze customer feedback to automatically populate certain form fields (product, sentiment, product area, etc.).

Here’s my automation:

  1. Webhook: detects the creation of feedback in AirFocus
  2. Parse JSON: converts to JSON format
  3. Gemini: analyzes the title and description of the feedback
  4. Create JSON: creates a JSON file populated by (2) Parse JSON and (3) Gemini
  5. HTTP Request: updates the feedback in AirFocus

My problem: during the HTTP request, I can update the feedback name in AirFocus. But I can’t update the description.

I think my JSON structure isn’t correct…

Here is the API doc : Endpoints

Welcome to the Make community!

From your screenshot/output bundle, it appears that you have an ARRAY of items. What do you do when you have an array?

“Looping” Through Array Items

When you see an array in your module’s output, think of using an Iterator module.

In this example, this variable is an array of items (collections). You’ll want to map this array in an Iterator module.


Question: Have you tried mapping your array variable into an Iterator module, ran the scenario once, and view the output?

Next,

Combining Bundles Using Aggregators

Every result (item/record) from trigger/iterator/list/search/match modules will output a bundle. This can result in multiple bundles, which then trigger multiple operations in future modules (one operation per bundle). To “combine” multiple bundles into a single variable, you’ll need to use an aggregator of some sort.

Aggregators are modules that accumulate multiple bundles into one single bundle. An example of a commonly-used aggregator module is the Array aggregator module. The next popular aggregator is the Text Aggregator which is very flexible and can apply to many use-cases like building of JSON, CSV, HTML.

You can find out more about the other types of aggregator modules here:

Question: Which is the best aggregator do you think you’ll need for your use-case?

Mapping a Specific Structure Into a Complex Field

If you have an array of collections, in programming terms, this is called an array of objects, or an array with non-primitive data types (“complex”).

The Array Aggregator module is very powerful because it allows you to build a new complex array of collections that matches a later module’s field to map multiple items (collections) to it. Such fields initially would allow you to manually add items, but you can toggle the “Map” switch to the “on” state and map a whole array into a single field.

This is done by selecting the “Target structure type” in an Array Aggregator module.

As you can see from the above example, the “Map” toggle on complex fields are used when you have an array variable (like from an array aggregator). Other combinations of modules may also allow you to generate an array that matches a future field’s array structure, like “Aggregate to JSON + Parse JSON”, or “Create JSON + Parse JSON”, but this is an advanced topic.

Question: Are you mapping your array into a field that accepts more than one item/collection?

Example

Here is an example of how your scenario could look like:

This is just an example. Your final solution may or may not look like this depending on your requirements and actual data.

For more information, see “Mapping with arrays” in the Help Centre. You should also do the Make Academy, which also covers the use of Iterators & Aggregators.

Hope this helps! If you are still having trouble, please provide more details.

@samliew
P.S.: investing some effort into the tutorials in the Make Academy will save you lots of time and frustration using Make!

Thank you samliew

I will look at those actions Iterate and Aggregator.

I find it difficult because Description is an array of objects, which are differents.

And the webhook output give a JSON with ‘next’ object in each object ; but this ‘next’ is not needed.

            "description": {
                "next": {
                    "blocks": [
                        {
                            "content": [
                                {
                                    "content": "Texte simple",
                                    "type": "text"
                                }
                            ],
                            "type": "paragraph"
                        }
                    ],
                    "richText": true
                }
            }