Watch Me Build A Fully Automated Receipt Scanner With AI

Поділитися
Вставка
  • Опубліковано 24 жов 2024
  • A complete walk-through and how-to to build a fully automated receipt scanner. Compatible with mobile devices. A fully functioning system allows users to upload a picture of a receipt within a project and use AI to read and transcribe the receipt. Great for local businesses or personal use for tracking financing and accounting. All no-code tools: Airtable, make.com, OpenAI API (Chat GPT). Build no-code tools easily or have my team build it for you.
    To speak with me about automation questions
    ⬇️
    ➡️ www.builddigitalco.com ⬅️
    RESOURCES FROM THE VIDEO ⤵️
    Prompt:
    Objective:
    Please look at the provided receipt and extract the following information for each item listed on the receipt: Description of the item Quantity (if available)Total price of each item. The extracted information should be formatted in a way that can be easily parsed and uploaded to Airtable as new records in a list view. Desired Output Format:
    Please provide the extracted data in the following JSON format:jsonCopy code[
    {
    "Description": "Item description",
    "Quantity": "Item quantity (if available)",
    "TotalPrice": "Item total price"
    },
    {
    "Description": "Next item description",
    "Quantity": "Next item quantity (if available)",
    "TotalPrice": "Next item total price"
    }
    // Continue for all items on the receipt
    ]
    Example Output:jsonCopy code[
    {
    "Description": "Apples",
    "Quantity": "2 lbs",
    "TotalPrice": "$3.00"
    },
    {
    "Description": "Bananas",
    "Quantity": "1 bunch",
    "TotalPrice": "$1.50"
    },
    {
    "Description": "Milk",
    "Quantity": "1 gallon",
    "TotalPrice": "$2.50"
    }
    ]
    Additional Instructions: Ignore any non-item lines such as the store name, date, subtotal, donation roundups, and total amount lines. If the quantity is not available for an item, leave the "Quantity" field empty. Also make a seperate line item for tax. Make the description "Tax" and make the total price the tax price. Make sure to include a line item of Ensure the data is accurate and formatted correctly to avoid errors during the Airtable upload.
    Make sure you only return the JSON formatted output, do not include any extra text besides the JSON of the extracted values. It is extremely important you do not add any additional text the the JSON output.
    The receipt image will be given.
    Automation Script: see ** ** in script, needs editing before working.
    // Define the webhook URL
    let url = "*Your webhook here*";
    // Get the record ID and the table name from the input configuration
    let inputConfig = input.config();
    let recordID = inputConfig["recordID"]; //*make sure to add passthrough variable*
    let table = base.getTable("Projects"); // Replace with your table name
    // Fetch the record by ID
    let record = await table.selectRecordAsync(recordID);
    // Get the attachments from the image field
    let attachments = record.getCellValue("Receipts"); // Replace with your field name
    // Get the URL of the most recently uploaded attachment
    let attachmentURL = attachments && attachments.length *Insert greater than angled bracket* 0 ? attachments[attachments.length - 1].url : null;
    // Prepare the payload
    let payload = {
    recordID: recordID,
    attachmentURL: attachmentURL
    };
    // Send the data to the webhook
    let response = await fetch(url, {
    method: "POST",
    headers: {
    "Content-Type": "application/json"
    },
    body: JSON.stringify(payload)
    });
    // Check the response status
    if (response.ok) {
    console.log("Webhook triggered successfully.");
    } else {
    console.log("Error triggering webhook:", response.statusText);
    }
    Make sure to insert angled bracket where ** is as they are not allowed in the description.
    Hope this helps, enjoy.

КОМЕНТАРІ •