How to extract data from a Webhook like this?

Hello
My MMS provider has a ready solution to send w Webhook when MMS arrives. The problem Is I am not able to retrieve photos from this.
Webhook send data as POST :
numer=PHONE_NUMBER
data=RECEIVE_DATE
id=ID
temat=TOPIC
zalaczniki=NUMBER_OF_ATTACHEMENTS]|[FILE_NAME1]|[CONTENT-TYPE1]|[DATA1]|[FILE_NAME2]|[CONTENT-TYPE2]|[DATA2]

At the moment all I can have is this:
Zrzut ekranu 2023-01-17 o 20.45.49

But I dont know how to push it further.
Could anyone give me any hints?

if you go to your webhook settings and select “Redetermine Data Structure” then send the webhook again. it should identify all the fields. However it is dependent on the format of the data sent. If it does not work then you need to post what the webhook is receiving so we can help you break it down.

1 Like

I always start with determining data structure, this time this is the result.
Actually you will not see anything more that I have showed you before.

I have learned that the image Is coded to base64, but I am still unable to :

  • extract each attachment
  • decode it to a file
    Any help?

Ok guys I have learned that I have to decode the part In red circle into binary and then I will receive a photo.
Zrzut ekranu 2023-01-17 o 21.14.54
Now only thing left is to get “zalaczniki” into separate strings
Help?

@Kamil can you post this data you want to split as text?
You can either use the split() function or use RegEx to extract data according to a pattern:

1 Like

I was working on this for some time, and asked developers to pass json via webhook, because the data they passed, was without any logic. But now I am lost I know its basic stuff, but I am not very good at this.
I iterated json and got this result:
Zrzut ekranu 2023-01-18 o 11.59.02
But when I tried to pass this to mail, and attach all the bundles and try to put data from iterator, I have only one result:
Zrzut ekranu 2023-01-18 o 11.59.24
What I am doing wrong?

Hi @Kamil,

To better understand the problem, could you please share screenshots of your scenario, specifically the execution and the operations used per app? This will give us a clearer idea of what might be causing the issue. Additionally, can you also clarify if the output you shared in your image is the output of your webhook trigger or your iterator? With more information, we’ll be better equipped to help you troubleshoot the problem. :slight_smile:

Glenn - Callinetic

Hi Glen,
I managed to find a solution for the issue, but later on I stuck on Bitrix24 integration which didn’t allow to add multiple files into CRM. So I had to abandon this project.
Thank you for your time, It was my first attempt to find help here and I am greatly satisfied.
Best regards

Hello there @Kamil welcome to the community :wave:

I just wanted to say thanks for letting us know how the situation panned out.

Sorry to hear that you had to let go of the project but glad to learn that you’re happy with the help you got in the community. We have a whole bunch of incredibly skilled and helpful Makers here :blush:

Would you mind sharing the solution that you managed to find? I know that you did not end up pursuing this but this info could help some users when looking for similar answers :slight_smile:

Thanks a lot!

I actually understood that after iteration, the next module will be run by number of bundles iterator produced and accepted it.

1 Like