Sample Actions

This page provides links to quickly generate sample Actions that you can customize and use to explore the features of the platform. By clicking the sample type links, you'll be presented with a wizard user interface. When the wizard completes, you get a working Dialogflow agent with intents and full source code for the fulfillment which you can modify for your own Actions.

Sample types

To get started building your Actions:

  1. Scroll to one of the samples types from the list. Optionally, you can preview the user experience for each sample type by playing the audio recording, or try out an instance by clicking on the Action link.
  2. Click on its Add to Dialogflow button.
  3. Follow the Dialogflow wizard to generate the sample.
Sample Create It Preview Features Action Link
Handling user input

This sample, a story book Action, shows how to accept user input and use it to create a dynamic response.
User input, rich response, SSML TRY IT
Simple response

This sample, a joke Action, demonstrates the use of simple textual responses, including SSML, for conversational Actions.
SSML, Audio, daily updates, routine suggestions, built-in intents TRY IT
Basic card

This sample, an Action for famous quotes, showcases the use of a basic card to display images and data in a response.
Basic card rich response, daily updates, routine suggestions, built-in intents TRY IT
Table card

This sample, an Action for facts, demonstrates the use of a table card to display tabular data in a response.
Table card rich response, daily updates, routine suggestions TRY IT
List selection

This sample, a horoscope Action, demonstrates a list response to allow a user to select an option.
List selection rich response, custom entities, helpers TRY IT
Session state

This sample, an interactive adventure Action, showcases how to use session state to store conversational data.
In-dialog data persistence, custom entities TRY IT
Media response

This sample demonstrates how to play audio content in an Action.
Media response, Media status TRY IT

Using sample Actions

You can use the sample Actions here to see examples of various Actions on Google capabilities, such as rich responses, SSML, persistence, and built-in intents. There are also sample Actions that can use daily updates and notifications, or be added to routines for recurrent use.

The intents are designed to follow our best practices for Actions, including:

  • Error handling with no-input and fallback logic
  • Support for help
  • Support for repeating prompts
  • Support for navigating back
  • Exit and cancel prompts

Each sample type include examples of user prompts that follow our conversational design guidelines.

Customize your Action

The agent is configured to use Cloud Functions for Firebase for the fulfillment. To customize the Action behavior, open the Dialogflow fulfillment editor and follow the step-by-step instructions provided in the source code.

Enable daily updates and routines

Most of the sample Actions are designed to support the automatic discovery flow of daily updates and routines with an intent called One-shot.

To enable daily updates or routines in your Action:

  1. Go to the Actions console.
  2. Select the Actions menu option.
  3. Select One-shot from the list of Actions, then enable daily or routines under User engagement.

The Assistant will automatically suggest to the user to add your Action to daily updates or routines after they invoke your Action.

Test your Action

To test your Action, follow these steps:

  1. In the Dialogflow console, after you have modified the fulfillment code, save and deploy it as a Cloud Function by clicking on the Deploy button at the bottom of the Dialogflow fulfillment editor.
  2. Once the function is deployed, click on Integrations > Google Assistant > Test to launch the Actions simulator and test your new Action.

When you are ready to publish the Action, go to the Actions console and provide some additional information for the Actions directory and submit your Action for review.