Services Plugins FAQs

OCR Plugin - Writing OCR output to database

Hi All,

I’m having trouble with the workflow to get OCR output text to appear as text in the database of my app.

I’ve attached a snapshot of what Im trying to achieve. Ive tried a couple of workflows with the step 2 variation in the attached appearing to add to database in the correct data type and correct column. The only problem is that the output text isnt the actual OCR output text (it looks like a file name).

Basically what I’d like to see is the actual OCR output text written to the database (In data type “Compliance To-Do”, in column “Text Body”) instead of what looks like the file uploader’s file naming.

Hope this makes sense.

Thanks
Harry




Hello, @pecuniaprojects,

The problem appeared because you were not saving the correct data. To have the text from the uploaded image saved in the DB you should use the following settings.
image
In your case, the data type has to be “Compliance To-Do” and the field instead of “Text_OCR” - “Text Body”.
Also, to be sure that the image is fully processed before the initiation of the saving is needed to use the event “OCR.Space OCR Done”. In other words, the workflow should be the following.

If you will use the event “PictureUploader A’s value is changed” for triggering the update of the DB most probably the data will be empty as the plugin will not have enough time to process the data and null data will be saved.

Hope this helps!

Best Regards,
Alex

Hi @alex.grimacovschi, Thanks for looking into this. But the issue I am having is not so much writing to the database but the result that I see in the database. The workflow I was using writes information however the formatting isnt what i’d like to see.

For example when I run the workflow, in the database under “Text body”, instead of seeing the words ‘Fire Engineering Report’ (which is the piece of text in the pdf file i upload) i see ‘//s3.amazonaws.com/appforest_uf/f1579606869596x516533763888227460/FER%20-%20Test%20Upload.pdf’.

Apologies I may not have explained it well enough previously.

Hello @pecuniaprojects,

You have in the database the wrong data because you are saving “The Picture Uploader’s Value” which is basically the address that you see

To have saved the words ‘Fire Engineering Report’ from the pdf file you are uploading you should save “OCR.Space B’s Output as Text” as presented previously.

Please consider that in order to be sure that the image is fully processed before the initiation of the saving is needed to use the event “OCR.Space OCR Done”. Without that, it is possible that no data will be saved in the database.

Hope this helps!

Best Regards,
Alex

Got it working @alex.grimacovschi! There was also an extra step in the workflow that i had to delete. Appreciate your help!

2 Likes

Hi @alex.grimacovschi are you able to help out with the below query?

Say I have a document that has three sentences. The app is set to output the OCR space as sentences so 3 line items appear in a repeating group that previews the OCR result. Question is if you want to write those sentences to the database as individual line items what is the workflow for getting that to happen?

What is happening at the moment is the entire OCR result writes to the database as a single line item.

Hope this makes sense. Let me know if you need to see some snapshots if its unclear.

Thanks in advance for your help.
Harry

Hello @pecuniaprojects,

Saving a list of texts as separate items in the database requires developing a complex logic. This functionality is more related to the functionality of the Bubble than Plugin. The idea is that the plugin reverts a list of texts and saving those lists in separate items can be done only through an API workflow. I would recommend checking the Bubble forum for solutions like this. Here you can find a few posts with related information:

I hope it helps,

Best Regards,
Alex

Appreciate the feedback @alex.grimacovschi. Will have a look at these links to see if I can get something to work.
Thanks again.
Harry

1 Like