{"id":15384899,"url":"https://github.com/manekinekko/google-actions-starter","last_synced_at":"2025-04-15T11:54:01.908Z","repository":{"id":143759256,"uuid":"78072953","full_name":"manekinekko/google-actions-starter","owner":"manekinekko","description":"A Node.js server for Google Assistant (and Google Home).","archived":false,"fork":false,"pushed_at":"2018-02-02T16:47:40.000Z","size":38,"stargazers_count":90,"open_issues_count":3,"forks_count":19,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-28T19:45:12.460Z","etag":null,"topics":["assistant","gactions","google","google-cloud","nodejs"],"latest_commit_sha":null,"homepage":"https://manekinekko.github.io/google-actions-starter/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/manekinekko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-05T02:51:52.000Z","updated_at":"2024-05-02T11:57:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"7aeccf87-8987-4d7d-81bc-b5c7da96a9ba","html_url":"https://github.com/manekinekko/google-actions-starter","commit_stats":{"total_commits":17,"total_committers":2,"mean_commits":8.5,"dds":0.05882352941176472,"last_synced_commit":"eade5bf4dc8509f5cdb51acb08ab97bf201ac49d"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manekinekko%2Fgoogle-actions-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manekinekko%2Fgoogle-actions-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manekinekko%2Fgoogle-actions-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manekinekko%2Fgoogle-actions-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manekinekko","download_url":"https://codeload.github.com/manekinekko/google-actions-starter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248638260,"owners_count":21137643,"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":["assistant","gactions","google","google-cloud","nodejs"],"created_at":"2024-10-01T14:43:36.286Z","updated_at":"2025-04-15T11:54:01.888Z","avatar_url":"https://github.com/manekinekko.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://cloud.githubusercontent.com/assets/1699357/21663314/b022ace0-d2df-11e6-8713-9f68b1c3ee3b.png\" width=\"350\"\u003e\n\u003c/p\u003e\n\u003ch2 align=\"center\"\u003eGAS-S: \u003ca href=\"https://github.com/manekinekko/google-actions-server\"\u003eGoogle Assistant Server\u003c/a\u003e Starter \u003cimg src=\"https://circleci.com/gh/manekinekko/google-actions-starter.svg?style=svg\"\u003e\u003c/h2\u003e\n\u003cp align=\"center\"\u003eA Node.js server for your \u003ca href=\"https://developers.google.com/actions/\"\u003eGoogle Assistant\u003c/a\u003e (and \u003ca href=\"https://madeby.google.com/home/\"\u003eGoogle Home\u003c/a\u003e).\u003c/p\u003e\n\n\u003cimg src=\"https://cdn-images-1.medium.com/max/2000/1*51-QcjdjlRiy4_ya2NjA2g.png\" align=\"center\"/\u003e\n\n\n## [Action Manifest](https://developers.google.com/actions/develop/sdk/actions) (action.json)\n\n```\n{\n    \"versionLabel\": \"1.0.0\",\n    \"agentInfo\": {\n        \"languageCode\": \"en-US\",\n        \"projectId\": \"my-first-action\",\n        \"voiceName\": \"female_2\"\n    },\n    \"actions\": [{\n        \"initialTrigger\": {\n            \"intent\": \"assistant.intent.action.MAIN\"\n        },\n        \"httpExecution\": {\n            \"url\": \"\u003cPUBLIC URL\u003e\"\n        }\n    }]\n}\n```\n\n**NOTE:** if you're deploying your action on Google Cloud, use your Google Cloud Project ID instead of \"my-first-action\".\n\n## Package.json\n\nIn the `package.json`, we provide you with the following (handy) scripts:\n\n```json\n{\n    \"scripts\": {\n        \"start\": \"npm run server\",\n        \"server\": \"nodemon dist/action.js\",\n        \"ngrok\": \"ngrok http 8080\",\n        \"build\": \"babel lib -d dist\",\n        \"build:watch\": \"npm run build -- -w\",\n        \"action:simulate\": \"gactions --verbose simulate\",\n        \"action:preview\": \"node ./scripts/preview_action.js\",\n        \"action:config\": \"node ./scripts/update_action_config.js\",\n        \"action:autopreview\": \"npm run action:config \u0026\u0026 npm run action:preview\",\n        \"action:deploy\": \"gactions deploy --action_package action.json --project my-first-action\",\n        \"release\": \"npm run build \u0026\u0026 npm version patch \u0026\u0026 git push --tags \u0026\u0026 git push \u0026\u0026 npm publish\"\n    }\n}\n```\n\n**NOTE:** The default port used by GAS is `8080`. See [API section](https://github.com/manekinekko/google-actions-server#actionserverport--8080).\n\nTools bunlded by GAS for devs needs:\n\n1. [gactions](https://developers.google.com/actions/tools/gactions-cli): is the command line interface that you use to preview, simulate, and publish an action package. If you encouter errors with the bundled binary, use the [gactions](https://developers.google.com/actions/tools/gactions-cli) from the official website. GAS includes this just for convenience.\n2. [nodemon](https://github.com/remy/nodemon): Monitor for any changes in your node.js application and automatically restart the server.\n3. [ngrok](https://github.com/inconshreveable/ngrok): Introspected tunnels to localhost. Allows Google's server to access your local action (while in dev mode)\n\n# Step by Step\n\n0. run `npm install` to install all deps\n4. run `npm start`\n1. run `npm run ngrok` and keep it running in the background,\n3. run `npm run action:autopreview`, and **follow the instructions on the terminal**,\n5. run `npm run action:simulate` to start the simulator in CLI mode (or use Google Home)\n6. type in `talk to my first action` or `start my first action`\n\n**HINT #1:** you can run `npm run build:watch` in order to watch and rebuild your files on the fly while you're working on your action.\n\n**HINT #2:** I you have a Google Home device, you can use it instead of using the simulator.\n\n**NOTE:** If you already have a dev server where you can host your this project, you can use your own URL in `httpExecution.url` and skip steps 1 and 2. And run `npm run action:preview` instead. See `package.json` for more details.\n\n## GAS API\n\nSee the [GAS documentation](https://github.com/manekinekko/google-actions-server) from more details.\n\n## Deep Link invocation\n\nIn order to make a [deep link invocation](https://developers.google.com/actions/develop/sdk/invocation-and-discovery#deep_link_invocation), you have to provide two things:\n\n1. an invocation query in your `action.json` (see [this example](https://github.com/manekinekko/google-actions-starter/blob/master/action.json#L17-L21))\n2. [an intent](https://github.com/manekinekko/google-actions-starter/blob/master/action.json#L18) (and its implementation [here](https://github.com/manekinekko/google-actions-starter/blob/master/lib/action.js#L58) and [here](https://github.com/manekinekko/google-actions-starter/blob/master/lib/action.js#L42-L51)) that will be triggered when your action will be launched with the invocation query.\n\nThen you just have to start your action like so:\n\n```\ntalk to my first action to \u003cONE OF THE DEEP LINK QUERIES HERE\u003e\n```\n\nFor instance:\n\n```\ntalk to my first action to know what is the date\n```\n\n## Deployment\n\n### Deploy the Fulfillment Endpoint\n\nAfter you have created a Conversation Action you must first deploy your fulfillment endpoint to any provider, such as Google Cloud:\n\n1. Create a new project in [Google Cloud Platform Projects](https://console.cloud.google.com/iam-admin/projects) and [enable billing](https://support.google.com/cloud/answer/6293499?hl=en).\n2. Set current project with `gcloud config set project my-first-action`.\n3. Replace `my-first-project` with your project ID in `vm.yaml` and run `gcloud deployment-manager deployments create production --config vm.yaml`. You can check your deployment with `gcloud deployment-manager deployments describe production`.\n4. Deploy your code with `npm run build \u0026\u0026 gcloud app deploy`.\n\n### Create an Actions API Project\n\n1. Create a [new Google Actions API project](https://console.developers.google.com/apis/dashboard).\n2. Configure the project in \"Directory listing\". It's important to get the sample invocations right, eg. \"Ok Google, ask my first action to ...\".\n\n### Deploy Action\n\nDeploying the action makes it usable by others by submitting it for approval with Google.\n\n**NOTE:** Once submitted you have to wait for your action to be rejected or approved, there's no way to un-submit an action without [contacting support](https://developers.google.com/actions/support/?requesttype=support\u0026prio=low).\n\n1. Change the `httpExecution` URL(s) in action.json to the deployed fulfillment URL, eg. `https://my-first-action.appspot-preview.com`.\n2. Replace `my-first-action` by your action's ID in `package.json`.\n3. Run `npm run action:deploy`, which will register and deploy your action.\n\nSee the [GAS documentation](https://developers.google.com/actions/distribute/deploy) for more details.\n\n## Example projects\n\n- https://github.com/manekinekko/google-actions-rxjs\n- https://github.com/manekinekko/google-actions-twitter\n- https://github.com/manekinekko/google-actions-reader\n- https://github.com/manekinekko/google-actions-learn-angular\n\n## License\n\nThe MIT License (MIT)\nCopyright (c) 2017 - Wassim CHEGHAM\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanekinekko%2Fgoogle-actions-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanekinekko%2Fgoogle-actions-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanekinekko%2Fgoogle-actions-starter/lists"}