Processing Google Form Responses via a Webhook
Imagine you have a Google form for some purpose, and you want to run some logic with different services upon form submission. As you might know, Google provides an IDE to run some code that is bounded to the form. This service is called Google Apps Script. But combining various kinds of services can be frustrating. You can use Cortex XSOAR to make this process a lot easier.
For instance, see the following architecture:
#
Implementation Flow#
Generic Webhook ConfigurationDownload the Generic Webhook Pack and configure an instance of the Generic Webhook Integration. For example, you can call the instance: GenericWebhookForm.
NOTE
The webhook integration needs to be accessible from the internet. See the following article on how to access the Webhook via Server's HTTPS Endpoint. If your Server is not accessible, you may need to run the Webhook integration on an engine which is accessible from the internet.
Please configure the Webhook integration with a username & password, as the attached code is using basic authentication. See the Integration documentation for more information.
In Cortex XSOAR, create an incident type that represents the Google Form use case. Add a layout, mapper, classifier, etc...
It is recommended to enable the store_samples parameter of the Webhook integration to be able to create a mapper. Example of a mapper configuration:
Create a designated playbook to run when the incident is created.
#
Google Forms ConfigurationCreate a Google form that will provide the information you need.
Create a Google Apps Script for the selected form. See Creating a project from Google Docs, Sheets, or Forms for more information.
Add the
https://www.googleapis.com/auth/script.external_request
scope to your appsscript.json file. See this for more information.Create a new file in the script editor with the following generic code. (Replace the username, password, and URL with the values from the Generic Webhook integration):
Add an on Submit trigger to the context of the form and choose the atFormSubmit function to run when the form is submitted.
You can debug your work in the Executions Feature.
That's it, now every form submission will be reflected and managed by your playbook in Cortex XSOAR.