{"id":19985213,"url":"https://github.com/n0rthin/notion-chat","last_synced_at":"2026-04-11T22:01:18.169Z","repository":{"id":221944622,"uuid":"616116571","full_name":"n0rthin/notion-chat","owner":"n0rthin","description":"SaaS that turns your Notion in a chat bot","archived":false,"fork":false,"pushed_at":"2024-02-11T09:19:01.000Z","size":636,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-02-12T09:35:44.369Z","etag":null,"topics":["chatbot","gpt-4","notion","openai"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/n0rthin.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}},"created_at":"2023-03-19T16:54:01.000Z","updated_at":"2024-02-11T08:44:12.000Z","dependencies_parsed_at":"2024-02-11T09:45:37.383Z","dependency_job_id":null,"html_url":"https://github.com/n0rthin/notion-chat","commit_stats":null,"previous_names":["n0rthin/notion-chat"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n0rthin%2Fnotion-chat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n0rthin%2Fnotion-chat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n0rthin%2Fnotion-chat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n0rthin%2Fnotion-chat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/n0rthin","download_url":"https://codeload.github.com/n0rthin/notion-chat/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224387585,"owners_count":17302891,"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":["chatbot","gpt-4","notion","openai"],"created_at":"2024-11-13T04:23:55.928Z","updated_at":"2026-04-11T22:01:18.164Z","avatar_url":"https://github.com/n0rthin.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NotionChat\nNotionChat is a SaaS where you can create a GPT-4 powered chatbot based on your Notion docs.\nThis is an MVP I worked on some time ago; it's obsolete now since Notion released its chatting feature.\n\n# How it works\nThis project is based on [Retrieval Augmented Generation (RAG)](https://www.promptingguide.ai/techniques/rag) pattern to give GPT access to notion docs.\n\nThe process of chatbot creation looks like this:\n1. User gives access to their Notion workspace\n2. The user chooses which pages should the bot have access to\n3. The backend fetches selected pages\n4. Each page is split into parts that will fit into GPT-4 context window\n5. Then, embeddings for all generated page parts are created with OpenAI [Embedding API](https://platform.openai.com/docs/guides/embeddings)\n6. Embeddings generated by [separate python service](https://github.com/n0rthin/nc-sync-service)\n7. Embeddings are stored in [Pinecone](https://www.pinecone.io/) vector database\n8. Once all embeddings are generated and stored the chatbot is ready for usage\n\nWhen a user writes to the chatbot:\n1. Generate an embedding vector for the user's message\n2. Find the closest vectors in the Pinecone\n3. Extract original parts contents linked to the found vectors\n4. Fill the user message along with the related pages and previous chat history into prompt template\n5. Send prompt to the OpenAI [Chat Completion API](https://platform.openai.com/docs/api-reference/chat)\n6. Stream response to the client\n\nStack:\nTypeScript, NestJS, TypeORM, PostgreSQL\nPython for the service responsible for generating embeddings\nNextJS, Tailwind, React Query\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn0rthin%2Fnotion-chat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fn0rthin%2Fnotion-chat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn0rthin%2Fnotion-chat/lists"}