Know how many times a workflows was triggered

The idea is:

Have a counter to show how many times a workflow was triggered [Option to click into details to see a graph showing runs per day/week/month]

My use case:

Helps know how many times a workflow was triggered, without the need to send data to an external database each time a workflow was executed :slight_smile:

I think it would be beneficial to add this because:

It’s important to know how many times the workflow was triggered.

:fire::fire::fire: Don’t forget to upvote this request. The more votes this Feature Request gets, the higher the priority.

How about making a local JSON file with the counter variable?

1 Like

You can count it based on the logs from Log Streaming service. If you have a community version, then the easiest way is to export execution data somewhere (or create an SQL query directly in the DB) to count what you want to count :slight_smile:

1 Like

Much easier to just query your DB :wink:

EDIT: but I’d love to see this in the workflow list!

Here’s an example with Postgres:

SELECT 
    we.name AS "WorkflowName",
    ws.count AS "Count",
    ws."latestEvent" AS "LastRun"
FROM workflow_statistics AS ws
LEFT JOIN workflow_entity AS we 
ON ws."workflowId" = we.id
ORDER BY "Count" DESC;
3 Likes

I’m not very technical :slight_smile:

Looks like I’ll use an external DB for now, but would love to just have it there next to each workflow…

Thanks!

I think I’ll use Airtable to log the runs there, until this feature is added into n8n :slight_smile:
But I gotta add 2 airtable nodes at the end of each workflow.

  1. Get the last count of the workflow
  2. Add +1 to the count

Not sure if I can make it work with one…