How to Apply Email Rules to Emails Containing Specific Words in Google Workspace

Quick and easy-to-follow guide for Google Workspace administrators

What is the Objectionable content setting

  • You can set up email rules to check incoming or outgoing emails for specific words.
  • The email rules will look for words typed in the emails’ body, header, and attachments with text.

What emails can you apply the Objectionable content setting to

First, you select which emails you want to apply the setting to, based on:

  • Organizational unit
  • Direction: Sending, Receiving, or Internal Sending / Receiving
  • Type of recipient: User, Group, or Non-existent
  • Specific email addresses or domains
  • Specific senders or recipients
  • Specific words

What can you do with the Objectionable content setting

Then, you select what to do with such emails. You have these options:

  • Add headers
  • Modify their subject
  • Re-route to another mail server
  • Re-route to a different recipient
  • Add more recipients (BCC)
  • Bypass spam filters
  • Remove attachments
  • Enforce secure delivery
  • Reject emails
  • Quarantine emails

How to configure Objectionable content in Google Workspace step-by-step with images

Step 1

How To Apply Google Workspace Email Rules To Emails Containing Specific Words (Objectionable Content Setting) - Step 1

Go to Google Admin at https://admin.google.com and click the Apps icon.

Step 2

How To Apply Google Workspace Email Rules To Emails Containing Specific Words (Objectionable Content Setting) - Step 2

Select Google Workspace.

Step 3

How To Apply Google Workspace Email Rules To Emails Containing Specific Words (Objectionable Content Setting) - Step 3

Click Gmail. Make sure not to check the box to the left; just click the service.

Step 4

How To Apply Google Workspace Email Rules To Emails Containing Specific Words (Objectionable Content Setting) - Step 4

Select Compliance.

Step 5

How To Apply Google Workspace Email Rules To Emails Containing Specific Words (Objectionable Content Setting) - Step 5

Under Organizational Units, select the OU with the users whose settings you want to update. The same updates will apply to all sub-OUs under the OU you choose.

By default, if you don’t select an OU, you will add your setting to the top OU, named after your domain. This way, you will apply changes to all users in your account.

You can search for an OU to find it faster if you have a large OU structure.

If you’re not familiar with OUs, click here.

Step 6

How To Apply Google Workspace Email Rules To Emails Containing Specific Words (Objectionable Content Setting) - Step 6

Find the Objectionable content setting on this page and click the CONFIGURE button to the right. 

If you don’t see the CONFIGURE button, click ADD ANOTHER RULE instead.

Step 7

How To Apply Google Workspace Email Rules To Emails Containing Specific Words (Objectionable Content Setting) - Step 7

First, on top, enter a short description of what you’re setting up, so you can recognize this email setting later.

Next, under 1. Email messages to affect, select which emails the compliance filter will work on. They may be:

  • Inbound: emails coming in from external people outside the domain.
  • Outbound: emails going out from this domain to external people.
  • Internal – sending: emails sent internally to other users in the Google Workspace account.
  • Internal – receiving: emails received internally from other users in the Google Workspace account.

Step 8

How To Apply Google Workspace Email Rules To Emails Containing Specific Words (Objectionable Content Setting) - Step 8

Under 2. Add words you want to search for in each message you get to specify what words the filter will look for in emails. 

Check the Custom objectionable words box and click Edit. Then click either Add button to add words the filter will search for. The words must be comma or space-delimited.

Click SAVE to add the words to the filter.

Step 9

How To Apply Google Workspace Email Rules To Emails Containing Specific Words (Objectionable Content Setting) - Step 9

Next comes 3. If the above expressions match, do the following. Here, you get to choose what to do with any emails matched by this compliance filter. Modify message offers the following options:

Headers – lets you add custom headers to emails. For example, you can add a custom header matching the description you entered for the setting. This helps analyze why an email was routed in a certain way or what triggered a filter.

Adding the X-Gm-Original-To header is useful when you reroute a copy of an email, and the new recipient wants to know the original recipient’s address. The latest recipient can see the original recipient by checking the X-Gm-Original-To header box in the email.

Add X-Gm-Spam and X-Gm-Phishy headers to indicate if the email is spam or phishing. For example, these headers will look like this:

X-Gm-Spam: 0 (means that the email is not spam)

X-Gm-Spam: 1 (means that the email is spam)

Prepend custom subject allows you to add something to the beginning of emails’ subjects.

Change route allows you to re-route emails to another mail server, already added to the Hosts setting as shown here.

Change envelope recipient allows you to change the email recipient to another email address, bypassing the original recipient.

Bypass spam filter for this message approves emails for delivery automatically, regardless if Gmail’s built-in spam filter thinks they are spam.

Remove attachments from this message strips the emails of all attachments.

Add more recipients adds extra recipients to the email. This acts similar to a BCC, so the sender and recipients of the message won’t know about the additional recipients you have added.

Encryption (onward delivery only) makes it mandatory for a secure connection to be established during the transmission of the email, otherwise, it will not be delivered.

Step 10

How To Apply Google Workspace Email Rules To Emails Containing Specific Words (Objectionable Content Setting) - Step 10

Under 3, you can also choose to Reject – additionally, you can type a custom rejection notice.

Step 11

How To Apply Google Workspace Email Rules To Emails Containing Specific Words (Objectionable Content Setting) - Step 11

You have the option of sending messages to a spam Quarantine.

Click here to learn about spam quarantines.

Step 12

How To Apply Google Workspace Email Rules To Emails Containing Specific Words (Objectionable Content Setting) - Step 12

Before you save the setting, you should also look at the additional options – click Show options at the bottom.

Step 13

How To Apply Google Workspace Email Rules To Emails Containing Specific Words (Objectionable Content Setting) - Step 13

Address lists – check to add a list of email addresses and/or domains. Then the Content filter may bypass this list, or only apply to this list.

Account types to affect – users, groups, or unrecognized (non-existent in your Google Workspace)

Envelope filter – you can have it only affect specific senders or recipients.

Click SAVE to add the routing rule.

Step 14

How To Apply Google Workspace Email Rules To Emails Containing Specific Words (Objectionable Content Setting) - Step 14

Now you can see your setting listed in the Objectionable content section.

You can Edit it, Disable it (turn off temporarily), Delete (completely remove, no restore option) or ADD ANOTHER RULE.

It may take up to 24 hours before the changes kick in.

That's all! You reached the end of the article. Continue to:

If you find this useful, share and help others!

Email
Reddit
Facebook
Telegram
Twitter
LinkedIn
Pinterest

Address Lists

Set up email addresses and domains lists to allow, block, apply or exclude from email routing settings.

Routing

Set up email delivery rules that apply to incoming or outgoing emails.

Blocked Senders

Automatically reject emails from specific domains or email addresses.

Forward All Mail

Forward a copy of all incoming or outgoing mail from one email address to another.

Email Marketing Tools
Better Gmail and email marketing
If you work with Gmail or do email marketing, you will appreciate what these services can do for you.
Protect And Secure Google Workspace
Protect your data and maximize security
Data protection and security tools are crucial, especially if you store any sensitive data in your accounts.
Collab And Optimization Tools
Process optimization and collaboration
You can use these services to make tedious processes a whole lot easier, improve teamwork, save time, and get better results.
Website Tools and Resources
Resources for website creators
Awesome tools and services for easy and effective site building, content creation, SEO, email marketing, and more.
Improve Google Workspace
Get the best out of Google Workspace
Add essential functionality such as backup and increased security, get new awesome features, and optimize your work with these additional services for Google Workspace.

Submit Feedback

Think we could do something better or just want to tell us how happy you are with the site? We would love to hear from you – your feedback is more valuable than you can imagine.

Fill out this form, and we will get back to you.

Report An Issue With Workspace123

Are you running into an issue with the site? Maybe you found a broken link, or something else is wrong?

Fill out this form to let us know, and we will address it as soon as possible.

Please make sure to be very specific and add as many details as possible.

Missing Content

Our goal is to run the number one site in the world for you to get help with and learn how to use Google Workspace. This can’t be so if there is any missing information.

If you believe we need to add something, fill out this form, and we will do our best to add any missing content as soon as possible.

This site uses cookies to ensure you get the best experience. Click here to see our Cookies Policy.

Be the first to know

You can stay on top of news and updates in Google Workspace and Workspace123 and get special offers by subscribing to our newsletter.

Subscribe by email for news and updates