Mailbox labels/filter GAM Commands

571 views
Skip to first unread message

Virender Kumar

unread,
Jun 2, 2019, 4:28:21 AM6/2/19
to google-ap...@googlegroups.com
Hello Team,

Can you help me to create three mailbox labels for designated users, then create 3 email filter rules that will populate the labels/folders.

Regards,
Virender Kumar
Maven Wave Partners (India) Pvt. Ltd.
O: 92572-01292 | M: 9988665426
Virende...@mavenwave.com

Maven Wave: Website | Fusion Blog | LinkedIn

Virender Kumar

unread,
Jun 2, 2019, 4:31:54 AM6/2/19
to google-ap...@googlegroups.com
Hello Team,

Can we create labels/filters using Google APIs?


Regards,
Virender Kumar
Maven Wave Partners (India) Pvt. Ltd.
O: 92572-01292 | M: 9988665426
Virende...@mavenwave.com

Maven Wave: Website | Fusion Blog | LinkedIn


Steve - DynTech

unread,
Jun 2, 2019, 8:18:59 AM6/2/19
to GAM for G Suite
Sure, here are two examples

gam user steve add label "Invoices"

gam user steve add filter query "to:sen...@domain.com" label "Invoices" markread archive

James SEYMOUR

unread,
Jun 2, 2019, 7:36:02 PM6/2/19
to GAM for G Suite
Hi Steve,

Thanks for this. I have added to my growing list of useful commands.

For those interested, Steve's command will create the Label and this will be applied to new messages. To add existing emails to this Label you need to run something like this (not sure if maxtomodify 1000000 doit is needed, but I had used it on the previous command doing a similar function.

gam user steve modify messages query "to:sen...@domain.com" label "Invoices" maxtomodify 1000000 doit



On Sunday, 2 June 2019 20:18:59 UTC+8, Steve - DynTech wrote:
Sure, here are two examples

gam user steve add label "Invoices"

gam user steve add filter query "to:s...@domain.com" label "Invoices" markread archive
Reply all
Reply to author
Forward
0 new messages