How to add text recognition (OCR) to Notion

Michiel van Beers
3 min readNov 14, 2022

--

A short demo of the text recognition OCR app you can find on my Github

Capturing notes

Remember when you had a great brainstorm on a whiteboard with your colleagues and took a picture ‘that you would process later’? Or that you took a picture of the letter from the municipality so it wouldn’t get lost between the piles of other papers? Only to end up trying to find it between all your family pictures, GIFs or WhatsApp stickers from friends? Well, I’ve got something for you…

Notion is, as for many others, the main part of my Second Brain setup. Since my Second Brain is based on the Capture, Organize, Distill, Express (C.O.D.E.) concept of Tiago Forte, it is important to me that I can easily capture any interesting piece of content that I come across in my day-to-day life.

For digital content, this can easily be done through the Save to Notion or the Readwise Highlighter Chrome extensions. For physical notes, this is somewhat more challenging. Taking a picture is easy enough, but retrieving these days, weeks or months later can be a challenge if I don’t add comprehensive tags right away. Next to that, I don’t like to spend a lot of time transcribing my notes. So, wouldn’t it be awesome if we had the same full-text search functionality as with all your other Notion notes?

Building my own automated text recognizer

Unfortunately, Notion doesn’t support this (yet?). They do however offer a publicly available API, so adding your own functionalities isn’t too difficult. For the text recognition or Optical Character Recognition (OCR) part, I wanted to use something reliable, fast and (most importantly) free. Microsoft offers a great free tier with their Microsoft Vision API, which allows for 5000 free transactions per month: that’s a lot of notes! For the logic, I used Python, mainly, well, since that is the language I can somewhat work with 😅. Last but not least, I wrapped the whole thing in a Docker container, so it can be quickly distributed, installed and updated on any machine.

The end result can be found on my Github page here, together with a bit more technical write-up on how to set everything up. With this setup, I can now quickly snap a picture of anything important, inspiring or noteworthy that I come across in my day-to-day life. By adding a small tag underneath the picture, the photo will be automatically converted to text and thus increases the chances that it will pop up in the future when I’m searching my notes for inspiration. And who knows what new project will emerge then…

As always, please share your feedback by adding a comment here, sending me a message or sharing this with someone you know!

--

--

Michiel van Beers

A productivity nerd, fitness enthusiast and software engineering manager who loves to create stuff. Check out https://michielvanbeers.com