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

#1753: Importing organizations and clients from CSV

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

This article describes the instructions for importing organizations and clients from a CSV file.

CSV file requirements:

  • the file must have 3 columns: client, email, organization
  • data must be separated by the ";" character

Example of CSV file contents:

client;email;organization
"James Rodriguez";"james_rodriguez_1658@example.tld";"Umbrella Co"
"Thomas Martinez";"thomas_martinez_4320@test.tld";"Hooli"
"Jennifer Lopez";"jennifer_lopez_8285@example.tld";"Massive Dynamic"
...

Instructions

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

  2. Create a backup of Swarmica using these instructions.

  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 Administrator

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

  1. Upload the script import_organizations_and_clients.py, 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 field, enter the name of the CSV file uploaded in step 2, and click Send:

Troubleshooting

You can track the process in the celeryworker container log:

docker logs swarmica-celeryworker-1 -f

Or after the script runs:

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