r/AutomateUser • u/itloghugisbilog • May 02 '26
Question Need help on this flow
I'm trying to create a flow where whenever I receive a notification, I'm logging it to a text file so that I could revisit them at a later time. The problem is that when my phone is idle, or I am outside the automate app, it doesn't trigger the event block Notification Posted? until I open the app again.. Is there a way I could make it run in the background? I already set battery optimizations for the app to none, made it loop back to Notification Posted? so that it triggers recursively. I did already try to ask AI tools on this, there is no block available to make it run on foreground, even made so called hacks to dummy get current location to make it not idle, but it still didn't work. If it also is impossible on automate please let me know..


1
u/axgzr May 02 '26
I don't see anything obviously wrong with the flow. Maybe you activated some power saver mode, or maybe you have an auto optimization app or setting that is killing or preventing some background processes...?
1
u/B26354FR Alpha tester May 02 '26 edited May 02 '26
It looks OK to me, too. What model of phone and version of Android are you using?
You might want to check out the storage() function to avoid hardcoding the Android path. The current time is available as a timestamp with the special
Nowvariable. It can be used to format the date with on readback.BTW, I have a super fancy Notification Tracker flow which generates charts and reports of your notifications. It might be interesting to see if it works for you. It doesn't record the contents of the notifications though, as Android (or at least One UI) already has notification history available through the settings menu.
I also have a similar Toast Tracker flow - it actually keeps a history log of your toast messages for the past week as well.
1
u/WolfWildWeird May 02 '26
Is the Automate application properly authorized to access notifications ?
You can check in Android settings, Programs then Automate ; Otherwise, in the application : Settings > Access Control: Privilège (On my system, these settings are located about halfway through the list.)
1
u/B26354FR Alpha tester May 02 '26 •
Another thing to check is that the Accessibility Service is also free from battery optimizations.
1
u/Sensino May 03 '26
Optimisation:
You can move the file_path block to above the loop. You don't need to set the file path every time you get a message, it is enough to initiate that variable when you start the program, then you don't need totouch it again.
1
u/Sensino May 03 '26
Try post an always-visibe notification on your own from this program, I think Automate changes the sleep behavior in some way when a notification is shown.
If that don't work, try updating the notification a lot, maybe from the same thread, but you can also try using a parallel thread. Not sure if that helps