WindmillWWindmill
Powered by
bluecoconutB
Windmill•3y ago•
3 replies
bluecoconut

Slack Resource - Bot vs. User Tokens

I just went to add, on a self hosted instance, the oauth for slack and was hoping to make an easy slack-bot to send messages "as windmill" to my slack.

I was able to easily make the slackbot application, and go through the process of getting keys and updating my oauth config, but ran into difficulty after making the resource in windmill. (It worked, but did what i didn't expect)

My struggle was trying to figure out what scopes to use // how to get the actions to post as the "bot" vs. "the user" that did the oauth flow.

My solution:
Specifically, i ended up making 2 resources -> Both were created identically (click on resource -> oauth flow -> approve as user -> save as 2 different named resources)
But then once they were created, i went to the second one, and edited the underlying secret variable, to be the "bot token" in order to have a bot-resource.

I'm not sure if this was the right way to do this, since it felt like a weird UX path, and wanted to post here to ask.. is this the expected behavior?

I found this flow for setting up was non-trivial, i kinda wish that sending as the "bot user" was the standard (and not sending as the user).

OR! I might not be using the APIs correctly, and I'm kinda curious, what is the best way to do this? Is what I did seen as an anti-pattern? (I tried using the slack api with flags like
as_user=False
as_user=False
and this failed (i think since it was a user token, not a bot token))

Regardless, things are working, so this isn't a big issue, just wanted to raise for the conversation / find out what the expected flow / UX experience to be.
WindmillJoin
3,362Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements
Recent Announcements
henri-c

Weekly kenote to tell you about our latest updates https://discord.com/channels/930051556043276338/1278977038430240813 https://youtube.com/live/2dGd9TdT8xs?feature=share

henri-c · 4d ago

Pyra

### HTTP tracing (EE) Capture HTTP requests made by job scripts as observability spans Features: - View HTTP request traces (method, URL, status, timing) in the job details UI - Auto-instrumentation for Native TypeScript, MITM proxy for other languages - Integrates with external OpenTelemetry collectors changelog: https://www.windmill.dev/changelog/http-tracing docs: https://www.windmill.dev/docs/advanced/instance_settings#http-tracing Additionally jobs memory metrics are now fully OSS!

Pyra · 2w ago

henri-c

First keynote of the year here https://discord.com/channels/930051556043276338/1278977038430240813 🙂

henri-c · 4w ago

Similar Threads

Slack Bot Development in Windmill
Stefan-neoSStefan-neo / help
2y ago
Resource vs (Secret) Variable
ym1198Yym1198 / help
3y ago
Is there any documentation on interacting with the Slack resource with python?
KathrynKKathryn / help
3y ago
Slack error handler: Resource exists but you don't have access to it
invakid404Iinvakid404 / help
2y ago