Google Cloud Vision OCR can not access the URL currently

I’m using Google Cloud Vision API for extracting OCR Text. For this I use an Integromat Scenario:

  • My App is sending the Image Column via Webhook to Integromat.
  • Google Cloud Vision returns the OCRTEXT
  • HTTP Request is sending the OCRTEXT back to my App

Sometimes, the Google Cloud Vision returns this Error:

We can not access the URL currently. Please download the content and pass it in.

When you google this Error, you get different possible solutions. One may be: “The site of your URL is down, or it temporarily blocked Google bot, or it updated robot.txt to stop the Google bot to crawl URLs.”

So I thought that maybe AppSheet could fix something on this part?

Because if I retry it after 1 Minute, it will work. And as mentioned, this happens only sometimes.

The Image URL AppSheet is sending in the Webhook is a long URL like this:
which in fact is public.

Info: Under SECURITY --> OPTIONS I’ve enabled “Require Image and File URL Signing”

Maybe you want to know, why I’m not just use the AppSheet OCRTEXT() expression. This is because my App has to work offline. And AppSheet’s OCRTEXT() expression needs Internet connection :wink:

Adding @hugheshilton @tony

Hi @Fabian. Are you making many concurrent requests to the vision API endpoint? On the AppSheet side of things, we’re not sure what could be causing that issue.

Hi @tony. No. Even when I’m sending just 1 image to vision API, it will sometimes give me this error.
I’m wondering if it happens, because the Image is not already available on Google Drive? This would explain why it works when I retry it after 1 Minute or so.

I also found out that the image is first stored as Base64. Could we get this information to send it in the Webhook? :thinking:
This would solve my problem.

Seems like two separate issues here.

  1. You want the ability to send a Base64 representaion of the iimage along with a webhook. That seems like a useful thing for us to provide in general. @Arthur_Rallu
  2. The image URL is not accessible. Hmm … I don’t know why you would get that error.

But a more basic thing I didn’t understand is your comment about not being able to use the OCRTEXT() function because your app needs to work offline. Clearly, it is not offline when you are invoking the Vision API through the webhook. So why can’t you call the OCRTEXT() function in a workflow action and save away the value into a data column?

This would be perfect. But my knowledge is, that OCRTEXT() actually is not working with Actions. @tony told me this is on your ToDo list. Or am I missing something?

I think you mean something like this?

Create a Workflow for Adds_Only:

And use OCRTEXT() to extract Text from the [Label] image column:

But this will not work.

yes, that is what I meant.

I guess @tony will clarify why this doesn’t work, since he is more familiar with the implementation than I am :]

1 Like

There are actually two bugs here:

  1. OCRTEXT doesn’t work in an action on the mobile device
  2. OCRTEXT doesn’t work in an action on the server (via workflow)

I’ll investigate these and get back to you.

1 Like

Hi @Fabian. Addressing these problems is still on our list, but it might take a little while to fully address them. Please stay tuned.

1 Like

Thank you very much @tony for all you hard work.
As you know OCR was and is my favorite :slight_smile:

Thank you @Fabian for being an early adopter and providing useful feedback!

1 Like