Search code examples
gmail

Archiving entire conversation in GMail


I receive a lot of pull request email notifications from Bitbucket. I like getting these emails because they remind me to look at PRs or read comments etcetera.

However I'd like to archive them from the inbox once a PR is merged. I have set up two filters to try to achieve this.

The first one is just to mark the email as a PR notification. It matches emails from the correct email adress with the subject line starting with [Bitbucket] Pull Request. This filter adds the label PR to the conversation and then we are done.

The second rule matches the same email adress and subject line, but also looks for the words MERGED pull request in the body of the email. This rule applies the PR label and I have ticked the box saying it should skip the inbox (archive).

The first filter works perfectly. The second one only works when I try it out during the creation process, i.e. ticks the box saying 'Also apply this to x amount of conversations'.

Are the two rules interfering with each other or am I missing something else? Is this behaviour even possible?


Solution

  • I did not find any easy solution to this, but I found this Medium article on how to archive gmail conversations using Google Scripts. It works great.

    You can set it up so that it runs your archiving scripts on a time trigger. Mine archives my tagged email once a day and I find it very useful.

    I have also added rules for other updates, such as slack reminders, newsletters etcetera.

    Cheers to Fwed for the hint!