{"id":13799635,"url":"https://github.com/actions-on-google/dialogflow-gdg-nodejs","last_synced_at":"2025-05-13T08:31:44.961Z","repository":{"id":85096652,"uuid":"176378115","full_name":"actions-on-google/dialogflow-gdg-nodejs","owner":"actions-on-google","description":"Localization, Meetup API \u0026 Cloud Translation API sample (using Dialogflow) in Node.js ","archived":true,"fork":false,"pushed_at":"2022-06-13T17:03:55.000Z","size":257,"stargazers_count":19,"open_issues_count":0,"forks_count":9,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-08-04T00:04:10.725Z","etag":null,"topics":["actions-on-google-nodejs","google-cloud-translation-api","localization","meetup-api"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/actions-on-google.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-03-18T22:16:26.000Z","updated_at":"2024-03-15T11:02:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"0f5d50d7-06df-4ade-8b67-369559b3e4dc","html_url":"https://github.com/actions-on-google/dialogflow-gdg-nodejs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actions-on-google%2Fdialogflow-gdg-nodejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actions-on-google%2Fdialogflow-gdg-nodejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actions-on-google%2Fdialogflow-gdg-nodejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actions-on-google%2Fdialogflow-gdg-nodejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/actions-on-google","download_url":"https://codeload.github.com/actions-on-google/dialogflow-gdg-nodejs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225190632,"owners_count":17435456,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actions-on-google-nodejs","google-cloud-translation-api","localization","meetup-api"],"created_at":"2024-08-04T00:01:04.679Z","updated_at":"2024-11-18T14:30:45.885Z","avatar_url":"https://github.com/actions-on-google.png","language":"JavaScript","funding_links":[],"categories":["Open source code"],"sub_categories":[],"readme":"# Actions on Google: GDG Sample\n\n*:warning: Warning: Conversational Actions will be deprecated on June 13, 2023. For more information, \nsee [Conversational Actions Sunset](https://goo.gle/ca-sunset).*\n\nThis sample demonstrates Actions on Google features for use on Google Assistant including localization ([i18n-node](https://github.com/mashpie/i18n-node)), conversation design, rich responses, and API integrations ([Cloud Translation API](https://cloud.google.com/translate/docs/) and [Meetup API](https://www.meetup.com/meetup_api/)) -- 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/). Generally, this Action provides information about [Google Developer Groups](https://developers.google.com/groups).\n\nThe [i18n-node](https://github.com/mashpie/i18n-node) library helps provide responses in several languages, which are contained in the `functions/locales` directory. Also, [Cloud Translation API](https://cloud.google.com/translate/docs/) translates data from Meetup API when the user's language does not match the GDG's primary language.\n\n:warning: This code sample was built using Dialogflow. We now recommend using [Actions Builder or the Actions SDK](https://developers.google.com/assistant/conversational/overview) to develop, test, and deploy Conversational Actions.\n\n**Attention: GDG Organizers**\nThis sample can be published on the Google Assistant platform (instructions below).\n\n### Enable Billing\n**Required for running this sample**\n\nCloud Translation API as well as Meetup API use will both require billing enabled in the Cloud Platform Console. For more info on Cloud Translation API, you can visit [Pricing Infomation](https://cloud.google.com/translate#translation-api-pricing). This sample uses Firebase Cloud Functions to make an HTTP request to a non-Google service(Meetup API), which will require an upgrade to a Firebase plan that allows for outbound networking, such as the [Blaze Plan](https://firebase.google.com/pricing/), also called Pay as you go.\n\n## Setup Instructions\n### Prerequisites\n1. Node.js and NPM\n    + We recommend installing using [NVM](https://github.com/creationix/nvm)\n1. Install the [Firebase CLI](https://developers.google.com/assistant/actions/dialogflow/deploy-fulfillment)\n    + We recommend using version 6.5.0, `npm install -g firebase-tools@6.5.0`\n    + Run `firebase login` with your Google account\n\n### Configuration\n#### Actions Console\n1. From the [Actions on Google Console](https://console.actions.google.com/?inviteCode=gdgaction), New project \u003e **Create project** \u003e under **More options** \u003e **Conversational**\n1. From the top menu under **Develop** \u003e **Actions** (left nav) \u003e **Add your first action** \u003e **BUILD** (this will bring you to the Dialogflow console) \u003e Select language and time zone \u003e **CREATE**.\n1. In the Dialogflow console, go to **Settings** ⚙ \u003e **Export and Import** \u003e **Restore from zip** using the `agent.zip` in this sample's directory.\n\n#### Cloud Platform Console\n1. In the [Google Cloud Platform console](https://console.cloud.google.com/), select your *Project ID* from the dropdown\n1. From **Menu ☰** \u003e **APIs \u0026 Services** \u003e **Library** \u003e select **Cloud Translation API** \u003e **Enable**\n\n#### Firebase Deployment\n1. The following values need to be configured in the `functions/config.js` file:\n    + `projectId`:  Your Project ID\n    + `gdgId`: unique identifier for the GDG on Meetup (ex: `google-developer-group-san-francisco` for `https://www.meetup.com/google-developer-group-san-francisco/`)\n    + `gdgName`: short name for the GDG (ex: `GDG San Francisco`)\n    + `appLocal`: language code from https://developers.google.com/assistant/console/languages-locales (ex: `en`, `pt`, `ja`, `es`, `tr`)\n1. On your local machine, in the `functions` directory, run `npm install`\n1. Run `firebase deploy --project {PROJECT_ID}` to deploy the function\n    + To find your **Project ID**: In [Dialogflow console](https://console.dialogflow.com/) under **Settings** ⚙ \u003e **General** tab \u003e **Project ID**.\n\n#### Dialogflow Console\n1. Return to the [Dialogflow Console](https://console.dialogflow.com) \u003e select **Fulfillment** \u003e **Enable** Webhook \u003e Set **URL** to the **Function URL** that was returned after the deploy command \u003e **SAVE**.\n    ```\n    Function URL (dialogflowFirebaseFulfillment): https://${REGION}-${PROJECT_ID}.cloudfunctions.net/dialogflowFirebaseFulfillment\n    ```\n1. From the left navigation menu, click **Integrations** \u003e **Integration Settings** under Google Assistant \u003e Enable **Auto-preview changes** \u003e **Test** to open the Actions on Google simulator then say or type `Talk to my test app`.\n\n### Running this Sample\n+ 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”.\n+ You can also use the Actions on Google Console simulator to test most features and preview on-device behavior.\n\n### Publish your Action on Google Assistant\n1. In the [Actions on Google Console](https://console.actions.google.com) \u003e from the top menu **Develop** \u003e **Invocation** (left nav) \u003e add in a **Display name** for each language. For ex: GDG San Francisco)\n    + Disregard any messaging about matching to the invocation, since we'll add that later; if it does not save, add empty space at the end.\n1. From the top menu **Deploy** \u003e **Directory information** (left nav) and enter all the required information for **each** language \u003e **SAVE**.\n    + **Description** Suggested Directory information for descriptions [here](resources.md) for all languages\n    + **Images**: Follow the [GDG Naming and Logo Guides](https://developers.google.com/programs/community/gdg/resources/)\n    + **Privacy and Consent**: This Action does not save any user data. Make sure that you have this verbiage in every language contained in the same document.\n1. Under **Deploy** \u003e **Release** \u003e **SUBMIT FOR PRODUCTION**.\n\n### References \u0026 Issues\n+ 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).\n+ For bugs, please report an issue on Github.\n+ Actions on Google [Webhook Boilerplate Template](https://github.com/actions-on-google/dialogflow-webhook-boilerplate-nodejs).\n+ [Codelabs](https://codelabs.developers.google.com/?cat=Assistant) for Actions on Google.\n+ Actions on Google [Documentation](https://developers.google.com/assistant).\n+ More info on deploying with [Firebase](https://developers.google.com/assistant/actions/dialogflow/deploy-fulfillment).\n\n## Make Contributions\nPlease read and follow the steps in the [CONTRIBUTING.md](CONTRIBUTING.md).\nWe are looking to translate this Action into all available languages.\n\n## License\nSee [LICENSE](LICENSE).\n\n## Terms\nYour use of this sample is subject to, and by using or downloading the sample files you agree to comply with, the [Google APIs Terms of Service](https://developers.google.com/terms/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factions-on-google%2Fdialogflow-gdg-nodejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Factions-on-google%2Fdialogflow-gdg-nodejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factions-on-google%2Fdialogflow-gdg-nodejs/lists"}