Skip to content

Conversation

@DmitryVDV
Copy link

Summary

When activating a workflow via REST API (POST /rest/workflows/{id}/activate), webhooks are not being registered because shouldAddWebhooks() in ActiveWorkflowManager only returns true for init and leadershipChange activation modes, not for activate.

Fix

Added activate to the list of activation modes that trigger webhook registration in shouldAddWebhooks() method.

Before:

if (['init', 'leadershipChange'].includes(activationMode)) return true;

After:

if (['init', 'leadershipChange', 'activate'].includes(activationMode)) return true;

Testing

Tested manually on a development build:

  1. Created a workflow with a webhook node
  2. Activated it via REST API: POST /rest/workflows/{id}/activate
  3. Verified the webhook responds with 200 OK and "Workflow was started"

Related Issue

Fixes #21614

When activating a workflow via REST API, webhooks were not being
registered because shouldAddWebhooks() only returned true for
'init' and 'leadershipChange' activation modes.

This fix adds 'activate' to the list of modes that trigger
webhook registration, ensuring webhooks are properly registered
when workflows are activated through the REST API.

Fixes n8n-io#21614
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


DmitryVDV seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

@n8n-assistant n8n-assistant bot added community Authored by a community member core Enhancement outside /nodes-base and /editor-ui in linear Issue or PR has been created in Linear for internal review labels Dec 5, 2025
@n8n-assistant
Copy link

n8n-assistant bot commented Dec 5, 2025

Hey @DmitryVDV,

Thank you for your contribution. We appreciate the time and effort you’ve taken to submit this pull request.

Before we can proceed, please ensure the following:
• Tests are included for any new functionality, logic changes or bug fixes.
• The PR aligns with our contribution guidelines.

Regarding new nodes:
We no longer accept new nodes directly into the core codebase. Instead, we encourage contributors to follow our Community Node Submission Guide to publish nodes independently.

If your node integrates with an AI service that you own or represent, please email [email protected] and we will be happy to discuss the best approach.

About review timelines:
This PR has been added to our internal tracker as "GHC-5790". While we plan to review it, we are currently unable to provide an exact timeframe. Our goal is to begin reviews within a month, but this may change depending on team priorities. We will reach out when the review begins.

Thank you again for contributing to n8n.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community Authored by a community member core Enhancement outside /nodes-base and /editor-ui in linear Issue or PR has been created in Linear for internal review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deployment + Activation via API does not register webhook path

2 participants