Hello, I am trying to figure out webhooks in purpose to integrate with my workflow in Hubspot. The workflow is triggered by submitted form. In this workflow I want to invoke a cloud function that will create a new document in firestore. This document will store all data of the incoming form. There are over 160 unique forms, so thats why I need webhooks. Thats atleast what im thinking. Is this possible or are there other solutions i should try?
Yes, this can be done by using Google Cloud Functions. You could expose a HTTP Function and implement the signature validation before inserting the document into Firestore.
Here is a quick and simple solution, including code and some scripts to deploy and test the function.
https://github.com/mecclesgoogle/hubspot-firestore
Ensure you grant the default Compute Service Account the 'Datastore User' role so that the function can write into the Firestore database.
You'd also have to make some changes to harden this code:
Hope this helps!