@@ -478,17 +478,15 @@ gog gmail drafts send <draftId>
478478gog gmail labels list
479479gog gmail labels get INBOX --json # Includes message counts
480480gog gmail labels create " My Label"
481- gog gmail labels update < labelId> --name " New Name"
482- gog gmail labels delete < labelId>
481+ gog gmail labels modify < threadId> --add STARRED --remove INBOX
483482
484483# Batch operations
485- gog gmail batch mark-read --query ' older_than:30d'
486- gog gmail batch delete --query ' from:spam@example.com'
487- gog gmail batch label --query ' from:boss@example.com' --add-labels IMPORTANT
484+ gog gmail batch delete < messageId> < messageId>
485+ gog gmail batch modify < messageId> < messageId> --add STARRED --remove INBOX
488486
489487# Filters
490488gog gmail filters list
491- gog gmail filters create --from ' noreply@example.com' --label ' Notifications'
489+ gog gmail filters create --from ' noreply@example.com' --add- label ' Notifications'
492490gog gmail filters delete < filterId>
493491
494492# Settings
@@ -1076,13 +1074,19 @@ gog slides export <presentationId> --format pptx
10761074
10771075``` bash
10781076# Mark all emails from a sender as read
1079- gog gmail batch mark-read --query ' from:noreply@example.com'
1077+ gog --json gmail search ' from:noreply@example.com' --max 200 | \
1078+ jq -r ' .threads[].id' | \
1079+ xargs -n 50 gog gmail labels modify --remove UNREAD
10801080
10811081# Archive old emails
1082- gog gmail batch archive --query ' older_than:1y'
1082+ gog --json gmail search ' older_than:1y' --max 200 | \
1083+ jq -r ' .threads[].id' | \
1084+ xargs -n 50 gog gmail labels modify --remove INBOX
10831085
10841086# Label important emails
1085- gog gmail batch label --query ' from:boss@example.com' --add-labels IMPORTANT
1087+ gog --json gmail search ' from:boss@example.com' --max 200 | \
1088+ jq -r ' .threads[].id' | \
1089+ xargs -n 50 gog gmail labels modify --add IMPORTANT
10861090```
10871091
10881092## Advanced Features
0 commit comments