Slack > Applescript/JS on new DM?

205 views Asked by At

I'm trying to do some automation on new slack DM, (I'm using Applescript with some JS code),

I can read the numbers of unread message with this AppleScript

tell application "Safari"
    
    set unreadmessage to do JavaScript "document.getElementsByClassName('p-channel_sidebar__badge c-mention_badge c-mention_badge--black')[0].innerHTML;" in tab 2 of window 1
    
end tell

But I can't tell who that message was sent from and how to action it and reply to it

-- Slack API is not an option for me since disabled by my organisation

enter image description here

0

There are 0 answers