i'm keen to understand if i can use a google sheet / script to receive incoming data from an external (3rd party / non google) webhook.
the webhook requirements:
POST
(my preferred), PUT
, PATCH
https://docs.google.com/spreadsheets/d/[sheet_id]/[service_name]
or even https://script.google.com/d/[project_id]/[service_name]
where ScriptApp can perform handling of the data{ "id": integer }
oauth inputs include authentication_url
, azure_subscription_key
, app_key
, app_secret
, resource_id
.
hopefully this is enough information to determine if this is possible. if not then please comment with questions and i'll do my best to answer them. thanks in advance :)
Short answer: Yes, for the most part.
Explanation -
...receive incoming data from an external (3rd party / non google) webhook.
Google Apps Script (GAS) provides a format called as Web Apps where, you write a script to handle incoming requests and "deploy" the Apps Script itself as a web app. In doing so, GAS provides you with it's own endpoint.
Adding this as a point of clarification where the endpoint/URL would not be that of a 3rd party, but that of GAS itself, which will need to be used in a 3rd party's application where they require you to provide an endpoint :)
You only have GET
& POST
requests (as of now) that can be handled by Apps Script's Web App and not the others that you've stated.
The non-dev, prod-ready link would look something like this - https://script.google.com/macros/s/Unique-Script-ID-Goes-Here/exec
The available auth/permission settings are described here.
The request parameters also describes the format of data that can be processed by the Web App.
Hope this helps but please feel free to ask for any clarifications too, as required.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With