Every six hours, labels the inbox mail from the senders and subjects you nominate and archives it out of the way.

UsesGmail

Clear the mail you never read out of your inbox

ScheduleRun every 6 hours.Run every 6 hours.
ValuesSet clutterSenders to blank.Set clutterSenders to blank.
ValuesSet clutterSubjects to blank.Set clutterSubjects to blank.
ValuesSet labelName to blank.Set labelName to blank.
ValuesSet maxToArchive to 25.Set maxToArchive to 25.
ValuesSet inboxScanLimit to 50.Set inboxScanLimit to 50.
ValuesSet punctuationMarks to [!, ?, :, ;, ,, ., (, ), [, ], , ', |"].Set punctuationMarks to [!, ?, :, ;, ,, ., (, ), [, ], , ', |"].
ValuesSet senderRules to an empty list.Set senderRules to an empty list.
Decisions & LoopsFor each rawSender in clutterSenders split by ,:For each rawSender in clutterSenders split by ,:
TextMake rawSender lowercase and save it as senderRule.Make rawSender lowercase and save it as senderRule.
Decisions & LoopsIf senderRule isn't emptyIf senderRule isn't empty
Yes
ListsAdd senderRule to the end of senderRules and save it as senderRules.Add senderRule to the end of senderRules and save it as senderRules.
No
No steps
ValuesSet subjectRules to an empty list.Set subjectRules to an empty list.
Decisions & LoopsFor each rawSubject in clutterSubjects split by ,:For each rawSubject in clutterSubjects split by ,:
TextMake rawSubject lowercase and save it as subjectRule.Make rawSubject lowercase and save it as subjectRule.
Decisions & LoopsIf subjectRule isn't emptyIf subjectRule isn't empty
Yes
ListsAdd subjectRule to the end of subjectRules and save it as subjectRules.Add subjectRule to the end of subjectRules and save it as subjectRules.
No
No steps
ValuesSet searchTerms to an empty list.Set searchTerms to an empty list.
Decisions & LoopsFor each searchSender in senderRules:For each searchSender in senderRules:
ListsAdd from:searchSender to the end of searchTerms and save it as searchTerms.Add from:searchSender to the end of searchTerms and save it as searchTerms.
Decisions & LoopsFor each searchPhrase in subjectRules:For each searchPhrase in subjectRules:
ListsAdd subject:@searchPhrase to the end of searchTerms and save it as searchTerms.Add subject:@searchPhrase to the end of searchTerms and save it as searchTerms.
Decisions & LoopsIf searchTerms is emptyIf searchTerms is empty
Yes
Decisions & LoopsStop and report a problem: List the senders to clear in the 'clutterSenders' step, or the subject words in the 'clutterSubjects' step, then run it again.Stop and report a problem: List the senders to clear in the 'clutterSenders' step, or the subject words in the 'clutterSubjects' step, then run it again.
No
No steps
ValuesSet inboxSearch to {searchTerms joined by a space}.Set inboxSearch to {searchTerms joined by a space}.
GmailGmailList emails matching inboxSearch. Save it as inbox.List emails matching inboxSearch. Save it as inbox.
ValuesSet candidates to inbox.emails.Set candidates to inbox.emails.
TextTrim labelName and save it as label.Trim labelName and save it as label.
ValuesSet archivedCount to 0.Set archivedCount to 0.
Decisions & LoopsFor each message in candidates:For each message in candidates:
Decisions & LoopsIf archivedCount is greater than or equal to maxToArchiveIf archivedCount is greater than or equal to maxToArchive
Yes
Decisions & LoopsStop repeating.Stop repeating.
No
No steps
Decisions & LoopsIf a step below fails, save the error as clutterErrorIf a step below fails, save the error as clutterError
Try
TextTrim message.id and save it as messageId.Trim message.id and save it as messageId.
TextTrim message.from and save it as fromHeader.Trim message.from and save it as fromHeader.
ValuesSet senderAddress to fromHeader.Set senderAddress to fromHeader.
Decisions & LoopsIf fromHeader contains <If fromHeader contains <
Yes
ListsGet the first item of the last item of fromHeader split by < split by > and save it as senderAddress.Get the first item of the last item of fromHeader split by < split by > and save it as senderAddress.
No
No steps
TextMake senderAddress lowercase and save it as senderAddress.Make senderAddress lowercase and save it as senderAddress.
TextMake message.subject lowercase and save it as subjectText.Make message.subject lowercase and save it as subjectText.
Decisions & LoopsFor each mark in punctuationMarks:For each mark in punctuationMarks:
Text Replace mark with in subjectText and save it as subjectText. Replace mark with in subjectText and save it as subjectText.
ValuesSet paddedSubject to subjectText .Set paddedSubject to subjectText .
ListsCheck whether senderRules includes senderAddress and save it as matched.Check whether senderRules includes senderAddress and save it as matched.
Decisions & LoopsFor each phrase in subjectRules:For each phrase in subjectRules:
Decisions & Loops If paddedSubject contains phrase (ignoring case) If paddedSubject contains phrase (ignoring case)
Yes
ValuesChange matched to true.Change matched to true.
Decisions & LoopsStop repeating.Stop repeating.
No
No steps
Decisions & LoopsIf matched is yesIf matched is yes
Yes
GmailGmailAdd label label to email messageId.Add label label to email messageId.
GmailGmailArchive email messageId.Archive email messageId.
ValuesAdd 1 to archivedCount.Add 1 to archivedCount.
No
No steps
On error
ValuesShow in the output: Left one message in the inbox because it could not be read: clutterError as text.Show in the output: Left one message in the inbox because it could not be read: clutterError as text.
ValuesShow in the output: Labelled '@label' and archived archivedCount as text message(s). Nothing was deleted - search for the label to review what was cleared or move any of it back.Show in the output: Labelled '@label' and archived archivedCount as text message(s). Nothing was deleted - search for the label to review what was cleared or move any of it back.