Google Assistant Routines execute multiple Actions with a single command, perfect for those times when users wake up in the morning, head out of the house, get ready for bed or many of the other tasks they perform throughout the day. After someone engages with your Action, offer a Routine suggestion that lets users add your Action to their Routines.
Set up Routine suggestions
To configure one of your Action's intents for Routine suggestions, follow these instructions:
Prepare a triggering intent
Configure one of your Action's intents as a triggering intent. This intent is added to users' Routines when they follow your suggestion. When a user runs their Routine, the intent triggers and the Routine continues from there.
To define a triggering intent in Dialogflow, do the following:
- In the Dialogflow Console, click on Integrations.
- Under the Google Assistant section, click on Integration Settings.
- Under Discovery > Implicit invocation, click on Add intent and select your triggering intent if it's not already there.
- Turn on Auto-preview changes if it's not already enabled.
- Click Close.
In the Actions SDK, define your triggering intent in the Action package.
To turn on Routine suggestions for your triggering intent, do the following:
- In the Actions console, navigate to Develop > Actions.
- Select your triggering intent. If your intent doesn't appear in the list, make sure it's configured as a triggering intent and Dialogflow's Assistant integration is set to auto-preview changes.
- Scroll down to the User engagement section and turn on Would you like to offer routine suggestions to users.
- Enter a Content title.
- Click Save.
You've now configured your Action to suggest your intent for a Routine.
Test Routine suggestions
Test your Routine suggestions using a mobile device with the Google Assistant by following these steps:
- Make sure you're using the Google account that you used to build your Action.
- Invoke your Action.
- Interact with your Action, then end the conversation.
- Select the Routine suggestion chip. If you don't see this chip, try using your Action again but invoke different intents throughout the conversation.
- Follow the prompts to add the Action to a Routine.
- Start the Routine on your device, and make sure your Action is invoked.