Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/voznik/whatsonaristocrats
Google Assistant Action to get Nowplaying Information from Aristocrats.fm
https://github.com/voznik/whatsonaristocrats
dialogflow firebase-functions google-assistant-actions typescript webhook
Last synced: 16 days ago
JSON representation
Google Assistant Action to get Nowplaying Information from Aristocrats.fm
- Host: GitHub
- URL: https://github.com/voznik/whatsonaristocrats
- Owner: voznik
- Created: 2020-03-23T10:44:46.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T03:28:41.000Z (almost 2 years ago)
- Last Synced: 2024-10-11T09:35:04.689Z (about 1 month ago)
- Topics: dialogflow, firebase-functions, google-assistant-actions, typescript, webhook
- Language: TypeScript
- Size: 2.42 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 38
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Actions on Google: Webhook Boilerplate
This sample demonstrates the base webhook required for building Actions on Google for use on Google Assistant -- using the [Node.js client library](https://github.com/actions-on-google/actions-on-google-nodejs) and deployed on [Cloud Functions for Firebase](https://firebase.google.com/docs/functions/).
## Setup Instructions
Select **only one** of the options below.
### Option 1: Add to Dialogflow
Select the button below and follow prompts to create a new agent:
[![Webhook Boilerplate](https://storage.googleapis.com/dialogflow-oneclick/deploy.svg "Webhook Boilerplate")](https://console.dialogflow.com/api-client/oneclick?templateUrl=https%3A%2F%2Fstorage.googleapis.com%2Fdialogflow-oneclick%2Fagent.zip&agentName=ActionsOnGoogleTemplateSample)
### Option 2: Dialogflow Console and Firebase CLI
### Prerequisites
1. Node.js and NPM
- We recommend installing using [NVM](https://github.com/creationix/nvm)
2. Install the [Firebase CLI](https://developers.google.com/assistant/actions/dialogflow/deploy-fulfillment)
- We recommend using version 6.5.0, `npm install -g [email protected]`
- Run `firebase login` with your Google account### Configuration
#### Actions Console
1. From the [Actions on Google Console](https://console.actions.google.com/), New project (this will become your _Project ID_) > **Create project** > under **More options** > **Conversational**
2. From the top navigation menu under **Develop** > **Actions** (left nav) > **Add your first action** > **BUILD** (this will bring you to the Dialogflow console) > Select language and time zone > **CREATE**.
3. From the left menu > select **Intents** > **Default Welcome Intent**, scroll down to the end of the page and under **Fulfillment** > **Enable Webhook** > **Save**.- This will allow you to have the welcome intent be a basic webhook intent to test.
#### Firebase Deployment
1. On your local machine, in the `functions` directory, run `npm install`
2. Run `firebase deploy --project {PROJECT_ID}` to deploy the function- To find your **Project ID**: In [Dialogflow console](https://console.dialogflow.com/) under **Settings** ⚙ > **General** tab > **Project ID**.
#### Dialogflow Console
1. Return to the [Dialogflow Console](https://console.dialogflow.com) > select **Fulfillment** > **Enable** Webhook > Set **URL** to the **Function URL** that was returned after the deploy command > **SAVE**.
```
Function URL (dialogflowFirebaseFulfillment): https://${REGION}-${PROJECT_ID}.cloudfunctions.net/dialogflowFirebaseFulfillment
```2. From the left navigation menu, click **Integrations** > **Integration Settings** under Google Assistant > Enable **Auto-preview changes** > **Test** to open the Actions on Google simulator then say or type `Talk to my test app`.
### Running this Sample
- You can test your Action on any Google Assistant-enabled device on which the Assistant is signed into the same account used to create this project. Just say or type, "OK Google, talk to my test app".
- You can also use the Actions on Google Console simulator to test most features and preview on-device behavior.## References & Issues
- Questions? Go to [StackOverflow](https://stackoverflow.com/questions/tagged/actions-on-google), [Assistant Developer Community on Reddit](https://www.reddit.com/r/GoogleAssistantDev/) or [Support](https://developers.google.com/assistant/support).
- For bugs, please report an issue on Github.
- Actions on Google [Documentation](https://developers.google.com/assistant)
- Actions on Google [Codelabs](https://codelabs.developers.google.com/?cat=Assistant)