Skip to main content

Export of user data

What is Data Export


Data Export - allows you to export, user data of your bot, that was saved in variables, to a file. The data is exported to a text .csv file, with ";" as a column separator, in Unicode UTF8 format.

You can check the number of available Data Exports in:
☞ 🔐Admin

We remind you that if you need to find out the data of only one user - you do not need to carry out a full export, you can use the command:
/userinfo user_id/user_code - displays all the information available on the user. (The command consumes 5 Tokens of Functions).

ATTENTION:
You can
export to a file, the data of ONLY those users who have somehow manifested themselves in the bot, apart for just wondering through the menu. To export, you need the user to have referrals, referral parent, balance, or something else - bonuses, for example - to be actually saved in variables.

The data of those who just went to see the bot and pressed few menu buttons - will NOT be exported - and you CANNOT find them out - NEITHER paid, NOR free, NEITHER as an exception, NOR because this is "the only thing that you lacked in your life." This is a matter of ETHICS, not technical capabilities.

If you have not SPECIFICALLY configured any function to store data in variables, do not expect any data to be exported.

If you do not know what functions of the bot can store data in variables, then you DEFINITELY have not configured any of them!

Further more... For those of you, who is not capable to make logical conclusions from the above, or prefer to ignore reality for the sake of their own desires:
If you have users in the bot, WITH data stored in variable and WITHOUT any data stored in variable, then ONLY those users will be exported, who actually HAVE the data stored in the variables. The rest will not be exported - despite the fact that they have a Telegtam ID and a Name.

AND LAST: one exported file will contain ALL the available data of ALL available users !!!!!!!!!!!!! Not the one user per export, not two, not three, but ALL - ALL AVAILABLE! We do not know how this concept can be explained more clearly, so there is NO NEED for further clarifications of this concept neither in the Support nor in the Tech Groups.
Because we really...

GettingTired.jpg

To connect, go in your bot:
☞ 🔐Admin | 🧩Extensions | 📂Logs and Data


Exported data


The list of exported data (typical):
● ID (user_id)
UserCode (user_code)
● UserName (username)
● First
name (first_name)
● Last name (last_name)
● Deleted - bot blocked by user (bot_blocked)
● Banned - user is banned by admin (is_banned)
● Variables - their data (by the name of variable)
● Number of Referrals - all levels (ref1, ref2, ref3, ref4 and so on)
● Referral Parent (ref_parent)

All data combined in .csv file which is sent by a bot to a chat with the admin. Files such as .csv can be open as the text, in any text editor, or in the form of spreadsheet in any applications supporting or working with spreadsheets (MS of Excel, OpenOffice, LibreOffice, FreeOffice).

The default column separator is a semicolon (;)

Not all spreadsheet editors correctly handle the ";" (semicolon) as a separator. Read below how to use a "," (comma) as a separator.


How to export data


Commands are used to export data. Depending on the selected command, you can export all available data or individual columns.

WARNING: one exported file will contain ALL available data of ALL available users !!!!!!!!!!!!!


Full export of all data

/varexp

ALL the data stored in the bot's variables, of ALL users who have them, will be exported to one file.

For those alternatively gifted, who have difficulties with understanding from the first time...
No need to come to support and ask: "10 exports is 10 people? And if I have 1000 people, I need 1000 exports?"
NO - you DO NOT need 1000 exports!
One single Export sends ALL (I repeat: ALL ) the available data, ALL (I repeat: ALL ) the available users with the saved data.

If your Bot has a large number of users or they have a large amount of data, the size of your Full Export file may exceed the maximum size allowed by the Telegram team for bots (bots have a limit on the file size they can send to chat). In this case, your bot, technically, will not be able to send you this file. Once again, we emphasize this limitation of Telegram itself. In this case, to reduce its size, we can place your export file in a ZIP archive. If the bot will not be able to send you even the archived file, then your export file will be uploaded to one of our servers. In a chat with the bot, you, in turn, will receive a link to this file. Just follow the link to download the file from our server. The file will be deleted from the server after you download it, or deleted within 24, if it has not been downloaded by you.

Export of data of your choice

/varexp var_name - exports data of a single column.
/varexp var_name1 var_name2 var_name3 - exports data of three columns.

Where var_name is the name of the variable whose data you want to export. The file will contain only User ID and the corresponding data of the specified variable (of ALL users who have data in the specified variable (I repeat ALL users data)).

The user_id column (containing Telegram user ID) - NOT exported by default. Specify it as one of the arguments if you need it in the export.

The sequence of command's arguments is not related to the sequence of columns in the export file.


Column separator variants


When exporting data, you can assign "," (comma), instead of ";" (semicolon) as a column separator (default is semicolon). It can help to open the .csv export file normally in mobile apps and Google Docs.

Use an additional parameter - the word "comma" when exporting. For example:
/varexp comma

The position of the comma argument relative to other possible command's arguments is irrelevant.


Additional commands


You can see tips on using the export commands right inside the bot:
/varhelp


Common mistakes when using export


Here are collected the most common examples of errors encountered when exporting data.

The bot does not send a file with data (although it did before)

If you know for sure that you have saved user data and previously have been exporting it, but suddenly your bot did not send the file, then, it means, your bot received Tempoban from Telegram. Wait until it is removed and then he will be able to send files again.

Characters instead of text in the export file

The file is open in the wrong encoding. Use Unicode UTF8 encoding - when opening the file in your spreadsheet application or text editor.

The data is not divided into columns and goes in one line in the export file

Try using a different column separator. Use a "," (comma) instead of the default ";" (semicolon) and vice versa.