I need help creating an automation, I often receive a text message with a work order, depending on how much it is paying and millage I chose to pick it up on the app.
for example this is the content of the text:
xx, you’ve been offered (wired) installation job 246 miles from you for $135.
I wanted to have an alert when order is less than 50 miles and pays more than $50
I have create the automation but where I am stuck is on match text message
- I create the first filter.
using match text
match (\d+)\s*miles
then I don’t know from there how to get that number into variable and then
open an IF
if var miles < 50 then turns on an alert
Will appreciate any help
It sounds like you are up to speed on Personal Automations etc., so won’t go into that. Addressing just the mechanics you were struggling with, the screen grab should sort things out for you.
1 Like
wow TDK_SA90, thanks for taking the time to check on this.
I will try and let you know how it goes.
thanks a lot
1 Like
No probs. Here’s the actual shortcut which may speed things up for you when building-out the full thing.
OK so I was able to get though with some changes, the most difficult part was to get payment out the text message, because in your example when I tried to see what was system seeing it show $50 and I couldn’t make it as number.
I see your mock code in MacOS which is fine, it guide me a lot, but once you get into IOS 26 everything is different and confusing, but nothing out of this world, just need a little bit of patient and it is done.
Just posting the most critical part of the automation, getting miles to work was quite easy, but getting the payment was challenging and this is the only way I was able to get through.
from the previous example by setting up the automation the variable pay shows 50 not $50, and then I was able to play with that number
of course there are couple of nested IF and validation but that is carpenter job.
hope this might help more people.
Glad you got there, though that screen grab you’ve posted is exactly the same as the steps I had for extracting the payment. Anyways, best of luck with those automated notifications!
1 Like