Why is the execution count in the admin panel different from the one of the API call?

We are on a Pro account and the admin panel tells us that that this months executions is around 12K
Curious about which WF is consuming most of them, I used the n8n node to get all executions and count them by WF. Turns out, that that call is only returning around 4K of executions starting with end of December.
How can the difference between these numbers be explained?

Information on your n8n setup

  • n8n version: 1.22.5
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Cloud

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hey @jocsch,

Welcome to the community :cake:

The amount of log records kept is based on your cloud plan so we may only keep 1 week or a couple of weeks of data. The log will also only contain execution history for the worklfows you have enabled it on so it could be possible that you don’t have logging enabled for all of the workflows.

Hi @Jon
thanks for the fast response.
Is that an overall limit of log records? Because the first I see is from December which means that there is the overlap with the January number in the admin panel.
Looks like all our workflows share them same default setting. So everything should be logged.
My best guess currently would be deleted workflows. Would their exeuctions show up in the API call?
If not, is there any way to retrace how the number in the admin panel is calculated?

Hey @jocsch,

There is a limit in the amount of records we keep as well so it might be 2 weeks but I think we limit the count as well as an example I know my cloud account is limited to only ever keeping at most 2500 executions in the log and it keeps them for 7 days. This will change depending on the plan, I have just used your forum email address to work out the instance I think you are using and it looks like your instance on that plan is 25000 execution logs or 30 days.

Can you share a bit about what triggers your workflows are using? Internally we count 1 execution whenever a workflow is automatically triggered.

This should mean the execution API should return (roughly) the same amount of executions?
We have all kinds of triggers across the workflows: Cron, Workflow triggers for subworkflows, webhooks, manual execution.

@Jon Just looked at the most recent of the workflow that is querying the executions via API: It does not contain the executions of the deleted workflows. So this would be an explanation why the numbers are different. Not sure if this justifies the huge gap between the numbers though.

Hey @jocsch,

It is normally close although manual executions and sub workflows don’t count towards the usage limit so it is possible to see more in n8n than what you have used. It is also possible to see less in n8n if the workflow logging is not enabled for success and error.

Internally we have a hook that is called when a workflow starts to track the execution and I am fairly confident after doing some checks that the counting is correct.

One thing you could do it keep an eye on the /limits url and see if that is jumping by crazy amounts that may help track down what is going on.