To develop with Dialogflow, you first need to create an Actions on Google developer project and a Dialogflow agent. Having a project allows you to access the developer console to manage and distribute your app. The Dialogflow agent contains all the intents that define your app.
Create the developer project and Dialogflow agent
- Go to the Actions on Google Developer Console.
- Click on Add Project, enter
YourAppNamefor the project name, and click Create Project.
- In the Overview screen, click BUILD on the Dialogflow card and then CREATE ACTIONS ON Dialogflow to start building actions.
- The Dialogflow console appears with information automatically populated in an agent. Click Create to save the agent.
Start with the Dialogflow starter app
For your first app, we recommend you start with the Dialogflow starter app. It includes a Dialogflow agent with intents that you'll most likely use and a Google Cloud Function for fullfillment.
- Download and unzip the starter agent for Dialogflow. We'll refer to this directory as
- Restore the
<sample_dir>/agent.zipinto the YourAppName agent:
- In the left navigation, click on the gear icon to the right of the agent name.
- Click on the Export and Import tab.
- Click RESTORE FROM ZIP and select the
RESTOREin the text box, click RESTORE, then DONE. When the restoration is finished, the following screen appears. Make note of your app's project ID; you'll need it to deploy the sample's fulfillment.
Enabling fulfillment lets you return responses to users with your web fulfillment code instead of using Dialogflow's Responses feature. To do this, you must enable fulfillment for the entire agent and then select the intents that you want to use fulfillment for. To enable fulfillmenet:
- Click on Fulfillment in the left navigation.
- Enable the Webhook option.
- Enter a dummy URL into the URL field.
- Click Save