Hello everybody! What is WorkflowHooks in n8n?

	/**
	 * The process did send a hook message so execute the appropiate hook
	 *
	 * @param {WorkflowHooks} workflowHooks
	 * @param {IProcessMessageDataHook} hookData
	 * @memberof WorkflowRunner
	 */
	processHookMessage(workflowHooks: WorkflowHooks, hookData: IProcessMessageDataHook) {
		workflowHooks.executeHookFunctions(hookData.hook, hookData.parameters);
	}

Those are n8n internal hooks that execute for example before or after a workflow or node got executed. They for example take care of saving the workflow execution to the database, sending the node data to the frontend, and so on.

Thanks. Much appreciated.

Sure. Btw. you can find the implementation of most of them here:

Have fun!

1 Like