# Nested array of objects in webhook data

**URL:** <https://forum.mautic.org/t/nested-array-of-objects-in-webhook-data/25897>\
**Category:** Product Support\
**Tags:** mautic-4\
**Created:** [October 31, 2022, 11:58am UTC](https://forum.mautic.org/t/nested-array-of-objects-in-webhook-data/25897 "2022-10-31T11:58:32Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marc\_1](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/marc_1/32/6285_2.png) [@Marc\_1](https://forum.mautic.org/u/Marc_1)\
**Post date:** [October 31, 2022, 11:58am UTC](https://forum.mautic.org/t/nested-array-of-objects-in-webhook-data/25897/1 "2022-10-31T11:58:32Z")

</div>

Hi,

I’m trying to send a webhook as a campaign event but the requested format does not work:

Format requested: [Send Template Message](https://docs.wati.io/reference/post_api-v1-sendtemplatemessage)

```auto
{
    "broadcast_name": "welcome_test",
    "parameters": [
        {
            "name": "name",
            "value": "Marc"
        }
    ],
    "template_name": "berlin_welcome_test"
}

```

Mautic only sends:

```auto
{
    "broadcast_name":"welcome_test",
    "parameters":"[{\"name\":\"name\",\"value\":\"Marc\"}]",
    "template_name":"berlin_welcome_test"
}

```

So the nested array of parameters gets an extra quote.

 ![Schermafbeelding 2022-10-31 om 12.57.20](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/0/003d8df3a4de7b708c67ac13b90f313aff823b38.png)

How can i solve this?

---

<div class="post-metadata">

**Author:** ![francesco](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/francesco/32/82_2.png) [@francesco](https://forum.mautic.org/u/francesco)\
**Post date:** [January 10, 2023, 10:52am UTC](https://forum.mautic.org/t/nested-array-of-objects-in-webhook-data/25897/2 "2023-01-10T10:52:18Z")

</div>

Hi, I have the same problem. Did you solve this?

Thanks and best regards

---

<div class="post-metadata">

**Author:** ![leoschuler](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/leoschuler/32/4798_2.png) [@leoschuler](https://forum.mautic.org/u/leoschuler)\
**Post date:** [January 10, 2023, 1:57pm UTC](https://forum.mautic.org/t/nested-array-of-objects-in-webhook-data/25897/3 "2023-01-10T13:57:54Z")

</div>

this seem to be a shortfall of mautic, the way I worked around it was to create a middle man, that receives the mautic webhook and converts the data so the final destination can read it. n8n seem a good open source tool to do such thing, there is also paid services like integromat.

for my case in particular, as a developer, I use serverless functions (also known as lambda functions in AWS). Netlify ([Netlify Functions](https://www.netlify.com/products/functions/)) allows you to host those function up to 125k monthly function calls for free, cloudflare as a similar service as well

---

<div class="post-metadata">

**Author:** ![francesco](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/francesco/32/82_2.png) [@francesco](https://forum.mautic.org/u/francesco)\
**Post date:** [January 11, 2023, 4:31pm UTC](https://forum.mautic.org/t/nested-array-of-objects-in-webhook-data/25897/4 "2023-01-11T16:31:17Z")

</div>

Hi, thanks for your reply. I’m a developer too and i’ll try to edit php file used for webhook or i’ll create a php file on one of my server to process data received and forward them to the final destination

i’m trying to send whatsapp messages via api and for template section i need to write an array like this

```auto
template: {
     name: hello_world,
     language: {
          code: it_IT
          }
}

```

---

<div class="post-metadata">

**Author:** ![francesco](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/francesco/32/82_2.png) [@francesco](https://forum.mautic.org/u/francesco)\
**Post date:** [January 12, 2023, 10:02am UTC](https://forum.mautic.org/t/nested-array-of-objects-in-webhook-data/25897/5 "2023-01-12T10:02:09Z")

</div>

i just opened this thread [Webhook campaign action: send array values](https://forum.mautic.org/t/webhook-campaign-action-send-array-values/26720)

---

<div class="post-metadata">

**Author:** ![francesco](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/francesco/32/82_2.png) [@francesco](https://forum.mautic.org/u/francesco)\
**Post date:** [January 12, 2023, 6:06pm UTC](https://forum.mautic.org/t/nested-array-of-objects-in-webhook-data/25897/6 "2023-01-12T18:06:38Z")

</div>

Today I wrote the php code that forwards Mautic webhook to Facebook API.

In this way we must not use twilio or any other third party service to send

This is the workflow:

We must upload a PHP file everywhere over the internet. It can be uploaded on the same server where mautic is installed or into another domain.

We must send webhook to this file that will elaborate the payload and will forward it to WhatsApp.

Tomorrow I’ll post a new thread with details about webhook in mautic campaign and also the php file that forwards data to WhatsApp.

---

<div class="post-metadata">

**Author:** ![nilesh15](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/nilesh15/32/12740_2.png) [@nilesh15](https://forum.mautic.org/u/nilesh15)\
**Post date:** [September 17, 2024, 6:22pm UTC](https://forum.mautic.org/t/nested-array-of-objects-in-webhook-data/25897/7 "2024-09-17T18:22:57Z")

</div>

is this issue solve? Please help
