Tips to use AI steps in agents

Google Workspace Flows productivity guide

One of the most powerful features of Google Workspace Flows is that you can easily incorporate Gemini into your agents. In an agent, Gemini can help automatically analyze, write, research, or even determine if an agent should run at all. But it can be hard to know which step is best for your use case. This page covers:

How to use AI steps

No matter which AI step you use, here are 4 keys to success:

  1. Provide context in your request. Gemini doesn’t know about the other steps in your agent. Prompts like "Write a professional reply to the email" won’t work because Gemini doesn’t know which email you mean.
    • Reference data from earlier steps and specific files: For AI steps that have an open prompt, such as Ask Gemini, Ask a Gem, and Decide, add variables, links to Drive files, or links to other websites to give Gemini context.Learn more about prompt best practices.
    • Allow Google Workspace data sources: By default, Gemini can reference the web, as well as all content that you can access in Google Workspace and connected integrations. To prevent Gemini from accessing your organization's data, choose Web only. Learn more about Gemini sources.
  2. Access Gemini’s response by adding a variable in a later step. The response from Gemini or a Gem is available as a variable associated with the AI-powered step. You can add in later steps in your agent to use it in a message, a document, a sheet, or another request to Gemini.
  3. Use more than one AI step in an agent. It’s OK! Pass information from one AI step to another with variables. For example, you could use the Sales pitch ideator Gem in Ask a Gem to analyze a form response, use an Extract step find any questions in an open-ended response, use a Ask Gemini step draft an email message using the Gem response and extracted questions for additional context, and use an Ask Gemini step to create a subject line for your message.
  4. Use AI skill steps when appropriate. Though you can use Ask Gemini for almost all types of requests, Workspace Flows has AI steps that are optimized for certain skills, such as extracting information from text, summarizing ideas and insights, or writing text for specific scenarios. Learn more about AI skill steps.

General AI steps

Use these fundamental agentic steps the same as you do in Gemini in Workspace.

Name Best for
Ask Gemini

Best for when you have general inquiries or text generation needs.

For example:

  • Do a quick web search on the company of a person who submitted a form or contacted you.
  • Summarize the state of a project based on the latest meeting notes and tracking spreadsheet.
  • Write a poem about the importance of updating a meeting agenda to send to attendees.

Tip: For common drafting, summarizing, and extracting tasks, you can save time crafting prompts by using AI skill steps instead. Learn more about AI skill steps.

Ask a Gem

When you need the agentic expertise of a Gem, either pre-built or one of your own.

For example:

  • Have the Sales pitch ideator Gem generate ideas based on a customer interest form.
  • Use a custom Gem that’s grounded in your files to generate the content you need based on a request from a stakeholder.

Control which sources Gemini can use

In the Ask Gemini and Ask a Gem steps, you can choose which sources Gemini can use to generate a response.

By default, Gemini is allowed to use the web, as well as any Workspace and connected integration data that you can access. That content includes:

  • Your Gmail and Chat messages
  • Files you own or that are shared with you in Drive
  • Your calendar
  • Content from any linked integrations, such as Asana projects, Mailchimp audiences, and Salesforce

To prevent unintentional sharing of your organization's data, you should only choose this option for agents where you or trusted recipients get the response from Gemini. We recommend that you don't use it for agents that share the response from Gemini externally automatically. Instead, have the agent put the response in a draft or protected document, then review the output and share it manually.

Alternatively, select Web only. With this setting, Gemini can’t use anything except public websites. For example, if you link to a file in Drive in your prompt, Gemini can’t access it.

AI skill steps

These specialized steps have optimized requests built-in and help you provide context for best results. In some cases, they can do things that Gemini or a Gem can’t do yet.

Name Best for

Decide

When you want your agent to run only when certain subjective or complex conditions are met.

For example:

  • Email messages with an angry tone
  • Files added to a folder that are about a certain topic
  • Form responses with positive feedback

Decide lets you specify many conditions at once, giving you sophisticated control on your agent’s behavior.

Extract

When you want to pull out specific details or information from text.

For example:

  • Order number
  • Phone number
  • Physical address
  • Action items

Summarize

When you want to get the highlights from text.

For example:

  • An email thread
  • Insights from a sheet
  • Contents of doc
  • A custom request

With the predefined options, you only need to provide the content to summarize. You can optionally give Gemini more instructions about what you want in the summary or its format.

Recap unread emails

Ask Gemini can’t tell if a message is read or unread. Instead, use this step to get a summary of your unread emails from a specific time frame.

This is a great way to assess and prioritize requests that you get through Gmail.

Was this helpful?

How can we improve it?