by P. Andreas Schmidt, IVE
Version 2 (April 18, 2024)
Download (116 downloads)
ATTENTION: Google made this impossible, these functions are no longer available, let's complain to get them back again!
Non-Premium (25 blocks)
No-root
Needs free Tasker plugin MailTasker by M. Stornelli (https://play.google.com/store/apps/details?id=com.balda.mailtask)
At the moment, AM doesn't support reading emails, yet. Fortunately with this free Tasker plugin can you get the text and also mark emails read etc. This is more of an example flow for you to toy with. I use it to read out a set of emails from a label whilst I'm on the road. It also has a regex to split text without breaking sentences. Enjoy!
Setup:
1) install plugin, grant permissions (there's no check done, the flow will simply "crash" without, from the start...)
2) configure your email account as well as labels or other criteria for finding emails, in blocks 2, 40 & 93 (this last is just a copy of 2, so just delete it, copy & paste 2, reconnect)
3) if necessary change language and messages in speak/recognize blocks. If your emails aren't in one language only, check out my detect language flow to get right language for speak block and voila! (I do this, it works: https://llamalab.com/automate/community/flows/41150)
Explanation:
* The speak block in AM is limited to 4000 symbols. That's why there's a for each where the length is checked and if necessary split it up into smaller chunks. This is done through a regex that will not cut off in the middle of a sentence, so the text will be read out intact. You can obviously adapt that to be smaller parts, or at every line break.
* You obviously don't have to keep my Bluetooth system that listens for play/pause and next keys, but it's handy when in the car, I find. You could also adapt it so that instead of going to the "next" email it would go to the "next" chunk of text (especially interesting if your email contains different messages and you split them accordingly).
* It will ask at the end if you want to stop, rather than listen to the next one. I find this more practical in the car, since that way I don't actually have to say anything for the flow to read out the next mail.
Problems, comments, suggestions etc welcome!
V2: added in a delay block because it takes some time before the email is marked as read and otherwise you'd get the same email twice... You could of course place the fetch and check for new messages after asking if you want to continue, that way it's definitely marked as read but I found it better to know beforehand that there aren't any new messages.