You can create tasks from e-mails in your Gmail account using the gmail service name.

Additional Dependencies

Install packages needed for Gmail support with:

pip install bugwarrior[gmail]

Client Secret

In order to use this service, you need to create a product and download a client secret file. Do this by following the instructions on: You should save the resulting secret in your home directory as .gmail_client_secret.json. You can override this location by setting the client_secret_path option.

Example Service

Here’s an example of a gmail target:

service = gmail
gmail.query = label:action OR label:readme
gmail.login_name =
service = "gmail"
query = "label:action OR label:readme"
login_name = ""

The specified query can be any gmail search term. By default it will select starred threads. One task is created per selected thread, not per e-mail.

You do not need to specify the login_name, but it can be useful to avoid accidentally fetching data from the wrong account. (This also allows multiple targets with the same login to share the same authentication token.)

Thread Limit

Gmail search results are capped at 100 max results by default, but may be adjusted to meet your needs by specifying email_limit:

gmail.thread_limit = 1000
thread_limit = "1000"


When you first run bugwarrior pull, a browser will be opened and you’ll be asked to authorise the application to access your e-mail. Once authorised a token will be stored in your bugwarrior data directory.


A limitation of the current implementation is that the browser must be available on the same machine as bugwarrior is invoked from. This precludes usage of the gmail service on a headless server.

Provided UDA Fields

Field Name




GMail labels

Text (string)


Last RFC2822 Message-ID

Text (string)


GMail last sender name

Text (string)


GMail last sender address

Text (string)


GMail snippet

Text (string)


GMail Subject

Text (string)


GMail Thread Id

Text (string)



Text (string)