Share feedback, ideas and get community help

D
F
M
a
g

How to repeat steps multiple times and store the results in an array or in sub-variables?

I'm creating a flow asking about information to a borrower and a co-borrower.
The questions are the same for both. The way around this today is duplicating and updating each step two or three times based on the number of borrowers, which is quite tedious since each variable is different and needs to be updated for each step.

Any ideas? Thanks!

The result would look something like this
Plain Text
{
  "borrower.name": "John Doe",
  "borrower.email": "[email protected]",
  "borrower.phone": "1234567890",
  "coBorrower.name": "Jane Doe",
  "coBorrower.email": "[email protected]",
  "coBorrower.phone": "1234567890"
}
B
t
3 comments
Amazing, thanks!
An alternative but more creative solution if we had access to a list of defined variables mid-typebot in the script block:
  1. Once the flow is completed, store current defined variables under a namespace variable, for example: name -> borrower.name
  2. Jump back to the start of the flow
  3. Once you reach the end of the flow, you are back at step 1, use a different namespace, for example coBorrower.name
  4. Do this as many times as needed
Add a reply
Sign up and join the conversation on Discord
Join