the100rabh / Slack-Export-JSON-to-CSV

Convert Slack messages exported in their complicated JSON format to simple CSV format
The Unlicense
12 stars 10 forks source link

Does not work with SlackBot #4

Open calebbraun opened 6 years ago

calebbraun commented 6 years ago

The script fails because we have a Slackbot auto reply in our channels: Error:

Traceback (most recent call last):
  File "slack_json_to_csv.py", line 54, in <module>
    user_cur = user[item["user"]]
KeyError: 'USLACKBOT'

Example message in json

{
         "text": "That's just, like, your opinion, man.",
         "type": "message",
         "subtype": "slackbot_response",
         "user": "USLACKBOT",
         "ts": "1510321670.000102"
},
almccon commented 1 year ago

@calebbraun I sort of solved this by editing the users.json file an adding this line to the array of objects:

{"id":"USLACKBOT","name":"Slackbot"},