tony-xlh / Zapier-Barcode-Reader

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Zapier-Barcode-Reader

Zapier integration for Dynamsoft Barcode Reader.

We can scan barcodes and trigger zaps.

Online demo

API

You can deploy the server on your own and create an integration using the API.

  • /code

    Methods: GET, POST

    Create a new barcode using the POST method and query scanned new barcodes by UUID using the GET method.

    Arguments:

    • clear (optional): pass this argument to clear the barcodes
    • barcode (optional): string of scanned barcode
    • uuid: unique ID of a device. Barcodes will stored according to the UUID.

    Sample Response:

    [
        {
            "id":1,
            "barcode":"9780321344755"
        }
    ]
  • /auth

    Methods: GET

    This always returns {"success":true}.

Sample Usage

We can scan an ISBN barcode of a book, get its info and send it to notion.

image

JavaScript used:

output = [];
let response = await fetch("https://www.googleapis.com/books/v1/volumes?q=isbn:"+inputData.barcode);
let object = await response.json()
let items = object["items"]
if (items.length>0) {
  let item = items[0];
  let title = item["volumeInfo"]["title"];
  let desc = item["volumeInfo"]["description"]; 
  let authors = item["volumeInfo"]["authors"].join(" ");
  output = [{"title":title,"desc":desc,"authors":authors}];
}

About


Languages

Language:HTML 82.0%Language:Python 18.0%