N8n Insights Dashboard show incorrect prod. executions value

Describe the problem/error/question

Hi all,
My team is running a self-hosted n8n instance with an Enterprise License enabled.

I’ve noticed that number of prod. executions on Insights dashboard do not match with count of production executions at workflow’s ‘Executions‘ tab.

I’ve run a query against our postgres n8n database, filtered by one specific workflow, and here the results:

insights tables

psql=> select sum(value) total_value, "workflowId"
from insights_by_period ibp
left join insights_metadata im using ("metaId")
where ibp.type in (2, 3) and im."workflowId" = 'GTHlONs9bKUBYfE1a6M9G'
group by "workflowId";

 total_value |      workflowId
-------------+-----------------------
          10 | GTHlONs9bKUBYfE1a6M9G

executions table

psql=> select count(1) total_value, mode, "workflowId"
from execution_entity
where "workflowId" = 'GTHlONs9bKUBYfE1a6M9G'
group by "workflowId", mode;

 total_value |  mode   |      workflowId
-------------+---------+-----------------------
           3 | webhook | GTHlONs9bKUBYfE1a6M9G
          17 | manual  | GTHlONs9bKUBYfE1a6M9G

From what I know, manual executions are not included into production executions.

Does anyone know if there is a bug in Insights numbers right now?

Information on your n8n setup

  • n8n version: 2.7.4
  • Database (default: SQLite): PostgreSQL
  • n8n EXECUTIONS_PROCESS setting (default: own, main): queue mode (with workers)
  • Running n8n via (Docker, npm, n8n cloud, desktop app): self-hosted on kubernetes
  • Operating system: Linux
1 Like

@dan.lavr i guess it only counts production workflow executions with parent flow on a specific time window i am curious that why execution_entity does not match those metrics , as i was reading this one when i got to know about this:

Found a way to repoduce this bug:

  • create a workflow with a chat trigger
  • set Response mode to “Using Response Nodes“
  • add several Chat nodes to the workflow

Here is my sample workflow

After publishing the worklfow, I’ve opened Production URL in a separate tab and send 1 message to the chatbot. As a result, I see only 1 execution on workflow’s Executions tab and 4 production executions on Insights panel.

Yeah this looks like a legit bug, the insights counter is probably firing once per Chat node response instead of once per execution. Since you’ve got a clean repro I’d open a GitHub issue on n8n-io/n8n with that workflow JSON, the n8n team is pretty responsive to well-documented bugs like this and it’ll get more visibility there than on the forum.