I have written a bash script it process some data and puts in one file. My intention is to give slack alert if there is content in that file if not it should not give the alert. Is there a way to do it?

Can someone help me on this.

There is no easy way to do conditional steps like this in Concourse. If you are using the slack alert resource then you are limited to conditionals based on the state of the previous step (such as on_success or on_failure)

To do what you want you would probably need to write a custom script that only makes the slack API call when the file has contents.

Thank you for the response !!