Is it possible to send a private slack message with the slack pack?

#1

I would love to send private slack messages from coda as well, is it possible somehow? As of know you have to provide channel, but is it something I can write in the channel for it to be sent as a private message?

0 Likes

#2

Great question @Tomas_Jansson! Yes, you can send direct messages by using the Slack user’s handle, eg @lane. Here’s a quick screenshot:

0 Likes

#3

Of course :). Should have tried that. You should add that to the placeholder text to make it obvious.

0 Likes

#4

Tried it now and it works fine when the person name doesn’t contain space or “åæø”. Do I need to escape any characters for private messages?

0 Likes

#5

Did you manage to solve this issue? Facing the same ATM. Thanks!

0 Likes

#6

Nope, could figure out how to send to “complex” names. Maybe @lane knows?

0 Likes

#7

Sorry for the delay @Tomas_Jansson and @Jaroslaw_Stefanski, missed the original reply!

Unfortunately right now this is not supported due to some limitations in the Slack API. We’re working with them to resolve and will update this thread when we make more progress.

0 Likes

#8

can’t you just use the Slack member id? you can copy it from the user’s profile or pull it from the user.list slack api call. some examples in Slack’s documentation like this page: https://api.slack.com/methods/users.identity but user ids start with U

0 Likes

#9

I never tried and think that should be possible. The point here is more about giving feedback on something that should work in coda. The API workaround is too much work for me to be worth it.

0 Likes

#10

I hear you.

But this might be easier than you expect. Check this page out. https://api.slack.com/methods/users.list/test

Just make sure you’re logged in and picking the correct workspace from the drop down at the top right and click the “test method” button after the list of fields. you don’t need to add any data, all your users will be returned as a JSON object including their user ids.

I’ve setup a Zapier push (chrome extension) that parses all my Slack users and adds them to a table in Coda with their name, slack avatar, email and slack member id. I’m using a few lines of Javascript to only keep the part of Slack’s JSON response that I care about and then map that to Coda fields. All of this is pick-and-click in Zapier except for the bit of code that massages the JSON (about 20 lines but 80% is Slack JSON to smaller JSON mapping)

Works like a charm!

1 Like