メニュー

Expand
ページを評価:

Google Assistant (Deprecated)

With Twilio Autopilot you can build Google Assistant actions. On this page we'll walk you through how to link Google Assistant so you can build Google Assistant Actions with Autopilot.

To set Google Assistant, follow these steps:

  1. Go to https://console.actions.google.com and create a project.
  2. Define a Google Action Manifest. You'll need:
    • A unique name to describe your action. "REPLACE_THIS" in this example.
    • One or more "trigger" phrases that Google Home will listen for to activate this skill
    • Your Autopilot URL for Google Assistant.
    • You'll need this file to define your manifest:
    • {
       "actions": [
         {
           "description": "Default Welcome Intent",
           "name": "MAIN",
           "fulfillment": {
             "conversationName": "REPLACE_THIS"
           },
           "intent": {
             "name": "actions.intent.MAIN",
             "trigger": {
               "queryPatterns": [
                 "talk to REPLACE_THIS"
               ]
             }
           }
         }
       ],
       "conversations": {
         "REPLACE_THIS": {
           "name": "REPLACE_THIS",
           "url": "https://https://channels.autopilot.twilio.com/v1/<ACCOUNT_SID>/<ASSISTANT_SID>/google-assistant"
         }
       },
       "locale": "en"
      }
      

Create your own version of the above file with your own names, phrases and URL filled in.

Create Project on Google

Follow the action project setup on the following page. You will be using the "gaction" CLI tool to upload the JSON file you defined above. This will create your project and wire up its fulfillment URL.

https://developers.google.com/actions/sdk/create-a-project

There is no need to define actions or intents in Google, as Autopilot will be taking care of the interaction model.

Once completed, you should be able to go into the test portion of the console, invoke your skill by using the trigger phrase and see your request in the Autopilot logs.

Autopilot URL Parameters

パラメーター 概要
TargetTask

A string representing the unique name of the destination Task. If no TargetTask is provided, the destination task is determined by the natural language understanding.


TargetTask is useful when you want to control what task a user is routed to.

Memory

Lets you send Inbound Context to Autopilot. Should be a JSON string containing key-value pairs to insert into the Autopilot memory before starting a dialogue with the bot.

Useful for passing data stored in third party systems like a CRM into Autopilot

Example 1: Using TargetTask parameter at the end of the URL

https://channels.autopilot.twilio.com/v1/<ACCOUNT_SID>/<ASSISTANT_SID>/google-assistant?TargetTask=handle_appointment_confirmation

Any message sent to number or messaging service configured with this URL will land in the handle_appointment_confirmation task.

Example 2: Passing Inbound Context with Memory

https://channels.autopilot.twilio.com/v1/<ACCOUNT_SID>/<ASSISTANT_SID>/google-assistant?Memory={"CarModel":"Diablo","CarMake":"Lamborghini","CarYear":"2019"}

Any message sent to a bot with this URL will insert CarModel, CarMake and CarYear into the Autopilot Memory.

ページを評価:

ヘルプが必要ですか?

誰しもが一度は考える「コーディングって難しい」。そんな時は、お問い合わせフォームから質問してください。 または、Stack Overflow でTwilioタグのついた情報から欲しいものを探してみましょう。

        
        
        

        フィードバックくださりありがとうございます!

        We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

        Sending your feedback...
        🎉 Thank you for your feedback!
        Something went wrong. Please try again.

        Thanks for your feedback!

        Refer us and get $10 in 3 simple steps!

        ステップ1

        Get link

        Get a free personal referral link here

        ステップ2:

        Give $10

        Your user signs up and upgrade using link

        ステップ3

        Get $10

        1,250 free SMSes
        OR 1,000 free voice mins
        OR 12,000 chats
        OR more