How to automate Notion with Python | Notion API Tutorial

Поделиться
HTML-код
  • Опубликовано: 30 июн 2024
  • Learn how to work with the Notion API in Python.
    Code: www.python-engineer.com/posts...
    Notion Setup: developers.notion.com/docs/cr...
    Get my Free NumPy Handbook:
    www.python-engineer.com/numpy...
    ✅ Write cleaner code with Sourcery, instant refactoring suggestions in VS Code & PyCharm: sourcery.ai/?... *
    ⭐ Join Our Discord : / discord
    📓 ML Notebooks available on Patreon:
    / patrickloeber
    If you enjoyed this video, please subscribe to the channel:
    ▶️ : / @patloeber
    ~~~~~~~~~~~~~~~ CONNECT ~~~~~~~~~~~~~~~
    🖥️ Website: www.python-engineer.com
    🐦 Twitter - / patloeber
    ✉️ Newsletter - www.python-engineer.com/newsl...
    📸 Instagram - / patloeber
    🦾 Discord: / discord
    ▶️ Subscribe: / @patloeber
    ~~~~~~~~~~~~~~ SUPPORT ME ~~~~~~~~~~~~~~
    🅿 Patreon - / patrickloeber
    #Python
    Timeline:
    00:00 - Introduction
    00:27 - Create Notion Integration
    01:47 - Create Database
    03:52 - Query Pages
    08:43 - Create Pages
    09:57 - Update Pages
    11:04 - Delete Pages
    ----------------------------------------------------------------------------------------------------------
    * This is an affiliate link. By clicking on it you will not have any additional costs, instead you will support me and my project. Thank you so much for the support! 🙏

Комментарии • 37

  • @higornunes3525
    @higornunes3525 Год назад +3

    I've been struggling with this for the past two days, thank you! Your video came out just in time!

  • @wisamahmed251
    @wisamahmed251 Год назад +2

    I've been needing a tutorial for this for months. Thank you so much.

  • @silkogelman
    @silkogelman Год назад +5

    Fun and clear tutorial, thank you Patrick! 🙏😀
    About the hard to read dictionary at 9:33: Pydantic makes my world a happier place regarding API data consumption and providing it with data.
    Might be interesting to include in a future tutorial.

  • @richkirschenbaum6957
    @richkirschenbaum6957 Год назад

    Terrific Lesson!!! This Is The Absolute Best Video on the Notion API With Python. Thank You Soooooooo Very Very Much.

  • @backest9312
    @backest9312 Год назад +2

    Interesting tutorial !! Always nice videos

  • @spamblocker3402
    @spamblocker3402 Год назад

    Really Great ! Thanks

  • @MonLes-xt7gc
    @MonLes-xt7gc 10 месяцев назад

    Thank you for the awesome content, Patrick! What framework do you use to build your website?

  • @shrvn110
    @shrvn110 Год назад

    thank you!

  • @user-st8ul1st4v
    @user-st8ul1st4v 8 месяцев назад +1

    Great video, thank you! How would you extend your python code to manage an empty or null field in your notion page? for example, somehow, you forgot to give your blog entry a Title?

  • @sabrinawst
    @sabrinawst Год назад +3

    Thank you !!! I know nothing about Python and I love notion. I wanted to challenge myself more so I try to use python to do web scraping then send the data to Notion. Your tutorial helps me A LOT!!! Thank you so much! 🎇🎇🎇🎇

    • @munawwarshaikh8010
      @munawwarshaikh8010 8 месяцев назад

      How did you do it bro?

    • @sabrinawst
      @sabrinawst 8 месяцев назад +3

      @@munawwarshaikh8010 After some time, I forgot some details. The process is mainly divided into two steps. The first step is to use Python to crawl the data you need. The next step is to follow this tutorial to convert the crawled data into Notion. Good Luck!!

    • @munawwarshaikh8010
      @munawwarshaikh8010 8 месяцев назад

      @@sabrinawst thanks, that's all I needed. Do you remember how you stored the data you crawled using python? Like in csv, json, txt, etc.

    • @sabrinawst
      @sabrinawst 8 месяцев назад

      @@munawwarshaikh8010 ummm...I just checked my old files, and I don’t think I stored them anywhere specific. I looked at the Python code I used for web scraping, and it contained the following lines:
      import requests
      from bs4 import BeautifulSoup
      import re
      However, as I mentioned earlier, I’m not familiar with Python at all. So, I found this code online. From what I remember, I didn’t store the data anywhere. Instead, I directly transferred it to Notion. Unfortunately, I can’t provide you with more detailed information right now because I can’t find the second part of the code (I have no idea where I saved it LOL). If I find it later, I’ll share it with you.

  • @devworks8787
    @devworks8787 Год назад +1

    i finally hit a gold to learn Python. I just loved how Patrick's Python intermediate course in freecodecamp channel. and from then looking into his channel which has all great content

  • @yildirimakbal6723
    @yildirimakbal6723 Год назад

    Bu işi biliyorsun reyiz.

  • @vuquangtruong5950
    @vuquangtruong5950 Год назад

    I really love your video. Can you make tutorial how to access Audacity by Python code.

  • @Rainquiller
    @Rainquiller 4 дня назад

    hi thanks for this! question. how do I add data on next row?

  • @punisherjones6795
    @punisherjones6795 Год назад

    Hi, can do you a tutorial on building a chatbot using ontology? From scratch Without API

  • @acidjumps
    @acidjumps Год назад

    How do I make the database update automatically that way? let's say I update a database, I want the other database to update

  • @pon00050
    @pon00050 Год назад +4

    I am asking because I am ignorant.
    What are some use cases that this will be useful in?

    • @Finkelfunk
      @Finkelfunk Год назад

      I mean he said he uses this to collect all of his blog posts. For Kanban Boards you could automatically create new ToDo items, you could use it for Uni-Notes. There's hundreds of possible uses.

    • @pon00050
      @pon00050 Год назад +4

      @@Finkelfunk I don't understand the utility of collecting all of his blog posts using Notion API. All the blog posts are already on his blog. Why bother collecting? for back-up purposes? Isn't that being redundant? I'd imagine his hosting service or something is probably already backing up. Please enlighten me. There must be something that I don't understand.

    • @rensan6749
      @rensan6749 Год назад +1

      I'm currently using a notion integration to automate currency conversions using another API to get the exchange rates at a certain date and update the whole database everyday. It's mainly to save time for my team so they don't have to retrieve each info manually. I also came across another project that generates/updates burndown charts, which is a hassle to do manually and natively on Notion. I imagine there must be a lot of other use cases much more complexe.

    • @pon00050
      @pon00050 Год назад +1

      @@rensan6749 Thank you for sharing that example.

  • @eldofrederick1269
    @eldofrederick1269 20 дней назад

    Is there any way to pull my markdown files folderwise from Joplin into notion using python api?

  • @cgndev
    @cgndev 5 месяцев назад

    Thanks for your Tutorial.. i can't see python source example in notion's reference page... is it ok?

    • @zvch88
      @zvch88 3 месяца назад

      I am a bit curious about this too. Wonder if they stopped supporting python

  • @user-qi2kt8ow5r
    @user-qi2kt8ow5r Год назад +4

    All my homies use Obsidian

    • @faizyusuf2470
      @faizyusuf2470 Год назад +2

      Obsidian for knowledge taking, and Notion for habit and routine development.

  • @ifthikhanmohamed1681
    @ifthikhanmohamed1681 Год назад

    make digits classification with pytorch

  • @girogiro-vh5pz
    @girogiro-vh5pz 3 месяца назад

    Hello. I liked your very nice-looking guide on how to use Python to handle a Notion database. A need arose for me after importing an Evernote Notebook containing 843 notes into Notion, and nearly every record in the resulting Notion database begin duplicated. To remove these duplicates from within Notion would be very tedious.
    Therefore it seems that a Python program will do the job. This looks like a fun thing for me to do but I don't have the spare time to spend on this. And my need is not particularly urgent🙂 * Has anybody already written a Python program to do remove duplicates from a Notion database?

  • @antonkalashnikov4062
    @antonkalashnikov4062 9 месяцев назад

    got keyerror 'results ' when executed def get_pages😢

  • @RunYourLuck
    @RunYourLuck 11 месяцев назад

    New to Python so I may not have anything setup correctly. But getting 'Import "requests" could not be resolved from source'. Anyone know why?

    • @tchag9951
      @tchag9951 3 месяца назад

      You have to Import request. If you use vs Code it is possible that you installed it in the wrong Interpreter. You can switch it.

  • @user-sl2hk5ue6b
    @user-sl2hk5ue6b Год назад

    Can you put subtitles in Greek?

  • @shubhamshendre2153
    @shubhamshendre2153 Год назад

    Need internship.