New to Kestra?
Use blueprints to kickstart your first workflows.
Use Kestra and Google Gemini to turn a natural-language weather question into a structured go/no-go decision that notifies Slack and blocks your calendar.
Turn a plain-English weather question into an automated decision. This blueprint asks Google Gemini for the current wind speed at a location, returns a structured JSON answer with a clear boolean recommendation, and then acts on that recommendation: it posts a Slack notification and blocks time on a Google Calendar when conditions are right. It solves the gap between AI reasoning and real action, where a model can answer a question but cannot reliably drive downstream systems on a schedule with retries and audit trails.
ask_ai task (io.kestra.plugin.gemini.StructuredOutputCompletion) sends a natural-language prompt to the gemini-2.5-flash-preview-05-20 model. A jsonResponseSchema forces the answer into a fixed shape with content (text), wind (number), and go_sailing (boolean), so downstream tasks get machine-readable fields instead of free text.if task (io.kestra.plugin.core.flow.If) evaluates the model output by parsing go_sailing from the prediction with a jq expression, branching only when the decision is true.notify_me (io.kestra.plugin.slack.notifications.SlackIncomingWebhook) sends the model's content message to Slack.block_calendar (io.kestra.plugin.googleworkspace.calendar.InsertEvent) inserts an all-day event into a Google Calendar, embedding the live wind value in the event description.check_daily Schedule trigger (io.kestra.plugin.core.trigger.Schedule) shows how to run the whole check automatically on a cron each morning.Gemini answers a single question, but it has no scheduler, no retry logic, and no way to chain notifications and calendar writes. Kestra adds event and Schedule triggers, automatic retries, full execution lineage and logs across the AI call and every downstream system, and a declarative YAML definition you can version and review. The conditional If branch keeps actions gated on the AI verdict, something a standalone model API cannot coordinate on its own.
GEMINI_API_KEY: API key for the Gemini model call.SLACK_WEBHOOK: incoming webhook URL for Slack notifications.CALENDAR_ID: the target Google Calendar identifier.GOOGLE_SA: Google service account JSON for Calendar access.GEMINI_API_KEY, SLACK_WEBHOOK, CALENDAR_ID, and GOOGLE_SA as secrets.check_daily trigger to run it automatically each morning.wind thresholds to send different messages per condition.