I’m working on a field data collection workflow where users capture paper forms on-site using AppSheet. The trigger point is when a user takes a photo of a document and saves the form — at that moment, instead of storing the raw photo directly, I’d like to automatically trigger a pipeline that:
Picks up the photo immediately after the AppSheet form is saved
Automatically crops and applies document scanning (perspective correction, contrast enhancement, etc.) via an API
Saves the processed, high-quality document image back to Google Drive
What I’ve tried so far:
I experimented with two Google APIs (Google Vision API and Google Drive’s built-in scanning) with AI assistance, but I wasn’t able to replicate the quality of document scanning that Google Drive produces natively when you scan a document directly from the mobile app. The output from my API calls lacked the same level of perspective correction and image clarity.
My questions:
Has anyone implemented a similar post-save document scanning pipeline triggered by an AppSheet form submission?
Is there a recommended API or third-party service (e.g. Google Vision, DocAI, Microsoft Azure Document Intelligence) that produces Drive-quality scans?
What’s the best way to trigger this processing automatically after the form is saved in AppSheet — Apps Script, a webhook, or an AppSheet automation?
Any guidance or examples would be greatly appreciated. Thanks in advance!
Script to take AppSheet file column file path value and get it from Google Drive: AppSheet
If you combine these two together into your own custom script, you can:
Use the one script to get the file that was just uploaded into google drive
The file column has the folder/filename value
This script takes that value, and a folder to start from, and looks for the file in the folder - returning the file
Take that file and base64 encode it’s contents
Send that to Mistral using the script
Return the contents, and do whatever you want with it.
Maybe use the AppSheet API to return the value back into your system: AppSheet
Or actually return an object back to the automation that kicked off the script execution, and in AppSheet do something with the return values.
I didn’t mention this in the other post, but the Mistral OCR API has a basic endpoint (that returns the text) and another that does a more detailed extraction - where you can get descriptions of the images that are included in the file it’s OCRing.
FYI: My script doesn’t cover that more advanced usage
Thank you for the suggestion! Mistral OCR looks really powerful and we will definitely keep it in mind for future use cases.
However, what we are looking for is slightly different. Our goal is not to extract text from documents at this stage — we need the actual image of the document to look like a proper scan.
Here is our exact use case:
Field workers photograph paper forms on-site using AppSheet. These raw photos often contain unwanted backgrounds, angles, and surrounding objects. What we need is an automated pipeline that:
Saves the result as a clean, scan-quality image to Google Drive
Essentially, we want to replicate what Google Drive’s native mobile scanner does — but triggered automatically after the user saves the form in AppSheet, without any manual steps.
The reason image quality matters here is that these are signed physical documents. At the end of the year, they are submitted digitally to government authorities, so they need to look clean, professional, and clearly legible — not like casual phone snapshots.
Has anyone implemented a similar document image processing pipeline integrated with AppSheet? Any API, Cloud Function pattern, or SDK recommendation would be greatly appreciated!
I’ve experienced this too, but I haven’t investigated whether it’s my own fault, as there may be other options when uploading images to Appsheet via a form like (large, medium, or small size). Here’s an example. ( This is manual step)
The following tip is old almost 6 years ago. However you may want to check if relevant today. Maybe the service provider of images (FlieStack) has also made relevant changes to stay uptodate.