Google Gemini
Generate text, chat, and create images using Google Gemini models.
On this page
Connect
Auth type: API key (secret_text). Pass the provider's API key or token as the connection's credential. It is sealed at rest and only opened on the server when an action runs.
- From your agent: integrations {action: "connect", piece, credentials, env} stores the credentials for dev, prod or all. Answers name the fields, never the values.
- Or set the integration's project secrets with the secrets tool (SLACK_BOT_TOKEN, DISCORD_WEBHOOK_URL, TELEGRAM_BOT_TOKEN, TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN …): a call uses the connection, else those secrets. integrations {action: "catalog", piece} lists which ones work.
- Try one action now with integrations {action: "call", piece, piece_action, input}. It really sends.
Call it from a workflow
step.ctx.integrations.invoke("google_gemini", action, input) resolves with the provider's answer and rejects when Google Gemini isn't connected or refuses. Wrap it in step.run so a retry sends once. See step.ctx. Its actions run through the integration runner, which the server's operator turns on: integrations {action: "catalog", piece: "google_gemini"} says whether yours can call it.
// workflows/notify.ts: call Google Gemini when a booking is confirmed
import { on } from "@appbricx/workflows";
export const tellGoogleGemini = on.transition("booking", "status", "confirmed", async (_event, step) => {
// Recorded once: a retry doesn't send it twice. Rejects when Google Gemini isn't connected.
const output = await step.run("Google Gemini", () =>
step.ctx.integrations.invoke("google_gemini", "chat_gemini", {
"model": "<model>",
"prompt": "<prompt>"
}),
);
step.ctx.log("Google Gemini answered", output);
});{
"name": "integrations",
"arguments": {
"project_id": "<project-id>",
"action": "call",
"piece": "google_gemini",
"piece_action": "chat_gemini",
"input": {
"model": "<model>",
"prompt": "<prompt>"
},
"env": "dev"
}
}curl -X POST "$APP_ORIGIN/__appbricx/connector-proxy/google_gemini/chat_gemini" \
-H "Authorization: Bearer $APP_KEY" \
-H "content-type: application/json" \
-d '{"props":{"model":"<model>","prompt":"<prompt>"}}'Actions
chat_gemini
Chat Gemini. Chat with Google Gemini
| Input | Type | Description |
|---|---|---|
modelrequired | id (picked from your account) | The model which will generate the completion |
promptrequired | long text | The prompt to generate content from. |
memoryKeyoptional | text | A memory key that will keep the chat history. Keep it empty to leave Gemini without memory of previous messages. |
create_video
Create Video. Generate a video from a text prompt using Google Veo models.
| Input | Type | Description |
|---|---|---|
modelrequired | one of "veo-3.1-generate-preview" | "veo-3.1-fast-generate-preview" | "veo-3.0-generate-001" | "veo-3.0-fast-generate-001" | "veo-2.0-generate-001" | Model |
promptrequired | long text | Describe the video you want to generate. Be specific about the scene, motion, style, and lighting for best results. |
imageoptional | file | Optional image to use as the first frame of the video (image-to-video). |
lastFrameoptional | file | Optional image to use as the last frame. Use together with Start Image to generate an interpolation video. |
aspectRatiorequired | one of "16:9" | "9:16" | Aspect Ratio |
durationSecondsoptional | id (picked from your account) | Must be 8 when using 1080p, 4K, or reference images. |
resolutionoptional | id (picked from your account) | 1080p is available on Veo 3.0+ only. 4K is only available on Veo 3.1 models. 1080p and 4K require 8-second duration. |
personGenerationoptional | one of "allow_adult" | "allow_all" | "dont_allow" | Controls whether people or faces can appear in the generated video. |
generate_content
Generate Content. Generate content using Google Gemini using the "gemini-pro" model
| Input | Type | Description |
|---|---|---|
promptrequired | long text | The prompt to generate content from. |
modelrequired | id (picked from your account) | The model which will generate the completion |
toolTypeoptional | one of "google-search" | "file-search" | "google-maps" | "url-context" | Select built-in tool to use with Gemini model. |
toolPropertiesoptional | object (depends on other props) | Tool Config |
generate_content_from_image
Generate Content from Image. Generate content using Google Gemini using the "gemini-pro-vision" model
| Input | Type | Description |
|---|---|---|
promptrequired | long text | The prompt to generate content from. |
imagerequired | file | The image to generate content from. |
modelrequired | id (picked from your account) | The model which will generate the completion |
generate_content_with_filesearch
Generate Content with File Search. Generate content with file search functionality.
| Input | Type | Description |
|---|---|---|
promptrequired | long text | The prompt to generate content from. |
modelrequired | id (picked from your account) | The model which will generate the completion |
fileStoreNamerequired | text | File Store Name |
filerequired | file | File |
text-to-speech
Text to Speech. Converts text to audio file.
| Input | Type | Description |
|---|---|---|
modelrequired | one of "gemini-2.5-pro-preview-tts" | "gemini-2.5-flash-preview-tts" | Model |
textrequired | long text | Input Text |
voicerequired | one of "Zephyr" | "Puck" | "Charon" | "Kore" | "Fenrir" | "Leda" | "Orus" | "Aoede" | "Callirrhoe" | "Autonoe" | "Enceladus" | "Iapetus" | Voice |
custom_api_call
Custom API Call. Make a custom API call to a specific endpoint
| Input | Type | Description |
|---|---|---|
urlrequired | object (depends on other props) | url |
methodrequired | one of "GET" | "POST" | "PATCH" | "PUT" | "DELETE" | "HEAD" | Method |
headersrequired | object | Authorization headers are injected automatically from your connection. |
queryParamsrequired | object | Query Parameters |
body_typeoptional | one of "none" | "json" | "form_data" | "raw" | Body Type |
bodyoptional | object (depends on other props) | Body |
response_is_binaryoptional | boolean | Enable for files like PDFs, images, etc. |
failsafeoptional | boolean | No Error on Failure |
timeoutoptional | number | Timeout (in seconds) |
followRedirectsoptional | boolean | Follow redirects |
Details
- Id
google_gemini- Category
- AI and ML
- Tags
- ai, google, gemini, llm, multimodal
- Package
@activepieces/piece-google-gemini@0.1.5- Runs
- Through the integration runner