# Automated group creation using CSV of email addresses or user names?

**URL:** https://meta.discourse.org/t/automated-group-creation-using-csv-of-email-addresses-or-user-names/27429
**Category:** Feature
**Created:** [10 april 2015 om 18:34 UTC](https://meta.discourse.org/t/automated-group-creation-using-csv-of-email-addresses-or-user-names/27429 "2015-04-10T18:34:59Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![chenny408](https://avatars.discourse-cdn.com/v4/letter/c/ee7513/32.png) [@chenny408](https://meta.discourse.org/u/chenny408)
#### Post date: [10 april 2015 om 18:34 UTC](https://meta.discourse.org/t/automated-group-creation-using-csv-of-email-addresses-or-user-names/27429/1 "2015-04-10T18:34:59Z")

</div>

Hi, currently I am using SSO to create users on Discourse through my Rails site, which works well. However I also need to create different categories that will be accessible by different groups, based on these users. Is there a script or any automated method to create groups, without having to hack the database?

Thanks!

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [10 april 2015 om 19:33 UTC](https://meta.discourse.org/t/automated-group-creation-using-csv-of-email-addresses-or-user-names/27429/2 "2015-04-10T19:33:26Z")

</div>

Use the API, see the howto category for examples.

---

<div class="post-metadata">

### Author: ![chapoi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chapoi/32/537252_2.png) [@chapoi](https://meta.discourse.org/u/chapoi)
#### Post date: [4 december 2025 om 11:35 UTC](https://meta.discourse.org/t/automated-group-creation-using-csv-of-email-addresses-or-user-names/27429/3 "2025-12-04T11:35:51Z")

</div>


