notion-qa logo

notion-qa

hwchase17/notion-qa

A Python script for querying a Notion database via natural language using LangChain.

GraphCanon updated 5d · GitHub synced 5d · 25 views this month

2.2k stars360 forksLast push 1y Python MIT

Decision brief

Notion-QA enables querying Notion databases using natural language. Built with LangChain, this tool facilitates easy setup and deployment on StreamLit.

Good fit when

  • 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.

Avoid when

  • 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.
Pricing:
freemium
Requirements:
Requires installation of Python packages as listed in `requirements.txt` along with setting up an OpenAI API key for usage.

Observed Jul 12, 2026 · Source: enrich:decision_facts

Verify the decision

Maintenance and security

Full trust report
Maintenance
Dormant (708d since push)
As of 5d
Provenance
Not a fork · Personal account
As of 5d
Security (OSV)
11 critical, 4 high, 3 medium, 22 low (11 critical, 4 high, 3 medium, 22 low)
As of 1mo

Public GitHub metadata and optional OSV scans. Signals, not a guarantee. Trust methodology.

Install

pip install notion-qa
PyPI

Similar tools

Same-category neighbours. No typed graph edges are catalogued for this tool yet.

Evidence and technical details

Sourced facts, taxonomy, compatibility claims, README excerpt, and machine-readable endpoints.

Overview

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.

Capability facts

Languages
python

Source: github.language · Aug 15, 2026

Categories

Compatibility

Sourced claims from the README excerpt - not unsourced marketing copy.

LangChain integrationLangChain

Source: README excerpt (regex_v1, Aug 15, 2026)

💪 Built with [LangChain](https://github.com/hwchase17/langchain)
Source link
OpenAI APIOpenAI API

Source: README excerpt (regex_v1, Aug 15, 2026)

Then set your OpenAI API key (if you don't have one, get one [here](https://beta.openai.com/playground))
Source link
Python runtimePython

Source: README excerpt (regex_v1, Aug 15, 2026)

- Python script to query Notion with a question
Source link

Tags

README

Notion Question-Answering

🤖Ask questions to your Notion database in natural language🤖

💪 Built with LangChain

🌲 Environment Setup

In order to set your environment up to run the code here, first install all requirements:

pip install -r requirements.txt

Then set your OpenAI API key (if you don't have one, get one here)

export OPENAI_API_KEY=....

📄 What is in here?

  • Example data from Blendle
  • Python script to query Notion with a question
  • Code to deploy on StreamLit
  • Instructions for ingesting your own dataset

📊 Example Data

This repo uses the Blendle Employee Handbook as an example. It was downloaded October 18th so may have changed slightly since then!

💬 Ask a question

In order to ask a question, run a command like:

python qa.py "is there food in the office?"

You can switch out is there food in the office? for any question of your liking!

This exposes a chat interface for interacting with a Notion database. IMO, this is a more natural and convenient interface for getting information.

🚀 Code to deploy on StreamLit

The code to run the StreamLit app is in main.py. Note that when setting up your StreamLit app you should make sure to add OPENAI_API_KEY as a secret environment variable.

🧑 Instructions for ingesting your own dataset

Export your dataset from Notion. You can do this by clicking on the three dots in the upper right hand corner and then clicking Export.

When exporting, make sure to select the Markdown & CSV format option.

This will produce a .zip file in your Downloads folder. Move the .zip file into this repository.

Run the following command to unzip the zip file (replace the Export... with your own file name as needed).

unzip Export-d3adfe0f-3131-4bf3-8987-a52017fc1bae.zip -d Notion_DB

Run the following command to ingest the data.

python ingest.py

Boom! Now you're done, and you can ask it questions like:

python qa.py "is there food in the office?"

For agents

This page has a .md twin and JSON over the API.

Was this helpful?

Anonymous feedback helps us improve pages and translations.