This tips and tricks is brought to you by Apps script and a MD5 checksum function.
It solves a particular problem: Appsheet lets users upload the same image over and over again, and will create a new unique filename each time. This solution finds duplicate images using the image fileโs checksum.
A byproduct of this solution is that we also write the Google DocID for the image back into the spreadsheet. This by itself is quite useful. @tsuji_koichi in a separate post, you mentioned something about needing to โpublishโ the google folder which was โless secureโ (I canโt remember exactly how you phrased it). I do not see a reason to make any security changes in Google Drive if your goal is only to get a DocID and Checksum for use inside of Appsheet.
In this solution, no folder changes are required. The basic premise of associating an Apps Script with a Google sheet trigger is still the same.
Everything you need to walk through this example is in the PDF attached to this post.
Would love a second pair of eyes on this in the case that I missed somethingโฆ Thanks!!
Find Duplicate Images using AppsScript.pdf (316.1 KB)