# With the n8n API, How do know if a workflow is published and OK?

**URL:** <https://community.n8n.io/t/with-the-n8n-api-how-do-know-if-a-workflow-is-published-and-ok/326358>\
**Category:** Questions\
**Tags:** workflow-building, bug:unconfirmed\
**Created:** [November 3, 2026, 6:20pm UTC](https://community.n8n.io/t/with-the-n8n-api-how-do-know-if-a-workflow-is-published-and-ok/326358 "2026-11-03T18:20:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![liar666](https://avatars.discourse-cdn.com/v4/letter/l/8e7dd6/32.png) [@liar666](https://community.n8n.io/u/liar666)\
**Post date:** [November 3, 2026, 6:20pm UTC](https://community.n8n.io/t/with-the-n8n-api-how-do-know-if-a-workflow-is-published-and-ok/326358/1 "2026-11-03T18:20:22Z")

</div>

I found some answers about testing if a workflow is running. But I’m interested in if it is published & OK (like the green bullet next to it in the workflow editor view).

## Describe the problem/error/question

Running n8n locally on laptop.  
CONTEXT: Created a workflow that is triggered / ~10 minutes. Checks my emails, selects some and summarizes them, then submits to a RocketChat channel.  
Unfortunately, many errors happen, which “unpublish” it (e.g.: mail provider error, LLM errors, laptop lid closed → n8n sleeps, etc).  
Thus, I’ve created a secondary workflow that restarts the primary:

- on any error (nodes in primary raise errors)
- on n8n start (n8n container starts at boot)

But I still get cases where the primary workflow stops. Wanting to add a 3rd case:

- a trigger every 1h that checks if the workflow is “down” and, if so, restarts it.

When I use the API node to retrieve the primary workflow, I can “workflowPublishHistory” or “active”. Unfortunately, they are both true/activated even if the workflow is in error (red bullet in editor’s view).  
Due to my particular setup:

- I cannot just check if my primary workflow is published
- I cannot just check if it is running, like in the posts I found here, since my workflow can just be “sleeping” in-between two 10 min triggers.

So my question: How do I get the same information as is underlying the display of the red/green/yellow bullet next to a workflow in editor mode, using the n8n API node?

## Information on your n8n setup

- **n8n version:** 2.45.7
- **Database (default: SQLite): default**
- **n8n EXECUTIONS\_PROCESS setting (default: own, main): own, main**
- **Running n8n via (Docker, npm, n8n cloud, desktop app): running in home made incus container that starts npx n8n**
- **Operating system: Debian 14 guest / LMDE 7 Host**

---

<div class="post-metadata">

**Author:** ![Livinus\_Okoz](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/livinus_okoz/32/197044_2.png) [@Livinus\_Okoz](https://community.n8n.io/u/Livinus_Okoz)\
**Post date:** [November 3, 2026, 9:29pm UTC](https://community.n8n.io/t/with-the-n8n-api-how-do-know-if-a-workflow-is-published-and-ok/326358/2 "2026-11-03T21:29:04Z")

</div>

Checking the `active` flag via the n8n API only tells you if the workflow is toggled on, which is why it remains true even when runtime errors trigger a red bullet. To programmatically check health, you should query the `/executions` endpoint filtered by `status=error` alongside your workflow status check to verify if the last run succeeded. Let me know what database backend you are using for your self-hosted setup and I can outline the exact API call sequence right here.

---

<div class="post-metadata">

**Author:** ![Deepankar](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/deepankar/32/197564_2.png) [@Deepankar](https://community.n8n.io/u/Deepankar)\
**Post date:** [November 3, 2026, 9:34pm UTC](https://community.n8n.io/t/with-the-n8n-api-how-do-know-if-a-workflow-is-published-and-ok/326358/3 "2026-11-03T21:34:24Z")

</div>

Hey @liar666 Welcome to the commnuity,  
The n8n API node’s Workflow Get doesn’t expose the same status as that dot in 2.45.7. The [editor](https://github.com/n8n-io/n8n/blob/n8n%402.45.7/packages/frontend/editor-ui/src/app/components/MainHeader/WorkflowHeaderDraftPublishActions.vue#L218) combines trigger publication status with draft changes and configuration issues, so active=true doesn’t guarantee a green dot.

With the default publication service enabled, the editor uses `GET /rest/workflows/<id>/publication-status`. Its [response](https://github.com/n8n-io/n8n/blob/n8n%402.45.7/packages/%40n8n/api-types/src/schemas/workflow-publication-status.schema.ts) has `data.status` (`published`, `partial`, `failed`, `in_progress` or `not_published`) and `data.triggers` with activation errors. You can inspect it in your browser while logged in. It’s an internal session-authenticated route, so your n8n API key won’t work there. Yellow can just mean unpublished edits, and publication status doesn’t guarantee the next email/LLM execution will succeed. What does the red dot’s tooltip say when it stops?

---

<div class="post-metadata">

**Author:** ![BenRon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/benron/32/197091_2.png) [@BenRon](https://community.n8n.io/u/BenRon)\
**Post date:** [November 4, 2026, 12:01am UTC](https://community.n8n.io/t/with-the-n8n-api-how-do-know-if-a-workflow-is-published-and-ok/326358/4 "2026-11-04T00:01:31Z")

</div>

The workflow object from the API has an active flag, so check that on your ten minute run and reactivate if it’s false. Active only tells you it’s switched on though, not that it’s healthy. Pulling the latest executions and checking for a recent success is a better test. A laptop that sleeps will keep biting you too.
