How to bulk-create groups?

I hope this isn’t a repeat question - the search showed how to add bulk users, but I want to build out my new Discourse site with 430 groups, straight away, representing the cities worldwide that my community live in.

Does anyone know how this could be done? The manual option would be sloooow going.

1 Like

You could use code to loop through each group name, posting it to the create group API.

5 Likes

The best bet, especially if you’re not self-hosted, would be to use the API as suggested. You probably also want to create corresponding categories?

If you’re self-hosted, it might be a little easier to do it via the rails console, but if you knew what that meant, you’d not have asked the question.

If you have a budget and need help you can message me or ask in marketplace.

Looks like there may be some examples of doing that with the API if you search.

3 Likes