Sim AI Studio tutorial: automate Gmail labels

Build a Gmail labeling workflow in Sim AI Studio with one-minute checks, a 20-email result setting, and an OpenRouter model for classification.

Player not loading? Watch on YouTube

This tutorial builds an AI agent workflow in Sim AI Studio to classify Gmail messages and apply existing labels. The demo uses alert, my bills, and subscriptions, with keywords that guide the classifier's choice. The speaker runs the workflow, then refreshes Gmail to show labels on previously unlabeled emails.

A schedule block checks Gmail every minute. An email monitor block searches messages with a maximum result count of 20, and a for-each loop processes the collected results. The walkthrough shows how to inspect block outputs in the logs for message content, subjects, and IDs. A separate Gmail read block retrieves inbox content; the speaker also points out an option to include attachments and says viewers can increase the result count if they receive more than 20 emails per minute.

The classifier receives the subject, sender, and content, with instructions to return exactly one of the three labels. For my bills, the example keywords include invoice, payment, and billing. The speaker uses a model described as free through OpenRouter, without naming it. This demonstration uses a hosted model service and does not show how to run models locally.

The speaker explains that the classifier cannot apply Gmail labels dynamically on its own. A condition block routes its output to separate Gmail blocks, each configured to add a label using the message ID from the read block.