Here's the code I used to integrate my local Selenium tests with BrowserStack's Automate. Their documentation and customer support helped me achieve it.
I tried to follow the OSSRH guide but I had lots of issues. I hope this "guide of the guide" saves you time and frustration. Examples and commands included.