Can you pre-populate a newly self-registered proje...
# support
a
Quick question about Bot cloning that's been driving me nuts... I'm building a system where users can self-register new projects, and I want each new project to automatically get a set of standard Bots (with their API secrets) - kind of like a "starter pack" of Bots -- along with their secrets -- that just magically appear in their project. Is there a slick way to automate this? Like, can I clone Bots from a template project when someone creates a new project? I know there is the clone project function -- but not sure how to connect this with self-registration. Right now I'm imagining having to manually copy/paste secrets and bots which sounds... not fun 😅 Would love any tips or tricks you might have up your sleeves! Thanks! 🙏 PS. I did take a look at the threads here: https://discord.com/channels/905144809105260605/1212330252592750594 and here: https://discord.com/channels/905144809105260605/1272610842801737729 which suggests writing a script to "upsert" the bots into the project @Charlie from Imagine and giving the deployed bots a common identifier@Pravin -- though if there was any further guidance / documentation on this, it would be so appreciated! Thanks so much @rahul1 @reshma
p
Have you checked https://www.medplum.com/docs/self-hosting/super-admin-cli#project-management to create/clone project and to create Bot- https://www.medplum.com/docs/cli#bot-create? This might give you some starting point
a
Thanks so much, @Pravin -- appreciate the lead and I'll take a look! 🙂
OK, so I was able to install the medplum CLI and I figured out how to use the $clone project command from the medplum CLI. Which is cool... basically you can use the $clone operation to clone a project from the Medplum CLI: For example, medplum post 'Project/bca80725-ea6a-4fb4-8eac-41b8ee51f09e/$clone' -- seems to work just fine to clone a project from medplum Command Line. And then, I made a bot which calls an API to Medplum through a superadmin enabled ClientApplication -- and which then clones the template project. Fingers crossed!
I think it works! Gracious! But what a bear! Thanks so much @Pravin for your clues! With your helpful guidance, I was able to wrestle it into action!
180 Views