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
"""
    Send a file to a slack channel
    Examples:
    .. code-block:: python
        # Send file with filename and filetype
        slack = SlackAPIFileOperator(
            task_id="slack_file_upload",
            dag=dag,
            slack_conn_id="slack",
            channel="#general",
            initial_comment="Hello World!",
            filename="hello_world.csv",
            filetype="csv",
        )
        # Send file content
        slack = SlackAPIFileOperator(
            task_id="slack_file_upload",
            dag=dag,
            slack_conn_id="slack",
            channel="#general",
            initial_comment="Hello World!",
            content="file content in txt",
        )
    :param channel: channel in which to sent file on slack name (templated)
    :type channel: str