@kutti 

You can easily do this using Do Until Flow Logic

sharing link from docs for your help

Do the following until flow logic

Remember there might be performance impact if the do until runs many times

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0827663

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader