Hi n8n Community,
I’m currently encountering an issue while trying to trigger an n8n webhook using a POST request sent via the Flowise tool. Despite setting everything up correctly, the webhook doesn’t seem to receive or respond to the POST requests sent from Flowise.
Here’s a detailed summary of my setup and steps taken:
1. Webhook Setup in n8n:
- I’ve created a webhook node in n8n and set it to listen for POST requests.
- The webhook URL is hosted on my n8n cloud instance and follows the structure:
bash
Copy code
https://your-n8n-instance/webhook-test/webhook
- When tested using Postman or similar tools, the webhook works perfectly and responds as expected with a 200 status code and the message:
json
Copy code
{ "message": "Workflow was started" }
2. Flowise Setup:
- I’m using Flowise to trigger the webhook via the
fetch
method in a custom tool. The code snippet for the POST request is as follows:
javascript
Copy code
const fetch = require('node-fetch');
const url = 'https://your-n8n-instance/webhook-test/webhook';
const options = {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ query: "indexes" }),
};
try {
const response = await fetch(url, options);
const text = await response.text();
console.log('Response from n8n:', text);
} catch (error) {
console.error('Error:', error.message);
}
- The request does not throw any errors in Flowise, but the n8n webhook is not triggered. I don’t see any logs or events in n8n indicating that the webhook received the request.
3. Debugging Steps Taken:
- Tested the webhook using Postman, and it works as expected.
- Verified the URL and headers are correct.
- Ensured the request payload (
{ "query": "indexes" }
) is being sent in the correct JSON format. - Confirmed there are no network or firewall restrictions preventing the request.
- Observed that the issue persists only when the request is sent from Flowise.
Question:
Could this be an issue with how Flowise sends POST requests to n8n? Are there any known limitations or specific configurations required for webhook compatibility with Flowise?
Any guidance or suggestions for troubleshooting would be greatly appreciated!
Thank you in advance!