-
Notifications
You must be signed in to change notification settings - Fork 16.6k
Description
Apache Airflow Provider(s)
slack
Versions of Apache Airflow Providers
No response
Apache Airflow version
main
Operating System
macOS
Deployment
Other Docker-based deployment
Deployment details
No response
What happened
SlackAPIFileOperator does not allow using content and filename together.
When the operator is used without filename, the file appears in Slack as "Uploaded file".
Our team finds this not user-friendly, so we cannot use the provider's operator and instead call the Slack API directly.
What you think should happen instead
When uploading content via content, we should be able to pass filename as the display name shown in Slack.
The Slack API supports this combination.
The operator should allow content and filename together in this case, while keeping the existing behavior when filename is used as a file path.
How to reproduce
Create a DAG with SlackAPIFileOperator using both content and filename.
This raises: ValueError("Either file or content must be provided, not both.").
Using only content without filename results in the file being shown as "Uploaded file" in Slack.
Anything else
I couldn't find a strong reason for disallowing content and filename together.
If there isn't one, I'd like to fix this.
Please assign this issue to me.
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct