mbrt/gmailctl

Cant figure it out

Closed this issue · 1 comments

Using version 0.10.6 I ran gmailctl init and set everything up and get "You have correctly configured gmailctl to use Gmail APIs."

Everything seems to go fine in terms of setup however when I run the following command

gmailctl edit and enter the following it saves it as config.jsonnet but nothing happens in gmail.


local lib = import 'gmailctl.libsonnet';

local me = 'leat@gmail.com';
local toMe = { to: me };


{
  version: 'v1alpha3',
  author: {
    name: 'leat',
    email: me,
  },

  rules: [
    {
      filter: {
        or: [
          { from: 'leat@gmail.com' },
          { from: 'leat@yahoo.com' },
        ],
      },
      actions: {
        star: true,
        markImportant: true,
      },
    },
  ],
}


I was expecting emails from leat@gmail.com and leat@yahoo.com to get marked important and get starred. However nothing happens and I see no errors or any thing obviously wrong after the init command.

I am guessing I am just using the program wrong? I have tried reading the documentation and changing my configuration using examples from the documentation but nothing changes my actual gmail like marking the message as important.

in the .gmailctl folder I see gmailctl, config, credentials, and token files and they all seem fine.

mbrt commented

Gmailctl only changes the filters in your settings. Gmail will apply the actions only to new emails.

Please take a look at https://github.com/mbrt/gmailctl#apply-filters-to-existing-emails for how to apply the filters to existing emails.