Sending Slack messages as user?

I was wondering if there was a way to post messages on Slack without using a bot, directly from a user’s account. I don’t seem to find a way to do that and bots are not always the most suitable (or possible) option, specially in workspaces where you can’t approve the bot.

It feels strange because nothing would stop me from copy&paste messages across workspaces and there are legit scenarios such as posting announcements about events on channels that are targeted to that.

What am I missing?

This option?

Hey @JFQueralt!

You can do this in two ways.

  1. OAuth Authentication: If you’re using the OAuth authentication method, the node will send a message as a user.
  2. Access Token: If you’re using Access Token, you can use the User OAuth Token. If you have the Bot OAuth Token, you can select the option that Ivan shared above

@ivov @harshil1712

That solution works only in both cases it requires to have an App installed in the destination workplace, which is the main problem (I may have articulated the problem wrongly).

I am trying to send a message as a User on other workplaces where I may not have Admin permissions (as regular users wouldn’t be able to approve app if proper security measures are implemented).

Thoughts?

OK, I just tested creating a separate credential and maybe the problem here was that I didn’t (possible still don’t) totally understand the way the Slack Apps work.

I was able to create a new App and attach it to a workspace where I don’t have Admin permissions. I am a bit confused with it so that means more research.

Will circle back to close the thread once I am clear.

OK, I wasn’t so crazy: Workspace still have the last word to decide if an App can be installed (which in fact makes a lot of sense).

Any way to overcome this?

Only if you go the unconventional way i think

@Damian_K unveil your secrets.

Use the Slack web app, Send a message, Capture the request, Simulate it in let’s say Postman, Make it work, Replicate it in N8N

3 Likes

That’s some good dark magic there.
:dancer:

Will check it, thx.

Any news on allowing to send messages directly as a user?
(The bot-way does not work as a general solution)

As a random user in the channel or as you?

I would guess that he wants to send it on behalf of someone else on the team? Because you can send a message as you. Unless I’m missing something.

As myself.

For now, all sending options are through a bot (Token or OAuth authentication alike) and that requires having permissions to install bots in each workspace.

You can send block messages via the Block Kit page and that goes as oneself (can select all workspaces and then the destination channel).
It is therefore possible to accomplish, just doesn’t seem to be an option on current Slack node.

Unless I am missing something, which is quite possible.

Note: For anyone wanting to try the Block Kit Builder:
https://app.slack.com/block-kit-builder/

I did wonder if that was the case but it wouldn’t be very good if someone could randomly send a message as another user.

Doesn’t it need each user to go through the Auth process so the user can grant the permission for the app to send?

Correct, you should only be able to send messages from accounts that you control; and that’s the intention here.

The point is to not need an app to send the message, rather to do it directly on behalf of your own user (which as mentioned above is possible via Slack API and can be tested with the Block Kit Builder).

Perhaps using incoming web-hooks?

That solution seems to still need to have app permissions for each workspace.

I can’t wrap my head around the fact that Slack wouldn’t allow to authenticate a connection as a user and then let you post via API.

Maybe the trick is that it can only be done via Web API?

You still need a token for that one which need and admin to create but would do the job.

Same deal with a web hook, I think the main problem might be with how slack works. User accounts are treated as unique between workspaces whereas with say Discord you have one user account and use that to join channels.

There was a feature in Slack where you could email a channel so you could have had a private channel for your users and a bot post a message and have it picked up by n8n then emailed to the channel addresses but it would look a bit crap.

What I have been looking at doing is creating one bot that I add to our various slack instances so I can post once and add a reaction to it and based on that post it in other channels as the bot.