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

feature: allow response from 'Respond to Webhook' node #9

Open
c-nv-s opened this issue Feb 1, 2023 · 1 comment
Open

feature: allow response from 'Respond to Webhook' node #9

c-nv-s opened this issue Feb 1, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@c-nv-s
Copy link

c-nv-s commented Feb 1, 2023

At present it seems there is only a fixed response to any submission.
Allowing customized response options from the 'Respond to Webhook' node (just like with regular webhooks) would be useful, especially when working with custom html forms or javascript libraries.

@Joffcom Joffcom added the enhancement New feature or request label Feb 3, 2023
@Kase0x
Copy link

Kase0x commented Nov 18, 2024

A work around I've found for this is the setup a n8n Webhook node that has a Respond to Webhook node down the line.
Then just update the javascript code to post to the webhook url node.
Optional addition: Add a body.innerhtml replace and place the response data to update the form page on the fly:
$(document).on('submit','#n8n-form',function(e){ $.post('/webhook/xxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx', $('#n8n-form').serialize(), function(data, status) { //console.log(data,status); document.body.innerHTML = "<div>some html</div>"+ data + "<div>some html</div>";}); return false; });

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants