DEV Community

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

Posted on • Originally published at edenai.co

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

In this tutorial, we'll show you how to integrate Eden AI's Invoice parser API into your software using Bubble 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 Bubble 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 Bubble:

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/6401bba986cde35d7fbffa8a_buH2QY5uPllTPvwyk0gOgXdC8xYThvjIZHmrdx0xe05lqWKoGv0ernTlP5B7JPNr6jkx3lDSQtx_nJwuBZDx2hSkY8N47m6NhZdDpDe67PiF2XfWeEbRgwKy0ExDiv94e9qNVATDE44kI4KJzEB2G94.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 Bubble?

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. Install the Eden AI Invoice Parser plugin to your app

First, you'll need to install the Eden AI - Invoice Parser plugin.

In your app, click on the “Plugin” menu, then “add plugins” and search for the “Eden AI - Invoice Parser” Plugin:

https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/6401bba8e48dd04be7ae7bb3_XTRlErbxI4bxb7I8oUiwTwkkBC0-Sy6ckfaIZBYlXNDm3K7EMElDk_ME4cmwRc3F9iFQ0Lnh_cSeGJqlSathK32dRmtsjeNLPrLwHiB2FeR1vSWeMJPzvNeLyuik04dzL2dKjRzNyZYTr55Xis2UKt4.png

Once the plugin is installed, you will be asked to enter your API key.

https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/6401bba89ae39a5faeb3469e_uhLDdovTb5nbt4JJexo2QRAn6InbLiT7b23R3r7k0EIvd8GpfFEOnpab9Y0ZIP4ChG4c5UxwqGxeLXR3lQkXzY0gRLrkFPqRrt2kYS5I4uXAi8lJOZRnFBQMmh176BvxG0kHaLvdFOwR3RtQ9eODJRU.png

Don’t forget the keyword “Bearer” before your api key

https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/6401bba8aaeca700d3a1e0bb_9p8Wr-PKsdJ91aYI3C3I_mHf1f56pfrW3gUa8IVje5d3cfPxtF1Ajsb3DC8g1oCjyMOO_c21K0b9CG1NC4JJIFzV0y4YkxgkALlESUQyj5GypHVvDRkV4Km415XPrBaZsaNdrLFOLPDbLgZvC9iO0ek.png

🔑 Note that in order to obtain your API key, you must create an account on Eden AI for free:

https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/6401bba86b48d8011bccfbe4_fAApLr6dnHvA2SKriXbxW8hMVAfL3s_UwQ5JIBcxkIzGDMA_MB9MuJReMveNk2fGQDqVOTlbv6M_MNRe02UZf5J9SWe0_1ZlbEQg8roHckElrmvbJtd7tdDg3oLCNPDUFIv0UGkNNpyLsqULvejGd2E.png

Get your API key for FREE

2. Start designing your app

In order to develop an application capable of parsing any invoice, you will require four components:

  • a file uploader
  • a button that launches the API call
  • a group that stores the information of the API call
  • strings of text to display the response

You can find them in the design menu :

https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/6401bba8e48dd09764ae7be3_4bVASbLHEXVFlbjDxj1OMROimrND9wuNzanq1PW17Afd8sY9-u-RSp0xwPZNPtz-CGDCOPgTNNCDfKZ8qmJn_XY8QqABpA_Ya0R2WgCazIiAix1jSUkb-42RwEyGJPb40RSUiN3BbGiJVDU4wBK4ep0.png

https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/6401bba83f8f2a27ae020bc6_H3xM7ygWSLT8HQAm7nsBTagbIG9QGsDwFYNd81zRSaURQh1J5DBoILOwOiiWI89CASxsolYgDb1lSVXHImJzpno5hcpVQVWJW_zhRVAvpDVMkawy9qe0HTyG6Lejd2eCLt0BdukLFhBFqCvz0_6kPa4.png

https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/6401bba986cde3bafbbffb19_YcBks0T9dLBAvRxWCVOxxvAAn2wPHPoN2TorRHPiQ_Fz8Zk5lM_qoUA4GvfAl_XkOJApMCN6FWuoerzCYN41nN0_QRxykantrM7fN8LtjuZCX97hyNNeasuD1fWirSnEhYCENHfo_i1_Av5lzUQUpS4.png

Be sure that you put your strings of text inside the group :

https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/6401bba94215e9550a9e9825_pXu8CROoi_R0gw3xgtF7QyEBRb17ObkAmDt3ezvtplJ0g6ygz0kHRw63Y8pmytsTcfCZiPUNtiKhne2rdRhevNtRc-ZG0NfZRmAODeeObnsxRL_JkOp-_gNPabEO-yC-OugJ40ih3YM1VJ9myumOfis.png

3. Set up Custom States

One way to make the API call is with Custom States. When the button “Parse” is clicked, the custom state takes the value of the file dropped in the FileUploader. If the custom state is not empty, the API call is launched. This method avoids false responses due to an empty file uploader.

To create the custom state, double click on your group to display its toolbar, then click on:

https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/6401bba89ae39a6b94b34829_UV8M5EhdISJoxSGy0RC8VdhcAfk77V4AH8FNudMTY9eRhMjWE6vVElbjA5WWdw32N_ZFKWmTyqqopxZ5Avn0_cvb-CaaRXd9wuX7Mafkr-L5C5kHgszaufFhHe3q2EvvOLyjA_NKHdbJIMzyq_9ZWoE.png

Click on “add new custom states”:

https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/6401bba99302ac6b6373e39c_X3e4dl8NYLs9DW7sjTGWxD8N9hOSS_Loy5MJOrmQVR-taR5KLqjVZJg9xPB6PQ--gc0imsEIwy6gszMBksQLctIXy5K0GnURqb6HG5xHNbOCbed0jFA1aOgMMhB9qtzIIc--_bbqWkZzbeMe9WZ5Fk0.png

Choose a state name and select “file” for state type to process invoices:

https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/6401bba99ae39a8281b348c4_YMU-idez07yZVnYNaVaWOLWVUv7T1CLIdNqXdplZ_smOUW9zkU24rDhwy6JiM7YG5YS2spt-sV1pG7BMXzPu8X5pFIC33niEeIqDZIMizHXk25LYJ7vCF7GhOLqfbb2REIgDpNzVToTSNVcHu2wgw9o.png

Then, adjust the button to set up your state with the right value. To do so, double click on the button and click on “Start/Edit Workflow”.

https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/6401bba93f8f2a2cd8020d47_d654vZjk93kNsbhpQxVwf3AKlf1U2-0M-_dU2DOLktvQZbFl0F-9jco4kybRypapgagiy_d7M2GjxUpzXz6HPulnY4jx3QOV9jVYcqXZkBxcsu63s5O5TeY7vfE64n67xsWrS_YRr_Szf5r9dMpHaII.png

You will be directed to the Workflow menu on which you'll need to click on “Element Actions”, then “Set state” :

https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/6401bba94215e9ce689e98dc_IcIv3oMOxXGkuwBusx4jRyLuL6vAzB5xCuBhdlHufpLcBLLf6pzWCglUZT9VfWZiBcYfLmXn63oiKztqd9W4EjaC2LmpDH4WpVx0xJVLgSlWR0VmQlADBWcAArh8uUKiqzuz8m4nAi8wdrbabuRHb_k.png

Set up your custom state with the FileUploader value which will correspond to the invoice you want to parse :

https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/6401bba96b48d81131ccfce2_ylELUCHgo04MvbHdruTQsKnSb032u5xqmxaLjOJdLDtL4pR8kLiATtnHXNGewb8pF3w4gGZep7LhrRipj-Bx_pehHRzcB7w5GmMdExAwuL0a0yDUEJ5iBIX4PNY3UYZD5l1yv6b0ACleFN2yStWtdm0.png

4. Launch the API call

Then, configure the group that will receive the data of the API call.

Double click on the group, and configure it like this :

https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/6401bbaa3f8f2a9d2d020dc8_3AVpp0-w4vI2Ijp0hz_MmZK6YyMMRnO2KC6yKdE1wlNZVeVXm9uUK3_fQaXhCDajC3WmWvxrnUui9nfJbOhPY32NGuHWb46LwURG7xgsEmYNN7IsnPkGqRAodYAmKkoWS0zF-54RwnAEcgS-kV36iWY.png

https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/6401bba99ae39ab3b1b34921_zOcssg_C7A29_9UQQHroKOBzmlDhUVuw0rrooc5rVcTLGyZKvkxhobDFFiywKo7ZDpN2c_CLvro0YPLGK5I-GXeLwGwajWQ5fpoOVjCZ9vH-cwzhm4IrxR3V0uqTMLV0C3MjPjI52_XqqcjrQOEpsI4.png

https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/6401bbaa9c1f8cc5f7ed5a1d_lDIJYIrxlAn3d11V35hYTc3r8vLsigcd093NVlygqO4NyvFahvncO-ZuiyeS34ChX12BRtmG1-TTsFq5iAFxv5EudU8hKPI4WdALY6xJdHDwwd6494XORr6QmKutQ77g0GYZG51mn47sJeF0x2nD-Kg.png

Here, we chose to use Google as a provider and English as a language but you can change these parameters depending on your needs. You can access the list of our invoice parsing providers and languages directly on our documentation.

https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/6401bba92ca6da5bc5801d9f_kVqYAgnkZPtYHQO_qQYeoxxvMh1J3QYJTU2BboJGn1Zum5C74LNibByY2I-2z2MeHzxfLx6kDlLzUnfuj3aRPo8Vrahp1DZcbCgwbzHVsyz5_TmcOAuEYqhjLTY_3p26KMmbWGmZ0_afW70EjukHAEo.png

https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/6401bba986cde3c7aebffbf8_m-ujKUXUvlTfLs3yo3FxETvV0C1ekn960lyPyVzaM_y5KFUe4hcW9u-b-j2GgQoJxibfOnbrl_oDtSycKyvObNFlk0TRl15RuAqH5qtX3soI89BxkZ7QpRn_8L0kV0rXrjMHlyC0bsDP7vSZB2wnzSE.png

Once it is done, remember to click on the button below to change the content type of the group; otherwise, the data source will not be accepted. The purpose of using a group is to allow all groups' elements to access the datasource of the parent’s group. Therefore, it is easier for you to manipulate the data in it.

https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/6401bbaa4839d1516ecb3921_ePVJFuxfsdfkNyZrnmbd6XWgZiAYx0bxqC1Bdtf0tA_ApeDwpDnMemzsqRwaAboO_MIlrrkicN2S-QRtAtjEaIAzR-hQUMuTO-Ntp6DnlMZSAuXgg2G5LyT0pyax0cx_sXbUn2YgqP4_-Mys3u9VOY4.png

Eventually, double click on the strings of text inside your group and choose the data you want to retrieve:

https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/6401bbaa9ae39a9413b34a26_BmZW0_o1tfGXCYwpkisk_Tc8-sVVE5Q_w7LMlNIW8_E3fiTfLulOyDX_71q6SBKq-5Xn7GEinqqi9yZiptx24X93ni9ae6tecGD0v4tnoF9IPXVIkWqsOz1X5dLCAONSss4-HJtLADgZQw67N9frd08.png

5. Test your app

To test your app, click on “Preview” in the top right of the page :

https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/6401bbaa2ca6da8884801da0_DsPAUHkfHP92m8j4SEO5H0Otaswl65MrD_tCSAQv6UsV8x3CkmwCxaMwV6meoCbt_EBJzdA1AS3jkPIUoKf00jXwOGN6MUMSehnF6xHRVZs_igo5eJP7hTrjrigxvZrP3M56p1vRCrW3bdZgoIoLkEk.png

https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/6401bbaa9302acf7c573e52b_v1GrIC5ls6aP6C6kJlL4YG1hQ568DnNV25kQlKU0AiodXgaBiWPf8YA1TXYcXqq86IAmbWVgB_hCxbBcfhVKgGClVaFq99zMSp5w7OTNHeOcIwssEcPzj7DU0RYWVOCh_lIEcVNt-WjIyRqESfXQUUs.png

After uploading the file of your choice, click on the button "Parse" and wait a few seconds to see the result.

https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/6401bbaae48dd0b2c5ae7e3a_uiRnWQwQ7Q4AGfFxiDnhTcyvMCyYssWuw3vE8vNz4SMbpa42-gN1F3gxudUQtkRT4WPd8t7Es0zxYaNR_9td_uR0yghxtlIk9ISNM1hemVe_IBQLvd53IYN7gHrR4uqGr16JdzZnmRRUN6XPk36T5rE.png

Please be cautious as each click on the button triggers a call.

Congrats 🥳 You're all set and ready to automate your invoice processing with Bubble!

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 AppsZapierGoogle App ScriptRetoolMakeDataikuIFTTT, and n8n.

Create your Account on Eden AI

Top comments (0)