Can I use SmartThings to run bash scripts on my Raspberry PI

Give OmniThing a try. I know it is capable of running scripts on a RPi, as the author of OmniThing, @leinax, is doing exactly that already.

[RELEASE] OmniThing v0.5.0 - ESP8266/ESP32/RaspberryPi/Linux/Windows - A cross-platform successor to ST_Anything - Web-based Configuration Tool