- My goal: To get upto 100k data from big query & update in mongodb
- Issue: Unable to trigger update to mongo db via code
- Steps I've taken to troubleshoot: I follows this thread but still not working Workflow MongoDB updateLoop
Hi @Balv,
I'm not at my computer right now but in a workflow I don't think you can 'trigger' another block. I would put the block in a function (on the left) and call it from a code block with a little JS.
Does that make sense?
not really. Apologies, I am a newbie. Could you please share screenshot or example?
Hi there @Balv, and welcome to the forum!
So, what @Shawn_Optipath is saying is that the third block in your flow is only going to trigger only and after your second block runs. You are trying to trigger the third block from your second block and that won't work in a workflow.
The approaches I can think of are:
- Instead of block 2 and 3 in your screenshot, replace them with a loop block, which will use your MongoDb as resource. Connect that block to your first one and you will be able to write the same query, although you will need to add
valueto each property, e.g
{ "_id" : { "$eq": {{ value.id }} } }
What this does, is to iterate through each line in your first block (pretty much what you were trying to do with your second block)
- Alternatively, you can create a function, for which you can find the documentation here
Hope this helps!
Worked like a charm!. Thanks @MiguelOrtiz for the detail explanation. Here is the working screenshot
Glad you got it working @Balv! Thanks @MiguelOrtiz, I knew you wouldn't be far away ![]()

