Read application notifications

tienquan1288

New member
I have two banking apps. I want to create a macro to read a part of the content I want (For example, I only want to read the added amount), how should I do that? Hope everyone can guide me
 

hsurB

Well-known member
Save notification text to string variable. Next use text manipulation action and ask chat gpt to generate regex for macrodroid to save from notification whatever you want and save it in variable again. Thats it.
 

tienquan1288

New member
Lưu văn bản thông báo vào biến chuỗi. Tiếp theo, sử dụng hành động thao tác văn bản và yêu cầu chat gpt tạo biểu thức chính quy cho macrodroid để lưu khỏi thông báo bất cứ điều gì bạn muốn và lưu lại vào biến. Đó là nó.
Thank you very much. But I'm new to this app so I don't understand how to do it. Can you guide me more specifically?
 

hsurB

Well-known member
Sure.
Trigger: Notification recieved (choose apps and text they have to contain)
Actions:
Set variable action - Create global string variable named whatever you want (click 3 dots and find notification text)
Text manipulation action - Extract - At the top choose your variable, in the middle paste regex generated by chat gpt and save it in the same variable

And then this variable will contain whatever you wanted to be extracted from notification and you can use it everywhere in macrodroid.
I have macro written that based on notifications saves it all in excell file although managing excell file with write file action is tricky
 

tienquan1288

New member
Sure.
Trigger: Notification recieved (choose apps and text they have to contain)
Actions:
Set variable action - Create global string variable named whatever you want (click 3 dots and find notification text)
Text manipulation action - Extract - At the top choose your variable, in the middle paste regex generated by chat gpt and save it in the same variable

And then this variable will contain whatever you wanted to be extracted from notification and you can use it everywhere in macrodroid.
I have macro written that based on notifications saves it all in excell file although managing excell file with write file action is tricky
Do you use telegram? I can communicate with you there. Hope you help
 

hsurB

Well-known member
No, I don't. But we'll try our best to help here if you have more questions. I highly recommend spending some time using and having fun with macrodroid to better understand all the features, its worth it.
 

tienquan1288

New member
No, I don't. But we'll try our best to help here if you have more questions. I highly recommend spending some time using and having fun with macrodroid to better understand all the features, its worth it.
Do you use any apps that can send photos quickly?
 

hsurB

Well-known member
Save entire notification into variable and send here as text, please. Without any personal data tho - change it for some random letter if theres any
 

tienquan1288

New member
Save entire notification into variable and send here as text, please. Without any personal data tho - change it for some random letter if theres any
Thông báo biến động số dư
TK 01xxx888|GD: +657,500VND 24/10/23 18:05 |SD: 3,294,254VND|TU: 19033897971018|ND: Thanh toan HD 005105 tai In Tien Quan FT23297755703087 Trace 313692

Số dư TK VCB 9981118102 +15,000 VND lúc 24-10-2023 19:26:17. Số dư 80,000 VND. Ref TKP#intienquan#456861.241023.192617.QR - Thanh toan tai InTienQuan
 

hsurB

Well-known member
I am not too good at creating regex myself(I always use chat gpt to generate it for me, it requires testing), but chat gpt says this one below:
\+(\d{1,3}(?:,\d{3})*(?:\.\d{2})?)\s*VND
works for both your notifications and after testing it, it seems to be right.
Use text manipulation action - extract text and as I said earlier, at the top should be your variable (pick it from list that appears after clicking [...]).
Regex I sent in the middle and at the bottom save it to the same variable you used at the top.
Let us know if You managed to do it, although I am not sure if this regex will work for all of your others notifications thats why it would be easier for you to ask him directly,
 

tienquan1288

New member
I am not too good at creating regex myself(I always use chat gpt to generate it for me, it requires testing), but chat gpt says this one below:
\+(\d{1,3}(?:,\d{3})*(?:\.\d{2})?)\s*VND
works for both your notifications and after testing it, he seems to be right.
Use text manipulation action - extract text and as I said earlier, at the top should be your variable (pick it from list that appears after clicking [...]).
Regex I sent in the middle and at the bottom save it to the same variable you used at the top.
Let us know if You managed to do it, although I am not sure if this regex will work for all of your others notifications thats why it would be easier for you to ask him directly,
I'm really sorry, but I just learned about the app so I don't know much. I use Google translate so I don't understand some sentences. Can you help me too?
 

Attachments

  • Screenshot_2023-10-24-22-21-03-35_2e840d222d67ef3caca3a1c67d71d48f.jpg
    Screenshot_2023-10-24-22-21-03-35_2e840d222d67ef3caca3a1c67d71d48f.jpg
    268.2 KB · Views: 8
  • Screenshot_2023-10-24-22-20-56-56_2e840d222d67ef3caca3a1c67d71d48f.jpg
    Screenshot_2023-10-24-22-20-56-56_2e840d222d67ef3caca3a1c67d71d48f.jpg
    374.2 KB · Views: 8

hsurB

Well-known member
1. Notification recieved - select your apps here and make sure VND is in notifcation
2. Set variable the same as I did on screenshot
3. Use text manipulation action as on other screen
 

Attachments

  • Screenshot_20231024_172732_MacroDroid.png
    Screenshot_20231024_172732_MacroDroid.png
    507.8 KB · Views: 7
  • Screenshot_20231024_172743_MacroDroid.png
    Screenshot_20231024_172743_MacroDroid.png
    206.5 KB · Views: 7
  • Screenshot_20231024_172753_MacroDroid.png
    Screenshot_20231024_172753_MacroDroid.png
    226.1 KB · Views: 7
  • Screenshot_20231024_172926_MacroDroid.png
    Screenshot_20231024_172926_MacroDroid.png
    302.3 KB · Views: 7
Top