0

I would like to write a script which checks the subject-line of an email conversation for a reference number (which follows a set format), and if it finds a reference number, adds the reference number as a label to the thread.

But I would like to do this on the email conversation that I am currently viewing in the gmail web interface. Ideally right-click somewhere in the email and select "add reference as label" from the menu.

Writing the script is not the problem - the problem is how to invoke the script on the currently-viewed conversation. How can I do this? Thanks.

Jern
  • 161
  • 6
  • You could star every thread you want the script to process and then use `GmailApp.getStarredThreads()`. If you look for a better solution I guess you could always try to create a browser extension. – Tesseract Apr 15 '17 at 14:48
  • 1
    Related: http://stackoverflow.com/questions/15592094/bookmarklet-to-save-url-in-google-spreadsheet – Rubén Apr 16 '17 at 01:45

1 Answers1

0

I found the answer: Gmail add-ons. https://developers.google.com/gmail/add-ons/

Jern
  • 161
  • 6