How to create App/Project automatically?

Hello, I want to create a duplicated version of a project or module using code or api and get the details of the project like RetoolContext and current_user, is there any way to do that?

Hi @Huayu_Qin, currently retool does not provide an option to create a duplicate version of a project or module using code of an API. Although you can manually duplicate (or export to JSON or toolscript) the project within the Retool UI, duplicating project details like RetoolContext and current_user is not available. These variables are determined by the system and user interaction at runtime, they are not static and so, are dynamically populated based on the user and the state of the app at any given time.

However, you can get some user data using the built-in {{current_user}} global object in your Retool application code. I'll make sure our engineering team hears the feedback that an API to duplicate projects would be helpful!