mercado-libre-health repite el aviso al admin en cada corrida (sin deduplicar)
A working diagnosis of this problem and the sequence that actually resolves it, written from the operational side rather than the marketing side.
Reported context: ## Problema `/api/cron/mercadolibre-health` («Admin scheduled tasks», trabajo `mercado-libre-health`) manda el aviso de salud de Mercado Libre a los dos correos del admin **cada vez que corre y hay alertas**, sin deduplicar (`lib/mercadolibre/health-notification.ts`: `if (summary.issues.length === 0) return;` y después `resend.emails.send`). Cualquier corrida extra repite el mismo aviso: un `workflow_dispatch` manual
What is actually going on
Automation failures cluster around unhandled rate limits and missing idempotency keys, which produce duplicate side effects under retry.
Silent failures are the expensive ones: a workflow that stops running without alerting is worse than one that errors loudly.
The sequence that works
Add an idempotency key to every write operation so retries cannot duplicate effects.
Wrap every external call in a retry with exponential backoff and a hard attempt ceiling, and log the final state either way.
Respond to webhooks within the provider timeout by acknowledging immediately and processing asynchronously.
Instrument a dead-letter queue and a heartbeat. Alert on absence of expected events, not only on errors.
Load test the workflow at the provider's documented rate limit to find the real breaking point before production does.
Where people lose time
Retrying without idempotency, which turns one failure into many duplicate records.
Building on a no-code tool past its execution ceiling instead of splitting into smaller workflows.
Verify before you trust it
Run the checks above against your own data instead of adopting them at face value. The failure modes are specific enough that a single afternoon of measurement will either confirm this diagnosis or rule it out — both outcomes are useful, and guessing is not.
Automation Workflow Pack
A ready-to-use package for exactly this workflow — $27.55, delivered immediately.
Sold via Gumroad, which acts as merchant of record and handles payment and applicable taxes. All sales are final; see the return policy before purchase.