• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

How to extract phone# from incoming SMS in Tasker

Search This thread

Yahretzky

New member
Oct 12, 2018
3
0
Warsaw
I am working on Tasker to reply to an incoming text message using the GET VOICE and SEND SMS commands (for use while driving). After an incoming message Tasker listens to my reply using GET VOICE and sends the reply using SEND SMS with %VOICE in the Message field and some other variable with the phone# in the Number field... and here I'm stuck because I found no way of extracting the phone number from an incoming SMS (it works when the variable has a phone number already assigned to it).
Can anyone help?
 

ktmom

Retired Forum Moderator
Apr 22, 2015
5,186
3,377
Deep Space Station K7
Have you tried using the %SMSRF variable? Typically I set a local variable to the value of %SMSRF as the first action in case another text comes in while the task is processing.


"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
 
  • Like
Reactions: Yahretzky

Yahretzky

New member
Oct 12, 2018
3
0
Warsaw
Thanks ktmom!
Worked like a charm!
No more struggling with the phone when driving!
Actually, now you have encouraged me to rewrite my task to give an option of when a new SMS arrives to either Text back, Call the sender or just Quit. I have also put to use your tip on setting local variables for all the parts of the incoming text message - just in case ;)
Have a nice day!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Have you tried using the %SMSRF variable? Typically I set a local variable to the value of %SMSRF as the first action in case another text comes in while the task is processing.


    "find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini