Webhook multipart/form-data to JSON

I have a custom app, which send webhooks this way.
Well, it is not perfect, because I have a JSON file, but is is inside a multipart/form-data
The original webhook message looks like this:

{
“data”: “{"orders":{"order":[{"storeName":"storesyncdev","innerId":"82","innerResourceId":"orders\/b3JkZXItb3JkZXJfaWQ9ODI=","outerResourceId":"","firstname":"Firstmane","lastname":"Lastmane","phone":"+36201234567","fax":"","email":"teszt@teszt.hu","customerId":"0","email_hash":"ef6adb36213bb91832c8ba3061cd9031de81f514e6d990f924fb599520cf5c56","cart_token":"cart","shippingFirstname":"Firstmane","shippingLastname":"Lastmane","shippingCompany":"","shippingAddress1":"Lovohazu.12.\/Fenyutcaipiac","shippingAddress2":"easybox Bp II ker Feny utcai Piac","shippingCity":"Budapest, II. ker\u00fclet","shippingCountryName":"Magyarorsz\u00e1g","shippingCountryId":"97","shippingZoneName":"","shippingPostcode":"1024","paymentFirstname":"Firstmane","paymentLastname":"Lastmane","paymentCompany":"","paymentAddress1":"Address","paymentAddress2":"","paymentCity":"Debrecen","paymentCountryName":"Magyarorsz\u00e1g","paymentCountryId":"97","paymentZoneName":"","shippingMethodName":"Easybox csomagautomata - 11150 - easybox Bp II ker Feny utcai Piac","shippingMethodCode":"easybox","shippingNetPrice":500,"shippingGrossPrice":"635","shippingAdditionalCostNet":0,"shippingAdditionalCostGross":0,"shippingInnerResourceId":"shippingModeExtend\/c2hpcHBpbmdNb2RlLWlkPTI0","paymentMethodName":"Banki \u00e1tutal\u00e1s (el\u0151re utal\u00e1s)","paymentNetPrice":0,"paymentGrossPrice":0,"couponCode":null,"couponGrossPrice":null,"cartAmountDiscount":"0","languageId":"1","languageCode":"hu","comment":"","total":"66921","totalGross":"85625","taxPrice":"18069","currency":"HUF","newsletterChecked":"NaN","paymentPostcode":"4028","paymentTaxnumber":"","paymentMethodCode":"bank_transfer","shippingId":"24","shippingReceivingPointId":"11150","orderHistory":{"status":"1","statusText":"F\u00fcgg\u0151ben l\u00e9v\u0151","comment":"K\u00e9rj\u00fck, a k\u00f6vetkez\u0151 banksz\u00e1ml\u00e1ra utalja \u00e1t a v\u00e1s\u00e1rl\u00e1si v\u00e9g\u00f6sszeg\u00e9t.\n\n<p><span style="font-size:12px;">Az \u00e1tutal\u00e1shoz sz\u00fcks\u00e9ges adatok:<\/span><br \/>\r\n\t\u00a0\r\n<\/p>\n\nA rendel\u00e9se az \u00f6sszeg be\u00e9rkezt\u00e9t k\u00f6vet\u0151en ker\u00fcl kisz\u00e1ll\u00edt\u00e1sra."},"orderProducts":{"orderProduct":[{"innerId":"464","productId":"555","innerResourceId":"orderProducts\/b3JkZXJQcm9kdWN0LW9yZGVyX3Byb2R1Y3RfaWQ9NDY0","outerResourceId":"","name":"Amsterdam classic 2020 n\u0151i v\u00e1rosi ker\u00e9kp\u00e1r - barna","sku":"Amsterdam-classic-2020-noi-varosi-kerekpar-barna","price":"66921.260","currency":"HUF","taxRate":"27.0000","quantity":"1","image":"https:\/\/storesyncdev.myshoprenter.hu\/custom\/storesyncdev\/image\/data\/product\/Amsterdam_classic_2020_noi_varosi_kerekpar_barna.jpg","category":"Alkatr\u00e9szek, BMX ker\u00e9kp\u00e1r, Enduro ker\u00e9kp\u00e1r, Gyerek\u00fcl\u00e9s, H\u00e1ts\u00f3 v\u00e1lt\u00f3, Karbantart\u00e1s, Ker\u00e9kp\u00e1rok, Kieg\u00e9sz\u00edt\u0151k, felszerel\u00e9sek, Leg\u00fajabb term\u00e9kek, M\u00e1rk\u00e1k, Ruh\u00e1zat, Szerviz, Teleszk\u00f3p","volume":{"height":"0.00","width":"0.00","length":"0.00","volumeUnit":[{"unit":"cm","language":"hu"}]},"weight":{"weight":"0.00","weightUnit":[{"unit":"kg","language":"hu"}]},"orderProductOptions":{"orderProductOption":[{"name":"\u00dczembe helyez\u00e9st k\u00e9rek","valueName":"Nem","price":"66921.2598","prefix":"+"}]}}]}}]}}”,
“IMTHEADERS”: [
{
“name”: “connection”,
“value”: “upgrade”
},
{
“name”: “x-real-ip”,
“value”: “162.158.49.112”
},
{
“name”: “x-request-id”,
“value”: “e67c76d54d58b60282da875bcc91ea28”
},
{
“name”: “content-length”,
“value”: “3524”
},
{
“name”: “cdn-loop”,
“value”: “cloudflare”
},
{
“name”: “cf-ipcountry”,
“value”: “IE”
},
{
“name”: “accept-encoding”,
“value”: “gzip, br”
},
{
“name”: “cf-ray”,
“value”: “8a313be648f7be11-DUB”
},
{
“name”: “cf-visitor”,
“value”: “{"scheme":"https"}”
},
{
“name”: “user-agent”,
“value”: “ShopRenter”
},
{
“name”: “accept”,
“value”: “/”
},
{
“name”: “content-type”,
“value”: “multipart/form-data; boundary=------------------------d905d61771ecbc2c”
},
{
“name”: “cf-connecting-ip”,
“value”: “54.72.253.96”
}
]
}

When make.com recevies this webhook, the parsed item look like this (no the same data than the first code snipet):

{
  "data": "{\"orders\":{\"order\":[{\"storeName\":\"storesyncdev\",\"innerId\":\"81\",\"innerResourceId\":\"orders\\/b3JkZXItb3JkZXJfaWQ9ODE=\",\"outerResourceId\":\"\",\"firstname\":\"L\\u00e1szl\\u00f3\",\"lastname\":\"T\\u00f3th\",\"phone\":\"+36201234567\",\"fax\":\"\",\"email\":\"teszt@teszt.com\",\"customerId\":\"0\",\"email_hash\":\"3a672fbe5db60f8bff7d63c257761e9d365ed1b79ff3c058e9ce9ce6ea361b20\",\"cart_token\":\"cart\",\"shippingFirstname\":\"L\\u00e1szl\\u00f3\",\"shippingLastname\":\"T\\u00f3th\",\"shippingCompany\":\"\",\"shippingAddress1\":\"Lovohazu.12.\\/Fenyutcaipiac\",\"shippingAddress2\":\"easybox Bp II ker Feny utcai Piac\",\"shippingCity\":\"Budapest, II. ker\\u00fclet\",\"shippingCountryName\":\"Magyarorsz\\u00e1g\",\"shippingCountryId\":\"97\",\"shippingZoneName\":\"\",\"shippingPostcode\":\"1024\",\"paymentFirstname\":\"L\\u00e1szl\\u00f3\",\"paymentLastname\":\"T\\u00f3th\",\"paymentCompany\":\"\",\"paymentAddress1\":\"G\\u00f6rgey\",\"paymentAddress2\":\"42\",\"paymentCity\":\"Hajd\\u00fahadh\\u00e1z\",\"paymentCountryName\":\"Magyarorsz\\u00e1g\",\"paymentCountryId\":\"97\",\"paymentZoneName\":\"\",\"shippingMethodName\":\"Easybox csomagautomata - 11150 - easybox Bp II ker Feny utcai Piac\",\"shippingMethodCode\":\"easybox\",\"shippingNetPrice\":500,\"shippingGrossPrice\":\"635\",\"shippingAdditionalCostNet\":0,\"shippingAdditionalCostGross\":0,\"shippingInnerResourceId\":\"shippingModeExtend\\/c2hpcHBpbmdNb2RlLWlkPTI0\",\"paymentMethodName\":\"Banki \\u00e1tutal\\u00e1s (el\\u0151re utal\\u00e1s)\",\"paymentNetPrice\":0,\"paymentGrossPrice\":0,\"couponCode\":null,\"couponGrossPrice\":null,\"cartAmountDiscount\":\"0\",\"languageId\":\"1\",\"languageCode\":\"hu\",\"comment\":\"\",\"total\":\"5504\",\"totalGross\":\"7625\",\"taxPrice\":\"1486\",\"currency\":\"HUF\",\"newsletterChecked\":\"NaN\",\"paymentPostcode\":\"4242\",\"paymentTaxnumber\":\"\",\"paymentMethodCode\":\"bank_transfer\",\"shippingId\":\"24\",\"shippingReceivingPointId\":\"11150\",\"orderHistory\":{\"status\":\"1\",\"statusText\":\"F\\u00fcgg\\u0151ben l\\u00e9v\\u0151\",\"comment\":\"K\\u00e9rj\\u00fck, a k\\u00f6vetkez\\u0151 banksz\\u00e1ml\\u00e1ra utalja \\u00e1t a v\\u00e1s\\u00e1rl\\u00e1si v\\u00e9g\\u00f6sszeg\\u00e9t.\\n\\n&lt;p&gt;&lt;span style=&quot;font-size:12px;&quot;&gt;Az \\u00e1tutal\\u00e1shoz sz\\u00fcks\\u00e9ges adatok:&lt;\\/span&gt;&lt;br \\/&gt;\\r\\n\\t\\u00a0\\r\\n&lt;\\/p&gt;\\n\\nA rendel\\u00e9se az \\u00f6sszeg be\\u00e9rkezt\\u00e9t k\\u00f6vet\\u0151en ker\\u00fcl kisz\\u00e1ll\\u00edt\\u00e1sra.\"},\"orderProducts\":{\"orderProduct\":[{\"innerId\":\"456\",\"productId\":\"533\",\"innerResourceId\":\"orderProducts\\/b3JkZXJQcm9kdWN0LW9yZGVyX3Byb2R1Y3RfaWQ9NDU2\",\"outerResourceId\":\"\",\"name\":\"Sport orsz\\u00e1g\\u00fati nyereg - fekete\",\"sku\":\"A-sport-orszaguti-nyereg-fekete\",\"price\":\"5503.937\",\"currency\":\"HUF\",\"taxRate\":\"27.0000\",\"quantity\":\"1\",\"image\":\"https:\\/\\/storesyncdev.myshoprenter.hu\\/custom\\/storesyncdev\\/image\\/data\\/product\\/Sport_orszaguti_nyereg_fekete.jpg\",\"category\":\"Alkatr\\u00e9szek, BMX ker\\u00e9kp\\u00e1r, Enduro ker\\u00e9kp\\u00e1r, Gyerek\\u00fcl\\u00e9s, H\\u00e1ts\\u00f3 v\\u00e1lt\\u00f3, Karbantart\\u00e1s, Ker\\u00e9kp\\u00e1rok, Kieg\\u00e9sz\\u00edt\\u0151k, felszerel\\u00e9sek, Leg\\u00fajabb term\\u00e9kek, M\\u00e1rk\\u00e1k, Ruh\\u00e1zat, Szerviz, Teleszk\\u00f3p\",\"volume\":{\"height\":\"0.00\",\"width\":\"0.00\",\"length\":\"0.00\",\"volumeUnit\":[{\"unit\":\"cm\",\"language\":\"hu\"}]},\"weight\":{\"weight\":\"0.00\",\"weightUnit\":[{\"unit\":\"kg\",\"language\":\"hu\"}]}}]}}]}}"
}

My problem is, that I want to use the JSON parser in make.com, but it cannot parse the received message.
I see this:

My problem is, that the JSON parser does not recognize, that inside “data” I have an other JSON, which includes the order informations. And I need the order info.

What should I use to get the order informatios?

Hi @Laszlo,

Be mindful that the editor of this community may have edited your code. If you want to share code, use this:
Scherm­afbeelding 2024-07-14 om 15.50.32

Additionally, I am not sure what your question is. The data object seems to be JSON already?

Can you share the setup of your custom app and the scenario that you are using it in? Please, follow these steps when asking a question, and you’ll be more likely to get a helpful answer:

:writing_hand: Give us a detailed explanation of what you’re trying to achieve

:footprints: Tell us about any steps you’ve tried so far

:camera_flash: Include screenshots of:

  • your scenario flow and setup (functions, mappings, variables, etc.)

  • module configurations and outputs

  • any error messages you are getting

:card_file_box: Share the blueprint of the scenario you are asking a question about. (this does not contain any connection or personal information)

Henk

Welcome to the Make community!

Your JSON code is now invalid, I tried pasting it in https://jsonformatter.org and it is throwing errors.

1. This forum might have or already changed your text

When pasting text into this forum, you should format the example text using the rich-text editor, otherwise the forum software might modify the displayed text, and you might get incorrect answers from others because of it.

Some things this forum software might do to mangle your text:

– remove extra spaces (which may be necessary)
– convert links to titles (when copied is incorrect)
– incorrect joined links
– convert single and double quotes to smart angled quotes ()
– emojis
– etc.

This interferes with you receiving correct answers, because it:

– makes JSON invalid (you can verify when copy-paste into https://jsonformatter.org)
– makes incorrect text examples when we need to build a pattern for text parsing

2. To prevent this in future, please format text in code blocks

A. Type code fence manually
Either add three backticks ``` before and after the text, like this:

```
content goes here
```

B. Highlight and click the format button
Or use the format code button in the editor:
Screenshot_2023-10-02_191027

3. You might need to re-copy the original text

Once the post has been submitted, it’s too late to format it since it’s already butchered, and you need to make a re-copy of the text, and format it before submitting the forum post.

Please let us know once you have corrected the issue. This will avoid others potentially providing wrong answers based on incorrect text in your question.

Thank you!

Thanks for your feedback. I rewrited the post.

Thanks for your feedback. I have edited the coeds and uploaded screenshot.