Reads unread inbox mail every hour and applies your own labels to each message using AI.

UsesClaudeGmail

Auto-label new Gmail messages with AI

ScheduleRun every hour.Run every hour.
ValuesSet labelRules to blank.Set labelRules to blank.
ValuesSet maxEmails to 25.Set maxEmails to 25.
GmailGmailList emails. Save it as inbox.List emails. Save it as inbox.
ValuesSet messages to inbox.emails.Set messages to inbox.emails.
Decisions & LoopsFor each email in messages:For each email in messages:
Decisions & LoopsIf a step below fails, save the error as labelErrorIf a step below fails, save the error as labelError
Try
ValuesSet subject to email.subject.Set subject to email.subject.
ValuesSet sender to email.from.Set sender to email.from.
ValuesSet snippet to email.snippet.Set snippet to email.snippet.
ValuesSet prompt to You are labelling one email. Reply with EXACTLY one label name from the rules below, and nothing else. If none of them fit, reply with the single word none.Set prompt to You are labelling one email. Reply with EXACTLY one label name from the rules below, and nothing else. If none of them fit, reply with the single word none. Rules: labelRules From: sender Subject: subject Preview: snippet.
ClaudeClaudeAsk Claude: prompt. Save it as verdict.Ask Claude: prompt. Save it as verdict. Maximum response length: 16
TextTrim verdict.response_text and save it as label.Trim verdict.response_text and save it as label.
Decisions & LoopsIf label isn't empty and label is not noneIf label isn't empty and label is not none
Yes
GmailGmailAdd label label to email email.Add label label to email email.
No
No steps
On error
ValuesShow in the output: Could not label message email.id as text: labelError as text.Show in the output: Could not label message email.id as text: labelError as text.