Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Support
  3. Add users in bulk via spreadsheet or link

Add users in bulk via spreadsheet or link

Scheduled Pinned Locked Moved Support
usermanagement
10 Posts 6 Posters 1.9k Views 6 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    ntnsndr
    wrote on last edited by girish
    #1

    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.

    girishG jdaviescoatesJ BrutalBirdieB 4 Replies Last reply
    2
    • N ntnsndr

      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.

      girishG Offline
      girishG Offline
      girish
      Staff
      wrote on last edited by
      #2

      @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 🙂

      1 Reply Last reply
      2
      • N ntnsndr

        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.

        girishG Offline
        girishG Offline
        girish
        Staff
        wrote on last edited by
        #3

        @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 )

        1 Reply Last reply
        1
        • N ntnsndr

          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.

          jdaviescoatesJ Offline
          jdaviescoatesJ Offline
          jdaviescoates
          wrote on last edited by
          #4

          @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.

          I use Cloudron with Gandi & Hetzner

          1 Reply Last reply
          0
          • N ntnsndr

            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.

            BrutalBirdieB Offline
            BrutalBirdieB Offline
            BrutalBirdie
            Partner
            wrote on last edited by BrutalBirdie
            #5

            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

            Like my work? Consider donating a drink. Cheers!

            BrutalBirdieB 2 Replies Last reply
            3
            • BrutalBirdieB BrutalBirdie

              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

              BrutalBirdieB Offline
              BrutalBirdieB Offline
              BrutalBirdie
              Partner
              wrote on last edited by
              #6

              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.

              Like my work? Consider donating a drink. Cheers!

              robiR girishG 2 Replies Last reply
              3
              • BrutalBirdieB BrutalBirdie

                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.

                robiR Offline
                robiR Offline
                robi
                wrote on last edited by robi
                #7

                @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.

                Conscious tech

                1 Reply Last reply
                1
                • BrutalBirdieB BrutalBirdie

                  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.

                  girishG Offline
                  girishG Offline
                  girish
                  Staff
                  wrote on last edited by
                  #8

                  @brutalbirdie doesn't users and mailboxes UI both have a search?

                  fbartelsF 1 Reply Last reply
                  2
                  • girishG girish

                    @brutalbirdie doesn't users and mailboxes UI both have a search?

                    fbartelsF Offline
                    fbartelsF Offline
                    fbartels
                    App Dev
                    wrote on last edited by
                    #9

                    @girish i would say so as well. For mailbox ownership and group membership there is a "filter" element.

                    1 Reply Last reply
                    2
                    • BrutalBirdieB BrutalBirdie

                      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

                      BrutalBirdieB Offline
                      BrutalBirdieB Offline
                      BrutalBirdie
                      Partner
                      wrote on last edited by
                      #10

                      huh for some reason in my last session I did not see the search field but there is one. (Maybe I was just blind 🤷)

                      094213ff-47fe-41f3-b452-a341a216719f-grafik.png

                      I take it back, please don't throw stones 😄

                      Like my work? Consider donating a drink. Cheers!

                      1 Reply Last reply
                      2
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Bookmarks
                      • Search