This failed social media post recovery template makes sure no publish stays silently broken. It sweeps your failed publishing jobs, retries the ones the API marks as retryable, and turns the rest into a single actionable digest for your team.
What it uses
GET /publishing/jobsfiltered to failed and partially failed jobs- The failure classification on each job:
failureCategory,failureCode, andfailureInstruction POST /publishing/jobs/{publishJobId}/retryfor retryable failures: capped at 5 retries per job, never a duplicate post- InvisibleAPI's built-in failure emails as the trigger, or a scheduled sweep
How it works
- List jobs in failed or partial failure status.
- Read each job's failure category and code.
- Retry the retryable ones. The API guards against duplicates, so retries are safe.
- Collect the non-retryable jobs into one digest with each job's failure instruction.
- Report counts: recovered, retrying, needs attention.
Start from this template
Copy the ready-made agent prompt from the templates page and point your agent at the InvisibleAPI MCP server, or implement the same steps directly against the API.