Slack Plugin issue
-
Re: Slack Plugin
Hello!
Having issues with the slack plug-in, Does anyone have it working? Im getting a invalid user and/or Channel passed error and I assume I have the format wrong.
Same issue as this post from 9 months ago
https://forums.fogproject.org/topic/10916/slack-plugin -
When you enter the channel, you must have the # in front, and for a user you must have the @ in front.
So you must have your token, and the user/channel you’re trying to send the messages to.
-
@Tom-Elliott when trying to enter user/channel format, the plug in states invalid user/channel passed. So if my user is called fogbot and channel is fogimaging, wouldn’t the format be @fogbot/#fogimaging or are there spaces in between? I even reset API token and generated a new one just in case that could have been it.
-
@jgallo It’s an Either OR, not both. You can only send to one user, or one channel, per slack account added.
-
So you would do:
User
Access Token: xoxp-sometokenfromslack
User/Channel to post to: @someuserChannel
Access Token: xoxp-sometokenfromslack
User/Channel to post to: #somechannel -
@tom-elliott That’s the thing, on the plug-in, it only has a field for access token and user/channel. So when using the format of @someuser/#somechannel under one field, the plugin returns an error stating that it’s invalid. Are you saying there should be two parts to linking a new account?
Also xoxb is the token assigned by Slack now and I just noticed that you stated xoxp. Could that make a difference?
-
-
@jgallo One account can link to either a user, or a channel. Not both.
-
@jgallo
in User/Channel to post to you either choose to sent it to a user or a channel.
You are setting the destination, the access token is going to make it send from your user. This integration doesn’t create a bot like other slack integrations. You could create a separate slack user called fogbot to connect this integration and that would make it send as a different user.
But lets say you don’t do that, here’s what will happen in 2 different fixesSo if you change
User/Channel to post to
to@fogbot
then it will send updates from your slack user in a direct message to fogbot in slack.
If you change
User/Channel to post to
to#fogimaging
then updates of imaging actions will send from your slack user to the #fogimaging channel.Hopefully that helps as I’m guessing that you’re thinking that you’re setting a user to post as because many other slack integrations require that. This one is a bit more basic as it just uses the user in the access token and sends it to a choice of destination.
So think of
access token
as the source andUser/Channel to post to
as the destination