N
Novu15mo ago
YacineBKA

Create templates using the sdk

Hello, I want to know if there's a way to create and add steps using sdk (either nodejs or golang sdks), i want to be able to use a script to create several workflows automatically when a new organization is created. thanks you
5 Replies
todd
todd15mo ago
@YacineBKA Dotnet does if you are interested in an approach. https://github.com/novuhq/novu-dotnet/tree/main/src/Novu.Sync. I use it in a build pipeline to keep all environments synced. Take a look at the tests for different examples as the project is underdocumented. I'd start here: https://github.com/novuhq/novu-dotnet/blob/main/src/Novu.Tests/AcceptanceTests/SyncEnvironmentTests.cs There is a bit to managing the lifecycles because ... well that's another discussion. Personally, I am letting this approach bed in and then thinking about writing a terraform provider. I wonder what your use case here is.
YacineBKA
YacineBKAOP15mo ago
Hi basically i want to copy all workflows from one organization to the new organization using either nodejs or golang but i having issues wiht copying/creating steps
Lionel Mandine
Lionel Mandine14mo ago
Hi @YacineBKA , I have the same use case . Did you find a way to do it with nodejs SDK ?
Pawan Jain
Pawan Jain13mo ago
@Lionel M Checkout this code snippet to create workflow using nodejs sdk https://github.com/novuhq/novu/tree/next/packages/node#create-a-new-workflow
Lionel Mandine
Lionel Mandine13mo ago
Thanks @Pawan Jain
Want results from more Discord servers?
Add your server