Workflow loops
It seems that loops are released but i am not sure if they are working as expected or i will need to learn how to make them.
First running a workflow for 3 records selected still runs 3 workflows.
Second is about real usage and how to implement. I want to have list of people selected , then the user selects a campaign that he needs to add this people and then the iteration starts.
The iteration checks if each one of the users is not already in the campaign members list and if not it adds them.
and i am geting several json errors trying to setup the iterator with [] [id] which is the selection of some field from the Launch manually node.
It seems that i can not select the record it self but some field under it.
Maybe i am doing it completely wrong




32 Replies
cc @Baptiste Devessier @thomast
Even when i try to change the iterator and i try to select to iterate from the select campaign node i get some selection "add people to campaign" that i am not sure who it is created. cause it is not a workflow and the campaign model does not have access to people it has connection to campaign members which is where i try to create the new records

Same for me unable to get the value of the current Item. Even passing the whole item in JSON Object array didn't work or just passing a array item also don't work

cc @thomast
First, I didn't manage to make any workflow with a filter in loop work. The filter outputs nothing if conditions are false, so the loop remains running, waiting to receive the signal to continue that will never come.
For the launch manually, select the bulk option, it return an array. Remove the existing [] and add the array from bulk launch manually
should we open bug or not?
cc @Baptiste Devessier
Hi! Could you share how you created your workflow? You should be able to get the value of the current item.
Are you still blocked?
yes
nothing i do not know how to fix or what i missed. have you made any update on system after 1.7.6? or is the version correct and the proper implementation needs to be found?
Yes. Sorry got busy will share a video recording shortly.
Hi all, here are a few inputs on how to use iterators:
- as @[S05] Sterb4 said, you need to set bulk availability on the manual trigger so only one workflow is triggered
- then you only put the trigger output into the iterator, in my case
Companies without braces
- finally, iterator will provide as output the current item which will be a company. All company fields should be available as usual
Adding screenshots.
About the filter issue, this is indeed not supported today since it stops the whole workflow instead of stopping only the iteration. It should be available in the next release - 1.10 coming end of next week. This is why iterators are still in the lab, there are missing features.
Thank you all for your feedbacks. Let me know if I did not answered for something!


Thank you @thomast i knew that something was not set properly from my side. Iteration is in general working, i will still wait for the filter solution cause i am also filtering and i have the same issue with @[S05] Sterb4 . if the filter is false i can not set it to continue the iteration. The filter needs 2 outputs.
Itterator only worked with records? Can I just use a code to generate a array and itterate using that ?
Please look at the sample.
I have code that generates a JS array and I want to use the array to create new records




cc @thomast
i know what @bt747 add is also extra requirement but looking at the initial to place them in order there are 2. The firsti is the filter issue and also the second is the iterator over created list in javascript. Do we have timelines ?
You can use the full current item. Backend support already this case but frontend does not. It means that when you will select the current item, you will see
Not Found as the variable. But if you run your workflow it will work. See screenshot.
But you cannot select field of your current item - for example, select milestoneName in yours. I need to dive into that issue, this is definitely something that we should support
Filters should be good for 1.10 release, planned end of this week or early next weekIs there a syntax that I can use to get the item. I don't worry about getting about to select. Are you using Jinja or something else ? Ex: if I type in {{currentItem.milestone}}
syntax will be {{
iterator_step_id.currentItem..milestone }}
for the step id you can have a look in the findOneWorkflow call in your network. Or log it from the codeThank you will give this a try
@thomast it worked. But only worked for texts. When there are numbers or dates we are getting null. Even though I saved correctly for numbers and dates they are being cleared in the node



Interesting, thanks for checking. I actually implemented the sub-field selection from current item, even when coming from a code step. So it will fix the issue for dates and numbers. Will be available in next release 👍
Hi @thomast i have seen in the new release the changelog and you have https://github.com/twentyhq/twenty/commit/cbfd73cbd8ce8cb355c8287a6ca4ddbd5a4f4f6f
fixed the filter. but it seems i did not understand how to fix it in user interface . do we have a selection somewhere cause from my side i do not see something changing in use interface to deal with the case that you need to apply the continue; to the next iteration
GitHub
Enable filters in iterators (#15017) · twentyhq/twenty@cbfd73c
Filters should not cut the whole workflow. These should only stop the
branch. This PR:
- adds a new skipped status
- when a filter stops, it still goes to the next step
- the next step will execut...
The filter will do a continue by default if the condition is not matched
thx
i guessed something like this happens but it is always better to confirm
thank you very much
You're welcome, let me know if you find issues!
ok
nicely done thank you
Hello @thomast I have upgraded to the latest version. I’m still having same issue. Unable to select the current item. Is the fix been released or still. Waiting.
Version 1.8.2
Version 1.8.2
Hi, please provide details and screeshots, we discussed several issues in that thread 🙂
@thomast I’m still see this https://discord.com/channels/1130383047699738754/1423699718134829167/1427317991023972483
can you try to re-create your iterator node, or at least remove and put back the variable you set in items? This is how the output of the iterator is re-generated
Thank you re-creating worked. Found a weird issue. When we create the records with the currency in this case it showed 0 value when I clicked to edit it showed the correct value. Please see attached screen record
@thomast