GoogleGemini
Google Gemini LLM Integration for AI-powered analysis and chat capabilities. This integration provides access to Google Gemini's large language models for: - AI-powered chat conversations - Text analysis and generation - Natural language processing tasks Supports both Google AI Studio (API key) and Google Cloud Vertex AI (service account) authentication. Supported models include Gemini 2.0 Flash, Gemini 1.5 Pro, and various preview models.
Cloud Services · Google Gemini
Details
| ID | GoogleGemini |
|---|---|
| Provider | |
| Category | Cloud Services |
| From Version | 6.10.0 |
| Docker Image | demisto/google-api-py3:1.0.0.10182333 |
| Supported Modules | XSIAM Agentix |
README
Google Gemini Integration
This integration provides access to Google Gemini’s large language models for AI-powered analysis and chat capabilities in Cortex XSOAR or XSIAM. Supports both Google AI Studio (API key) and Google Cloud Vertex AI (service account) authentication.
Configure GoogleGemini in Cortex XSOAR
- Navigate to Settings > Integrations > Servers & Services.
- Search for Google Gemini.
- Click Add instance to create and configure a new integration instance.
Configure GoogleGemini in Cortex XSIAM
- Go to Marketplace
- Search for GoogleGemini
- Add ContentPack
- Search for GoogleGemini in Data Source and Integrations
- Create new instance
Instance Configuration Parameters
| Parameter | Description | Required |
|---|---|---|
| Authentication Type | Choose between “AI Studio API Key” or “Vertex AI Service Account” | True |
| Server URL | For AI Studio: https://generativelanguage.googleapis.com. For Vertex AI: https://aiplatform.googleapis.com (auto-detected if unchanged). |
True |
| API Key | Google AI Studio API key. Required when using AI Studio. | False |
| Service Account Key (JSON) | Service Account Key JSON for Vertex AI authentication. Required when using Vertex AI. | False |
| Project ID | Google Cloud Project ID. Required when using Vertex AI. | False |
| Location | Google Cloud location for Vertex AI (e.g., global, us-central1). Defaults to global. |
False |
| Default Model | Select a Gemini model from the dropdown | True |
| Max tokens | Maximum number of tokens in the response (default: 1024) | True |
| Temperature | Controls randomness in responses (0.0-2.0) | False |
| Top P | Nucleus sampling parameter (0.0-1.0) | False |
| Top K | Top-k sampling parameter | False |
| Trust any certificate (not secure) | Whether to ignore SSL certificate verification | False |
| Use system proxy settings | Whether to use system proxy configuration | False |
Supported Models
The integration supports various Gemini models including:
Stable Models:
- gemini-2.5-pro
- gemini-2.5-flash
Deprecated (Legacy Only) Models — operational until June 1, 2026:
- gemini-2.0-flash
- gemini-2.0-flash-lite
Preview Models:
- gemini-3.1-pro-preview
- gemini-3.1-flash-preview
- gemini-3.1-flash-lite
Note: You can also use the freetext model field to specify newer models not in the dropdown list.
Commands
You can execute these commands from the CLI, as part of an automation, or in a playbook.
After you successfully execute a command, a DBot message appears in the War Room with the command details.
google-gemini-send-message
Send a prompt to Google Gemini and receive an AI-generated response.
Base Command
google-gemini-send-message
Input
| Argument Name | Description | Required |
|---|---|---|
| prompt | The prompt or question to send to the AI model | Required |
| model | Override the instance default model for this specific request | Optional |
| history | Conversation history in JSON format for maintaining context across multiple interactions | Optional |
| save_conversation | Whether to automatically save and retrieve conversation history (default: false) | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| GoogleGemini.Chat.Prompt | String | The original prompt sent to the model |
| GoogleGemini.Chat.Response | String | The AI model’s response |
| GoogleGemini.Chat.Model | String | The model used for generation |
| GoogleGemini.Chat.Temperature | Number | The temperature parameter used for response generation |
| GoogleGemini.Chat.History | Array | Complete conversation history (when save_conversation=true) |
| GoogleGemini.Chat.ConversationId | String | A unique identifier, used to identify the chat session |
Command Examples
!google-gemini-send-message prompt="What is artificial intelligence?"
!google-gemini-send-message prompt="Analyze this suspicious email for potential threats" model="gemini-2.5-pro"
!google-gemini-send-message prompt="Continue our previous discussion" history='[{"role": "user", "parts": [{"text": "Hello"}]}, {"role": "model", "parts": [{"text": "Hi there! How can I help you?"}]}]'
!google-gemini-send-message prompt="What are the next investigation steps?" save_conversation=true
Conversation History Management
When save_conversation=true, the integration:
- Automatically retrieves existing conversation history from context
- Uses the last exchange (user + model response) to provide context for the current request
- Saves the complete updated conversation history to
GoogleGemini.Chat.History - Allows analysts to maintain conversation continuity without manually managing JSON history
Human Readable Output
The command returns the AI model’s response as human-readable output in the War Room.
Setup Instructions
AI Studio (API Key)
- Obtain API Key: Visit Google AI Studio to create an API key.
- Configure Integration: Add a new GoogleGemini integration instance, set Authentication Type to AI Studio API Key, and enter your API key.
- Test Connection: Use the Test button to verify connectivity.
- Start Using: Execute the
google-gemini-send-messagecommand for AI interactions.
Vertex AI (Service Account)
- Create a Service Account: In the Google Cloud Console, go to IAM & Admin > Service Accounts and create a service account with the Vertex AI User role.
- Generate a JSON Key: On the service account page, create a new JSON key and download it.
- Configure Integration: Add a new GoogleGemini integration instance, set Authentication Type to Vertex AI Service Account, and paste the full JSON key contents into the Service Account Key field.
- Set Project ID: Enter your Google Cloud Project ID.
- Set Location: Enter the location (default:
global). Useus-central1,europe-west4, etc. for regional endpoints. - Test Connection: Use the Test button to verify connectivity.
Troubleshooting and Tips
- Ensure your API key has access to the Generative Language API.
- Verify your Cortex XSOAR or XSIAM instance can access the configured endpoint.
- Check that the specified model is available in your region.
- Review usage quotas and rate limits for your API key or project.
- The integration attempts to use models not included in the official list and issues a warning.
- Ensure the service account has the
roles/aiplatform.userrole and the Vertex AI API is enabled in your project. - For AI Studio, use the server URL
https://generativelanguage.googleapis.com. For Vertex AI, the URL auto-switches tohttps://aiplatform.googleapis.comby default.
Configuration parameters
auth_type— Authentication Type (required)url— Server URL (required)api_key—service_account_key—project_id— Project IDlocation— Locationmodel— Default Model (required)max_tokens— Max tokens (required)temperature— Temperaturetop_p— Top Ptop_k— Top Kinsecure— Trust any certificate (not secure)proxy— Use system proxy settings
Commands (1)
-
google-gemini-send-messageSend a chat message to the Gemini AI model.
sectionorder: - Connect - Collect category: Cloud Services provider: Google commonfields: id: GoogleGemini version: -1 configuration: - additionalinfo: Choose whether to authenticate with a Google AI Studio API Key or a Google Cloud Vertex AI Service Account. defaultvalue: AI Studio API Key display: Authentication Type name: auth_type options: - AI Studio API Key - Vertex AI Service Account required: true section: Connect type: 15 - defaultvalue: https://generativelanguage.googleapis.com additionalinfo: "For AI Studio: https://generativelanguage.googleapis.com. For Vertex AI: https://aiplatform.googleapis.com (auto-detected if unchanged)." display: Server URL name: url required: true section: Connect type: 0 - name: api_key displaypassword: API Key required: false type: 9 section: Connect hiddenusername: true additionalinfo: "API Key for Google AI Studio authentication. Required when using AI Studio." - name: service_account_key displaypassword: Service Account Key (JSON) required: false type: 9 section: Connect hiddenusername: true additionalinfo: "Service Account Key JSON for Vertex AI authentication. Required when using Vertex AI." - additionalinfo: "Google Cloud Project ID. Required when using Vertex AI." display: Project ID name: project_id required: false section: Connect type: 0 - additionalinfo: "Google Cloud location for Vertex AI (e.g., 'global', 'us-central1'). Defaults to 'global'." defaultvalue: global display: Location name: location required: false section: Connect type: 0 - defaultvalue: gemini-2.5-flash additionalinfo: Please choose only one model, or select another from the list https://ai.google.dev/models. display: Default Model name: model options: # Stable models - gemini-2.5-pro - gemini-2.5-flash # Deprecated (Legacy Only) - operational until June 1, 2026 - gemini-2.0-flash - gemini-2.0-flash-lite # Preview models - gemini-3.1-pro-preview - gemini-3.1-flash-preview - gemini-3.1-flash-lite required: true section: Collect type: 16 - additionalinfo: The maximum number of tokens that can be generated for the response (1-10000). Defaults to 1024. defaultvalue: '1024' display: Max tokens name: max_tokens required: true section: Collect type: 0 - additionalinfo: Controls the degree of randomness in token selection. Lower values (closer to 0) produce more deterministic outputs, while higher values (up to 2.0) increase randomness and creativity. advanced: true display: Temperature name: temperature required: false section: Collect type: 0 - additionalinfo: Changes how the model selects tokens for output. Tokens are selected from most to least probable until their cumulative probability equals the topP value (0.0-1.0). Lower values for less random responses, higher values for more random responses. advanced: true display: Top P name: top_p required: false section: Collect type: 0 - additionalinfo: Consider only the top K most probable tokens when generating text. Affects the diversity of the generated content. advanced: true display: Top K name: top_k required: false section: Collect type: 0 - display: Trust any certificate (not secure) name: insecure required: false section: Connect type: 8 - display: Use system proxy settings name: proxy required: false section: Connect type: 8 description: |- Google Gemini LLM Integration for AI-powered analysis and chat capabilities. This integration provides access to Google Gemini's large language models for: - AI-powered chat conversations - Text analysis and generation - Natural language processing tasks Supports both Google AI Studio (API key) and Google Cloud Vertex AI (service account) authentication. Supported models include Gemini 2.0 Flash, Gemini 1.5 Pro, and various preview models. display: Google Gemini name: GoogleGemini script: commands: - arguments: - description: The prompt or question to send to the AI model. name: prompt required: true - description: The Gemini model to use for this request. If not specified, uses the default model from configuration. name: model required: false - description: |- Optional conversation history in JSON format. Array of message objects with 'role' (user/model) and 'parts' containing text. Example: [{"role": "user", "parts": [{"text": "Hello"}]}, {"role": "model", "parts": [{"text": "Hi there!"}]}]. name: history required: false - defaultValue: false description: If true, saves the complete conversation (including the current exchange) to context under GoogleGemini.Chat.History for reuse in subsequent calls. name: save_conversation required: false auto: PREDEFINED predefined: - 'true' - 'false' description: Send a chat message to the Gemini AI model. name: google-gemini-send-message outputs: - contextPath: GoogleGemini.Chat.Prompt description: The original prompt sent to the model. type: String - contextPath: GoogleGemini.Chat.Response description: The AI model's response. type: String - contextPath: GoogleGemini.Chat.Model description: The model used for generation. type: String - contextPath: GoogleGemini.Chat.Temperature description: The temperature setting used. type: Number - contextPath: GoogleGemini.Chat.History description: Complete conversation history in Gemini format, updated when save_conversation=true. Can be used as input for the history argument in subsequent calls. type: Unknown - contextPath: GoogleGemini.Chat.ConversationId description: A unique identifier, used to identify the chat session. type: String dockerimage: demisto/google-api-py3:1.0.0.10182333 runonce: false script: '' subtype: python3 type: python tests: - No tests (auto formatted) fromversion: 6.10.0