1

In a Google Apps Script, I'm trying to use a Cloud Function URL as described here

But I'm getting an error:

Executions on HTTP endpoints are disabled. Set enableHttpEndpoints to true in manifest file.

I've searched all over Google's documentation, stack overflow, and google and can't figure out where to put that enableHttpEndpoints: true. Anywhere I've tried results in an invalid manifest error.

error

enter image description here

{
  "timeZone": "America/New_York",
  "exceptionLogging": "STACKDRIVER",
  "addOns": {
    "common": {
      "name": "name",
      "logoUrl": "logo",
      "homepageTrigger": {
        "runFunction": "firebase functions URL here"
      },
  }
}
Rubén
  • 34,714
  • 9
  • 70
  • 166
d-_-b
  • 21,536
  • 40
  • 150
  • 256

2 Answers2

1

I think I figured this one out. You can't use the "classic" Google Apps Script editor to deploy an addon that uses HTTP endpoints (aka Alternate Runtime).

Instead you have to go to the Google Cloud Console and enable the Alternate Runtime feature of the Google Workspace Marketplace SDK service.

This URL should take your straight there: https://console.cloud.google.com/apis/api/appsmarket-component.googleapis.com/googleapps_sdk_gsao

Once enabled, you create a deployment on the same page using the button Create New Deployment. It appears that you don't need to use the "classic" Apps Script editor at all (which is great!). The schema doesn't seem 100% compatible so please correct any validation warnings before submitting.

Once a deployment has been created you can simply click Install next to it to test it out.

That's about as far as I've gotten. My addon finally hit my endpoint.

More information here: https://developers.google.com/workspace/add-ons/guides/alternate-runtimes

stefansundin
  • 2,826
  • 1
  • 20
  • 28
0

There is no mention to any enableHttpEndpoints in the documentation (which can be read here), nor there seems to be any response to the call. This is an issue that has been reported in Issue Tracker:

https://issuetracker.google.com/214015254

You can click the star next to the issue number to upvote it and give it more visibility.

Meanwhile, I would suggest using endpoints with an https:// prefix, as it is stated here that http:// endpoints are not accepted.

Oriol Castander
  • 640
  • 1
  • 5