actions-on-google

Making POST requests in google actions without Inline Cloud Functions


I want to make a simple post request in google actions to a self hosted web server and I cant seem to figure out how to do that. I cant find much in the documentation and I dont have access to inline cloud functions either.


Solution

  • What you're looking for is sometimes known as a webhook or a handler or handling fulfillment in the documentation.

    You'll configure the overall Action with a single webhook URL. For specific Intents (in Dialogflow) or as part of a Handler when in a scene in Action Builder, you can specify when the webhook should be called. It will be called with a JSON body that is specific to Actions on Google (and differs if you're using Action Builder or Dialogflow) and expects a JSON response in a specific format.

    For details about all of this, consult the documentation for webhooks in either Action Builder or Dialogflow.