paint-brush
How To Automate Book Data Entry With Notion and Google Sheetsby@wen
1,850 reads
1,850 reads

How To Automate Book Data Entry With Notion and Google Sheets

by Wen 👩‍💻August 10th, 2021
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

A product manager who enjoys learning and exploring various no-code tools. Product manager is a product manager with a passion for exploring no code tools. No-code is available in the U.S. version of this article. Please contact us at http://www.mailonline.com/[email protected] for more information about the latest developments in the world of the no code world. Back to the page you came from: http://mailonlineonline.co.uk/report.com.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - How To Automate Book Data Entry With Notion and Google Sheets
Wen 👩‍💻 HackerNoon profile picture


Motivation 🤓

Being someone who enjoys learning and would like to soak up as much knowledge as possible, I have accumulated a list of books on Google Keep that I want to read over time. Since I came across the idea of building my “library” on Notion, I wanted to transfer the list of books to Notion. However, the copy-pasting and manual data entry doesn’t sound fun, especially when the list is close to 80 books. After a few trials and errors, I managed to find a way to automate this process.


New to Notion? Check out the link at the “Notes” section for free templates!


Requirements ⚓

Automate get and create book data entry on Notion

  • Data involved → book title, author, and cover URL
  • Data source → Amazon website
  • Tools → Google sheet, Notion and Zapier


The “how” 💡

Part I: Import data using Google Sheet

Create a new Google Sheet with the following headers and formulas.

Header

Purpose

Formula

Amazon URL

Data source

Paste book URL of your choice (cell = A3)

Book title

Get book title

= IMPORTXML(A3, "//*/span[@id='productTitle']")

Author

Get author

= IMPORTXML(A3, "//*/span[@class='a-declarative']/a[@class='a-link-normal contributorNameID']")

Cover URL

Get cover image

= IMPORTXML(A3, "//*/div[@id='img-canvas']/img/@src")

Send to Zapier

Trigger column for Zapier

Insert a checkbox for all cells in this column


Part II: Setup Zapier Trigger

Create a new zap trigger - when to trigger Zapier?

  • App event → Google Sheet

  • Trigger event → New or Update Spreadsheet Row

  • Connect to your Google account

  • Select spreadsheet and worksheet

  • Trigger Column → Send to Zapier

    Note: whenever there is a change to this column, it will trigger Zapier to get the row data

  • Test Trigger

    Note: Zapier will attempt to find a recent item from your trigger app to use in the Zap. Zapier will get row 8 data based on the screenshot above since it’s the most recent item with a checkbox.


Part III: Setup Zapier Action

Create an action - what should Zapier do with the given data?

  • App event → Notion

  • Action event → Create Database Item

  • Connect to your Notion account

  • Set up action

    • Database → select the Notion database that should be getting the data
    • Match the column in Notion and Google sheet
  • Test Trigger

    Note: Most likely, it’s going to be an empty line. Don’t worry! You can have a more accurate test once you turned on the zap.


Oth

Final: Turn on the zap and test!

Turn on the zap and go back to your Google sheet. Tick “Send to Zapier” beside the row you wish to send to Notion.


After a few minutes, you should see the data being sent and created in Notion 🎉


Notes 📝

Additional information, limitations, links and references

  • For IMPORTXML formula
    • Works if (a) it’s Amazon website (b) option = hardcover or paperback. Other options, e.g. Kindle, seem to have a different HTML structure.
    • The “author” cell won’t populate when there is more than one author
    • It will take some time for every cell to be populated when there are many rows of data
  • For Notion to receive the image URL from Zapier, the field property type needs to be “URL”. You can switch the property type back to “files & media” to show the images.
  • Free Notion templates to track your reading
  • Alternative methods to import external data into Google Sheets




Love this guide? Feel free to buy me a coffee