Help with webhook - output, bundle output

Good day, when I send tally data to my webhook it receives it correctly, but when creating any action afterwards (new step) it only reads one field of the 48 that tally form sends (matrix) and that actually receives the webhook. Do you have any idea how to read those 48 fields as a different field each to use in the next steps, please help.

I have tried json parse, I have tried everything…

Captura de pantalla 2023-12-14 a la(s) 5.22.37 p.m.

thanks

Hi @LxKl

Utilize an iterator to iterate “fields”(array), employ a second iterator to iterate the “options” within an array, and subsequently consolidate the outcomes using a text aggregator.

If you require additional assistance, please don’t hesitate to reach out to us.
MSquare Support
Visit us here
Youtube Channel

2 Likes

Welcome to the Make community!

Yes, you can use the toCollection() built-in function to convert the fields array to a collection with mappable keys (variables).

It should look something like this:

{{ toCollection(15.data.fields; "label"; "value") }}

If you need further assistance,

Please provide the output bundles of the modules [15] by running the scenario, then click the white speech bubble on the top-right of the module, save the bundle contents in your text editor as a bundle.json file, and upload it here into this discussion thread.
Screenshot_2023-10-06_141025

Providing the output bundles will allow others to replicate what is going on in the scenario even if they do not use the external service.

This will allow others to better assist you. Thanks!

2 Likes

Thank you very much @samliew , it has been a great advance, I just need something…

In dropdown type questions an array is generated with option (name) and this contains ID and text…

The answers to these questions are left with ID and not with TEXT, could you help me?


[
    {
        "eventId": "9d85ca9d-f543-4efd-aa76-f1dbfee22a96",
        "eventType": "FORM_RESPONSE",
        "createdAt": "2023-12-15T06:28:04.159Z",
        "data": {
            "responseId": "1EeWYL",
            "submissionId": "1EeWYL",
            "respondentId": "B7PBb1",
            "formId": "mKVr8k",
            "formName": "Perfilacion larga",
            "createdAt": "2023-12-15T06:28:02.000Z",
            "fields": [
                {
                    "key": "question_Ek7VxB",
                    "label": "a. ¿Cuál es tu nombre?",
                    "type": "INPUT_TEXT",
                    "value": "Jairo"
                },
                {
                    "key": "question_rjM9o2",
                    "label": "b. ¿Cuál es tu apellido?",
                    "type": "INPUT_TEXT",
                    "value": "Patino"
                },
                {
                    "key": "question_ODMqGg",
                    "label": "c. ¿Cuál es tu número de teléfono?",
                    "type": "INPUT_PHONE_NUMBER",
                    "value": "+573123332233"
                },
                {
                    "key": "question_BzWYNA",
                    "label": "Seleccionar País",
                    "type": "DROPDOWN",
                    "value": [
                        "0c975303-2427-48d0-be00-29d6a9f05805"
                    ],
                    "options": [
                        {
                            "id": "c3ce00bb-c731-46fe-9fe7-1e5e0fc8cac2",
                            "text": "Alemania"
                        },
                        {
                            "id": "d41967de-639c-4898-ad01-ad6f75478468",
                            "text": "Argentina"
                        },
                        {
                            "id": "26bc2d7a-be05-46fb-8ea7-74e75ddf18c1",
                            "text": "Australia"
                        },
                        {
                            "id": "6ed371da-e7d3-406d-bfa9-1b00e5ced951",
                            "text": "Bahamas"
                        },
                        {
                            "id": "1bf6a2ca-7766-4c78-9faa-39fd4fcd4aac",
                            "text": "Barbados"
                        },
                        {
                            "id": "8b662a6c-e6a1-4329-83cb-4ad2467c6b4a",
                            "text": "Belice"
                        },
                        {
                            "id": "4e60d09f-3700-4ff2-aad7-ba6aabff8ccf",
                            "text": "Bolivia"
                        },
                        {
                            "id": "f03f401c-02aa-4386-a342-6485601fb79e",
                            "text": "Brasil"
                        },
                        {
                            "id": "a915dd7b-0dbd-4064-849d-50d8ca48042f",
                            "text": "Canada"
                        },
                        {
                            "id": "b6802637-c7af-4f53-9001-f35a2add9179",
                            "text": "Chile"
                        },
                        {
                            "id": "0c975303-2427-48d0-be00-29d6a9f05805",
                            "text": "Colombia"
                        },
                        {
                            "id": "6481b45b-fe5f-4f73-a21e-8ec721b79f61",
                            "text": "Costa Rica"
                        },
                        {
                            "id": "e5170664-40ec-4c13-bdf8-ffc3fdb6135e",
                            "text": "Cuba"
                        },
                        {
                            "id": "f491d8a5-9126-4fd9-a3fc-fb9deda5efc6",
                            "text": "Ecuador"
                        },
                        {
                            "id": "5d0f7c38-9fdf-47de-8ddc-1d6d77c83466",
                            "text": "El Salvador"
                        },
                        {
                            "id": "eb1e80c9-2274-42ea-800a-178feb91fda5",
                            "text": "España"
                        },
                        {
                            "id": "225b1272-f9f8-4611-ab56-9c4e29fdc406",
                            "text": "Estados Unidos"
                        },
                        {
                            "id": "53921682-1e32-437e-8f86-73bbef1800da",
                            "text": "Francia"
                        },
                        {
                            "id": "6523a439-af46-4d8e-9769-bf66996fc463",
                            "text": "Guatemala"
                        },
                        {
                            "id": "2858f14a-9ea5-4c33-854c-15ff6304b2d3",
                            "text": "Guyana"
                        },
                        {
                            "id": "ee0cffb8-867f-40d1-b9c5-2ae92fab2b55",
                            "text": "Guyana Francesa"
                        },
                        {
                            "id": "8c95dcbd-72c2-4207-a7d6-a831a0db82b8",
                            "text": "Haiti"
                        },
                        {
                            "id": "d54c5ee8-77cd-4b76-b7c6-38e5b126e61a",
                            "text": "Honduras"
                        },
                        {
                            "id": "53094867-e272-4535-b682-f155a2d6c703",
                            "text": "India"
                        },
                        {
                            "id": "b09f18c8-65d8-4683-bc91-5620473197e5",
                            "text": "Irlanda"
                        },
                        {
                            "id": "0be4c295-3fd7-4ccb-b560-1e1a604ec357",
                            "text": "Italia"
                        },
                        {
                            "id": "66f9d64e-6e8a-4f58-bd26-65b7d66ec5cc",
                            "text": "Malta"
                        },
                        {
                            "id": "f8f2af0a-4f2e-4c7a-8ec2-43903f5744e2",
                            "text": "Mexico"
                        },
                        {
                            "id": "af554b1c-6a25-49f1-a744-736899735599",
                            "text": "Nicaragua"
                        },
                        {
                            "id": "ca2a9873-8790-4d4b-b9ce-69db002e8945",
                            "text": "Nueva Zelanda"
                        },
                        {
                            "id": "b1c8c688-f5a6-4c5b-bc20-132216a99477",
                            "text": "Panama"
                        },
                        {
                            "id": "ee6190d9-b8ec-41fa-8e56-45408c70701a",
                            "text": "Paraguay"
                        },
                        {
                            "id": "887df7d9-52d7-4444-85b9-a6d925b0271d",
                            "text": "Peru"
                        },
                        {
                            "id": "c29ba488-fca0-4955-a970-609fd5747322",
                            "text": "Portugal"
                        },
                        {
                            "id": "776bcf4d-f5db-48e5-92fa-db5c86ec98d2",
                            "text": "Puerto Rico"
                        },
                        {
                            "id": "eb7bf437-aadf-4e6e-a283-edb231e239cc",
                            "text": "Reino Unido"
                        },
                        {
                            "id": "68243568-e751-411c-ac40-ebc76dcab6e2",
                            "text": "Republica Dominicana"
                        },
                        {
                            "id": "879f136b-fc49-4ceb-885c-04044ac76924",
                            "text": "Surinam"
                        },
                        {
                            "id": "8f53b6b5-b62b-48cc-82fc-04da5d0dd6e9",
                            "text": "Trinidad y Tobago"
                        },
                        {
                            "id": "f37bcca9-f827-424d-ba8c-37b684021080",
                            "text": "Uruguay"
                        },
                        {
                            "id": "78b3a11d-57bb-4265-b372-9b07be080d03",
                            "text": "Venezuela"
                        },
                        {
                            "id": "8afdacf2-d7db-4a6e-bdb3-abd480ce63f3",
                            "text": "Otro"
                        }
                    ]
                },
                {
                    "key": "question_kdB4qJ",
                    "label": "Seleccionar ciudad de Alemania",
                    "type": "DROPDOWN",
                    "value": null,
                    "options": [
                        {
                            "id": "b7b30948-f6a5-4d71-a075-eb8f3cd55249",
                            "text": "Berlín"
                        },
                        {
                            "id": "41cd920f-520f-4b86-8706-d2da6b9cfac9",
                            "text": "Bonn"
                        },
                        {
                            "id": "06891111-9185-4854-a522-2c77a334a487",
                            "text": "Colonia"
                        },
                        {
                            "id": "f4548e46-7cfa-44ab-9696-c80f2a978942",
                            "text": "Düsseldorf"
                        },
                        {
                            "id": "c363669a-580c-4b1c-9056-1bb66a2950a2",
                            "text": "Fráncfort"
                        },
                        {
                            "id": "d1a9d8f9-d8a1-465b-b488-3d559fb5b5e5",
                            "text": "Hamburgo"
                        },
                        {
                            "id": "05743d21-103c-4c52-ae04-3734ad7a202a",
                            "text": "Munich"
                        },
                        {
                            "id": "70752c1b-d799-4646-b9b0-33783fc4234a",
                            "text": "Otra"
                        },
                        {
                            "id": "237fbbe8-3d62-4406-9e92-4efb7f6a13b0",
                            "text": "Stuttgart"
                        }
                    ]
                },
                {
                    "key": "question_vG5akd",
                    "label": "Seleccionar ciudad de Argentina",
                    "type": "DROPDOWN",
                    "value": null,
                    "options": [
                        {
                            "id": "807ad297-54cb-4127-b1ee-d95d699bbc31",
                            "text": "Buenos Aires"
                        },
                        {
                            "id": "b0d3bed7-b879-46fd-8c12-1ceae185cc12",
                            "text": "Comodoro Rivadavia"
                        },
                        {
                            "id": "ef7ce42a-3b60-4f6a-bc45-cd16192e7de1",
                            "text": "Corrientes"
                        },
                        {
                            "id": "51a54ea1-965e-491b-8a65-78d95698ee20",
                            "text": "Córdoba"
                        },
                        {
                            "id": "6c5d515c-c93f-43a7-afdd-58353c68aabc",
                            "text": "La Plata"
                        },
                        {
                            "id": "381eea35-fa37-4f8a-b91a-f1c57ab7dbfd",
                            "text": "Mar del Plata"
                        },
                        {
                            "id": "fe0e083e-b557-4ebb-bc82-67de752c115c",
                            "text": "Otra"
                        },
                        {
                            "id": "32dfb5ca-4e4d-47be-a1df-94f3f49360ba",
                            "text": "Rosario"
                        },
                        {
                            "id": "268959aa-9c68-43d8-94d4-41229cb409ee",
                            "text": "San Miguel de Tucumán"
                        },
                        {
                            "id": "c874b0b2-fafa-41ab-8a8a-8ad1ccc89230",
                            "text": "Santa Fe"
                        }
                    ]
                },
                {
                    "key": "question_KYK4bk",
                    "label": "Seleccionar ciudad de Australia",
                    "type": "DROPDOWN",
                    "value": null,
                    "options": [
                        {
                            "id": "4f2afd76-7e71-4b66-8b92-05a6e33c3bfc",
                            "text": "Adelaide"
                        },
                        {
                            "id": "b18dc3d0-13bb-49be-932c-e61dc4e609ea",
                            "text": "Brisbane"
                        },
                        {
                            "id": "4fed2464-2e1a-4407-9f3d-0225a4f79bb9",
                            "text": "Darwin"
                        },
                        {
                            "id": "da5368e3-90f6-446c-82de-6abb2d884003",
                            "text": "Gold Coast"
                        },
                        {
                            "id": "33a7d9ff-0b1d-488d-88e6-8d22cd2c00d3",
                            "text": "Melbourne"
                        },
                        {
                            "id": "b7e50a40-1332-491e-aa29-f83a456e03c0",
                            "text": "Otra"
                        },
                        {
                            "id": "e7fd30ac-8fdd-4fdc-9002-0dfb5e26617e",
                            "text": "Perth"
                        },
                        {
                            "id": "fc0a0d85-c210-4d4b-a23c-9afc118e3f23",
                            "text": "Sydney"
                        }
                    ]
                },
                {
                    "key": "question_LZLjlO",
                    "label": "Seleccionar ciudad de Bahamas",
                    "type": "DROPDOWN",
                    "value": null,
                    "options": [
                        {
                            "id": "4f70b6cc-1329-4426-9f1e-668ee78dccff",
                            "text": "Freeport"
                        },
                        {
                            "id": "de8e2d75-75ff-4252-8dc7-df3ba86bb46c",
                            "text": "Lucaya"
                        },
                        {
                            "id": "24ffcfe4-3f00-44ba-a4eb-d8dcfbaea55b",
                            "text": "Nassau"
                        },
                        {
                            "id": "7f071ff5-8f70-4791-a6a7-5e9b5fbcebd9",
                            "text": "Otra"
                        }
                    ]
                },
                {
                    "key": "question_pbpNaZ",
                    "label": "Seleccionar Ciudad de Barbados",
                    "type": "DROPDOWN",
                    "value": null,
                    "options": [
                        {
                            "id": "1a890056-e3b2-40aa-9aa4-7d171b5ff2b3",
                            "text": "Bridgetown"
                        },
                        {
                            "id": "05c3c865-4ed1-4dae-a246-bf380616c5c2",
                            "text": "Otra"
                        }
                    ]
                },
                {
                    "key": "question_1AoY8O",
                    "label": "Seleccionar ciudad de Belice",
                    "type": "DROPDOWN",
                    "value": null,
                    "options": [
                        {
                            "id": "d0b793b9-0a8c-46cb-a1ff-e878bb66aba3",
                            "text": "Otra"
                        }
                    ]
                },
                {
                    "key": "question_Mep2Bg",
                    "label": "Seleccionar ciudad de Bolivia",
                    "type": "DROPDOWN",
                    "value": null,
                    "options": [
                        {
                            "id": "31cbca36-3f74-42ab-9115-ad46933edcd7",
                            "text": "Cochabamba"
                        },
                        {
                            "id": "35817b87-557e-46ac-8609-fff8eb789c97",
                            "text": "La Paz"
                        },
                        {
                            "id": "a3eb5c5b-06b4-4758-88c2-9f6ee9616196",
                            "text": "Oruro"
                        },
                        {
                            "id": "8100455f-82ea-413e-9774-a4f00abbe3c4",
                            "text": "Otra"
                        },
                        {
                            "id": "38ffba5d-ed18-4d55-934b-3e346741ab6c",
                            "text": "Santa Cruz de la Sierra"
                        },
                        {
                            "id": "a1b8f2de-7b07-486c-a532-dceeba5edcf3",
                            "text": "Sucre"
                        }
                    ]
                },
                {
                    "key": "question_J9vr7Y",
                    "label": "Seleccionar ciudad de Brasil",
                    "type": "DROPDOWN",
                    "value": null,
                    "options": [
                        {
                            "id": "8ef2d16e-4d10-4470-acfd-666ebd833b3d",
                            "text": "Belo Horizonte"
                        },
                        {
                            "id": "e1d87dc1-2076-4e0c-9b6d-ca0826494414",
                            "text": "Brasilia"
                        },
                        {
                            "id": "9eea7c60-b18d-421d-be2c-e91cc8dfcc0f",
                            "text": "Curitiba"
                        },
                        {
                            "id": "950c8c42-cac6-4251-8255-e765983285b4",
                            "text": "Fortaleza"
                        },
                        {
                            "id": "876e18b7-c8e8-4095-8016-56bb913cdcea",
                            "text": "Manaus"
                        },
                        {
                            "id": "2b6ef6cd-a684-485c-8a09-61d50e3b3a11",
                            "text": "Otra"
                        },
                        {
                            "id": "586bc50d-cb3a-4429-9b8f-c20b4bf3ce03",
                            "text": "Porto Alegre"
                        },
                        {
                            "id": "1346ba55-8c4d-4dec-b842-76e6ba8bf328",
                            "text": "Recife"
                        },
                        {
                            "id": "baa39c22-e11d-4774-ad18-76ca6df8cc5e",
                            "text": "Rio de Janeiro"
                        },
                        {
                            "id": "c100074f-815c-45a6-adc0-1aa0f3f68cad",
                            "text": "Salvador"
                        },
                        {
                            "id": "e22a1528-bc43-4f85-b91e-4b7229b95850",
                            "text": "Sao Paulo"
                        }
                    ]
                },
                {
                    "key": "question_gD6V21",
                    "label": "Seleccionar ciudad de Canadá",
                    "type": "DROPDOWN",
                    "value": null,
                    "options": [
                        {
                            "id": "b6d5dab8-e49b-48d4-9045-fc9c1949814e",
                            "text": "Calgary"
                        },
                        {
                            "id": "bd009268-7696-48ae-bfc3-4d83d8549858",
                            "text": "Ciudad de Quebec"
                        },

Since the “value” can either contain a string or an array, and if an array, containing option IDs,

You’ll need to use

  1. Iterator
  2. Set Variable with an if-statement to return the string or selected option text
  3. Array Aggregator
  4. Set Variable with toCollection

Screenshot_2023-12-15_151227

The magic is in the “Set Variable”

Select new value with Iterator label

Output

Screenshot_2023-12-15_151234

3 Likes

Thanks @samliew Could you please tell me what is the step before 1.iterator? It seems that it is a variable (purple).

Could you please share the Blueprint with me?

thank you

That is your webhook data. Replace accordingly.

This part has worked @samliew , now I have a challenge. :man_lifting_weights:

My idea: make a filter after this sequence and send to a URL (webhook response) depending on its response, it gives me an error. Do you know if there is a way to solve it? thank you again.

No problem, glad I could help!

In future, please create a new thread for each question. This makes it easier for others with the same problem to search for the answer. Thank you for your cooperation!

The Make Community guidelines encourages users to try to mark helpful replies as solutions to help keep the Community organized.

This marks the topic as solved, so that:

  • others can save time when catching up with the latest activity here, and
  • allows others to quickly jump to the solution if they come across the same problem

To do this, simply click the checkbox at the bottom of the post that answers your question:
Screenshot_2023-10-04_161049

1 Like