Google is committed to advancing racial equity for Black communities. See how.

Integrate a Dialogflow chatbot with Actions on Google

Once you build your agent on Dialogflow, you can use the one-click integrations to connect to various platforms such as the Google Assistant, web, telephony, Slack, Facebook Messenger, Twitter, and more. In this codelab, you'll integrate Dialogflow with Actions on Google to enable the chatbot as an Action on Google Home or the Assistant.

Actions on Google is a platform where you can create software to extend the functionality of the Assistant. By integrating Dialogflow with Actions on Google, you can reach more than 500 million devices that support the Assistant, including smart speakers, phones, cars, TVs, and watches.


Before proceeding, you need to complete Build an appointment scheduler with Dialogflow.

What you'll learn

  • How to enable an Actions on Google integration from Dialogflow
  • How to test the Action
  • How to manage the Assistant from the Actions on Google console

What you'll build

  • An integration between a Dialogflow agent and Actions on Google

What you'll need

  • A web browser and an email address to log into Dialogflow console
  1. Navigate to the Dialogflow console.
  2. Select the AppointmentScheduler agent that you previously built.

  1. Click Integrations.

  1. Click Google Assistant Integration Settings.

  1. In the dialog, define the Explicit invocation and Implicit invocation.

An explicit invocation occurs when users tell the Assistant to use your Action by name. Optionally, users can include an invocation phrase at the end of the invocation that leads directly to the requested function. When users say, "Ok Google, talk to smart scheduler," smart scheduler is the trigger name. In your case, the default welcome intent is a perfect spot for users to land on, so you'll stick with it.

An implicit invocation is an interaction flow that occurs when users make requests to perform a task without invoking an Action by name. The Assistant attempts to match the request to a suitable fulfillment, such as an Action, search result, or mobile app, then presents recommendations. If you've deployed an Action that can help users with the task, then implicit invocation provides a way for users to discover your Action via the Assistant. If users say, "Ok Google, ask smart scheduler to set an appointment for 5 PM tomorrow," that's an implicit invocation required to trigger a deep link, so in this case, you should invoke your schedule appointment intent directly because you know exactly what the users intend to do.

  1. Click Test to see if it functions correctly in the Actions simulator.

  1. Try the following phrases:
  1. Enter "Talk to my test app," to which the bot replies, "Alright. Let's get the test version of my test app. Good day! What can I do for you today?"
  2. Enter "help me set an appointment" or "set an appointment for 4 PM tomorrow" and follow the prompts to see an appointment setup.

  1. You can also see options to test and debug the request using the Display, Request, Response, Audio, Debug, and Errors tabs.

  1. Navigate to Dialogflow and click Integrations.
  2. Click Integration Settings for Google Assistant.
  3. In the dialog, click Manage Assistant App .

That provides you with the ability to set the invocation name for the chatbot. In the sample, you called it "Smart Scheduler," but you'll need to use another name because those are global.

  1. Select Male 1 voice for the Assistant and click Save.

5. Under Deploy, click Company Details, then provide company details and contacts.

  1. Click Directory Information. Complete all fields. Click Save.

Here's a sample small image that you can use:

  1. Click Location targeting, select the countries that you want to deploy to and the surfaces that you want your actions to run on.

  1. (Optional.) Once you feel comfortable after simulator testing, you can push the app for alpha and beta testers to further test. To enable alpha and beta testing, click Deploy > Release.
  1. With Beta, you can test the action with 200 users.
  2. With Alpha, you can enable the action for as many as 20 users.

  1. (Optional.) When you're satisfied and ready to push the app to production, click Deploy > Release > Submit For Production.
  1. (Optional.) You'll see a dialog to confirm that you tested the app before deploying to production and submitting for approval. Select appropriately.

If you don't wish to submit the action for review in production, that's fine. All the setup that you did so far is still useful to do a proper testing in simulator, alpha, and beta.

Log into Google Home or the Assistant app with the same email address that you used to build the app. Test it with the following conversation:

  1. User: "Talk to <example name given> (smart scheduler in your case)"
  2. Chatbot: "Sure. Let's get the test version of smart scheduler demo. Hi! How are you doing?"
  3. User: "Hi"
  4. User: "Set an appointment"
  5. Chatbot: "What date?"
  6. User: "May 23"
  7. Chatbot: "What time would you like to come in?"
  8. User: "10 AM"

Try another example in which you set an appointment for 4 PM tomorrow. Google Home or the Assistant should respond with confirmation of the appointment.

If you plan to complete other codelabs that involve Dialogflow, then skip this section for now and return to it later.

Delete the Dialogflow agent

  1. Click next to your existing agent.
  1. In the General tab, click Delete This Agent.
  2. Type Delete into the dialog and click Delete.

You built a chatbot and created an Action out of it. You're now a chatbot developer!

Learn more

Check out the code samples at the Dialogflow Github page to learn more.