Explains a way to send OK Google commands.
I wanted to automate sending commands to OK Google, for example "today's weather" to listen to a weather forecast. It didn't seem to be possible to do this through different methods I tried. Then I thought of a simple solution and that was to just record my voice with the commands and just play them to run commands. I tried this and it work perfectly.
I ended up creating a flow which would work as an alarm in the morning which runs the commands "Play news" and "Today's weather"
How to create recording of command
1. Open voice recorder app on your phone
2. Record your voice saying "Ok Google" (or your wakeup command) and "Play news"
3. Open your ringtones and add the voice recordings to your ringtones
4. Open the automate flow and select the voice recording on the play sound blocks
OK Google must have the following enabled "access with voice match" and "unlock with voice match" - This allows it to work when your phone is locked.
I hope this helps someone who is trying to do the same.
If there is a better way to send OK Google commands then please do let me know.
Rate and review within the app in the Community section.