I'm developing a slack app, and I'd like to allow the users who uses my app to customize specific settings, e.g. 3rd-party integration passwords.
How can this be done?
If you app needs to manage custom user settings you need to build that yourself.
UI to show and modify settings
Storage to store settings
You can use any approach for that, e.g. build the UI part within Slack (a Slack Dialog would work nicely) or make an external website.
You need to store state of the user settings someplace. I agree with Erik that you can build the UX within slack.
I don't think Slack has a great way to do store state right now, though I suppose you could create some hacky way of doing it (create a private slack channel for each user with a random name and store state in there).
I'd suggest using either a real database, or a service like Transposit (full disclosure, I work there). With the former, you could use something like Heroku Postgres, and host an API on Heroku. With the latter, you could use the Slack API combined with Dynamodb or some other database.
Related
I am trying to download the history messages for a specific Slack app, let's say MLflow.
I found a few open-source tools on Github but none of them actually work for me. It seems that slack has disabled ways for non-admin to create the access token since May 2020. Is there any way for the scraping script to work without tokens? WHat else can I do now?
You can try the app called Backupery for Slack
Disclaimer: I'm the developer of the app and the app is not free, but a free trial is available.
The app can help you to export any conversation from your Slack workspace, including direct messages between you and an app. For example, if I need to export the conversation between me and Jira Cloud app, I just need to select the conversation and export it:
Please also note, the app will automatically create an access token for you. By default, Primary Owner, Owners, Admins and Full Members are allowed to install any applications for Slack (and create access tokens). However, a workspace Admin or Owner may limit installations to pre-approved apps - in this case you will not be able to use the app as it will not be possible to install it.
I'm doing research for a new Slack app that will require the admin adding the app to paste an API token and request url for the third-party API which the app will call. I can't find anywhere in the Slack API docs to store these settings on an app-wide basis. Can this be done via environment variables of some type?
Slack Apps don't really store settings like that. You would need to persist them in a data store of your choice, like MySQL, Dynamo etc and access them from your code.
I'm designing the architecture for a Microsoft Teams app.
This app is an integration to a multitenancy platform that the customer can set up their own URL to access the system, i.e: https://app.customer.com/
I was wondering if there is a standard way to have a step on the app installation to set up the instance URL.
I understand I could design an app generator that would reside inside each customer instance and then deliver the manifest.zip to the customer to install it, but I feel we would lose all marketing and partnership opportunities that having it on the store would provide.
I couldn't find a standard way so I designed a proposed solution and wanted to validate it with the community.
I came with a list of issues and workarounds to work with a single app for the multiple instances based on what we've seen so far on Microsoft Teams documentation.
Issue 1: Accessible domains should be explicitly set on the manifest.json
Workaround: have a middleware in a fixed URL that handles all requests made by the app and route to the customer site
Issue 2: There is no standard step on an app installation to set up the instance URL
Workaround: Design a static tab that would handle the configuration, so in that tab, the admin would need to set up any
configuration like instance URL
Issue 3: After installation, the feature will be available for the users even before admin did the setup to define the customer instance URL to be used.
Workaround: Make all designed interactions (i.e.: Tabs configuration page, bot response, actions, cards, etc... ) have a
response to the user saying there are pending configurations in case
the admin did not set the URL yet
What is the best approach to manage app ownership in Slack?
Currently all devs in our team create their apps under their own Slack accounts. The risk with this is if they leave the company and their account gets closed then the apps they created will cease to work.
This must be a common solution but I couldn't find a definitive document with a good solution.
What would you recommend?
Here is what I would suggest for managing ownership of app development.
For this discussion we need to distinguish between
creating a Slack app
installing a Slack app.
Those are different concepts which need to be handled in different ways.
Creating a Slack app
A new Slack app is always created in a workspace and belongs to the user that created it. If that user leaves the workspace (or goes on a longer vacation) the Slack app can no longer be managed.
This risk can be mitigated by adding collaborators to every Slack app. Collaborators have the same rights (e.g. delete an app) and will keep their access when the initial creator is deactivated.
As the documentation states:
Slack apps are owned and contained by the team they are created on.
Slack apps may have multiple App Collaborators associated with it, and they can review & manage the application record. They can also add or remove other collaborators.
To further mitigate the risk of losing access to Slack app it might be prudent to create a dummy admin user that has to be added to every Slack app as collaborator. That way you won't loose access to your Slack app even if multiple users leave the workspace.
Installing a Slack app
When the creator or collaborator of a Slack app gets deactivated his app will automatically be uninstalled if he was also the installer. As it says in the documentation:
One caveat: this exception doesn't apply to the folks who created an
app or were added as an App Collaborator. When they leave, the app is
still uninstalled. Same goes for when an app uses additional scopes
beyond the ones listed above, taking on the behavior of a user.
One way to avoid this situation is to use a dummy admin account for app installation instead of the actual user.
Is there a way to allow the user to add additional items to one group in the settings bundle? Specifically, I a would like the user to be able to specify a list of URLs and Site Names within Settings. The functionality is almost exactly the same as the Twitter app that allows for a list of usernames and passwords and in the mail app where the server name, inbound and outbound email server names/addresses are maintained. I am familiar with doing this with archive, CoreData and SQLite within the app, but would prefer to keep key settings outside the app as I would like to intentionally distance the config data from the user interface.
Thanks
Derrick
Unfortunately you're pretty limited with what you can do in the settings. There isn't any way to run code, so there can be no add buttons or changes to the model - its basically predefined key value pairs. Twitter and mail are first-party apps so they can do things in settings the rest of us can't.