Send a text message with Google Home and Amazon Echo with natural language command 2017-02-13

Learn how to make Alexa and the Google Assistant be able to send text messages

  1. joaomgcd
    By the end of this tutorial you'll be able to do something like this:

    /!\ If you use the attached profile XML file, please make sure to go into the AutoVoice Natural Language event condition in the profile and enable your own natural language command. This project was created for my command which will obviously not exist in your case :p

    STEP 1 - CREATE NATURAL LANGUAGE COMMAND


    • In AutoVoice -> Natural Language -> Commands create a command with a command text as something like Send a text message to tom with hello and any variations of this you may want
    • Create a response with something like ok sending message to tom with hello
    • Select the tom text and use the Create Variable option to create a variable called contact
    • Select the hello text and use the Create Variable option to create a variable called text
    • Accept the command and go back to AutoVoice
    (i) This has created a command which will contain two variables: %contact (which will contain the contact's name) and %text (which will contain the message text). We're going to use this command in a profile in Tasker now


    STEP 2 - CREATE PROFILE TO REACT TO COMMAND


    • Create a profile in Tasker with the AutoVoice Natural Language event condition
    • Select your previously created command and accept the condition
    (i) Note how the 2 mentioned variables are shown in the variable list
    • In the task use a Flash action to show the text: sending text to %contact: %text


    STEP 3 - GET CONTACT'S NUMBER AND SEND SMS


    • Use the AutoContacts Query 2.0 action
    /!\ At the time of writing, this action is only available in the AutoContacts beta. Get it here if needed.
    • In the Filters section set Names to %contact
    • Select the Default Phone Number option
    • Under Fields to Get select the Phone Number
    • In the task use a Flash action to show the text Found number: %acnumber
    • Add a Send SMS Tasker action and set the Number field to %acnumber and the Message field to %text
    • Back out of Tasker to save


    STEP 4 - TEST


    /!\ Make sure that the Use For Google Assistant/Alexa option is enabled in AutoVoice -> Natural Language -> Commands for this to work. Otherwise you should try to test this with the AutoVoice Natural Language home screen shortcut/widget.
    If you now say the command you'll see all the flashes show up confirming that the correct info was found and the SMS should now be sent to your contact. :cool:


    /!\ IMPORTANT: If the phone number for a contact is not found (you'll know because %acnumber in step 3 won't have a phone number in it), please check if Google Home or Alexa wrote the name in a way that is different then the name of your contact.
    For example, you may have a contact called Maddie and Google Home might understand it as Maddy in which case the contact will not be found.
    In this case, add Maddy as the contact's nickname in your Contacts app and that should make it correctly find the contact.