Here is the overview of my workflow. I have a webhook node that I use to trigger the workflow. I trigger it using a curl request with method POST and send data along with it - data is the repository path of GitLab self hosted and GitLab SaaS. I am currently testing it by doing curl on terminal - but in future I want to do this curl using Jenkins.
Once the webhook node is trigger - it sends the data to Google Sheet Node and puts that data in the desired columns. After that slack node is triggered which just sends a message on a channel.
The problem I am facing is:
1- When I send curl request with multiple tries - sometimes I get slack message once, while sometimes I get slack message twice - as described in above image. - I only want to get slack message once.
2- Also, in some cases (not all) – and randomly - sometimes it puts the value in sheet two times
How can I solve this? Not sure what error I am making.
I have gone through executions - they look fine. I have tried a lot of things as well - but these weird error is not fixing.
Also, it is very random - meaning, sometimes one slack message , and sometimes 2.
Sometimes data being appended one time – and in rare cases randomly - 2 times.
My workflow is active and I am using production url.
Writing the data of copy node here with images::
1- Webhook
2- Google Sheet
3- Slack
Please let me know how can I fix this issue.
PS - Above 2 issues only happen when I use production url. I just tested 5 times by using the test url - I have not faced those issues with test url.
Information on your n8n setup
n8n version: Version 1.20.0
Database (default: SQLite): - Postgres 11
n8n EXECUTIONS_PROCESS setting (default: own, main): Have not set these in env variables. Also, don’t know what this means yet. I only have one instance of n8n.
@Priyanshi_Sarad , Slack node will send as many messages as GSheet node returns rows. If you want to send only one message (regardless of the number of items in the GSheet node output), you can achieve this by setting Slack node to do just that.
Thanks for taking the time to reply. As you can see from the image below, the google sheet returns only one row for every execution. It says 1 item. And, slack has als accepted just 1 item from google sheet.
Also, I have already set the Execute Once option in slack. But it did not work I don’t know why.
Also, I am facing this issue only when I use production url. I am jus going to try this Execute Once again with both production and test url.
1- I did 2 tries with Execute Once option set in slack node, and tested it with a test url.
I am getting message on slack once and also one entry in google sheet. (which is the expected behavior)
@Priyanshi_Sarad , according to the screenshots the Slack node also sends only one message.
Could you check the workflow execution history and see if the webhook was called twice in those instances (maybe milliseconds apart)? Perhaps you can see two separate executions taking place at almost the same time, which simply gives an impression that the very same execution created two Slack messages?
My self hosted n8n is also being proxied using Cloudflare - we are using Cloudflare for DNS mapping and also proxy – (is that cause of issue?)
It could be. Does the proxy expects a response? If so, perhaps it does not receive a confirmation from your webhook. Again, that could result in re-sending the request and hence the workflow fires second time for the same initial curl command.
Perhaps you can check Cloudflare logs to understand what is really happening.
Do you have an ALB/ Reverse proxy in front of the n8n? Maybe you should check its logs to see if there are duplicated requests from the client or if the ALB itself is messing with the requests and sending them sometimes twicely
Wanted to inform that n8n issue is solved on it’s own and I have not received the same error since then using the production url that is triggered by jenkins stage with curl request.