Find Duplicate Appsheet Images in Drive using Apps Script

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)

8 0 743
0 REPLIES 0
Top Labels in this Space