2 HTTPs Request from 2 separate Workflow to one Webhook?

Question:

Hi, I’m trying to know if it’s possible to send 2 items from 2 separate HTTPs request to one unique Webhook (in another separate workflow). I tried with the test version but it only listen for one HTTPs request but it’s maybe because I’m in test mode.

Thanks for your help.

Information on your n8n setup

  • n8n version: the last one
  • Database (default: SQLite): default
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: MacOS

hello @C459760

One HTTP request = one Webhook response.

If you would like to send data from two distinct HTTP requests, you should pack the responses from both into one array and then send that to the Webhook.

2 Likes

Hey @barn4k,

Thanks for your answer !

HTTP request are from 2 separate workflow, that why I tried to build a new workflow with a webhook. I would like to get all output data from the 2 workflow.

To illustrate :
Workflow 1 → Do some data transformation and calculation from source 1, end with a http request
Workflow 2 → Do some calculation and transformation too but from source 2, end with a http request
Workflow 3 → Starts with a Webhook Trigger (I would like to merge all my previously calculated and transformed data)

Did you have any idea how can I do it ?

edit : I tried to add 2 Webhook with different URL targeted by my 2 HTTP request but its not working too. My Workflow 3 stopped when it gets only one item from Workflow 1 or 2.

So they are two separate http calls to you and you want to return the data of both together, right?

Is there any identifiable data in them where you could store the first calls data until the second one comes in and then match it with a search to combine them? This could be done many places: local storage/spreadsheet/air table

Exactly, 2 workflows with 2 different treatments but the 2 send 1 different HTTP request.

All the data is in JSON format, in a single item, an object called data_pack1 for the 1st and data_pack2 for the 2nd workflow.

I’d prefer to find a solution without “external” data storage, that’s why I’m trying to stay 100% in n8n :confused:

If you have any other ideas, don’t hesitate to let me know! Thanks a lot for your help @liam

Well… do your HTTP flows execute at a schedule?

The easiest solution would be:

  • Flow 1 - prepare data, save the data_pack1 on the n8n’s disk, trigger the webhook with something like “hey, I’ve saved the data_pack1”
  • Flow 2 - prepare data, save the data_pack2 on the n8n’s disk, trigger the webhook with something like “hey, I’ve saved the data_pack2”
  • Flow with Webhook - check if both files are on the disk. Basically, It has two possible scenarios:
    ** if the data_pack1 is saved and data_pack2 is not yet (or vice versa), then it does nothing.
    ** if both files are sabed on the disk, then it downloads their content, deletes the original files and processes them as you want.

Something like this.

Flow1:

Flow2:

Flow 3 with Webhook

2 Likes

Any idea to do it without any external storage ? n8n can’t hold some binary files or data in a workflow ?

The examples are without using an external storage

It use my local disk, no ?

it uses n8n disk, whatever it is. If you are using docker, then it will be the disk, that n8n uses inside the docker container.

1 Like

Crystal clear, any help to configure SSH in docker too ?

SSH? What is the case?

My bad, I tried this with the wrong node (SSH execute command instead of classic execute command). Thanks a lot for your help !


I got this error when I apply the last part of your flow3 example, any idea why I got this error ?

EDIT : I find the error, it was just the name of my node “Extract from File” lmao. Sorry for that.

1 Like

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