Hi, I am using a webhook that fetches a payload that I have to parse to extract specific information. Please note that the “payload” here is NOT a field in the incoming message (like email_body), but the whole message.
Part of this payload is quite straight forward:
FirstName: XXX
LastName: YYY
ZipCode: 3333
Another part of it is really strange and cannot be directly reconciled to the form “field: value”, as above.
Here a couple of examples, but there are 10-12 of similar sections in the meassage.
- 3EIGNUNG DACH] Haben Sie bereits eine Bestandsanlage?
- 3EIGNUNG DACH] Haben Sie bereits eine Bestandsanlage?
- 1
- 0
- UUID
- UUID
- 2200da203cde013bad001205644bcef7
- Label
- Label
- Ja, soll aber nicht mit der neuen Anlage kombiniert werden.
- #EIGNUNG DACH] Leistung in kWp:
- #EIGNUNG DACH] Leistung in kWp:
- 1
- 0
- UUID
- UUID
- 3ed4dfb0b8af012d2fb938ac6f7d89ab
- Label
- Label
- 4 bis 7 kWp
It is in German, but the above should correspond to the following real-world information.
- Key: 2200da203cde013bad001205644bcef7
- Value: Do you have already a Solar installation? Yes, but I want integrate it with a new one.
- Key: 3ed4dfb0b8af012d2fb938ac6f7d89ab
- Value: Power in kWp? 4 to 7 KWp
I want to address the following issues.
I would like to extract the full payload as text and apply something (code, AI, …, at the moment is not important) to extract the info above (key/value) from it. How can I put the whole payload of webhook into a single variable to be used later in the parser?
It would also be OK to extract only the keys (3ed4dfb0b8af012d2fb938ac6f7d89ab) into a comma-separated array and map it to a field and then using a lookup table to do the transofrmation.
In both cases, though, the main problem is that I have found no way to use the full payload as a single text within which I can “search” for something.
Can you help me?
Thank you
Alberto