Start a Background Agent when a Gmail message arrives

Choose the Gmail mailbox and sender, test with an eligible message, and verify that a new email triggers a run.

Use Email received when a new message in a connected Gmail mailbox should start an Agent. For example, use it to identify incoming reports from a known sender and summarize each subject in the run result.

Choose the mailbox and sender

  1. Connect your Gmail mailbox. In Agents, open an editable Background Agent in Build.
  2. Select its trigger. If it’s a placeholder, select Add trigger. Under Type, choose Email received.
  3. In Mailbox, select the Gmail address that should receive the message. In Senders, choose Specific sender and enter the complete address in Sender email. Use Any sender when every eligible incoming message in the selected mailbox should trigger the Agent. This option requires a mailbox selection.
  4. Add the intended steps and wait for the draft to save. For the example, use AI instruction with “Summarize the triggering email’s subject in one sentence.”

Test and verify a new delivery

  1. With the Agent off, its owner can select Test if they have permission to manage Agents. Mainbase looks for an eligible, readable message in the configured scope. If no sample appears, check the mailbox, sync status, and sender address.
  2. Check the sample in Runs. When the configuration is ready, switch the Agent on. Have the expected sender deliver a new test message to the selected address.
  3. Open Runs and check for an execution at the expected time. Inspect the result against the message you received. The live trigger applies to eligible incoming messages received after activation.

If the test message arrives but the run is missing, check that the Agent is active, the trigger is enabled in Settings, and the sender and mailbox match. Check mailbox sync if the message itself has not appeared in Mainbase.

Ask Mainbase AI

Ask about any feature in Mainbase. Find a setting, get step-by-step guidance, or troubleshoot a problem.

Open the AI assistant

Copy a question to get started

  • How do I create a Kanban view?
  • How do I invite a teammate?
  • Why is a record missing from this view?