Inserting multiple inputs into the same row in Mongodb

Hey, I have been struggling trying to insert the 3 separate inputs into 1 row in Mongodb.
Is there any way, I can get the inputs to be in the same row
@MutedJam , @mcnaveen, @harshil1712 , @Jon , @jan
Here is how my current Mongodb look like:

This is how my workflow look like:

Hey @ruby09, could you share a simplified workflow not relying on Telegram data coming in that lets me reproduce the problem?

The result you have shared looks like you have three separate items rather than one. This is most likely because your Merge nodes are using the wrong mode for what you have in mind.

If you want to combine three separate items into a single item containing the fields from each of the three incoming items, you probably want to use the Merge by Index mode:

image

Check out this example:

This workflow will have three separate items combined into a single item after the final merge:

On a side note, it’s really not necessary to randomly mention a bunch of forum users. People will try their best to help whenever they can.

2 Likes

Looks like I just answered a similar question.

2 Likes

Hi, I have tried following the way that you recommended but I don’t think it works because the execution is being doing 3 separate times so it just stops at the set node and doesn’t move forward. Is there any other way I can move forward?

image
image
Its the same even when i change the Merge node type to ‘Merge by Index’

1 Like

Have you tried setting the Merge Node Mode to Multiplex?

Check the link I shared above. It works

Hi,
If you look at the screenshot, I have tried using Merge by Multiplex and that too does not work. Is there any way to store all the separate data from the user to any node and after that pass it on to insert into Mongodb?

1 Like

You can use set node for that.

Set Node will merge all the data into one and make sure to enable Keep Only Set this will remove all other data except whatever is present on set node

From the set node you can insert into Mongodb

1 Like

@mcnaveen do you know the reason my workflow isnt working as expected?