Workflow actions

Generate text with Google Gemini

This Flow Companion action allows you to generate text using Google's Gemini AI models. The action can be used with any trigger.

Prerequisites

A Google AI API key is required to use this action. You can get it from Google AI Studio.

Configuration

Basic Setup

  1. Open the app and go to Settings → Actions
  2. Go to the Google (Gemini) section
  3. Enter your API key
  4. Set up completion parameters:
    • Name: an identifier for the parameter set.
    • Model: select the Gemini model to use. Different models have varying capabilities. See models overview for details.
    • Temperature: controls the randomness of the model's output:
      • Lower values (closer to 0.0) - more focused and deterministic responses
      • Higher values (closer to 2.0) - more creative and varied responses
    • Max Tokens: maximum length of the generated response in tokens. The model may stop before reaching this limit.
    • System Prompt: provides context and instructions to the model, helping define its role or specific goals.
    • Stop Sequences: Custom text sequences that will cause the model to stop generating content. Enter one sequence per line.

Action Parameters

When configuring the action in your workflow, you can specify:

  • Prompt (required): enter a prompt to generate the text that you want. You can use workflow variables in your prompt using the {{variable}} syntax.
  • Image URL (optional): URLs of images, one URL per line (maximum 10 images). The model will analyze the images along with your text prompt. Supported formats: JPEG, PNG, GIF, WebP. Maximum size per image: 10MB.
  • Completion Parameters: one of the parameter sets you created in the previous step. If not specified, the default parameter set will be used.

Output

The generated text is available as a variable that can be used in subsequent workflow steps.