Forwards each new Gmail email that mentions one of your keywords to the address you choose, as soon as it arrives.
Uses
Gmail
Forward emails that mention a keyword
Whenever a new email arrives in your Gmail inbox, the workflow looks for the words or phrases you choose in its subject and body. When one turns up, the email is forwarded from your Gmail account to the address you picked, opening with a line that names the keyword it matched, followed by the original sender, date, subject and recipients.
Matching ignores case, and you can limit it to the subject line for a stricter filter. Emails that mention none of your keywords are left alone. A copy the workflow forwarded is recognised and never forwarded again, so sending to your own address is safe. You can also narrow the trigger to one sender or domain so the workflow only looks at mail from there.
The forward is plain text: an email that only has an HTML version is converted to readable text, a very long one is cut with a note saying so, and attachments are not carried over.
email.When an email arrives. Save it as email.forwardTo to blank.Set forwardTo to blank.keywords to an empty list.Set keywords to an empty list.searchBody to true.Set searchBody to true.keywords, subject, sender, recipients, and date and save it as tidy.Run Python code on keywords, subject, sender, recipients, and date and save it as tidy.tidy.keywords is emptyIf tidy.keywords is emptyreadableBody to blank.Set readableBody to blank.bodyToSearch to blank.Set bodyToSearch to blank.bodyErrorIf a step below fails, save the error as bodyErrorbody and full_length and save it as converted.Run Python code on body and full_length and save it as converted.readableBody to converted.text.Change readableBody to converted.text.bodyToSearch to converted.text.Change bodyToSearch to converted.text.readableBody to [This email's body could not be included here: it is too large or could not be turned into text. Open the original in Gmail to read it.].Change readableBody to [This email's body could not be included here: it is too large or could not be turned into text. Open the original in Gmail to read it.].bodyToSearch to email.body.Change bodyToSearch to email.body.@tidy.subject @bodyToSearch and save it as searchedText.Build the text @tidy.subject @bodyToSearch and save it as searchedText.searchedText contains Forwarded automatically because it mentions "If searchedText contains Forwarded automatically because it mentions "searchBody is noIf searchBody is nosearchedText to tidy.subject.Change searchedText to tidy.subject.matchedKeyword to blank.Set matchedKeyword to blank.keyword in tidy.keywords:For each keyword in tidy.keywords:keyword and save it as term.Trim keyword and save it as term.term isn't blank and searchedText contains term (ignoring case)If term isn't blank and searchedText contains term (ignoring case)matchedKeyword to term.Change matchedKeyword to term.matchedKeyword is blankIf matchedKeyword is blankforwardTo. Save it as forwarded.Send an email to forwardTo. Save it as forwarded.
Subject: Fwd: tidy.subjectForwarded automatically because it mentions "@matchedKeyword".
---------- Forwarded message ---------
From: tidy.from
Date: tidy.date
Subject: tidy.subject
To: tidy.to
...