unsubscribe-gmail icon indicating copy to clipboard operation
unsubscribe-gmail copied to clipboard

Bug report

Open bre7 opened this issue 3 years ago • 3 comments

Just a couple of fixes for the script:

Messages aren't found if already in spam "folder". The hyperlink formula is incorrect when using some locales (; instead of , as formula separator.)

function doGmail() {
    // ...
    var threads = GmailApp.search(`label:${label} in:all`);
    // ...
    var hyperlink = '=HYPERLINK("#LINK#"; "View")'; // ; is universal apparently and will be converted when needed https://stackoverflow.com/a/61283851/2124535

bre7 avatar Nov 22 '21 20:11 bre7

Do you enter your label or email address here in step 2?

https://a.cl.ly/YEuBkEDp

mimedico avatar Jan 31 '22 00:01 mimedico

I did. The issue is how GMail filtering works. The repro for the bug is quite simple.

  1. Label an email that's tagged as spam.
  2. Try using label:REPLACE_WITH_LABEL_NAME Email won't be displayed in search results

Try using label:REPLACE_WITH_LABEL_NAME in:all instead

bre7 avatar Jan 31 '22 13:01 bre7

Applied this to my local version of the script and it worked great, thanks!

RainofTerra avatar Apr 20 '22 19:04 RainofTerra