Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(nodes-base): return response body on RespondToWebhook #10235

Closed
wants to merge 1 commit into from

Conversation

ndeitch
Copy link

@ndeitch ndeitch commented Jul 29, 2024

Summary

Returns body, statusCode & headers in RespondToWebbhook node.

This is useful to have access to workflow response in postExecute workflows hooks.

Review / Merge checklist

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

Test Proof

image

@n8n-assistant n8n-assistant bot added community Authored by a community member node/improvement New feature or request in linear Issue or PR has been created in Linear for internal review labels Jul 29, 2024
@Joffcom
Copy link
Member

Joffcom commented Jul 29, 2024

Hey @ndeitch

This goes against how the node works and our general design approach, it is meant to return only the input data rather than what gets sent back to the webhook.

I can't see what benefit this actually has at the moment as the body data can be accessed from node parameters.

Do you have some examples on how this would actually be used?

@ndeitch
Copy link
Author

ndeitch commented Jul 29, 2024

Hi @Joffcom, thanks for the quick review!

I see your point and indeed I can do it without this change. I did this because I have a backend hooks of type workflow.postExecute that checks the result of each execution and saves it in an external database.

Returning the response in the node makes it easier to save the workflow execution result, otherwise I need to check the result of each node used to build the response to get to the result returned by RespondToWebhook node.

@Joffcom
Copy link
Member

Joffcom commented Jul 30, 2024

Hey @ndeitch,

It sounds like if you are using n8n embed and hooks maybe a fork that includes this one change could be a possible route as I am not sure if this would benefit other users. This did come up on the forum recently though and I did come up with a possible solution which involved multiple output branches like the image below would that sort of approach work for you?

image

@ndeitch
Copy link
Author

ndeitch commented Jul 31, 2024

Hey @ndeitch,

It sounds like if you are using n8n embed and hooks maybe a fork that includes this one change could be a possible route as I am not sure if this would benefit other users. This did come up on the forum recently though and I did come up with a possible solution which involved multiple output branches like the image below would that sort of approach work for you?

image

Alright, I'll create my own RespondToWebhook node then. Thanks!

@ndeitch ndeitch closed this Jul 31, 2024
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 in linear Issue or PR has been created in Linear for internal review node/improvement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants