Before you begin
- Create a Gemini API key in your Google account, for example in Google AI Studio.
- In your Next Matter workspace, go to Automations library, click Connect in the Google Gemini app tile, and enter your API key.
Gemini usage is billed by Google to the account that owns the API key, not by Next Matter.
Generate text
- Click Workflows > + Create new… > Create a new workflow and give your workflow a name. If you have a workflow ready, click … > Edit workflow.
- Click + Add step and select Integrations > Google Gemini.
- Click the step and click Configure integration.
- Select Generates text from a prompt using Google’s Gemini AI.
- Enter the Prompt. To use data from earlier steps, insert a data reference in the prompt.
- Select the Model. The list shows the Gemini models that your API key can use for text generation.
- (Optional) Enter a System message to tell the model how to behave, for example “You are a support assistant. Answer in two sentences.”
-
Select the Output type:
- Text — the model answers in plain text.
- JSON — the model answers with a JSON object you can use in later steps.
- Specific JSON schema — the model answers in the structure you define in Output structure.
- Select the output as a variable you can refer to later on. Use Generated text for plain text, or Generated JSON for the two JSON output types.
- Save your changes.
Add documents or images
Use the Files field to give Gemini extra context, such as a contract to summarize or a photo to describe.- In the step, open the Files field.
- Add one or more links to files, separated by commas. You can use data references to files uploaded in earlier steps.
- Save your changes.
- Gemini reads PDF, DOCX, and TXT files as text. Next Matter adds up to 10,000 characters per file and up to 50,000 characters in total to the prompt, and cuts off the rest.
- Gemini analyzes images in PNG, JPEG, GIF, and WEBP format. WEBP images larger than 25 megapixels aren’t supported.
If a file can’t be downloaded or read, the step fails with a message that says which files caused the problem.
Fine-tune the answer
- Temperature — controls how creative the answers are. The default is 0.7. Lower values give more predictable answers.
- Max tokens — sets the maximum length of the answer. The default is 1024. Increase it if answers are cut off.
-
Replace placeholders in prompt — replaces text such as
{{country}}in your prompt with data from earlier steps. - Message history — continues an earlier conversation. Select the Message history output of a previous Gemini step. Leave it empty to start a new conversation.

