Add users in bulk via spreadsheet or link
-
I am using Cloudron to manage a university class with 250+ students. I wonder if there is a way to easily add all the students to a specific group, without having to add them manually one by one. For instance, can I:
- Send them a magic link that they can use to create a new account in a given group?
- Import them via a csv file or the like?
Thanks for your help.
-
@ntnsndr yes, this is coming in the next release as part of the import/export feature - https://forum.cloudron.io/topic/5982/what-s-coming-in-cloudron-7-1
-
@ntnsndr said in Add users in bulk via spreadsheet or link:
Send them a magic link that they can use to create a new account in a given group?
this part might have to be automated via some curl calls though. Maybe we can add a "checkbox" in the import UI to invite users as well (cc @nebulon )
-
@ntnsndr said in Add users in bulk via spreadsheet or link:
Send them a magic link that they can use to create a new account in a given group?
This would be awesome.
-
Here is what I did once for ~200 Users which I also had in a CSV. Converted the CSV to JSON.
Python
import json from pprint import pprint import requests data = [ { "Surname": "Testing", "Name": "Tina", "Login": "tina.testing", "Mail": "tina.testing@domain.tld", "Password": "_SUPER_SECURE_CLEAR_TEXT_PASSWORD_" } ] url="https://my.DOMAIN.TLD/api/v1/users" headers = { "Content-Type": "application/json", "Authorization": "Bearer CLOUDRON_API_TOKEN" } for value in data: values= { "email": value["Mail"], "displayName": f'{value["Name"]} {value["Surname"]}', "role": "user", "username": value["Login"], "password": value["Password"], "admin": False } jdata = json.dumps(values) try: # pprint(data) r = requests.post(url, data=jdata, headers=headers) except Exception as e: pprint(e)
I had no need for group mapping that is why the group
user
is hard coded and not mapped from the values.If you can convert your CSV to fit JSON Object required for the request it should be even easier.
{ "email": "jjnTB@eOvbuuolIyPahhKbpYAXiYncqvbIQQ.tl", "username": "cillum do dolore cupidatat", "displayName": "in dolore Lorem", "password": "nostrud Ut dolor consectetur", "admin": false }
https://docs.cloudron.io/api.html#tag/Users/paths/~1users/post
-
While at the topic When you got A LOT of users it can become a pain to manage them.
Example if you want to create a Mailbox and then have to scroll threw ALL 200 Users to find the correct one, since there is no search. -
@brutalbirdie same for domains, email and most other UI features. Although a browser based search can be used to jump to the relevant parts via CTRL-F.
-
@brutalbirdie doesn't users and mailboxes UI both have a search?
-
huh for some reason in my last session I did not see the search field but there is one. (Maybe I was just blind )
I take it back, please don't throw stones