Open google maps link from sms.

GeorgK

New member
Hello!

I'm a volunteer firefighter and we have an SMS system where the call is being sent to SMS. In there I have the google maps location for the call with provided google maps link.

I'm seeing myself wasting time if a call comes to open the call and click the link and then press start. I would like to get help to make it automated.

1. Call comes in via SMS
2. Macrodroid sees SMS and looks for google maps links or any URL.
3. Macrodroid clicks the link and google map pops up
4. Macrodroid clicks to start and navigation starts.

SMS has more info as well like what kind of call and what kind of truck needs to respond, not only the Google Maps link.

I don't know anything about setting up macrodroid, I tried and googled but did not find any answers for this.
Maybe someone is kind enough to help me with my problem and will make a solution.
 

dsnz

Well-known member
I don't think I will have enough time to help on this, but I'm sure other members will certainly help
however you must post an exact SMS message you receive, to have the format of the message and a real example is very important
 

RSF

Well-known member
Agree -- a sample message will be helpful. As an initial suggestion, though, something like this might work:
  1. Trigger: SMS message received either from a specific number, or with specific text
  2. Action #1: Extract the Google Maps URL, using action Text Manipulation, Extract Text option, with regular expression https://[^ ]+ and the "First Match" option
  3. Action #2: Open that URL in your browser
Screenshot 2022-06-22 11.08.29 AM.png

Note that if you have "RCS" active on your phone (as happens if you use Google's "Messages" app, and have activated chat features), the SMS trigger may not work. You could probably use a Notification trigger instead, in that case.

The Set Variable action in the screenshot above is only to simulate receiving the SMS -- it sets the "sms_message" variable manually, which would normally be set by the incoming SMS trigger.
 

GeorgK

New member
I don't think I will have enough time to help on this, but I'm sure other members will certainly help
however you must post an exact SMS message you receive, to have the format of the message and a real example is very important
TABMALU 31
17D-TULEKAHJU METSAS/MAASTIKUL
pä1
Keila metskond 156, Lääne küla, Harku vald, Harju mk
https://maps.google.com/maps?z=13&t=m&q=59.42658+24.3617
N 59 25 35.67
E 24 21 42.12
Riigiinfo telefonilt info,metsas tehakse lo~ket,t...

Its example.
 

RSF

Well-known member
Try the attached with an incoming SMS.
Eventually you'll probably want to add a filter to the trigger so it only runs for fire-related SMS's...
 

Attachments

  • Open_Google_maps_from_SMS.macro
    4.3 KB · Views: 16

RSF

Well-known member
Glad to hear it worked.

In thinking a little more about the Extract Text action, and the possibility that future messages may be formatted differently (for example, information may be added on the same line as the maps URL vs. on separate lines, as in the example), I recommend changing the regular expression to:

(https:\/\/maps\.google\.com\/.+?)\s

(All other options stay the same, including the "Group 1" option)

That will be more likely to work in case the SMS messages' layout changes in the future...
 
Top