Hello Make community!
I’m looking for guidance on creating a flexible solution for handling webhook data in Make.com and saving it to Google Sheets. Here’s what I’m trying to achieve:
- Receive data from various JSON structures to webhook
- Parse the incoming data from webhook module, regardless of its structure.
- Save the full JSON to a Google Sheets spreadsheet.
Current approach:
Example output bundle from Webhooks’s module:
[
{
"value": "{\"recent_messages\":[{\"creation_time\":\"2024-08-26T08:25:37.097Z\",\"message\":\"zzzz\",\"is_reply\":false},{\"creation_time\":\"2024-08-27T09:44:28.56Z\",\"message\":\"aaa\",\"is_reply\":false}],\"conversation_id\":\"aaaa\",\"campaign\":{\"name\":\"asdasd\",\"id\":zzzz},\"sender\":{\"id\":zzz,\"first_name\":\"aaa\",\"last_name\":\"zzzz\",\"full_name\":\"zzz\",\"email_address\":\"sss\",\"profile_url\":\"zzz\"},\"lead\":{\"id\":\"zzzz\",\"profile_url\":\"zzz\",\"first_name\":\"aaa\",\"last_name\":\"2\",\"full_name\":\"aaa\",\"location\":null,\"summary\":\"aaaa\",\"company_url\":null,\"company_name\":\"Czzz\",\"position\":\"zzzz\",\"about\":\"xxxx.\",\"email_address\":null,\"tags\":[],\"lists\":[{\"name\":\"zzzz\",\"id\":87261,\"custom_fields\":{}}]},\"timestamp\":\"2024-08-27T09:44:28.7141499Z\",\"event_type\":\"message_sent\"}"
}
]
Example of current JSON output saved to Spread Sheet:
[{"lead":null,"sender":null,"campaign":null,"timestamp":null,"event_type":null,"recent_messages":null}]
Questions:
- How can I ensure that any JSON structure from the webhook is properly parsed, especially considering the varying structures from different sources like Phantom Buster and Heyreach?
- What’s the best way to save the entire JSON as a string in a single cell in Google Sheets, while also potentially extracting specific fields for separate columns?
- Is it possible to do this entirely within Make.com, or do I need to use Google Apps Script? If so, how can I integrate it seamlessly?
Any examples or step-by-step guidance would be greatly appreciated. Thank you in advance for your help!