开始使用(Dialogflow)
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
开发使用 Interactive Canvas 的 Action 时,应遵循与构建对话型 Action 相同的一般步骤。创建 Action 项目、Dialogflow 代理、fulfillment 和 Web 应用后,即可定义 Action 和 Interactive Canvas 之间的通信。
请按照以下开发步骤构建您的 Interactive Canvas Action:
设置:设置用于开发使用 Interactive Canvas 的 Action 的各种工具和平台。
- 创建 Actions 项目:创建包含配置、管理和发布 Action 所需的元数据的项目。
- 创建 Dialogflow 代理:使用 Dialogflow 为 Action 构建对话界面。
构建对话型 Action:为 Action 中包含 HtmlResponse
的 intent 定义网络钩子逻辑。Interactive Canvas 文档介绍了如何使用 Node.js 客户端库构建 Action,但您也可以使用 Java 客户端库进行构建。
构建 Web 应用:使用现有 Web 技术创建 Web 应用,并编写利用 Interactive Canvas API 的客户端自定义逻辑。部署到您选择的网络服务器。
部署您的执行方式:使用 Firebase CLI 部署您的执行方式代码。
测试你的 Action:了解如何使用模拟器测试你的 Action。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-24。
[null,null,["最后更新时间 (UTC):2025-07-24。"],[[["\u003cp\u003eInteractive Canvas Actions blend conversational interfaces with rich visual experiences using web technologies.\u003c/p\u003e\n"],["\u003cp\u003eDevelopment involves setting up an Actions project, creating a Dialogflow agent, building a conversational Action with webhook logic, developing a web app using the Interactive Canvas API, and deploying the fulfillment.\u003c/p\u003e\n"],["\u003cp\u003eYou can build your Action using either the Node.js or Java client library, providing flexibility in your development process.\u003c/p\u003e\n"],["\u003cp\u003eThorough testing is essential, and the simulator provides a robust environment for validating your Interactive Canvas Action.\u003c/p\u003e\n"]]],["Develop an Interactive Canvas Action by first setting up an Actions project and Dialogflow agent. Next, build the conversational Action, defining webhook logic for intents. Subsequently, create the web app using web technologies and the Interactive Canvas API, and deploy it. Deploy the fulfillment code using the Firebase CLI. Finally, test the Action using the simulator to ensure it works correctly. These steps outline the core process.\n"],null,["# Get started (Dialogflow)\n\nDeveloping an Action that uses Interactive Canvas follows the same general steps\nfor building a conversational Action. Once you create your Actions project,\nDialogflow agent, fulfillment, and web app, you define the communication between\nyour Action and Interactive Canvas.\n\nFollow these development steps to build your Interactive Canvas Action:\n\n1. [Setup](/assistant/df-asdk/interactivecanvas/build/setup): Set up the various\n tools and platforms for developing an Action that uses Interactive Canvas.\n\n - Create an Actions project: Create the project that contains the metadata required to configure, manage, and publish your Action.\n - Create the Dialogflow agent: Use Dialogflow to build the conversational interface for your Action.\n2. [Build your conversational Action](/assistant/df-asdk/interactivecanvas/build/action): Define the\n webhook logic for the intents in your Action that include an\n `HtmlResponse`. The Interactive Canvas documentation shows you how to build\n your Action with the\n [Node.js client library](https://actions-on-google.github.io/actions-on-google-nodejs/2.10.0/classes/_service_actionssdk_conversation_response_html_.htmlresponse.html),\n but you can also build with the [Java client library](https://github.com/actions-on-google/actions-on-google-java).\n\n3. [Build your web app](/assistant/df-asdk/interactivecanvas/build/web-app): Use existing\n web technologies to create your web app and\n write the client-side custom logic that utilizes the\n [Interactive Canvas API](/assistant/df-asdk/interactivecanvas/reference/interactivecanvas).\n Deploy to your web server of choice.\n\n4. [Deploy your fulfillment](/assistant/df-asdk/deploy-fulfillment): Use\n the Firebase CLI to deploy your fulfillment code.\n\n5. [Test your Action](/assistant/df-asdk/interactivecanvas/build/test): Learn how to use\n the simulator to test your Action."]]