run_pipeline
Automate LinkedIn prospection by finding leads, sending invitations, checking acceptances, and sending direct messages. Skip lead search or simulate actions as needed.
Instructions
Trigger the full daily prospection pipeline: find leads → send invitations → check acceptances → send DMs. Uses the daily-orchestrator.js script. Can skip lead search with skip_leads=true.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| skip_leads | No | Skip lead search (invitations + DMs only) | |
| dry_run | No | Simulate without sending |
Implementation Reference
- src/index.ts:454-495 (handler)The implementation of the run_pipeline tool handler which executes the daily-orchestrator.js script.
server.registerTool( "run_pipeline", { title: "Run Prospection Pipeline", description: "Trigger the full daily prospection pipeline: find leads → send invitations → check acceptances → send DMs. " + "Uses the daily-orchestrator.js script. Can skip lead search with skip_leads=true.", inputSchema: { skip_leads: z.boolean().default(true).optional().describe("Skip lead search (invitations + DMs only)"), dry_run: z.boolean().default(false).optional().describe("Simulate without sending"), }, annotations: { readOnlyHint: false, openWorldHint: true, destructiveHint: false }, }, async ({ skip_leads, dry_run }) => { if (!fs.existsSync(SESSION_DIR)) { return { isError: true, content: [{ type: "text" as const, text: "LinkedIn session expired. Run setup-session.js to re-login." }], }; } const args: string[] = []; if (skip_leads) args.push("--skip-leads"); if (dry_run) args.push("--dry-run"); const result = await runScript("daily-orchestrator.js", args, 600_000); return { content: [ { type: "text" as const, text: [ result.code === 0 ? "Pipeline completed successfully!" : `Pipeline finished with code ${result.code}`, "", result.stdout.slice(-3000), result.stderr ? `\nErrors:\n${result.stderr.slice(-500)}` : "", ].join("\n"), }, ], }; }, );