dosubot[bot] commented on issue #29480:
URL: https://github.com/apache/superset/issues/29480#issuecomment-2207685012

   <!-- Greeting -->
   Hey there, @PuszekSE! I'm here to help you with any bugs, questions, or 
contributions you have. Let's work together to resolve this issue.
   
   <!-- Answer -->
   To resolve the issue of sending notifications via Slack failing due to a 
deprecated Slack API method in your Superset deployment, you should update your 
Slack app to use the new API methods. Specifically, you should replace the 
deprecated `files_upload` method with the new `files_upload_v2` method.
   
   Here is the relevant part of the code that shows the use of the new method:
   
   ```python
   # files_upload returns SlackResponse as we run it in sync mode.
   for channel in channels:
       if len(files) > 0:
           for file in files:
               client.files_upload_v2(
                   channel=channel,
                   file=file,
                   initial_comment=body,
                   title=title,
               )
       else:
           client.chat_postMessage(channel=channel, text=body)
   ```
   
   Ensure that your Slack app has the necessary permissions and scopes to use 
the new API methods. If the new method fails, the code falls back to the 
deprecated method, but this should be avoided by updating your Slack app 
configuration 
<sup>[[1]](https://github.com/apache/superset/blob/master/superset/reports/notifications/slack.py)</sup>.
   
   
   <!-- Dosu Comment Footer -->
   *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to