You want a script to post a deploy notification, a status update or a moderation action into some self-hosted app. The lazy path is reusing your own login. It already works, and it is one less thing to set up. It is also the wrong call the moment that credential lands in a config file, a cron job or a CI pipeline. Here is the pattern that avoids it, using a real self-hosted chat app's bot accounts as the example, plus the lessons that apply whatever you are automating.
Three concrete problems, not just a vague "best practice":
The self-hosted apps that get this right do not invent a separate bolt-on auth system for automation. They give it a real account in the existing user and permission model, authenticated differently. Outpost, a self-hosted Discord alternative, is a clean example. Its API bot accounts are real members with real roles. The only difference from a human member is that they authenticate with a long-lived token instead of a password, over the same REST and gateway API any client uses. No parallel bot-only API surface to maintain. No special-cased permission model to reason about separately.
That is the shape to look for. Or to build, if you are the one adding automation support to something:
It is tempting to hand a new automation account an admin or owner-equivalent role so you never think about it again. Do not. The blast-radius point above applies to the role you grant, not just the account you grant it to. A deploy-notification bot needs permission to post in one channel. Full stop. Work out the real minimum before you wire in the credential, not after something goes wrong.
bw create item with item type 1, a login. It saves
the username and everything else. Just not the secret you needed stored. The same call works correctly as a
personal, non-org item. If a freshly created login item in your vault is missing its password with no error
anywhere, check whether it landed in a shared collection before you blame the credential. It is very easy to
lose ten minutes suspecting the wrong thing. The password manager guide
has the base Vaultwarden setup this applies to.
Once you have a scoped, independently revocable credential, treat it like any other secret. A password manager entry, as a personal item per the warning above, or your CI system's own secret store. Never committed to a repo. Never pasted into a chat message or an issue thread to "share it with the team". If the automation runs somewhere with standing SSH access, a plain environment file readable only by the service's own user is a reasonable fallback. A real secret store beats that whenever one is available.