Skip to content

Purchase category not supported #451

@johntdyer

Description

@johntdyer

It seems like there are 5 categories supported by Gmail filters however Purchase doest not seem supported by gmailctl

Image

my config is

local shippedNotification = {
  filter: {
    or: [
      { from: 'mcinfo@ups.com' },
      { from:'TrackingUpdates@fedex.com'},
      { from:'order-update@amazon.com'},
      { from: 'auto-confirm@amazon.com'},
      { from:'auto-reply@usps.com'},
      { from: 'shipment-tracking@amazon.com' },
      { and: [{ not: { from: 'tldrnewsletter.com' }}, { has: 'has shipped' }] },
      { subject: 'Delivered: Your Amazon.com order' },
      { subject: 'Your Amazon.com order' },
      { subject: 'Your Amazon package will be delivered today' },
      { from:'USPSInformeddelivery@email.informeddelivery.usps.com'},
      { and: [
        { from:'help@walmart.com' },
          { or: [
            {subject:'Out for delivery'},
            {subject:'shipped'},
            {subject:'delivered'}
            ]
          },
        ]
      }
    ]
  },
  actions: {
    archive: true,
    markSpam: false,
    category: "purchases",
    labels: ['Mailbox/Shipments'],
  },
};

Changing this from "updates" to "purchases" results in the following

➜  .config gmailctl apply  --remove-labels flag --debug
You are going to apply the following changes to your settings:

Filters:
--- Current
+++ TO BE APPLIED
@@ -5,39 +5,39 @@
       "has shipped"
       -from:tldrnewsletter.com
   Actions:
     archive
     never mark as spam
-    categorize as: updates
+    categorize as: purchases
     apply label: Mailbox/Shipments

 # Search: subject:{"Delivered: Your Amazon.com order" "Your Amazon.com order" "Your Amazon package will be delivered today"}
 # URL: https://mail.google.com/mail/u/0/#search/subject%3A%7B%22Delivered%3A+Your+Amazon.com+order%22+%22Your+Amazon.com+order%22+%22Your+Amazon+package+will+be+delivered+today%22%7D
 * Criteria:
     subject: {"Delivered: Your Amazon.com order" "Your Amazon.com order" "Your Amazon package will be delivered today"}
   Actions:
     archive
     never mark as spam
-    categorize as: updates
+    categorize as: purchases
     apply label: Mailbox/Shipments

 # Search: from:help@walmart.com subject:{"Out for delivery" shipped delivered}
 # URL: https://mail.google.com/mail/u/0/#search/from%3Ahelp%40walmart.com+subject%3A%7B%22Out+for+delivery%22+shipped+delivered%7D
 * Criteria:
     from: help@walmart.com
     subject: {"Out for delivery" shipped delivered}
   Actions:
     archive
     never mark as spam
-    categorize as: updates
+    categorize as: purchases
     apply label: Mailbox/Shipments

 # Search: from:{mcinfo@ups.com TrackingUpdates@fedex.com order-update@amazon.com auto-confirm@amazon.com auto-reply@usps.com shipment-tracking@amazon.com USPSInformeddelivery@email.informeddelivery.usps.com}
 # URL: https://mail.google.com/mail/u/0/#search/from%3A%7Bmcinfo%40ups.com+TrackingUpdates%40fedex.com+order-update%40amazon.com+auto-confirm%40amazon.com+auto-reply%40usps.com+shipment-tracking%40amazon.com+USPSInformeddelivery%40email.informeddelivery.usps.com%7D
 * Criteria:
     from: {mcinfo@ups.com TrackingUpdates@fedex.com order-update@amazon.com auto-confirm@amazon.com auto-reply@usps.com shipment-tracking@amazon.com USPSInformeddelivery@email.informeddelivery.usps.com}
   Actions:
     archive
     never mark as spam
-    categorize as: updates
+    categorize as: purchases
     apply label: Mailbox/Shipments


Do you want to apply them? [y/N]: y
Applying the changes...
Error: creating filters: exporting filter #0: in export action: unknown category "purchases"

Note:
  - Filter (internal representation): {
      "ID": "",
      "Action": {
        "AddLabel": "Mailbox/Shipments",
        "Category": "purchases",
        "Archive": true,
        "Delete": false,
        "MarkImportant": false,
        "MarkNotImportant": false,
        "MarkRead": false,
        "MarkNotSpam": true,
        "Star": false,
        "Forward": ""
      },
      "Criteria": {
        "From": "",
        "To": "",
        "Subject": "",
        "Query": "\"has shipped\" -from:tldrnewsletter.com"
      }
    }
➜  .config

Version

➜  .config gmailctl version
0.11.0
➜  .config

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions