Dynamic respond mode of webhook with expression

Describe the problem/error/question

The requirement is to change the webhook respond mode concerning data coming from request information like; headers, query, or body.

Is there any way to set dynamically webhook responseMode?

"responseMode": "={{ #requestHeaders[\"responde\"] }}",

Please share your workflow

Information on your n8n setup

  • n8n version: 1.12.0
  • Database: postgres
  • Running n8n via: self host on docker
  • Operating system: linux

It looks like your topic is missing some important information. Could you provide the following if applicable.

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

Hey @Yalcin_Ari,

Not that I have evertried but you could always just use a respond to webhook node option then use a switch node to work out which one to use for the response it should allow you to do what you want.

Dear @Jon
We have many workflows that start with the webhook. Each workflow can have a different responsible person. we are providing simple solutions for our colleagues to design their workflows easily. So your suggestion has complex know-how that we need to transfer to them. the management of it could not be easy, therefore it can be forgotten.
could we dive into more detail?
if it is possible, we want to use it simple way.
Thanks in advance

Hey @Yalcin_Ari,

What do you mean by different workflow? I thought you just wanted to change the response based on a header? The quick version would look like the below, So in this we select the Respond to Webhook node by using a Switch node that checks the x-response header that we would send in a request. If you wanted to call a workflow as well you would need to add it between the switch output and the respond to webhook node.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.