for (const automation of automations) {
logger.info(`Running automation workflow for automation ID: ${automation.id}`);
const mastra = createMastraClient(process.env.WORKER_URL as string);
const workflow = mastra.getWorkflow("runAutomationWorkflow");
const run = await workflow.createRun();
await run.start({
inputData: {
automationId: automation.id,
},
});
}
for (const automation of automations) {
logger.info(`Running automation workflow for automation ID: ${automation.id}`);
const mastra = createMastraClient(process.env.WORKER_URL as string);
const workflow = mastra.getWorkflow("runAutomationWorkflow");
const run = await workflow.createRun();
await run.start({
inputData: {
automationId: automation.id,
},
});
}