Practice of Scanning and Importing Physical Books into Notion Douban Score Edition

https://linmi.cc/42154.html

Last week, I made an interesting toy for entering my existing physical books into Notion, which is convenient for me to manage.

  • First of all, there are some books that I will read from time to time, such as “Siddhartha” given to me by Shaonan;
  • I will also sell the books to return blood. After all, some books are a bit heavy when renting out, and data recording is also required here.
  • In actual use, I will also associate books with my diary. After the association, I will write ideas directly under the diary, and then use the synchronization block to synchronize.

Combined with the above, this toy reduces the entry cost for people like me who have a lot of physical data. With the content I posted on social media before, I have to fulfill my promise, so this article will come out along the way~

If you are interested in this tool, here I provide two versions: the geek version is used by students who like tossing, and the speed version is used by students who are not interested in tossing.

hint

? If you just want to use it, please swipe directly to the lazy package section and download the corresponding shortcuts and templates directly.

Geek version

Process analysis

In fact, Mayne made this idea a few years ago, and it seems that it has not been released. As for why I do it, it’s largely because I’m learning programming recently and want to put what I’ve learned into practice.

Closer to home, the book is scanned and entered into Notion. The actual implementation idea is very simple:

  1. Find a tool that provides the ability to scan code, and the shortcut command supports scan code analysis;
  2. Pass the parameter to the corresponding API, and let the API return the data after parsing the value;
  3. Import the returned parsed data into Notion to implement the import.

Untitled

Tool preparation

So about the above process implementation, you need to prepare the following things:

  1. a Notion account;
  2. Prepare an iPhone with a shortcut function for scanning codes. Android is also possible in theory, but it needs to have the support of similar shortcuts;
  3. Prepare a server for transit analysis, of course, you can also try to use the API provided by Google;
  4. To prepare a computer, some coding work is required;

API configuration

Then start our operation, the first is to get the data we want. At present, there are not many free APIs supported by ISBN. I found Google, but most students may not be able to access them.


  1. https : //www.googleapis.com/books/v1/volumes?q=isbn:0771595158

In addition, I want to see the Douban score of the book. It can only be achieved by using the Douban API. Unfortunately, the Douban API has been shut down.


  1. https : //api.douban.com/v2/book/isbn/9787543632608

Unfortunately, the original interface is no longer provided, so you can only build it yourself. For details, please refer to this document: Douban ISBN Query API Interface Creation Tutorial .

The specific logic is to directly parse the Douban web page and generate a custom API. The code is easier to understand. After all, it is written in the best programming language in the world.

Notion configuration

create database

Create a database page, and then name the attributes respectively. Here I directly use the book name, author, introduction, Douban score, etc. For details, you can refer to this picture to customize.
CleanShot 2022-03-27 at 19.02.52

Create a robot and get Token

Go to https://www.notion.so/my-integrations , click “New integration” to create a robot, enter the name, logo, space to be used, and select all the supported capabilities (read, update, write content) ), basically adjust the first three, and the default is fine.

Untitled

After the creation is complete, copy the created robot Token, which we will need later.

Untitled

Then go to the created database to invite the bot.

Untitled

At this point, the Notion configuration part is complete.

Shortcut configuration

The next step is the editing process of our shortcuts. It is recommended that you do it in steps.

Scan code function

The first is to determine the scan code function, search for “scan code” in the shortcut, here you can parse the barcode and QR code;

Untitled

Link resolution

Then search for “get URL content” to parse the link, and get the dictionary from the URL content, that is, the data we need to import into Notion.

Untitled

Write Notion

The next step is to write data to Notion, that is, with the help of the Notion API function. For the specific API usage, please refer to: Notion API documentation .

First, copy the link of the database. The Express version is made configurable, and you can configure it according to your personal habits.


  1. https : //www.notion.so/linmi/a8aec43384f447ed84390e8e42c2e089?v=...
  2. |--------- Database ID --------|

Here I get JSON directly to match the data, otherwise adding dictionaries and arrays one by one is really annoying, and occasionally crashes. Paste your Token and database_id.

Untitled

The JSON data format code is placed below, please be careful to replace the data I marked, otherwise the operation will report an error.


  1. {
  2. "parent" : {
  3. "database_id" : "f7c827199f58479b9349c690eee2965f" //数据库的ID
  4. },
  5. "icon" : {
  6. "type" : "external" ,
  7. "external" : {
  8. "url" : "词典值" // 图标
  9. }
  10. },
  11. "cover" : {
  12. "type" : "external" ,
  13. "external" : {
  14. "url" : "词典值" // 封面
  15. }
  16. },
  17. "properties" : {
  18. "书籍" : {
  19. "title" : [
  20. {
  21. "text" : {
  22. "content" : "词典值" // 书籍的名字
  23. }
  24. }
  25. ]
  26. },
  27. "描述" : {
  28. "rich_text" : [
  29. {
  30. "text" : {
  31. "content" : "词典值" //描述
  32. }
  33. }
  34. ]
  35. },
  36. "价格" : {
  37. "rich_text" : [
  38. {
  39. "text" : {
  40. "content" : "词典值" //价格
  41. }
  42. }
  43. ]
  44. },
  45. "页数" : {
  46. "rich_text" : [
  47. {
  48. "text" : {
  49. "content" : "词典值" // 页数
  50. }
  51. }
  52. ]
  53. },
  54. "评分" : {
  55. "rich_text" : [
  56. {
  57. "text" : {
  58. "content" : "词典值" // 豆瓣评分
  59. }
  60. }
  61. ]
  62. }
  63. }
  64. }

function test

Let’s try to pull out a book and test it out. Well, I succeeded here.

Untitled

Express version

Considering that some students do not have the time or relevant knowledge background to toss this matter, I have prepared a corresponding simple version, just click and copy and paste.

Copy template

Copy template: scan and enter the book , then copy the link id of the database.


  1. https : //www.notion.so/linmi/a8aec43384f447ed84390e8e42c2e089?v=...
  2. |--------- Database ID --------|

Create a bot

To create a robot, please refer to the “Notion Configuration” section of the geek version for details. After the creation is complete, copy the robot’s Token for backup;

Untitled

Save and configure shortcuts

Save the shortcut to the device, click the shortcut link , then click Edit Shortcut, and fill in the Token and Database ID to the specified location;

Untitled

Add a bot

Add a robot to the template you just created;

Untitled

enjoy typing

Start the shortcut and start using it with confidence.

At last

If there is any problem, please comment. If it is a program error, please record the screen or describe your operation steps in detail. By the way, this API is provided by my own server, and it may be unavailable in the future. At that time, I will update the links of shortcut instructions in this article.

There are other chat words, it is the iteration of functions, such as adding scanning and deduplication.

Over the Wall Technology Blog Subscription Address and Social Account

This article is reprinted from: https://www.chinagfw.org/2022/03/notion.html

For personal collection only, the copyright belongs to the original author

The physical book scanned and imported into Notion practice · Douban score version first appeared in Haowen Collection .

This article is reproduced from: https://shoucang.zyzhang.com/%E5%AE%9E%E4%BD%93%E5%9B%BE%E4%B9%A6%E6%89%AB%E6%8F%8F% E5%AF%BC%E5%85%A5-notion-%E5%AE%9E%E8%B7%B5-%C2%B7-%E8%B1%86%E7%93%A3%E8%AF%84 %E5%88%86%E7%89%88/
This site is for inclusion only, and the copyright belongs to the original author.

Leave a Comment