Workflows usage how to retrieve this information

Describe the problem/error/question

I’m looking for a way to plot some charts about my workflows statistics.
I really would like to know how many time a workflow get called in a certain amount of time and plot some charts.

Sadly this kind of information exists if and only if you save execution history, I’ve disabled it for every workflows because I prefer to save up execution space. I don’t need to know the errorred node and the data passed I just want to know the number of time that workflow have been called.

Analysis

Digging in the api I didn’t find anything but the api to extract workflow history. I’ts disable so not very useful in my situation.

Searching on the database I’ve spot some promising fields.

table workflow_statistics

This table have a count filed that seems very good. If I take hourly snapshot of this number I can create a chart with the number of time the workflow have been called.

Sadly there is no node to interrogate the database of n8n and I don’t see any endpoint to retrieve this information. I’m not even 100% sure if this counter effectively count this.

Question

Did you face this challenge? How did you solve it?
Do you have any advice?

Information on your n8n setup

  • n8n version: 1.84.3
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): docker compose
  • Operating system: linux raspberry pi 5

edits: formatting this keep 403 I think there is a bug in this forum

Hi,

I think this information can be found in the execution_entity table inside of the database. You can directly query it.

there are metrics that you can enable, but they are mostly high-level, success failure etc. /metrics endpoint

As of recently there is insights but they are only available in detail for the pro and larger.

Anyway you can do a lot of DIY with DB access and grafana. You can calculate queue timing waiting per workflow / execution times / etc.

All of the above assumes you are self-hosted…

regards
J.

Hi @dangerblack

It looks like you’ve already implemented SQLite3 Community Node

Why not use it to query the data you need from table workflow_statistics?

Or your question for the cloud version?

Yes and no.

Technically, I could do this, but I’d rather not let my workflow access my n8n instance directly. There are potential concerns, for example, secrets might not be securely stored in the database, or there could be issues with improper access.

If I can’t find a better solution, I could theoretically mount the relevant folder and access the DB directly. But ideally, I’d prefer to have a dedicated node handle that for me.

oh very cool!
I didn’t see them!
Insight seems what I was looking for, are those available also for self hosted solution?
let me check!
thanks!

Hi
It’s only as of 1.89…x / recent

The community version has a very basic banner with info. Per workflow is only paying as of pro cloud.

I guess enterprise self-hosted might include it.

Regards
J.

2 Likes

This is interesting, didn’t know this…

Is this a new feature in version 1.89? how it looks when you use it, and how can I activate it in the community version?

Hi,

Its was directly there (maybe only with registered community) but nothing special to be done

It’s only in overview mode / not in personal with the folders

also this is very basic info. anything more detailed is payable

reg,
j.

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.