Help

Scan Book using ISBN Barcode and populate Book Catalog

9070 11
cancel
Showing results for 
Search instead for 
Did you mean: 
MAHU_01
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi there

I do not have found a solution on the community or the web to my problem I try to resolve using AT.
I have a huge library of books. Instead of typing all books into a AT database (e.g. Book Catalog provided by AT) I would like to Scan the ISBN bar code (which is on each book) and populate my database with author, title, year etc. - basically all the record available on apps such as goodreads etc.
After all, the barcode can be read easily, it should after reading “simply” populate the record with the relevant data.

Does anybody have any idea to do this?
I have read, that it may be possible using API - but I have never worked with this. If so - could anyone give me some initial information how this could be achieved?

Any help is highly appreciated.

Thanks

11 Replies 11

Hello,

Did you ever find a solution? I am looking for something like this :slightly_smiling_face:
Thanks

yerigagarin
4 - Data Explorer
4 - Data Explorer

Create an automation:

yerigagarin_2-1706663279947.png

Use this script:

// Create an async await function
async function getBooksDetails() {
  try {
    // Import cell where is the ISBN code
    const isbn = input.config().ISBN;
    // Call Google Book API
    const baseUrl = 'https://www.googleapis.com/books/v1/volumes?q=isbn:';
    // Create URL base
    const url = `${baseUrl}${isbn}`;

    // Fetch data
    const response = await fetch(url);
    // Save data
    const data = await response.json();
    
    if (data && data.items && data.items.length > 0) {
      const { volumeInfo } = data.items[0];
      
      // Create a variable with book details
      const bookDetails = {
        Título: volumeInfo.title || "",
        Subtítulo: volumeInfo.subtitle || "",
        Editorial: volumeInfo.publisher || "",
        Autor: (volumeInfo.authors && volumeInfo.authors.length > 0) ? volumeInfo.authors[0] : "",
        Publicación: volumeInfo.publishedDate || "",
        Descripción: volumeInfo.description || "",
        Idioma: volumeInfo.language || "",
        Portada: (volumeInfo.imageLinks && volumeInfo.imageLinks.thumbnail) || ""
      };
      
      // Update cell information
      Object.entries(bookDetails).forEach(([key, value]) => {
        output.set(key, value);
      });
    } else {
      throw new Error("No se encontraron detalles del libro.");
    }
  } catch (error) {
    console.error("Error al obtener detalles del libro:", error.message);
  }
}
// Call function
await getBooksDetails();

This is my base:

yerigagarin_3-1706663324225.png