Creating Groups/categories automatically

AI-generated summary

In a discussion titled “Creating Groups/categories automatically,” user mikechristopher requests a plugin or development service to automate the creation of private groups and sub-categories. His use case involves organizing 70 users into 10 groups of 7 for 30-day weight loss challenges, requiring automated setup of access, members, and standard topics. mikechristopher notes that while the API could handle this, he needs guidance on where to start or a cost estimate for a custom solution.

Falco suggests that a custom Ruby script is the most viable path, as the feature is not common enough for core Discourse. When mikechristopher asks if this implies a plugin or a separate program, Falco clarifies that a custom script is necessary and recommends posting detailed specifications in the Marketplace to find developers Falco.

pfaffman reinforces this advice, suggesting that if the user has server access, a Ruby script running on the container is ideal. Alternatively, he proposes a script running on the user’s computer utilizing the Discourse API to handle the grouping logic. pfaffman notes that the specific requirement of splitting users into groups of 7 could be a separate phase or budget item. Falco confirms that the suggested approach involves an API-powered Ruby script, citing his own experience building one to manage over 100,000 users.

I would like a plugin of which would do the following and interested to know if or how much it would cost to develop it and see if it’s viable for us to be able to raise the money.

In short -

  • Create group with a name from a list
  • Create private sub category with only the group created above having access to it.
  • Add people into group
  • post a few standard topics into the category

It would also be good to have configurable amount of groups and number of people in it. For example if I had a list of 70 people - I could set it to create 10 groups/categories and split those 70 into groups of 7 across the 10 groups.

Use case: we have private weightless groups which last for 30 days with 7 guys in each group. Creating constant turnover. Would be good to have an automated solution rather than the manual process we have at the moment. I know that most of it if not all could be done via api but don’t know where to start with putting it all together.

Thanks
Mike

You can hack a ruby script that does this, and gives you a lot of flexibility on how to handle everything.

However, I would start with a simple group private message.

2 Mi Piace

Hey @Falco thanks for coming back to me

A group private message wouldn’t work sadly as we have a topic per day in the category for meal planning and exercise and general chat amongst the group throughout the month

When you say hack a ruby script do you mean as a plugin or a separate program utilising the api

So, if you really want to go the automatic group/category creation you will need a custom script. It doesn’t sound common enough to be a core feature.

I understand that I didn’t expect it would be a common feature and was expecting it to be plugin territory. It’s just where to begin is the problem. Hence seeing if anyone would potentially quote for it to see if it would be viable.

You can try to spec it in the most detailed way possible and open a topic in Marketplace.

2 Mi Piace

Follow @Falco’s advice and post in Marketplace. I’d move this post there, but you didn’t answer the required questions (what, when, how much).

@falco’s Ruby approach is good if you have access to the container in which your Discourse is running and are comfortable connecting to it. My solution would probably be to write a script (perhaps written in Ruby) that ran on your computer and used API calls to do what you ask.

The thing you describe in your use case is essentially an add-on to the first part. You’d want to be able to give the script a whole bunch of names, select groups of 7, and then call the script 10 times. In your post, you might include that as a second job with a second budget, or maybe that’s what you really want, because you still don’t want to have to run the script 10 times each month yourself.

2 Mi Piace

I was suggesting a API powered ruby script too :smile:. Made one to handle dozens groups with 100.000+ users, and works wonders with the Discourse API.

3 Mi Piace