Back to prompt library
Mastra Workflow Setup
Linked challenge: Mastra AI & Gemini 2.5 Flash European Chronic Heat Risk Alert Workflows
Prompt source
implementation11 lines3 sectionsNo variables0 checklist items
import { Workflow, Step } from '@mastra/core';
const calculateHeatIndexStep = new Step({
id: 'calc-heat-index',
execute: async ({ context }) => {
// Implement WBGT formula and trigger threshold logic
}
});
export const heatRiskWorkflow = new Workflow({
name: 'heat-risk-monitor',
steps: [calculateHeatIndexStep]
});