Skip to main content
openDirectMessage resolves the DM conversation for one Slack member. Use it before sending a direct message when you only have the person’s Slack user ID.

Example

automations/open-slack-dm.automation.ts

Inputs

Output

Returns { alreadyOpen: boolean; conversation: SlackConversation }. Pass conversation.id to sendMessage. With preventCreation, Slack can reject the request if the two users have no existing DM.