executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
lindy-core-workflow-bCore Lindy workflow for automating tasks and scheduling agents. Use when setting up automated workflows, scheduling agent runs, or creating trigger-based automations. Trigger with phrases like "lindy automation", "schedule lindy agent", "lindy workflow automation", "automate with lindy".
Independent GitHub snapshot · Automated classification · Original documentation governs
Complete workflow for automating tasks and scheduling Lindy AI agents.
lindy-core-workflow-a (agent creation)interface AutomationSpec {
agentId: string;
trigger: 'schedule' | 'webhook' | 'email' | 'event';
schedule?: string; // cron expression
webhookPath?: string;
emailTrigger?: string;
eventType?: string;
}
const automationSpec: AutomationSpec = {
agentId: 'agt_abc123',
trigger: 'schedule',
schedule: '0 9 * * *', // Daily at 9 AM
};
import { Lindy } from '@lindy-ai/sdk';
const lindy = new Lindy({ apiKey: process.env.LINDY_API_KEY });
async function createScheduledAutomation(spec: AutomationSpec) {
const automation = await lindy.automations.create({
agentId: spec.agentId,
type: 'schedule',
config: {
cron: spec.schedule,
timezone: 'America/New_York',
input: 'Run daily morning tasks',
},
});
console.log(`Created automation: ${automation.id}`);
return automation;
}
async function createWebhookAutomation(agentId: string, path: string) {
const automation = await lindy.automations.create({
agentId,
type: 'webhook',
config: {
path: path,
method: 'POST',
inputMapping: {
input: '{{body.message}}',
context: '{{body.context}}',
},
},
});
console.log(`Webhook URL: ${automation.webhookUrl}`);
return automation;
}
async function createEmailAutomation(agentId: string, triggerEmail: string) {
const automation = await lindy.automations.create({
agentId,
type: 'email',
config: {
triggerAddress: triggerEmail,
inputMapping: {
input: '{{email.body}}',
sender: '{{email.from}}',
subject: '{{email.subject}}',
},
},
});
console.log(`Forward emails to: ${automation.triggerEmail}`);
return automation;
}
| Error | Cause | Solution |
|---|---|---|
| Invalid cron | Bad schedule format | Use standard cron syntax |
| Webhook conflict | Path already used | Choose unique webhook path |
| Agent not found | Invalid agent ID | Verify agent exists |
async function setupAutomations(agentId: string) {
// Daily summary at 9 AM
await lindy.automations.create({
agentId,
type: 'schedule',
config: { cron: '0 9 * * *', input: 'Generate daily summary' },
});
// Webhook for external events
await lindy.automations.create({
agentId,
type: 'webhook',
config: { path: '/events', method: 'POST' },
});
// Email trigger for support
await lindy.automations.create({
agentId,
type: 'email',
config: { triggerAddress: 'support@mycompany.com' },
});
}
Proceed to lindy-common-errors for troubleshooting guidance.