How to clean up your overflowing Gmail Inbox

This template creates a bot to clean up your Gmail inbox. The bot inputs search terms into Gmail. It then loops through one search term at a time. On each loop, the bot clicks 'select all', then clicks 'matching emails'. Finally, the bot clicks 'confirm' to delete them all. This automation will only run if triggered in a page with Gmail open.

# How to Install the Gmail clean up your inbox bot

To install this Gmail template click 'Install template'. If you are a new user you will be required to create an account before you can edit the template.

# Set up 'Enter custom data' step

  1. In 'Custom data' data enter a list of items to store as data; each line will be stored as a new row.
  2. Check the data preview is correct.
custom data step axiom

# How to configure the 'Interact with a page's interface' step

We have configured this step for you. But you may need to re-select buttons, and text inputs as sites can be subject to change.

  1. Enter URL - should already be populated with ''.
  2. Enter Text: Search in emails - Select text field, use the selector tool to pick the gmail search box. In 'text' click 'Insert Data' and choose 'custom-data'.
  3. Press Key(s): Enter - Record an 'Enter' keypress. This submits the search.
  4. Click Element: Tick - Select the tick box that selects all the emails.
  5. Click Element: Select all messages that match this search - Select ths message which appears if the number of emails is over 50. Optional click - Tick as this message is not always present.
  6. Click Element: Delete - Select the Bin icon button
  7. Click Element: Ok - Select the OK button, Optional click - Tick as this message is not always present.

# Test your Inbox cleaner

We always recommed doing a trial run - click run now and the emails will be created but not sent. The 'Click Element: Ok' is disabled to stop the bot deleting any emails until ready.

clean inbox with

# Ready to automate Gmail

Click on the step called 'Click Element: Ok', it will be greyed out. Click on the menu icon top right-hand corner of the step. Then click 'Enable widget'. When run, the bot will now clean your inbox.

# Troubleshoot

Try these measures if your bot is not working. We would recommend you watch the video to troubleshoot.

  • No search terms are entered into the seartch box. Check and reformat you 'Custom Data' step if that is ok re-select the search box.
  • The bot does not delete any emails - check the final step is enabled.
  • Select all conversations that match this search does not click - reselect the button.