Skip to content

an actions on google application which can be used to easily generate teams by just using voice commands.

License

Notifications You must be signed in to change notification settings

flokol120/Team-Generator-Actions-on-Google

Repository files navigation

Team Generator

⭐ an actions on google application which can be used to easily generate teams by just using voice commands.


Used technologies


Getting started

TL;DR? Those instructions are specifically meant to be very detailed to give absolute newbies a place to start. If you happen to have some experience with the used technologies, you will be able to skim the instructions whilst understanding most of it.

0. Create a Dialogflow account

  • Visit the docs if you are not sure how.

1. Create a new agent in Dialogflow

  • Visit the docs if you are not sure how (you only need to add a new agent. You do not have to create any intents).

2. Import your agent/project into actions on google

  1. Visit the actions on google console
  2. Log in using your Google Account
  3. Click on the big ➕ (Add/import project)
  4. You should now be able to see the project which was created by Dialogflow, just select it and choose create project
  5. Choose Conversational at the very bottom
  6. Choose an invokation of your liking (i.e. mine is generate teams)

3. Import the intents

  1. Click the settings symbol in the top left corner
  2. Choose Export and Import
  3. Choose restore from zip
  4. Drag and Drop the dialog-flow-intents.zip (or click select file)
  5. Type RESTORE in the text input (It has to be upper case, I've tested it. Otherwise it wouldn't sound that cool, right? 😎) and click the restore button
  6. Click done after it is finished.

4. Setup Firebase functions

  1. Install the dependencies using yarn or npm
cd functions/
yarn

or

cd functions/
npm install
  1. Visit the Firebase console
  2. Log in using your Google Account
  3. Scroll down and you will find your project created in Dialogflow. Open it
  4. Click on Functions in the sidebar
  5. Click on get started
  6. Do not install firebase-tools globally even though Firebase tells you to! Just click next.
  7. run the following using yarn
cd functions/
yarn run init

or using npm

cd functions/
npm run init
  1. Choose TypeScript using the arrow keys and hit ENTER
  2. Hit ENTER 6 times
  3. type n and then ENTER
  4. Click the settings icon in the top left corner inside your project
  5. Select project settings
  6. Copy your Project-ID
  7. Open up the .firebaserc file and replace the placeholder with your Project-ID
  8. run using yarn
cd functions/
yarn deploy

or using npm

cd functions/
npm run deploy

This may take a while...


5. Set up fulfillment

  1. Navigate to your Functions in your Firebase Project
  2. Copy the URL in the Trigger coloumn
  3. Open you Dialogflow agent
  4. Click on Fulfillment in the sidebar
  5. Paste the copied URL in the URL Text input
  6. Scroll down and hit save
  7. Hit the settings icon
  8. Go to ML Settings
  9. Hit train. This will train the ML by the entered trigger words. This might take a time, depending on your system. The training process is indicated by the rolling settings icon.

That's it! You can now test the imported intents and the team dividing script by using the Simulator in the Actions on Google console! Every time you are modifying the actual code in functions/src/ you will have to deploy your changes to Firebase. To do that simply run with yarn:

cd functions/
yarn deploy

or with npm:

cd functions/
npm run deploy

Troubleshooting

I cannot test the intents in the Actions on Google Simulator

  1. Wait! Actions on Google is sometimes taking its time.
  2. Repeat the ML training step in 5.8 - 5.9

Feel free to contact me or open an issue!

About

an actions on google application which can be used to easily generate teams by just using voice commands.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published