Hi @mansiish,
It seems to be a very similar use case to my blog post here:
Hope it helps! Thanks, Ian