Skip to main content

How to upload Action Package on macOS

When configuring the Google Assistant channel, you download the Action Package file from your script. This file should be uploaded to the project where you configure your Action.

There are some details to be considered when uploading Action Package on macOS that are described in this article. If you use Windows, go to the Load Action Package into the project section of the main article on Google Assistant.

Upload Action Package via Terminal

caution
All steps should be performed from the Administrator account.
  1. Launch the Terminal.

  2. Run the following command: sudo chmod +x gactions. Enter the password if it is required.

  3. Enter the path to the folder with gactions and the JSON file to the $PAGE system variable. To do this, run the command: export PATH=$PATH:~/path where /path is the path to your folder.

  4. Check whether the path has been written to the variable correctly: echo $PATH. If everything is correct, the path will appear in the Terminal.

  5. To check the gactions availability, run the command: gactions help. If the system suggests updating gactions, type y and press Enter.

  6. Run the following command:

gactions update --action_package PACKAGE_NAME --project PROJECT_ID

  • Put the name of the JSON file you have downloaded before instead of PACKAGE_NAME.
  • Put the Project ID you have copied before from the project settings instead of PROJECT_ID. Press Enter.

As the result, you will see the URL which you need to put into the address bar in any browser.

After doing that, go to the Give permissions step in the instruction on the connection and publishing the Actions.

What to do in case you specified the wrong Google Account

caution
If you specify the wrong Google Account while following the further steps, you should delete the creds.data file from the folder containing gactions and JSON file.

After that, run the following command again:

gactions update --action_package PACKAGE_NAME --project PROJECT_ID