Request is executed numerous times after forEach instead of single run #249
-
Hey Flows community :) I have the following scenario - There's a "GET Recipients" request which returns many recipients. I iterate with For Each block through all the recipients and after that with Condition block I filter those that have international accounts and save as durables the values that I need. After that I want to make Transfer to International account. What is happening is that, let's say, I have 3 recipients with international accounts. And then the "Transfer to International Account" request is executed 3 times with the 3 different recipients. The issue is that I don't want the Transfer to international account request to be executed 3 times (or imagine I have 100 int acc recipients :DD) but only 1 is ok and enough just to check if everything is working correctly. So, my question is how can I achieve that? I have for example 3 recipients with int acc but wanna take some fields (accountNumber, routingNumber and beneficiaryId) only from the first one. How can I do that? I've tried everything, also with Create Data block, but didn't come out with any working solution. It appears that the Transfer request is executed numerous times because of the ForEach block or something like that... instead of taking the needed values only of the first recipient and run only one time. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Have you tried to link a block to the lower right square of the For Each block? This should run once after the For Each is completed. |
Beta Was this translation helpful? Give feedback.
-
Have you tried to link a block to the lower right square of the For Each block? This should run once after the For Each is completed. 10x for the suggestion @enochj but it does not work in my flow. Anyways I found a solution... but forgot to write it down here and close the topic. |
Beta Was this translation helpful? Give feedback.
Have you tried to link a block to the lower right square of the For Each block? This should run once after the For Each is completed.
10x for the suggestion @enochj but it does not work in my flow. Anyways I found a solution... but forgot to write it down here and close the topic.
What I'm doing is... after the forEach let's say I have 3 int accounts > Then I Create Data - List and save them there > After that I just append the List - Top block which takes only the first element from that list > and finally - success... the Transfer to Int Acc is executed only once :)