Function: draftFollowUpEmail()
draftFollowUpEmail(
taskId):Promise<DraftEmailResult>
Defined in: src/server/actions/pipeline.ts:723
Generate an outbound email draft for an email-channel follow-up task (the M-05 modal opens with this). AI-drafted (OpenAI→Anthropic, ADR-0026) with a deterministic template fallback so it works unconfigured. Never sends. Read-only; auth-guarded + company-scoped. The tone guardrail (market context only, never the facility's deficiencies/score) is enforced in the prompt and the fallback.
Parameters
taskId
string
Returns
Promise<DraftEmailResult>