How to unify data from multiple sources

This is a very novice question. I run a self hosted n8n instance. I need to create a workflow with multiple webhook triggers, each might receive a different data structure with some commonalities

For example, all webhooks might receive parameters that signify name, date and message, but possibly with different names. How can I unify them to add them for later processing and adding to a Google Sheet?

Have you tried the merge node? It has options to append or combine datasets.

3 Likes

No I haven’t. Didn’t even know about it. Seems like the right node for the job. Thanks

After checking the documentation, it seems like a different case. Docs say

Use the Merge node to combine data from two streams, once data of both streams is available.

I don’t want to merge two streams, I want to make either of them available.
To clarify, let’s assume I receive data on either of three webhooks, I process it, and I add it to a Google Sheet. That’s not merging, not all webhooks will stream data at once

hi @mustafamohsen

it depends on how you are going to unify them… The basic method is to use Set node and specify common variables there via {{ $json.variableName }} reference. And to use something like this (grey arrow and code nodes added just to show how it works if each webhook will output something):

3 Likes

Hi @barn4k
Thanks. The shared workflow requires login, cant see it :slight_smile:

Press f5 (or refresh the page). It sometimes not loaded completely

1 Like

@barn4k Spot on. Many thanks

1 Like

thanks for sharing!! It works.

1 Like

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