supporttracker’s documentation

supporttracker is a Python package that can be used to read messages from Slack and extract specific massages and fields from those messages.

supporttracker client

class supporttracker.client.SlackClient.SlackClient

A client that can read messages, retrieve user id, channel id, etc.

Environment variables

  • SLACK_API_KEY: The API key for your user in slack.
get_channel_id(channel_name: str)

Find the channel id from the channel name.

Parameters:channel_name – name of the channel
Returns:channel id
get_messages(channel_name: str, min_date: datetime.datetime, max_date: datetime.datetime)

Get messages in a range of datetime.

Parameters:
  • channel_name – name of the channel to look for the messages in
  • min_date – minimum date to look for the messages
  • max_date – maximum date to look for the messages
Returns:

return a pandas dataframe containing the messages and their fields

get_team_id(team_name)

Find the team id from the team name.

Parameters:team_name – name of the team
Returns:team id
get_user_id(user_name)

Find the user id from the user name.

Parameters:user_name – name of the user
Returns:user id
get_user_id_workflow(user_name)

Find the user id from the user name for a workflow user.

Parameters:user_name – name of the user
Returns:user id
get_user_name(user_id)

Find the user name from the user id.

Parameters:user_id – id of the user
Returns:user name

supporttracker extractor

class supporttracker.extractor.SupportExtractor.SupportExtractor(request_manager_names, request_filter, request_template_main, request_template_thread)

A class that can parse and extract support requests.

extract_requests(messages: pandas.core.frame.DataFrame)
Parameters:messages – A dataframe of all messages to be analyzed
Retrun:A dataframe analyzed and ready to be pushed to support track sheet