Home

Awesome

Webex Space Archiver

Because of a 'refocus' this repository will no longer be maintained by myself. Many thanks to the kinds words received from the users and the feedback they have been providing over the past years!

Important Release v30!** (check out new features in the release notes)

Features

Start

Configure

Release notes

Troubleshooting

Feedback & Support

<img src="https://camo.githubusercontent.com/7a785e6fab9f9040fb3739fdc2df1284b3ef199c7450b3d379716b365a37156f/68747470733a2f2f7374617469632e70726f64756374696f6e2e6465766e6574636c6f75642e636f6d2f636f646565786368616e67652f6173736574732f696d616765732f6465766e65742d7075626c69736865642e737667" alt="published" data-canonical-src="https://static.production.devnetcloud.com/codeexchange/assets/images/devnet-published.svg" style="max-width: 100%;">

Archive Cisco Webex space messages to a single HTML file. NOTE: This code is written for a customer as an example. I specifically wanted 1 (one) .py file that did everything. It's not beautiful code but it works :-) Feedback? Please go here and let me know what you think!

VIDEO

How to use & Demo

SCREENSHOT

Example HTML file of an archived Webex space:

                    <img src="https://raw.githubusercontent.com/DJF3/Webex-Message-space-archiver/master/webexteams-archive-screenshot.jpg" width="600px">

REQUIREMENTS

<a name="features"/>

Features

It doesn't:

NOTE:

<a name="start"/>

Start

  1. Meet the requirements

  2. Run the script (python webex-space-archive.py) to create the configuration file "webexspacearchive-config.ini" (if it does not exist)

  3. In the webexspacearchive-config.ini file, save your developer token or (👍better!) create an environment variable called "WEBEX_ARCHIVE_TOKEN" with your token

  4. Run the script: python webex-space-archive.py

parameter
nothinguse standard configuration .ini file
CONFIG_FILEuse non-standard configuration .ini file<br>testspace.ini
SEARCH_STRINGsearch for space name to get the space ID<br>ciscolive
SPACE_IDuse this SPACE_ID with standard configuration .ini file<br>Y2lzY29zcGFyazovL3VzL0lfS05FVy95b3Vfd291bGRfdHJ5X2hhaGE
CONFIG_FILE SPACE_IDuse non-standard configuration .ini file and provided SPACE_ID<br>a combination of examples above
SPACE_ID CONFIG_FILEuse non-standard configuration .ini file and provided SPACE_ID

UPGRADE? Replace the .py file and keep the configuration file (.ini). To get changes in the .ini file, run the script once without .ini file and it will create one for you with the latest remarks and features.

<a name="configuration"/>

Configuration

Edit the following variables in the python file:


Personal Token: you can find this on developer.webex.com, login (top right of the page) and then scroll down to "Your Personal Access Token". NOTE see the 'NOTE' section above to see how you can also use an environment variable to store your token!

mytoken = "YOUR_TOKEN_HERE"

NOTE: This token is valid for 12 hours! Then you have to get a new Personal Access Token.


Space ID: To find this, first save your developer token in the .ini file. Then run the script with a search arguments as a parameter. It will list all spaces+spaceId that match you search argument. Alternatively: go to Webex Developer List rooms, make sure you're logged in, set the 'max' parameter to '900' and click Run. If you don't see the RUN button, make sure 'test mode' is turned on (top of page, under "Documentation") TIP: to get the space ID of a space that you are in, in the client go to help / copy space details. Then in Webex talk to the bot "spaceidbot@webex.bot" and paste the space details. In return you get the space ID to be used here

myspaceid = "YOUR_SPACE_ID_HERE"


Downloadfiles: do you want to download images or images & files? Think about it. Downloading images and files can significantly increase the archive time and consume disk space. Downloaded images or files are stored in the subfolder. Options:

downloadfiles = info


UserAvatar: Do you want to show the user avatar or an icon? Avatars are not downloaded but linked. That means the script will get the user Avatar URL and use that in the HTML file. So the images are not downloaded to your hard-drive. Needs an internet connection in order to display the Avatar images.

useravatar = link


Max Messages: Restrict the number of messages that are archived. Some spaces contain 100,000 messages and you may not want to archive all of them. To archive the last 5000 messages:

maxtotalmessages = 5000


OutputFilename: Enter the file name of the output HTML file. If EMPTY the filename will be the same as the Archived Space name (recommended).

outputfilename = yourfilename.html


Sorting: of archived messages.

sortoldnew = yes


OutputJSON: Besides the .html file, how would you like to store your messages?

outputjson = no


DST: Besides the .html file, how would you like to store your messages? Both EU and US examples are shown in the .ini file.

dst_start = L,7,3 (last Sunday of March)

dst_stop = L,7,10 (last Sunday of October)


Blurring: Blur names and email addresses in html file

blurring = yes

<a name="troubleshooting"></a>

Troubleshooting

Most of the errors should be handles by the script.

<a name="releasenotes"></a>

Release Notes

For old releasenotes click here

Enhancements in release v30 - March 19th 2023

Overall: increased output quality and precision. Support for DST, privacy blurring, bulk processing

Important Enhancements - all based on user requests

IMPROVEMENTS

FIXED

NOTE

Info

<a name="feedback"/>

Feedback & Support

Submit here, open an issue or if you know my email address: send a message on Webex (not via email!).