📖 2 mins read

How to alert or remove Google Drive files that contain email addresses

Using GAT+ Alert rules, an Admin can get notified if Google Drive documents, when shared outside of your domain, contain text with email addresses.

This is one example of using the regex feature inside of Alert Rules.

GAT+ | How to alert or remove Google Drive files that contain email addresses 1

Create the alert

Navigate to GAT+ → Configuration →Alert rules → + button

GAT+ | How to alert or remove Google Drive files that contain email addresses 2

A new pop-up window will be displayed.

  • Name – enter the name for the rule
  • Enabled – use the checkmark to enable or disable the alert
  • Type – select the type of alert to Drive
  • Scope – select the scope of users where the rule will be active for
  • Recipient – enter the email of the recipient or leave as blank, all alerts generated will be shown under Alerts tab by default

GAT+ | How to alert or remove Google Drive files that contain email addresses 3

Set regex

  • Alert if the regex matches a newly shared out file (doc, presentation, pdf, txt files)
    • Click on the “Custom” option
      • Enter a name for the custom alert
    • An empty field will be displayed
      • Enter the REGEX needed

The Regex example below: You can set regex example for any words 

(\W|)(@gmail.com)|(@yahoo.com)|(@outlook.com).*?(\W$)

Additional options

There are two options that can be selected.

  • Notify user – Send notification to the end-users who did the sharing
  • Remove shares – Use to remove the shares automatically, once the alert is triggered

Click on the “Save” button to save the rule

GAT+ | How to alert or remove Google Drive files that contain email addresses 4

 

The rule will be saved and later can be viewed, edited, or removed from the options under Actions. 

When a google document is shared out and if it contains an email address (based on the regex) in its content an alert will be triggered.

Note: there extra contributors (external users) and Sharing Flag is Shared Out 

GAT+ | How to alert or remove Google Drive files that contain email addresses 5

 

Result

The alert will be shown under GAT+ → Audit & Management → Alerts 

On the alert itself click on the “eye” icon under Actions. Pop-up will be displayed with additional details.

GAT+ | How to alert or remove Google Drive files that contain email addresses 6

If the additional options are selected.

  • The users will be notified
  • The Shared will be removed – automatically once the Alert is triggered

Note: the “shares” (contributors) and the Sharing Flag – Shred out – have been removed 

GAT+ | How to alert or remove Google Drive files that contain email addresses 7

 

If you would like to run a trial of our products please install GAT+ from the Google Workspace Marketplace and contact us at support@gatlabs.com with any questions you may have.

To request a demo please click here and fill the form, we will get back to you in less than 12 hours during weekdays.

If you tried GAT in the past and you would like to run a fresh trial again, please enquire through this form.

Thanks for sharing and spreading the word!