← Helpful hints

Gmail Filters: YAML to XML Tool

By default, all engineering staff will be CC’d on build notifications and approvals. However, for those who prefer a more human-readable format for filter management than XML, there is a Python project called gmail-yaml-filters that converts YAML filter specification to XML for import into Gmail. This project uses Python 3.6, so a Docker wrapper project is provided for you here: https://github.com/jjtroberts/gmail-filters.

Usage

  1. Clone or fork https://github.com/jjtroberts/gmail-filters
  2. Modify or create your own filters.yaml
  3. Run make build
  4. Run make run
  5. XML output will be saved to filters.xml
  6. Navigate to Gmail filters
  7. Click the “Import filters” link
  8. Open the XML file containing the snippets, then click “Open file”
  9. Click the “Create filters” button to upload to create the filters.