Recent searches


No recent searches

How do I export a list of users?



image avatar

Katie Dougherty

Zendesk Digital Resources Team

Edited Mar 28, 2023


-7

14

14 comments

Export users into CSV

Export users into JSON in Zendesk -> Admin -> Reports

Adjust JSON file to make it validated array:

  • add "," add the end of each line, but the last one
  • add "[" at the beginning of the file
  • add "]" at the end of the file

JSON to CSV:

I use VS Code with Python and Panda. Here is the simplest code you can use to transform JSON to CSV.

import pandas as pd

# read JSON file

df = pd.read_json('./zd_user_all.json', orient='records')

# create CSV file

df.to_csv('zd_user.csv', index = None, header=True)

 

 

1


Hello - for Option 3

  1. Accounts with the customer lists can export their user list in a CSV file.

Could you detail the steps for this please?

Thank you

1


image avatar

Josh

Zendesk Customer Care

Hi Jonathan!
 
Thank you for messaging us. Customer list is a legacy add-on which is currently available for Suite plans. However, the steps in performing this is available here. 

0


As for option 4, you can find export and import apps on the Zendesk marketplace if you want to export your list of users in CSV. 

Or there is an automated data migration app, called Help Desk Migration. They have their app on the Zendesk marketplace.

1


Seriously there is no download to CSV in Zendesk?   We have to mess with add ons, or JSON files and convert?  I see you have bulk import options.   The cynic in me would say exporting users (key activity in truing up user counts) is made hard to make it harder for admins to ensure licences are recovered.

Is an export to CSV on the roadmap? if so when is it due?   if not - why not?

8


Exactly. I have no idea why I have to be some sort of programmer just to export a list of emails for my customers who have booked tickets.  Its honestly ridiculous.

7


Sarah H. Agreed. Ideally, you should just be able to run a report and export. I usually recommend our clients to export from their reporting tool (Looker, Tableau, PowerBI, etc.) if they have access to one. That's probably the easiest and most robust workaround.

0


It seems possible to export users in a CSV file; when requested, it is sent to your email address:

However, it doesn't seem to include all the users... in my case it's listing only 492 users out of 46633... 

 

0


image avatar

Giuseppe

Zendesk Customer Care

Hi Andrea,

 

CSV export is only applicable to tickets. Tested this out just now and I can confirm that only tickets are exported. Although, if you open the CSV file in a spreadsheet app, it could look like you are exporting a "Users" report because it lists ticket details including the ticket requesters. If you double-check the headers, it should look something like this:

The 'Id' in this case refers to the ticket ID.

More information about CSV Export:

  • CSV export: Exports ticket data in CSV format. Does not include deleted tickets, ticket comments, or ticket descriptions.

    With CSV export, if the amount of data being exported from a ticket is more than 1 MB, the ticket doesn’t export. It isn’t included in the resulting CSV file. However, typically, this never happens since CSV exports do not include ticket comments, which are usually the largest data component in a ticket.

    See Understanding which ticket data is in the CSV export for the ticket data included in CSV exports.

Reference: Understanding the data export options

 

0


Seriously - there is no way to get a report of customers (end users and their attributes) or organizations (customers and their attributes like external id, tags, etc) ?  

 

There must be in Explore or worst case - a simple CSV dump ?

1


image avatar

Dane

Zendesk Engineering

Hi Tom,
 
You can use the Full XML export option for users.

0


Really need to re-evaluate Zendesk as a product, If  I can't do a simple tasks as export users.

9


I used the following python script with my API credentials to export all end-users:

import requests, csv
from requests.auth import HTTPBasicAuth

url = 'https://YOUR_ZENDESK_SUBDOMAIN.zendesk.com/api/v2/search/export.json?query=role%3Aend-user&filter[type]=user'
zd_auth = HTTPBasicAuth('ZENDESK_USER@YOUR_COMPANY.COM/token', 'YOUR_ZENDESK_API_TOKEN')
response = requests.get(url, auth = zd_auth)
data = response.json()
results = data['results']

# Open a file for writing and create csv writer
csv_file = open('zendesk_users.csv', 'w')
csv_writer = csv.writer(csv_file)

# Write headers to the CSV file
header_line = results[0]
header = header_line.keys()
csv_writer.writerow(header)

for user in results:
    csv_writer.writerow(user.values())

while data['meta']['has_more']:
    url = data['links']['next']
    response = requests.get(url, auth = zd_auth)
    data = response.json()
    results = data['results']
    for user in results:
        csv_writer.writerow(user.values())

csv_file.close()

1


Please sign in to leave a comment.