What is ExternalHooks?

Hi my friends. Hope you’re doing great.

I have a question:
What is ExternalHooks.ts file doing? For example in Server.ts file for creating new workflow or updating one it runs a hook like this:
this.externalHooks.run(‘workflow.update’, [newWorkflowData])

Could you please explain? Thank you very much.

It allows to dynamically execute code external when something specific happens in n8n. Like in the above example every time a workflow gets changed.
That is currently undocumented and not officially released yet as it may still change in the future.

It gets currently used for example in n8n.cloud to enforce the limits and count workflow executions.

1 Like

Thanks man, As always: you are awesome!

You are welcome! Thanks a lot! Have a great day and upcoming 2021!

1 Like