{"id":13565286,"url":"https://github.com/antoine-aumjaud/api-synology-chatbot","last_synced_at":"2025-04-03T22:31:03.890Z","repository":{"id":147049487,"uuid":"89151484","full_name":"antoine-aumjaud/api-synology-chatbot","owner":"antoine-aumjaud","description":"API - Synology chatbot","archived":false,"fork":false,"pushed_at":"2018-11-21T22:20:19.000Z","size":163,"stargazers_count":10,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-04T18:46:41.367Z","etag":null,"topics":["api","api-ai","chatbot","dialogflow","sparkjava","synology","synology-chatbot","synology-nas"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":false,"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/antoine-aumjaud.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}},"created_at":"2017-04-23T15:20:47.000Z","updated_at":"2024-06-08T02:00:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"ac427404-930c-47c3-a1ef-4a3b3f49e03a","html_url":"https://github.com/antoine-aumjaud/api-synology-chatbot","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/antoine-aumjaud%2Fapi-synology-chatbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoine-aumjaud%2Fapi-synology-chatbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoine-aumjaud%2Fapi-synology-chatbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoine-aumjaud%2Fapi-synology-chatbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antoine-aumjaud","download_url":"https://codeload.github.com/antoine-aumjaud/api-synology-chatbot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247089985,"owners_count":20881899,"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":["api","api-ai","chatbot","dialogflow","sparkjava","synology","synology-chatbot","synology-nas"],"created_at":"2024-08-01T13:01:43.789Z","updated_at":"2025-04-03T22:30:59.018Z","avatar_url":"https://github.com/antoine-aumjaud.png","language":"Java","funding_links":[],"categories":["Java"],"sub_categories":[],"readme":"# api-syno-chatbot\nAPI - Synology chatbot: Linked to Google API.AI\n\n[![Build Status](https://travis-ci.org/antoine-aumjaud/api-synology-chatbot.svg?branch=master)](https://travis-ci.org/antoine-aumjaud/api-synology-chatbot)\n\nThis micro-service :  \n- recieves webhook from Synology Chat,\n- sends them to dialogflow to retrieve the user intent,\n- calls the webservice configured for this intent,\n- returns in the HTTP response, the response of this webservice\n\nIt can also push messages to Synology Chat.\n\n\n## Execution and Test\n\nThis repository use gradle to build the app. You can use ./gradlew run to launch the application.\nOnce the service launched, you can test it with this url :\nhttp://localhost:9080/hi\nYou can reload the configuration : \nhttp://localhost:9080/secure/reloadConfig?secure-key:xxx (or curl --header 'secure-key: xxx' \"http://localhost:9080/secure/reloadConfig\" )\n\n## Configuration\nThe configuration is here : https://github.com/antoine-aumjaud/api-synology-chatbot/blob/master/src/dist/lib/conf/api-synology-chatbot.properties\n\n```ini\nsecure-key=xxx\n```\nThe first line of the configuration is the value of a header or an URL parameter that should be set to access to an URL which a /secure/* path.\n\n```ini\n#message chat-\u003eapi\nchat-tokens=xxx;\n```\nIs the list of tokens (seperated by ';') authorized to call the /secure/receive/ URL.\nThis token is retrieved on the synology chat when you add an outgoing integration.\n\n```ini\n#message api-\u003echat\ntoken.antoine=xxx\n```\nIt is the token of a channel the when a message is send to /secure/send-message/antoine\nThis token is retrieved on the synology chat when you add an incoming integration.\n\n\n```ini\n#synology chat url\nsynology-chat.url=xxx\n```\nThe URL of the incomming integration, for my DS it is : https://admin.aumjaud.fr/webapi/entry.cgi?api=SYNO.Chat.External\u0026method=incoming\u0026version=1\u0026token=\"%s\"\nthe last %s is replaced by the token defined just before \n\n```ini\n#api.ai - service\n# https://console.api.ai/api-client/#/editAgent/d81ef3d4-4023-4457-a9e3-0779f4531615/\napi-ai.url=https://api.api.ai/api/query?v=20170507\napi-ai.client.others.token=xxx\n```\n\nThe URL is the API.AI URL with the version of the API you want to use.\nThe second line is the default agent token took to send the user message. This token is defined in API.AI integration.\n(There is an option to call an another agent for one specific chat channel too.)\n\n```ini\n#api.ai response -\u003e services\napi-ai.action.output=output\napi-ai.action.family-shoes-size-set.url=xxx\napi-ai.action.family-shoes-size-set.secure-key=xxx\n```\nThese last configuration items are to manage the API.AI response. If the user intent (call \"action\" in API.AI) is \"output\" then the API.AI message is returned in the chat HTTP response. \nOtherwise, the application searches for the configuration keys api-ai.action.user_intent.url and api-ai.action.user_intent.secure-key. If it finds them, it calls the URL with the header secure-hey (it do a POST if action finished by -set or a GET if action finish by -get).\n\n## Workflow\nSo workflow is:\nDS Chat -\u003e chabot API receive -\u003e API.AI -\u003e chatbot API -\u003e call an action (WS) -\u003e chatbot API -\u003e DS Chat (in HTTP response)\n\nYou can use webhook from API.AI too and the API.AI would always returns output to display the result build on API.AI side.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantoine-aumjaud%2Fapi-synology-chatbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantoine-aumjaud%2Fapi-synology-chatbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantoine-aumjaud%2Fapi-synology-chatbot/lists"}