DEV Community

Cover image for A Step-by-Step Guide to bring AI to your App using Zapier
Eden AI
Eden AI

Posted on • Originally published at edenai.co

A Step-by-Step Guide to bring AI to your App using Zapier

In this tutorial, we'll show you how to integrate Eden AI's Invoice parser API into your mobile app using Zapier to help streamline your financial operations and free up time for more important tasks.

The same process applies if you want to include other features like : Image taggingExplicit content detectionText analysis and many more AI APIs we offer.

Build AI on Zapier with Eden AI

Eden AI was created for no-coders having difficulties with choosing the right AI provider and/or integrating several APIs. Managing multiple accounts for each app can be a tough job, but with Eden AI, you can connect and manage all your APIs on a single account.

Since some AI providers can be complex to use, we wanted to simplify the “no code” part and make AI available to as many people as possible.

Eden AI allows you to solve multiple AI tasks on Zapier:

Let's practice with Invoice parsing!

Just like Receipt and Resume Parsing, Invoice Parsing is a tool powered by OCR to extract and digitalize meaningful data, Computer Vision to identify structure of the document, and NLP techniques to pin down the fields. Invoice parser technology extracts key information from an invoice (.pdf, .png or .jpg format) such as the invoice ID, total amount due, invoice date, customer name, etc.

https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/63da6e12b3e34e9d05f991a1_Mockups%20features%20(2).png

Invoice Processing implies the necessity of software and technology to automate the processing and management of invoices. It includes tasks such as capturing invoice data, validating it in comparison to purchase orders, and routing it for approval, payment and archiving. The goal of AI in invoice processing is to improve efficiency, accuracy, and speed in handling invoices without any human intervention.

Try Eden AI for FREE

How to bring invoice parsing to your app using Zapier?

If you're looking for an easier and faster way to implement invoice parsing to your app, skip the tutorial and watch the video below:

1. Get started with Zapier

Go to the “Zaps” menu, then create a new Zap.

https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/63ebb3e4c2eaac5a0b90cde8_1%20(2).png

2. Create your first step in Zapier

Let's create our first step by choosing a “Trigger”. A trigger in Zapier is an event that starts a workflow or a series of automated actions. In other words, it is the initial event that sets the "zap" in motion. Triggers can be initiated by various events, such as the creation of a new item in a spreadsheet, the receipt of an email, or the submission of a form.

https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/63ebb3fabe7ee13b24865b98_2.png

This step will allow you to get our invoice content to perform detection, for example, a trigger to get your invoice content from a Google Drive file.

https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/63ebc63d5a22b0a596574036_Sans%20titre%20(7)%20(1).png

Then, select the folder where your invoices will be stored:

https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/63ebc5cc2a1d35d92f411b6b_Sans%20titre%20(5)%20(1).png

3. Set up a “Code by Zapier” action

You can now add a new step that will perform an Action: run a Python code in order to call Invoice Parser API. Add a new Code by Zapier step as such and choose Run Python:

Warning

To use this Action with success, you will need a paid plan on your Zapier account. In fact, with the free plan, there is a 1 second timeout on the python script, which is not enough to call Eden AI APIs.

Starter is the minimum, it allows 10 seconds requests, but we recommend plans from Professional to Company where you can run scripts up to 30 seconds.

*

https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/63ebc5f119aa00f8c970c330_Sans%20titre%20(6)%20(1).png

Then you will to set up an Input Data to get your file from Drive trigger:

https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/63ebb433f3377e4df4507dd3_6%20(1).png

And write the code to call the Invoice Parser API:

https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/63ebc56f568527a643046e44_Sans%20titre%20(3)%20(1).png

Here is the code snippet that you can directly paste in the Code by Zapier module:

import json
import requests

headers = {"accept":"application/json","Authorization": "Bearer Your API Key"}

url="https://api.edenai.run/v2/ocr/invoice_parser"
data={"providers": "microsoft", "language":"en"}

invoice= requests.get(input_data['file']).content
files = {"file": ("settings.jpg", invoice, "image/jpeg")}

response = requests.post(url, data=data, files=files, headers=headers)

result = json.loads(response.text)
return(result)
Enter fullscreen mode Exit fullscreen mode

You just need to replace Authorization value with your Eden AI API key.

🔑Note that in order to obtain your API key, you'll need to create an account on Eden AI beforehand:

https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/63eb63393b9aa999bd131c13_Mockups%20features%20(3).png

Get your API key for FREE

This Action will return the extraction of the invoice in a structured output:

https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/63ebc477d2d591cf98b9ff06_Sans%20titre%20(1)%20(1).png

4. Parse extracted data in Google Sheet

Once invoice data has been extracted by Eden AI Invoice Parser API, you can get and store this data wherever you want (your ERP, Airtable, Google sheet, etc.).

Let's say you want to keep the results stored in a Google Sheet. you just need to add an Google Sheet action: Create Spreadsheet Row in Google Sheets

https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/63ebc4ed63a8a11864cec1ba_Sans%20titre%20(2)%20(1).png

You can select all elements from the third step (Code by Zapier) that returns Eden AI API response.

You are now ready to use AI in Zapier thanks to Eden AI APIs!

Get a preview of our integration on Zapier

We released some ready-to-use modules of Eden AI that you can directly use here.

This app allows you to use perform AI on text data such as summarization, text generation, sentiment analysis, keyword extraction, topic extraction, translation, language detection, etc.

More features will soon be added to the application: syntactic analysis of documents (receipt, invoice, CV, ID), voice recognition, and image processing (detection of objects, faces, explicit content, image generation, etc.).

If you're interesting in more low-code tools, have a look at our step-by-step tutorials on how to bring AI to your application with Power AppsGoogle App ScriptRetoolMakeIFTTT, and n8n.

Create your Account on Eden AI

Top comments (0)