Send a prompt to Gemini by Google
The Send a prompt to Gemini by Google Action allows you to send data to Google’s Gemini AI models for AI-powered processing within Arigato workflows. This action is ideal for generating product descriptions, enriching product data, summarizing content, classifying information, and other AI-driven automation tasks.
Configuring the Action
To set up the Send to Gemini by Google action, follow these steps:
- Set up the integration by following the Google Gemini integration guide.
- In your workflow, add a new action and select Send to Gemini by Google.
- Select the Model you want to use (for example, Gemini 2.5 Flash).
- Enter your instructions in the Prompt field. This tells Gemini what to do and can include tokens to pass dynamic data.
- (Optional) Enable Return JSON if you want the response returned as a structured JSON object.
- (Optional) Expand Advanced Google AI Settings to adjust model-specific behavior.
- (Optional) Check Include Context to automatically include the current product’s data with your prompt.
- Under What do you want to do with the response?, choose how the AI output should be handled.
- Click Save to apply the action.
Handling the AI Response
The Gemini action provides multiple options for working with the AI-generated response:
| Response Handling Option | Description |
|---|---|
| Handle the response with Custom Action code | Allows advanced users to process the Gemini response using custom code. The response is available as {{ response }}. |
| Run the response through a workflow | Passes the AI response into a subworkflow for additional processing or automation. This is useful when chaining AI output into multiple steps. |
| Use response in other Actions or Conditions | Generates a token (for example, {{ exec["id"].response }}) that can be reused in later Actions or Conditions within the Workflow. |
Example Configuration
Below is an example of using Gemini to generate a product description:
- Set the Prompt to:
Write a concise and engaging product description for {{ product.title }}. - Enable Include Context to provide Gemini with full product details.
- Select Use response in other Actions or Conditions.
- Use the generated response token in a product update, metafield, or email action.
Troubleshooting & Usage Tips
The Gemini response is too long or too short.
Adjust your prompt to include explicit length requirements, such as: Limit the response to 60 words.
The AI output is not structured as expected.
If you need predictable formatting, enable Return JSON and clearly specify the expected structure in your prompt.
The response token is empty or not working.
Ensure the Gemini action runs before any action or condition that references its token. The token will only contain data if the action successfully executes.
If the AI action is not triggered during testing, it will not produce usable token data. Make sure to run the workflow live or test it with valid data.
Credit Cost
The Send to Gemini by Google action costs one Action Credit on Lite plans and is unlimited on Unlimited plans.
Custom Actions
This action can also be used inside Custom Actions via the ai Twig filter when Google Gemini is configured as your default AI integration.
AI Twig Filter Alternative
The ai Twig filter can be used directly in most text fields without adding this action to your workflow. This is a convenient option for inline AI usage. Refer to the AI Twig filter documentation for more details.