Hey @Aditya_SMD - thanks for reaching out. Our documentation on the subject is a little light, but the key to passing data to and from an embedded app is the postMessage API. Parts of this are abstracted away by the Retool UI.
For example, we allow you to write a query within the embedded app that initiates communication with the parent, as described here, but it won't work if the parent isn't prepared to receive and respond to that request. One option is to use the retool-embed library, but you can alternatively define the necessary functionality as I described here.
I hope that helps you to get started! Don't hesitate to reach out with any clarifying questions.