{"__v":0,"_id":"5845a4a99f6fbb1b004307fd","category":{"version":"5845a4a89f6fbb1b004307b7","project":"54d3007669578e0d002730c9","_id":"5845a4a89f6fbb1b004307bd","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-07-08T18:48:02.369Z","from_sync":false,"order":5,"slug":"integrations","title":"Integrations"},"parentDoc":null,"project":"54d3007669578e0d002730c9","user":"5825da1aaf422e0f00a90204","version":{"__v":1,"_id":"5845a4a89f6fbb1b004307b7","project":"54d3007669578e0d002730c9","createdAt":"2016-12-05T17:32:24.708Z","releaseDate":"2016-12-05T17:32:24.708Z","categories":["5845a4a89f6fbb1b004307b8","5845a4a89f6fbb1b004307b9","5845a4a89f6fbb1b004307ba","5845a4a89f6fbb1b004307bb","5845a4a89f6fbb1b004307bc","5845a4a89f6fbb1b004307bd","5845a4a89f6fbb1b004307be","5845a4a89f6fbb1b004307bf","5845a4a89f6fbb1b004307c0"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"25.0.0","version":"25"},"updates":["582a5437e21d0d1b00d6cf10"],"next":{"pages":[],"description":""},"createdAt":"2016-11-11T14:57:02.069Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":2,"body":"This section describes the following topics:\n* [Overview](#overview)\n* [Enabling Actions on Google integration](#enabling-actions-on-google-integration)\n* [Configuring your Conversation Action](#configuring-your-conversation-action)\n * [Setting the invocation name](#section-setting-the-invocation-name-for-testing)\n * [Choosing a Welcome Intent](#section-choosing-a-Welcome-Intent)\n * [Selecting a voice](#section-selecting-a-voice)\n * [Choosing additional triggering intents](#section-choosing-additional-triggering-intents)\n* [Previewing your Conversation Action](#previewing-your-conversation-action)\n* [Using account linking](#using-account-linking)\n* [Deploying your Conversation Action](#deploying-your-conversation-action)\n* [Using a Webhook](#using-a-webhook)\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Overview\"\n}\n[/block]\nYou can integrate your API.AI agent with <a href=\"http://developers.google.com/actions/\" target=\"_blank\">Actions on Google</a>. When your agent is integrated with Actions on Google, you can preview your Conversation Action with the <a href=\"https://developers.google.com/actions/tools/web-simulator\" target=\"blank\">Google Home Web Simulator</a> and deploy your agent so that other users can discover and use it on the Google Home. \n\nActions on Google provides additional settings for your integration, including which voice to use, which intents to use to start the interaction, and account linking settings.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Enabling Actions on Google integration\"\n}\n[/block]\nTo begin testing your agent with Google, you must enable the Actions on Google integration. When integrated with Actions on Google, your API.AI agent is known as a *Conversation Action*.\n\n**To enable Actions on Google:**\n1. In the API.AI console, select **Integrations** in the left-hand panel.\n2. Enable the toggle switch on the Actions on Google card, as the following example shows:\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/db9c8f1-actions-on-google-enabled.png\",\n        \"actions-on-google-enabled.png\",\n        281,\n        285,\n        \"#6aacea\"\n      ],\n      \"sizing\": \"original\"\n    }\n  ]\n}\n[/block]\nAfter you have enabled Actions on Google, you can configure your Conversation Action to prepare it for previewing and deployment.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Configuring your Conversation Action\"\n}\n[/block]\nWhen you integrate your agent with Actions on Google, you have several configuration options. These include:\n* [Setting the invocation name](#section-setting-the-invocation-name-for-testing)\n* [Choosing a Welcome Intent](#section-choosing-a-welcome-intent)\n* [Selecting a voice](#section-selecting-a-voice)\n* [Choosing additional triggering intents](#section-choosing-additional-triggering-intents)\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"Before you can preview your Conversation Action on the <a href=\\\"https://developers.google.com/actions/tools/web-simulator\\\" target=\\\"blank\\\">Google Home Web Simulator</a>, you must [define an invocation name for testing](#section-setting-the-invocation-name-for-testing) and [choose a Welcome Intent](#section-choosing-a-welcome-intent).\",\n  \"title\": \"NOTE\"\n}\n[/block]\n## Setting the invocation name for testing\nThe invocation name for testing is used by <a href=\"https://developers.google.com/actions/tools/web-simulator\" target=\"blank\">Google Home Web Simulator</a> to refer to your Conversation Action during testing. It is not the same as the invocation name that you use during registration and deployment.\n\n**To set your invocation name for testing:**\n1. In the API.AI console, select **Integrations** in the left-hand panel.\n2. Click the **SETTINGS** link. The Actions on Google view displays.\n3. In the **Invocation name for testing** field, enter a name for your Conversation Action that you want to use during testing.\n\n## Choosing a Welcome Intent\nThe Welcome Intent is the intent that is triggered when one of the default invocation phrases is used. For example, when a user says \"OK Google, let me talk to Guess a Number\" or \"OK Google, at Guess a Number\", Assistant will invoke the Welcome Intent for that agent.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"NOTE\",\n  \"body\": \"To be able to preview your Conversation Action on the <a href=\\\"https://developers.google.com/actions/tools/web-simulator\\\" target=\\\"blank\\\">Google Home Web Simulator</a>, you must specify the Welcome Intent in your Actions on Google integration.\"\n}\n[/block]\n**To choose a Welcome Intent:**\n1. In the API.AI console, select **Integrations** in the left-hand panel.\n2. Click the **SETTINGS** link. The Actions on Google view displays.\n3. Move your cursor to the **Welcome Intent** field and select an intent from the drop-down list, as the following example shows:\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/408fb65-choose-welcome-intent.png\",\n        \"choose-welcome-intent.png\",\n        816,\n        646,\n        \"#dee0e1\"\n      ],\n      \"border\": true\n    }\n  ]\n}\n[/block]\nAfter you specify a Welcome Intent, API.AI automatically adds the **GOOGLE_ASSISTANT_WELCOME** event to the intent's definition, as the following example shows:\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/9c57dd8-event-added.png\",\n        \"event-added.png\",\n        646,\n        476,\n        \"#1d90cc\"\n      ],\n      \"border\": true\n    }\n  ]\n}\n[/block]\nFor a complete list of invocation phrases, see <a href=\"https://developers.google.com/actions/develop/apiai/invocation-and-discovery\" target=\"_blank\">Discovery and Invocation</a>.\n\n## Selecting a voice\nYou can select one of several voice options when integrating your agent with Actions on Google. Select a voice that best matches the tone and style of your application. The default voice for the Home is a female voice, so if you want to ensure that your app contrasts with the default voice, you can choose a male voice.\n\nThe voice that you select will be used only by the <a href=\"https://developers.google.com/actions/tools/web-simulator\" target=\"blank\">Google Home Web Simulator</a> when a user is interacting with your app. It is not used by the API.AI simulator.\n\n**To select a voice for your Conversation Action:**\n1. In the API.AI console, select **Integrations** in the left-hand panel.\n2. Click the **SETTINGS** link. The Actions on Google view displays.\n3. Under **TTS voice**, select one of the available voices, such as Male 1, as the following example shows:\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/769ea67-select-a-voice.png\",\n        \"select-a-voice.png\",\n        811,\n        651,\n        \"#e8e8e8\"\n      ],\n      \"border\": true\n    }\n  ]\n}\n[/block]\n4. To try out the new voice, click the **PREVIEW** button in the Actions on Google view, as described in [Previewing your Conversation Action](#previewing-your-conversation-action). The simulator should use the newly selected voice.\n\n## Choosing additional triggering intents\nYou use the Actions on Google view to select additional triggering intents. Triggering intents are the set of intents whose user expressions can be used to directly invoke the Conversation Action.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"To be able to preview your Conversation Action on the <a href=\\\"https://developers.google.com/actions/tools/web-simulator\\\" target=\\\"blank\\\">Google Home Web Simulator</a>, you must specify a Welcome Intent in your Actions on Google integration. Additional triggering intents are optional.\",\n  \"title\": \"NOTE\"\n}\n[/block]\n**To choose additional triggering intents:**\n1. In the API.AI console, select **Integrations** in the left-hand panel.\n2. Click the **SETTINGS** link. The Actions on Google view displays.\n3. Move your cursor to the **Additional triggering intents** field and select an intent from the drop-down list, as the following example shows: \n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/2a07f1b-select-additional-triggering-intents.png\",\n        \"select-additional-triggering-intents.png\",\n        806,\n        651,\n        \"#e3e2e1\"\n      ],\n      \"border\": true\n    }\n  ]\n}\n[/block]\nYou can select as many additional triggering intents for your agent as you want.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Previewing your Conversation Action\"\n}\n[/block]\nAfter enabling Actions on Google integration, you can publish a preview of your Conversation Action so that you can try it out with the <a href=\"https://developers.google.com/actions/tools/web-simulator\" target=\"blank\">Google Home Web Simulator</a>. This lets you test your agent without having to register it with Google just yet.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"Use the <a href=\\\"https://developers.google.com/actions/tools/web-simulator\\\" target=\\\"blank\\\">Google Home Web Simulator</a> to try out your Conversation Action.\",\n  \"title\": \"NOTE\"\n}\n[/block]\nBefore you can preview your Conversation Action, you must give it [an invocation name for testing](#section-setting-the-invocation-name-for-testing) and [select a Welcome Intent](#section-choosing-a-welcome-intent).\n\n**To preview your Conversation Action:**\n1. In the API.AI console, select **Integrations** in the left-hand panel.\n2. Click the **SETTINGS** link. The Actions on Google view displays.\n3. If the **AUTHORIZE** link is visible in the lower right, click it and follow the instructions to give your client access to the new Conversation Action on the simulator.\n4. In the lower right corner of the Actions on Google view, click the **PREVIEW** button. \n\n   If the **PREVIEW** button is not available, be sure that you have:\n    * Authorized your client to access the Conversation Action (click the **AUTHORIZE** button)\n    * Set the value of the [invocation name for testing](#section-setting-the-invocation-name-for-testing)\n    * Selected [a Welcome Intent](#section-choosing-a-welcome-intent)\n\n  If successful, a link to the <a href=\"https://developers.google.com/actions/tools/web-simulator\" target=\"blank\">Google Home Web Simulator</a> appears in the lower right corner:\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/9fd1bc7-preview-published.png\",\n        \"preview-published.png\",\n        525,\n        86,\n        \"#54546c\"\n      ]\n    }\n  ]\n}\n[/block]\n5. To try out your Conversation Action, click the provided link or follow <a href=\"https://developers.google.com/actions/tools/web-simulator\" target=\"_blank\">this link</a>.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Using account linking\"\n}\n[/block]\nWhen integrating with Actions on Google, you can specify the account linking settings by requiring sign-in for the Welcome Intent.\n\n**To specify account linking settings:**\n1. In the API.AI console, select **Integrations** in the left-hand panel.\n2. Click the **SETTINGS** link. The Actions on Google view displays.\n3. Enable the **Sign-in required for welcome intent** checkbox, as the following example shows:\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/f04f488-sign-in-required.png\",\n        \"sign-in-required.png\",\n        801,\n        916,\n        \"#f8f8f8\"\n      ],\n      \"border\": true\n    }\n  ]\n}\n[/block]\nThe following table describes the fields that are now visible:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Field Name\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"**Client ID** \",\n    \"1-0\": \"**Grant type**\",\n    \"2-0\": \"**Client Secret**\",\n    \"3-0\": \"**Authorization URL**\",\n    \"4-0\": \"**Token URL**\",\n    \"5-0\": \"**Scopes**\",\n    \"6-0\": \"**Privacy Policy URL**\",\n    \"0-1\": \"A unique public string used by Google to identify the client that is requesting authentication.\",\n    \"1-1\": \"Select either \\\"Authorization code\\\" (the default) or \\\"Implicit\\\". If you select \\\"Implicit\\\", then the **Client Secret** and **Token URL** are no longer required.\",\n    \"2-1\": \"The secret sent by Google to the authentication server to authorize the client.\",\n    \"3-1\": \"The URL to which users are redirected to enter their login credentials.\",\n    \"4-1\": \"The URL to fetch the access token given an authentication.\",\n    \"5-1\": \"A comma-separated list of scopes for which the user grants permission. Up to 10 scopes are supported.\",\n    \"6-1\": \"The location of your privacy policy.\",\n    \"7-0\": \"**Reason for user to link their account**\",\n    \"7-1\": \"A description of why the user should link their account so that you can recognize who the user is.\",\n    \"h-2\": \"Required?\",\n    \"0-2\": \"Required\",\n    \"1-2\": \"Required\",\n    \"2-2\": \"Required\",\n    \"3-2\": \"Required\",\n    \"4-2\": \"Required\",\n    \"6-2\": \"Required\",\n    \"7-2\": \"Required\",\n    \"5-2\": \"Optional\"\n  },\n  \"cols\": 3,\n  \"rows\": 8\n}\n[/block]\nFor more information, see <a href=\"https://developers.google.com/actions/develop/identity/account-linking\" target=\"_blank\">Account Linking with OAuth 2.0</a>.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Deploying your Conversation Action\"\n}\n[/block]\nAfter setting up Actions on Google integration, you can deploy your agent so that it is live and available for use by other users. To do this, you must first set up a Google App Engine project and register your Conversation Action with Google.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"The registration process can take 1 to 2 weeks for Google to approve your new Conversation Action.\",\n  \"title\": \"NOTE\"\n}\n[/block]\nFor more information, see <a href=\"https://developers.google.com/actions/distribute/deploy\" target=\"_blank\">Deploy Your Actions</a>.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Using a webhook\"\n}\n[/block]\nWhen developing an agent in API.AI, you can use a webhook to handle requests and generate responses to the Assistant. This process is called <em>fulfillment</em>.\n\nTo help you get started with your webhook, we provide the following boilerplate code:\n<a href=\"https://github.com/actions-on-google/apiai-webhook-template-nodejs\" target=\"_blank\">https://github.com/actions-on-google/apiai-webhook-template-nodejs</a>\n\nFor more information about using webhooks with API.AI, see <a href=\"/docs/webhook\">Webhook</a>.","excerpt":"","slug":"actions-on-google-integration","type":"basic","title":"Actions on Google Integration"}

Actions on Google Integration


This section describes the following topics: * [Overview](#overview) * [Enabling Actions on Google integration](#enabling-actions-on-google-integration) * [Configuring your Conversation Action](#configuring-your-conversation-action) * [Setting the invocation name](#section-setting-the-invocation-name-for-testing) * [Choosing a Welcome Intent](#section-choosing-a-Welcome-Intent) * [Selecting a voice](#section-selecting-a-voice) * [Choosing additional triggering intents](#section-choosing-additional-triggering-intents) * [Previewing your Conversation Action](#previewing-your-conversation-action) * [Using account linking](#using-account-linking) * [Deploying your Conversation Action](#deploying-your-conversation-action) * [Using a Webhook](#using-a-webhook) [block:api-header] { "type": "basic", "title": "Overview" } [/block] You can integrate your API.AI agent with <a href="http://developers.google.com/actions/" target="_blank">Actions on Google</a>. When your agent is integrated with Actions on Google, you can preview your Conversation Action with the <a href="https://developers.google.com/actions/tools/web-simulator" target="blank">Google Home Web Simulator</a> and deploy your agent so that other users can discover and use it on the Google Home. Actions on Google provides additional settings for your integration, including which voice to use, which intents to use to start the interaction, and account linking settings. [block:api-header] { "type": "basic", "title": "Enabling Actions on Google integration" } [/block] To begin testing your agent with Google, you must enable the Actions on Google integration. When integrated with Actions on Google, your API.AI agent is known as a *Conversation Action*. **To enable Actions on Google:** 1. In the API.AI console, select **Integrations** in the left-hand panel. 2. Enable the toggle switch on the Actions on Google card, as the following example shows: [block:image] { "images": [ { "image": [ "https://files.readme.io/db9c8f1-actions-on-google-enabled.png", "actions-on-google-enabled.png", 281, 285, "#6aacea" ], "sizing": "original" } ] } [/block] After you have enabled Actions on Google, you can configure your Conversation Action to prepare it for previewing and deployment. [block:api-header] { "type": "basic", "title": "Configuring your Conversation Action" } [/block] When you integrate your agent with Actions on Google, you have several configuration options. These include: * [Setting the invocation name](#section-setting-the-invocation-name-for-testing) * [Choosing a Welcome Intent](#section-choosing-a-welcome-intent) * [Selecting a voice](#section-selecting-a-voice) * [Choosing additional triggering intents](#section-choosing-additional-triggering-intents) [block:callout] { "type": "info", "body": "Before you can preview your Conversation Action on the <a href=\"https://developers.google.com/actions/tools/web-simulator\" target=\"blank\">Google Home Web Simulator</a>, you must [define an invocation name for testing](#section-setting-the-invocation-name-for-testing) and [choose a Welcome Intent](#section-choosing-a-welcome-intent).", "title": "NOTE" } [/block] ## Setting the invocation name for testing The invocation name for testing is used by <a href="https://developers.google.com/actions/tools/web-simulator" target="blank">Google Home Web Simulator</a> to refer to your Conversation Action during testing. It is not the same as the invocation name that you use during registration and deployment. **To set your invocation name for testing:** 1. In the API.AI console, select **Integrations** in the left-hand panel. 2. Click the **SETTINGS** link. The Actions on Google view displays. 3. In the **Invocation name for testing** field, enter a name for your Conversation Action that you want to use during testing. ## Choosing a Welcome Intent The Welcome Intent is the intent that is triggered when one of the default invocation phrases is used. For example, when a user says "OK Google, let me talk to Guess a Number" or "OK Google, at Guess a Number", Assistant will invoke the Welcome Intent for that agent. [block:callout] { "type": "info", "title": "NOTE", "body": "To be able to preview your Conversation Action on the <a href=\"https://developers.google.com/actions/tools/web-simulator\" target=\"blank\">Google Home Web Simulator</a>, you must specify the Welcome Intent in your Actions on Google integration." } [/block] **To choose a Welcome Intent:** 1. In the API.AI console, select **Integrations** in the left-hand panel. 2. Click the **SETTINGS** link. The Actions on Google view displays. 3. Move your cursor to the **Welcome Intent** field and select an intent from the drop-down list, as the following example shows: [block:image] { "images": [ { "image": [ "https://files.readme.io/408fb65-choose-welcome-intent.png", "choose-welcome-intent.png", 816, 646, "#dee0e1" ], "border": true } ] } [/block] After you specify a Welcome Intent, API.AI automatically adds the **GOOGLE_ASSISTANT_WELCOME** event to the intent's definition, as the following example shows: [block:image] { "images": [ { "image": [ "https://files.readme.io/9c57dd8-event-added.png", "event-added.png", 646, 476, "#1d90cc" ], "border": true } ] } [/block] For a complete list of invocation phrases, see <a href="https://developers.google.com/actions/develop/apiai/invocation-and-discovery" target="_blank">Discovery and Invocation</a>. ## Selecting a voice You can select one of several voice options when integrating your agent with Actions on Google. Select a voice that best matches the tone and style of your application. The default voice for the Home is a female voice, so if you want to ensure that your app contrasts with the default voice, you can choose a male voice. The voice that you select will be used only by the <a href="https://developers.google.com/actions/tools/web-simulator" target="blank">Google Home Web Simulator</a> when a user is interacting with your app. It is not used by the API.AI simulator. **To select a voice for your Conversation Action:** 1. In the API.AI console, select **Integrations** in the left-hand panel. 2. Click the **SETTINGS** link. The Actions on Google view displays. 3. Under **TTS voice**, select one of the available voices, such as Male 1, as the following example shows: [block:image] { "images": [ { "image": [ "https://files.readme.io/769ea67-select-a-voice.png", "select-a-voice.png", 811, 651, "#e8e8e8" ], "border": true } ] } [/block] 4. To try out the new voice, click the **PREVIEW** button in the Actions on Google view, as described in [Previewing your Conversation Action](#previewing-your-conversation-action). The simulator should use the newly selected voice. ## Choosing additional triggering intents You use the Actions on Google view to select additional triggering intents. Triggering intents are the set of intents whose user expressions can be used to directly invoke the Conversation Action. [block:callout] { "type": "info", "body": "To be able to preview your Conversation Action on the <a href=\"https://developers.google.com/actions/tools/web-simulator\" target=\"blank\">Google Home Web Simulator</a>, you must specify a Welcome Intent in your Actions on Google integration. Additional triggering intents are optional.", "title": "NOTE" } [/block] **To choose additional triggering intents:** 1. In the API.AI console, select **Integrations** in the left-hand panel. 2. Click the **SETTINGS** link. The Actions on Google view displays. 3. Move your cursor to the **Additional triggering intents** field and select an intent from the drop-down list, as the following example shows: [block:image] { "images": [ { "image": [ "https://files.readme.io/2a07f1b-select-additional-triggering-intents.png", "select-additional-triggering-intents.png", 806, 651, "#e3e2e1" ], "border": true } ] } [/block] You can select as many additional triggering intents for your agent as you want. [block:api-header] { "type": "basic", "title": "Previewing your Conversation Action" } [/block] After enabling Actions on Google integration, you can publish a preview of your Conversation Action so that you can try it out with the <a href="https://developers.google.com/actions/tools/web-simulator" target="blank">Google Home Web Simulator</a>. This lets you test your agent without having to register it with Google just yet. [block:callout] { "type": "info", "body": "Use the <a href=\"https://developers.google.com/actions/tools/web-simulator\" target=\"blank\">Google Home Web Simulator</a> to try out your Conversation Action.", "title": "NOTE" } [/block] Before you can preview your Conversation Action, you must give it [an invocation name for testing](#section-setting-the-invocation-name-for-testing) and [select a Welcome Intent](#section-choosing-a-welcome-intent). **To preview your Conversation Action:** 1. In the API.AI console, select **Integrations** in the left-hand panel. 2. Click the **SETTINGS** link. The Actions on Google view displays. 3. If the **AUTHORIZE** link is visible in the lower right, click it and follow the instructions to give your client access to the new Conversation Action on the simulator. 4. In the lower right corner of the Actions on Google view, click the **PREVIEW** button. If the **PREVIEW** button is not available, be sure that you have: * Authorized your client to access the Conversation Action (click the **AUTHORIZE** button) * Set the value of the [invocation name for testing](#section-setting-the-invocation-name-for-testing) * Selected [a Welcome Intent](#section-choosing-a-welcome-intent) If successful, a link to the <a href="https://developers.google.com/actions/tools/web-simulator" target="blank">Google Home Web Simulator</a> appears in the lower right corner: [block:image] { "images": [ { "image": [ "https://files.readme.io/9fd1bc7-preview-published.png", "preview-published.png", 525, 86, "#54546c" ] } ] } [/block] 5. To try out your Conversation Action, click the provided link or follow <a href="https://developers.google.com/actions/tools/web-simulator" target="_blank">this link</a>. [block:api-header] { "type": "basic", "title": "Using account linking" } [/block] When integrating with Actions on Google, you can specify the account linking settings by requiring sign-in for the Welcome Intent. **To specify account linking settings:** 1. In the API.AI console, select **Integrations** in the left-hand panel. 2. Click the **SETTINGS** link. The Actions on Google view displays. 3. Enable the **Sign-in required for welcome intent** checkbox, as the following example shows: [block:image] { "images": [ { "image": [ "https://files.readme.io/f04f488-sign-in-required.png", "sign-in-required.png", 801, 916, "#f8f8f8" ], "border": true } ] } [/block] The following table describes the fields that are now visible: [block:parameters] { "data": { "h-0": "Field Name", "h-1": "Description", "0-0": "**Client ID** ", "1-0": "**Grant type**", "2-0": "**Client Secret**", "3-0": "**Authorization URL**", "4-0": "**Token URL**", "5-0": "**Scopes**", "6-0": "**Privacy Policy URL**", "0-1": "A unique public string used by Google to identify the client that is requesting authentication.", "1-1": "Select either \"Authorization code\" (the default) or \"Implicit\". If you select \"Implicit\", then the **Client Secret** and **Token URL** are no longer required.", "2-1": "The secret sent by Google to the authentication server to authorize the client.", "3-1": "The URL to which users are redirected to enter their login credentials.", "4-1": "The URL to fetch the access token given an authentication.", "5-1": "A comma-separated list of scopes for which the user grants permission. Up to 10 scopes are supported.", "6-1": "The location of your privacy policy.", "7-0": "**Reason for user to link their account**", "7-1": "A description of why the user should link their account so that you can recognize who the user is.", "h-2": "Required?", "0-2": "Required", "1-2": "Required", "2-2": "Required", "3-2": "Required", "4-2": "Required", "6-2": "Required", "7-2": "Required", "5-2": "Optional" }, "cols": 3, "rows": 8 } [/block] For more information, see <a href="https://developers.google.com/actions/develop/identity/account-linking" target="_blank">Account Linking with OAuth 2.0</a>. [block:api-header] { "type": "basic", "title": "Deploying your Conversation Action" } [/block] After setting up Actions on Google integration, you can deploy your agent so that it is live and available for use by other users. To do this, you must first set up a Google App Engine project and register your Conversation Action with Google. [block:callout] { "type": "info", "body": "The registration process can take 1 to 2 weeks for Google to approve your new Conversation Action.", "title": "NOTE" } [/block] For more information, see <a href="https://developers.google.com/actions/distribute/deploy" target="_blank">Deploy Your Actions</a>. [block:api-header] { "type": "basic", "title": "Using a webhook" } [/block] When developing an agent in API.AI, you can use a webhook to handle requests and generate responses to the Assistant. This process is called <em>fulfillment</em>. To help you get started with your webhook, we provide the following boilerplate code: <a href="https://github.com/actions-on-google/apiai-webhook-template-nodejs" target="_blank">https://github.com/actions-on-google/apiai-webhook-template-nodejs</a> For more information about using webhooks with API.AI, see <a href="/docs/webhook">Webhook</a>.