{"id":15136194,"url":"https://github.com/dvir-cohen1/nextcloud-chatbot-fastapi","last_synced_at":"2026-02-11T23:38:42.725Z","repository":{"id":251624183,"uuid":"837944008","full_name":"Dvir-Cohen1/nextcloud-chatbot-fastapi","owner":"Dvir-Cohen1","description":"A FastAPI service for integrating chatbots with Nextcloud, providing webhook support for real-time interactions.","archived":false,"fork":false,"pushed_at":"2024-08-06T23:04:23.000Z","size":23,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T19:46:45.785Z","etag":null,"topics":["bot","fastapi","nextcloud","python"],"latest_commit_sha":null,"homepage":"","language":"Python","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/Dvir-Cohen1.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":"2024-08-04T14:05:53.000Z","updated_at":"2024-08-06T23:16:13.000Z","dependencies_parsed_at":"2024-09-21T10:02:32.200Z","dependency_job_id":"9ae9548b-c2c2-4f5b-a50c-27e86161d22c","html_url":"https://github.com/Dvir-Cohen1/nextcloud-chatbot-fastapi","commit_stats":null,"previous_names":["dvir-cohen1/nextcloud-chatbot-fastapi"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Dvir-Cohen1/nextcloud-chatbot-fastapi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dvir-Cohen1%2Fnextcloud-chatbot-fastapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dvir-Cohen1%2Fnextcloud-chatbot-fastapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dvir-Cohen1%2Fnextcloud-chatbot-fastapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dvir-Cohen1%2Fnextcloud-chatbot-fastapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dvir-Cohen1","download_url":"https://codeload.github.com/Dvir-Cohen1/nextcloud-chatbot-fastapi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dvir-Cohen1%2Fnextcloud-chatbot-fastapi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273140301,"owners_count":25052589,"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","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["bot","fastapi","nextcloud","python"],"created_at":"2024-09-26T06:04:30.916Z","updated_at":"2026-02-11T23:38:42.696Z","avatar_url":"https://github.com/Dvir-Cohen1.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FastAPI Chatbot Service\n\n## Overview\n\nThis repository contains a FastAPI service that acts as a chatbot for integration with Nextcloud. The service listens for webhook events from Nextcloud and processes them accordingly. The setup involves running the FastAPI application locally and connecting it to Nextcloud, which runs in a Docker container.\n\n## Features\n\n- **Webhook Integration**: Listens for and processes incoming webhook requests from Nextcloud.\n- **FastAPI Framework**: Utilizes FastAPI for creating the web service.\n\n## Prerequisites\n\n1. **Python 3.8+**: Ensure you have Python 3.8 or newer installed.\n2. **FastAPI**: Install FastAPI and `uvicorn` for running the app.\n3. **Nextcloud**: Running in a Docker container.\n4. **Docker** (for Nextcloud): Ensure Docker is installed if using Docker for Nextcloud.\n\n## Setup Instructions\n\n### 1. Clone the Repository\n\n```bash\ngit clone https://github.com/yourusername/your-repo-name.git\ncd your-repo-name\n```\n\n### 2. Create a Virtual Environment\n```bash\npython -m venv venv\nsource venv/bin/activate  # On Windows use `venv\\Scripts\\activate`\n```\n\n### 3. Install Dependencies\n```bash\npip install -r requirements.txt\n```\n\n### requirements.txt should include:\n```plaintext\nfastapi\nuvicorn\nhttpx\n```\n\n### 4. Create and Set Environment Variables\n```bash\n# .env file\n\nNEXTCLOUD_BOT_SECRET=\nNEXTCLOUD_URL=http:\n```\n\n### 5. Run the FastAPI Application\n```bash\n# In Development\nuvicorn main:app --host \u003cIPv4 Address\u003e --port 8000\n```\nThis command starts the FastAPI server locally at http://\u003cIPv4_Address\u003e:8000/.\n\n## Connecting to Nextcloud\nEnsure the Nextcloud instance is running and reachable.\n### 1. Install the Bot in Nextcloud\nUse the following command to install and configure the bot:\n```bash\n# Replace \u003c\u003e with your actual details.\n\nphp /var/www/html/occ talk:bot:install --feature bots-v1 \u003cBOT_NAME\u003e \u003cBOT_SECRET\u003e \u003cBOT_SERVICE_URL/webhook\u003e \u003cDESCRIPTION\u003e\n```\nSee full documntation here: [OCC documentation](https://nextcloud-talk.readthedocs.io/en/stable/occ/#talkbotinstall)\n\n\n### 2. Verify Webhook Communication\nSend a test message from Nextcloud and ensure that your FastAPI service logs or processes the message as expected. If communication fails, ensure that Nextcloud can reach the bot address.\n\n### 3. Enable Bot in chat\n- optional: Create new chat in Talk app and give it a name eg: Bot\n- Enable bot in chat setting.\n- send any message.\n\n## Screenshot\n![screenshot](https://github.com/user-attachments/assets/4edf9e03-f582-471b-bbec-bba151be604c)\n\n\n## Commands\n- Run the FastAPI Application: uvicorn main:app --reload\n- Install Python Dependencies: pip install -r requirements.txt\n- Activate Virtual Environment: source venv/bin/activate (Windows: venv\\Scripts\\activate)\n\n## Troubleshooting\n- Connection Issues: If you receive errors like Failed to connect, ensure that the FastAPI service is running and accessible from the Nextcloud Docker container. You may need to adjust Docker networking settings or use the IP address of the host machine instead of localhost.\n- Dependency Errors: Make sure all dependencies are installed and correctly listed in requirements.txt.\n\n## Acknowledgements\n- FastAPI\n- Nextcloud\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdvir-cohen1%2Fnextcloud-chatbot-fastapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdvir-cohen1%2Fnextcloud-chatbot-fastapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdvir-cohen1%2Fnextcloud-chatbot-fastapi/lists"}