{"data":{"slug":"hwchase17-notion-qa","name":"notion-qa","tagline":"A Python script for querying a Notion database via natural language using LangChain.","github_url":"https://github.com/hwchase17/notion-qa","owner":"hwchase17","repo":"notion-qa","owner_avatar_url":"https://avatars.githubusercontent.com/u/11986836?v=4","primary_language":"Python","stars":2154,"forks":360,"topics":[],"archived":false,"github_pushed_at":"2024-09-06T05:18:06+00:00","maintenance_label":"Dormant","stars_delta_30d":1,"url":"https://www.graphcanon.com/tools/hwchase17-notion-qa","markdown_url":"https://www.graphcanon.com/tools/hwchase17-notion-qa.md","api_url":"https://www.graphcanon.com/api/graphcanon/tools/hwchase17-notion-qa","graph_url":"https://www.graphcanon.com/api/graphcanon/graph?tool=hwchase17-notion-qa","description":null,"homepage_url":null,"license":"MIT","open_issues":20,"watchers":20,"ai_summary":"Notion Question-Answering is a tool developed using LangChain that allows users to query information from their Notion databases through natural language questions. The repository includes examples, deployment instructions on StreamLit, and directions for ingesting custom datasets.","readme_excerpt":"# Notion Question-Answering\n\n🤖Ask questions to your Notion database in natural language🤖\n\n💪 Built with [LangChain](https://github.com/hwchase17/langchain)\n\n# 🌲 Environment Setup\n\nIn order to set your environment up to run the code here, first install all requirements:\n\n```shell\npip install -r requirements.txt\n```\n\nThen set your OpenAI API key (if you don't have one, get one [here](https://beta.openai.com/playground))\n\n```shell\nexport OPENAI_API_KEY=....\n```\n\n# 📄 What is in here?\n- Example data from Blendle \n- Python script to query Notion with a question\n- Code to deploy on StreamLit\n- Instructions for ingesting your own dataset\n\n## 📊 Example Data\nThis repo uses the [Blendle Employee Handbook](https://www.notion.so/Blendle-s-Employee-Handbook-7692ffe24f07450785f093b94bbe1a09) as an example.\nIt was downloaded October 18th so may have changed slightly since then!\n\n## 💬 Ask a question\nIn order to ask a question, run a command like:\n\n```shell\npython qa.py \"is there food in the office?\"\n```\n\nYou can switch out `is there food in the office?` for any question of your liking!\n\nThis exposes a chat interface for interacting with a Notion database.\nIMO, this is a more natural and convenient interface for getting information.\n\n## 🚀 Code to deploy on StreamLit\n\nThe code to run the StreamLit app is in `main.py`. \nNote that when setting up your StreamLit app you should make sure to add `OPENAI_API_KEY` as a secret environment variable.\n\n## 🧑 Instructions for ingesting your own dataset\n\nExport your dataset from Notion. You can do this by clicking on the three dots in the upper right hand corner and then clicking `Export`.\n\n<img src=\"export_notion.png\" alt=\"export\" width=\"200\"/>\n\nWhen exporting, make sure to select the `Markdown & CSV` format option.\n\n<img src=\"export_format.png\" alt=\"export-format\" width=\"200\"/>\n\nThis will produce a `.zip` file in your Downloads folder. Move the `.zip` file into this repository.\n\nRun the following command to unzip the zip file (replace the `Export...` with your own file name as needed).\n\n```shell\nunzip Export-d3adfe0f-3131-4bf3-8987-a52017fc1bae.zip -d Notion_DB\n```\n\nRun the following command to ingest the data.\n\n```shell\npython ingest.py\n```\n\nBoom! Now you're done, and you can ask it questions like:\n\n```shell\npython qa.py \"is there food in the office?\"\n```","github_created_at":"2022-11-07T02:39:10+00:00","created_at":"2026-07-11T10:50:44.008028+00:00","updated_at":"2026-08-15T06:01:12.800258+00:00","categories":[{"slug":"data-retrieval","name":"Data & Retrieval","url":"https://www.graphcanon.com/categories/data-retrieval","markdown_url":"https://www.graphcanon.com/categories/data-retrieval.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/data-retrieval"},{"slug":"llm-frameworks","name":"LLM Frameworks","url":"https://www.graphcanon.com/categories/llm-frameworks","markdown_url":"https://www.graphcanon.com/categories/llm-frameworks.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/llm-frameworks"}],"tags":[{"slug":"langchain","name":"langchain"},{"slug":"natural-language-processing-nlp","name":"natural language processing (nlp)"},{"slug":"notion","name":"notion"},{"slug":"openai","name":"openai"},{"slug":"streamlit","name":"streamlit"}],"trust":{"provenance":{"is_fork":false,"github_id":562678926,"owner_type":"User","methodology":"github_public_v1","parent_repo":null,"near_duplicate_slugs":[]},"computed_at":"2026-08-15T06:01:12.055Z","maintenance":{"label":"Dormant","score":18,"methodology":"github_public_v1","releases_90d":0,"days_since_push":708,"last_release_at":null,"stars_delta_30d":1,"open_issues_delta_30d":-1},"security_summary":{"status":"findings","scanner":"osv@v1","low_count":22,"high_count":4,"last_scan_at":"2026-07-11T10:50:45.477Z","medium_count":3,"scan_profile":"deps","critical_count":11}},"capability_facts":{"scan":{"source":"repo_scan","observed_at":"2026-08-15T06:01:12.486Z"},"languages":{"value":["python"],"source":"github.language","observed_at":"2026-08-15T06:01:12.486Z"},"license_spdx":{"value":"MIT","source":"github.license","observed_at":"2026-08-15T06:01:12.486Z"}},"decision_facts":{"hosting":null,"pricing":{"model":"freemium"},"requirements":{"notes":["Requires installation of Python packages as listed in `requirements.txt` along with setting up an OpenAI API key for usage."]},"constraints":{"pricing_model":"freemium"},"when_to_use":["When you want to query information from your Notion database using simple, natural language questions, leveraging the power of LangChain.","If you prefer a more intuitive chat interface over traditional database querying methods for accessing Notion data."],"when_not_to_use":["When your use case requires real-time database updates or immediate changes that aren't optimized through natural language queries.","If your workflow demands handling very complex queries with detailed filters and conditions which might not be effectively conveyed by natural language alone.","For scenarios where you need strict control over the query execution process without relying on automated parsing and interpretation."],"source":"enrich:decision_facts","observed_at":"2026-07-12T12:18:01.153Z"},"constraint_facets":{"pricing_model":"freemium"},"decision_summary":[{"label":"Pricing","value":"freemium"},{"label":"Requirements","value":"Requires installation of Python packages as listed in `requirements.txt` along with setting up an OpenAI API key for usage."},{"label":"Adopt for","value":"Notion-QA enables querying Notion databases using natural language. Built with LangChain, this tool facilitates easy setup and deployment on StreamLit."}]}}