Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Slack bot cannot post message to private channel

I follow Slack bot post message documents

it works perfectly when post to public channel, but get error [error] => channel_not_found when post to private channel, I even change channel_name to channel ID (ex: G1HCG4BQ9)

I already authorized with both chat:write:user and chat:write:bot permissions

like image 556
ytdm Avatar asked Apr 07 '17 02:04

ytdm


People also ask

Can Slack bot send direct message to user?

You may see Slackbot in channels throughout your workspace, delivering reminders and automated messages for you and your teammates. When there's a reminder or a message just for you, Slackbot will send you a DM. You can access your DM with Slackbot the same way you would find a DM with anyone else in your workspace.

What is Slackbot in Slack?

Enter Slackbot—our friendly chatbot that welcomes you into Slack, dutifully sends you reminders, and tries to answer any product questions. While these functions are no doubt helpful, there's an additional feature called custom responses that lets you mold Slackbot to your individual workplace.


1 Answers

Did you invite the bot to the channel? A bot can't post in a private channel if it's not a member - you need to invite it to the channel like you would a person.

@YourBotsName will do it!

like image 144
Sam Mullin Avatar answered Sep 18 '22 06:09

Sam Mullin