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


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?



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



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



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?



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



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



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.



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: but user ids start with U



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.



I hear you.

But this might be easier than you expect. Check this page out.

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