To reuse an existing Windmill Slack integration, you can leverage the permissions model and the webhook functionality provided by Windill. Here's how you can manage it:
Assign Resources to Slack Group: Ensure that resources and variables you want to use with Slack are shared with the group in Windmill. You can do this by adding them to a folder that is part of the group. This allows the Slack integration to interact with these resources (1).
Use Webhooks: Windmill provides autogenerated webhooks for each Script and Flow. These can be triggered from Slack to execute specific scripts or flows. This means you can set up Slack commands that, when used, will send a POST request to the associated webhook URL to run the desired automation (2)(3).
Trigger Flows with Slack Commands: If you want to trigger a specific flow from Slack, Windmill allows you to build a Slackbot that can handle multiple commands. You can leverage branches in the flow to handle different commands and use the contextual variable
WM_USERNAME
WM_USERNAME
to get the username of the Slack user triggering the workflow (4).
Remember, you must have the Slack integration set up in your workspace settings to connect Slack with your Windmill account. Once set up, you can assign scripts or flows to the command in Slack, and they will respond accordingly when the command is executed.
For more detailed guidance on how to specifically set up and handle Slack commands within Windmill, you can refer to the article on building a Slackbot with