I need to get the OTP from gmail to login the application as we have DUO enabled on our application.
Did you tried to use this plugin ?
https://store.katalon.com/product/39/Read-and-Write-Gmail-Messages-Keywords
After getting OTP from Gmail, save it in a variable and just use the same anywhere you want