To use this script, follow these steps:
When the webhook receives data from the external service, it will write the headers and values to the active sheet in the Google Sheet. You can customize the script to write the data to a specific sheet or range in the Google Sheet if needed.
The code to paste in Google Apps Script section:
This script sets up a webhook endpoint that receives data from an external service and writes it to a Google Sheet. When the webhook receives a POST request, it extracts the headers and values from the request body and writes them to the active sheet in the Google Sheet. It then returns a success message to the external service.