New to Kestra?
Use blueprints to kickstart your first workflows.
Triage customer feedback, classify sentiment with Google Gemini, store metrics in DuckDB, and escalate urgent issues to Slack automatically.
Automate the end-to-end classification, analytics tracking, and escalation of incoming customer feedback. This blueprint uses Google Gemini structured output to extract sentiment, urgency, and categorization from unstructured user reviews or support tickets. It persists every evaluation to an embedded DuckDB database for historical analytics while immediately notifying customer success channels on Slack whenever an urgent issue or high-tier account requires attention.
analyze_sentiment_and_topics task (io.kestra.plugin.gemini.StructuredOutputCompletion) prompts Google Gemini using a strict JSON Schema, ensuring output fields like sentiment, urgency_score, category, and action_item are returned as typed variables.process_and_persist task (io.kestra.plugin.core.flow.Parallel) concurrently writes the analytical record into DuckDB (io.kestra.plugin.jdbc.duckdb.Queries) and logs key metrics to the Kestra execution console (io.kestra.plugin.core.log.Log).check_escalation conditional task (io.kestra.plugin.core.flow.If) inspects the model's urgency score and account tier. If the urgency is 7 or higher, or if the customer is on an Enterprise plan, it immediately routes an alert to Slack (io.kestra.plugin.slack.notifications.SlackIncomingWebhook).Standalone LLMs cannot connect webhooks to databases or notify team channels. Kestra provides the orchestration backbone: reliable secrets management, parallel task execution, conditional routing, and granular execution lineage. If an external service is temporarily unavailable, Kestra handles retries automatically with full auditability.
customer_id (STRING, default: "CUST-9842"): Unique identifier of the customer submitting feedback.customer_tier (STRING, default: "Enterprise"): Subscription tier of the user (Enterprise, Business, or Free).feedback_text (STRING): Raw customer feedback or support ticket text.outputs.analyze_sentiment_and_topics.predictions: Structured JSON array containing sentiment, urgency_score, category, summary, and action_item.feedback_analytics: Persistent table populated with feedback metrics and timestamps.GEMINI_API_KEY: API key for Gemini inference.SLACK_WEBHOOK: Incoming webhook URL for the destination Slack channel.WEBHOOK_KEY: Secret authentication key for the Kestra webhook trigger.GEMINI_API_KEY, SLACK_WEBHOOK, WEBHOOK_KEY) in your Kestra namespace.