Logo
ХелпдескУправление знаниямиБизнесуТарифыЧто такое KCS?Блог
Русский
Личный кабинет
Автоматизации и интеграции
© 2023 - 2026 ООО «Свормика». Swarmica - Платформа управления знаниями и ресурсами техподдержки. Версия: 6.1.2

#1741: How to Import Users with the Employee Role from a CSV File

Отредактирована: сегодня

This article provides instructions for importing users with the Employee role from a .csv file.

The script is требовательный к формату CSV file: the columns 'Employee' (employee name) and 'E-Mail' (email address) must be present, separated by the ';' character.

Example content:

Employee;E-Mail
John Doe;john.doe@test.tld
Ivan Ivanov;ivan.ivanov@test.tld
Thomas Smith;thomas.smith@test.tld
...

Instructions

  1. Connect to the Swarmica server via SSH as the root user.

  2. Create a backup of Swarmica using this guide.

  3. Upload the CSV file with the user list to the uploads folder in the django container:

docker cp <PATH-TO-CSV-FILE> swarmica-django-1:/swarmica/swarmica/uploads

where is the path to the CSV file.

  1. Log in to the Swarmica web interface as an Administrator.

  2. Create an import script in Swarmica - Settings - Scripts for the Administrator role:

  1. Upload the import_users.py script, add the following Web form parameters and click Save:
[
  {
    "name": "filename",
    "type": "string",
    "required": true,
    "displayName": "CSV file name"
  }
]

It should look like this:

  1. In the web form, enter the name of the CSV file loaded in step 2 and click Submit:

Troubleshooting

You can track the process in the log of the celeryworker container:

docker logs swarmica-celeryworker-1 -f

Or after the script runs:

docker logs swarmica-celeryworker-1 2>&1 | grep 'User import'