Getting Multiple Execution In Single API Call

Hi All,

Describe the problem/error/question

I am sending request from slack (using webhook node) and search the input in google-sheet and send the output to the same Slack channel(using slack node),

It is working fine when executing manually, but when I move into production URL and set Active in the workflow, the output is executing multiple time in a single request. Even I came out from the workflow. Please help me on this,

Example :

In slack,

Request

@bot-name search <–search-word–>

Response

<–output—>

[30s…1m] later

<–same output–>

[30s…1m] later

<–same output–>

Information on your n8n setup

  • n8n version: Version 0.225.2
  • Database (default: SQLite): -
  • n8n EXECUTIONS_PROCESS setting (default: own, main): own
  • Running n8n via (Docker, npm, n8n cloud, desktop app): : docker
  • Operating system: Ubuntu 22.04.2 LTS

Hey @Asuwini_P,

Have you checked the execution log for your workflow that would show if we are randomly starting it twice or if the workflow is being triggered twice.

Hi @Jon ,

Yes, I have reviewed the execution log, and as evident in the screenshot below, I triggered it only once. However, it is executing multiple times, and consistently providing the output from the previous request. I am uncertain about the reason for its multiple triggers without explicit requests.

Please help me on this, If it continues to execute in this manner, it could pose a significant obstacle in my project.

@Asuwini_P , I think the problem could be with the way you respond to the Slack command. You could read this Slack documentation and have your n8n-based Slack app respond in accordance to the type of the Slack command you use (there are many interaction types supported by Slack). In particular, pay attention to the section “Responding to users”.

Thanks for your response @ihortom , I will go-through it

I have analyzed the execution performance, It seems like, if the execution takes less time (in seconds), then the output repetition will not come. Otherwise, if it takes time, the output will repeat itself. I mean, if the execution doesn’t complete a certain amount of time, it’s executing again. Could you please comment on this analysis ?

I have multiprocess workflow and linked several nodes, Can we split the workflow into multiple workflow, does it make effective ?

Can you share your workflow?

@Asuwini_P , as per doc I pointed out to,

All apps must, as a minimum, acknowledge the receipt of a valid interaction payload.
To do that, your app must reply to the HTTP POST request with an HTTP 200 OK response. This must be sent within 3 seconds of receiving the payload. If your app doesn’t do that, the Slack user who interacted with the app will see an error message. Make sure your app responds quickly.

If the workflow you have built does not respond within 3 sec then you have a problem, which manifests itself depending on the nature of the Slack command that triggers the workflow.

Can we split the workflow into multiple workflow, does it make effective ?

The main point here is how fast your n8n-based Slack app responds. Splitting the workflow is not likely to make that faster.

  • Does your Slack command expects just 200 status as a response or it needs a specific body?
  • If only 200 OK, do you do it straight as the Webhook trigger got initiated or you do it once the workflow has completed?
  • Does your n8n app gets snoozed and it takes time for it to wake up to start the workflow?
  • Is you infra under-provisioned and it takes long time to complete the workflow?

The answers to these questions might help you to take the right steps to resolution.

2 Likes

Hi @ihortom ,

Upon examining these queries, I’ve identified that I failed to include the response code in the webhook node.

After updating the webhook response settings from "Using ‘Respond to Webhook’ Node” to “Immediately” and setting the Response Code to 200, the issue of the output not repeating has been resolved.

You assisted me in overcoming my problem. Many thanks @ihortom !

2 Likes

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