Custom trigger works manually, but workflow fails to activate

Describe the problem/error/question

I’ve developed a custom trigger that functions properly when invoking manually in the workflow builder.

I’ve tried removing the optional parameters from the trigger, but no luck.

What is the error message (if any)?

This toast message pops up after a failed PATCH to the workflow endpoint:

Workflow could not be activated:
There was a problem activating the workflow: "Could not get parameter"

I’ve seen this same error reported here; Custom Trigger Node: “Could not get parameter” on activation (manual run works)

Please share your workflow

Custom trigger is open source and is available here:

@getverdict/n8n-nodes-shopify-partner-relationship-events
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

N/A

Information on your n8n setup

  • n8n version: latest
  • Database (default: SQLite): SQLITE
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): docker
  • Operating system: Ubuntu

Can you provide us example error please? It maybe helps us to debug that.

Hi @withabdul

I wish I could give more details, the error message is vague from the PATCH /rest/workflows/ endpoint.

I’ve traced the error in the n8n repo to this module:

n8n/packages/core/src/execution-engine/node-execution-context/node-execution-context.ts

In this line:

// line 404		
if (value === undefined) {
			throw new ApplicationError('Could not get parameter');
		}

But this is a handled error, there’s no stack trace in the logs even when set to N8N_LOG_LEVEL=debug|trace

My workaround was to modify this line in a fork of the core n8n application, then build and push to my own docker hub repo.

Then after pulling to my instance and recreating the container, I was able to see more details about the culprit trigger parameter and fix the issue.

I may open a PR back to the n8n monorepo, but I’m not sure if the team wants this level of debugging in the user facing toast messages.