To enable external request for the Google Sheet script you have to set the scope in the manifest file:
Set the API key from the WebHMI project as well as other requred headers: