How to wait for an element to appear and run an activity after it appear?

Thanks for answering, but how do I fill in the timeout parameter in check app state if I don’t know exactly when the element appears because the element appears when the backend process is finished?