Actions11
- Audio Actions
- Document Actions
- Image Actions
- Text Actions
- Video Actions
Text → Message a Model
AI-generatedSummary
Sends a text prompt, with optional prior conversation turns, to a Gemini model on Google Vertex AI. Returns the generated reply as simplified text or as the full API response.
Inputs
- Model (required) — Gemini model, picked from a searchable list or entered by ID. Defaults to gemini-2.5-flash.
- Prompt (required) — The message sent as the final user turn.
- Messages (History) — Prior turns, each with a Role (User or Model) and Text. They are sent before the prompt, in order.
- Options: System Instruction — System prompt sent as the systemInstruction. Ignored if empty.
- Options: Temperature / Top P / Top K / Max Output Tokens — Sampling and length settings passed in generationConfig. They are sent only when set. Temperature allows 0–2, Top P allows 0–1, and Top K and Max Output Tokens have a minimum of 1.
- Options: JSON Output — When enabled, sets responseMimeType to application/json. The model is asked for JSON, but the node does not parse it.
- Options: Simplify Output — On by default. Returns only the generated text. Turn it off to get the raw API response.
Output shape
One output item per input item. With Simplify on, it is {text}, the concatenated text parts of the first candidate. With Simplify off, it is the full Vertex generateContent response JSON.
Each input item triggers a separate API call. With Continue On Fail enabled, a failed item returns {error: message}. API errors for 401/403/404/429 carry hints about authentication, model availability in the region, or quota. If the model returns no text, the simplified text is an empty string. Requires Google Vertex AI service-account credentials, and the project and region come from those credentials.
Examples
Example 1: Summarize incoming text
Model gemini-2.5-flash, Prompt set to an expression like 'Summarize: {{$json.body}}', Temperature 0.3.
Example 2: Extract structured data as JSON
Prompt describes the fields to extract, Options: JSON Output on, System Instruction 'Return only valid JSON'. Parse the text field in a later node.
Example 3: Continue a conversation
Add Messages (History) entries alternating User and Model roles, then set Prompt to the new user message.