The SlackAPIFileOperator is not straight forward and it might be better to add an example DAG to demonstrate the usage.

airflow/providers/slack/operators/slack.py
:param initial_comment: message to send to slack. (templated)
    :type initial_comment: str
    :param filename: name of the file (templated)
    :type filename: str
    :param filetype: slack filetype. (templated)
        - see https://api.slack.com/types/file
    :type filetype: str
    :param content: file content. (templated)
    :type content: str
    """
    template_fields = ('channel', 'initial_comment', 'filename', 'filetype', 'content')
    ui_color = '#44BEDF'
    def __init__(
        self,
        channel: str = '#general',
        initial_comment: str = 'No message has been set!',
        filename: str = None,
        filetype: str = None,
        content: str = None,
        **kwargs,
    ) -> None:
        self.method = 'files.upload'
        self.channel = channel
        self.initial_comment = initial_comment
        self.filename = filename
        self.filetype = filetype
        self.content = content
        self.file_params = {}
        super().__init__(method=self.method, **kwargs)
    def construct_api_call_params(self) -> Any: