Forward SMS based on content

143 views
Skip to first unread message

alexm...@gmail.com

unread,
Jul 21, 2023, 11:28:22 AM7/21/23
to Tasker
I need to know if it is possible to create a task to forward a sms from a contact but based in content. If it is possible, how to put in the content the words to match that content?
Thanks!!

João Dias

unread,
Jul 21, 2023, 1:05:13 PM7/21/23
to tas...@googlegroups.com
Can you give me a specific example of what you mean?

Thank you for your contact.

   Join: connect multiple devices (send pushes, remote SMS, notifications) on Android, Windows, Mac, Linux
   Tasker: customize/automate anything on your phone!
   AutoApps: add advanced functionality to Tasker via plugins

     

João Dias


alexm...@gmail.com

unread,
Jul 21, 2023, 2:00:58 PM7/21/23
to Tasker
Hi João!! Thanks for your pacience.
I mean, when I receive an sms with a code I want to forward that code/content to a predefined contact, preferably if the content matches what I need to forward.
Thanks again,
Alex

Brenden M

unread,
Jul 23, 2023, 2:06:07 AM7/23/23
to Tasker
The question of "possibility": Yes, I think Tasker could do that, but I haven't mapped it out exactly.

You can create a profile that looks for a text from a certain number or a text containing some content, extract the part of the content you need, and then Tasker could send an SMS using that content as the message, I believe.

Something like:
1. Your phone receives SMS from a number or with content you are interested in.
2. Activate a Profile in Tasker waiting for the Event mentioned in step 1.
3. When a Profile activates, you can pass Variables to the activated Task, so something like #mostrecentcode:
4. Send the content, or code, to the Task. 
This is the part I'm less sure about, getting the content from the text to a variable. In the user guide, these are called "local variables").
5. The Actions in your Task can be as complex as you like, though you want to send a text to a certain number with the message content being #mostrecentcode

Not having tried this, I'm not sure where I would run into any issues. Maybe I would look to AutoInput or some other Tasker plugIn to make something easier.

João Dias

unread,
Jul 24, 2023, 5:03:12 AM7/24/23
to tas...@googlegroups.com
Hi. Yes, that is totally possible, like Brenden mentioned! :)

  • Create a profile with the Text Received event condition
  • In the task use the Send SMS action to send it to a different contact (set the text to %evtprm3)
  • If you want it to be sent only when the text matches something, set a filter for it in the event condition I mentioned above :)
Hope this helps!

alexm...@gmail.com

unread,
Jul 24, 2023, 1:17:31 PM7/24/23
to Tasker
Thank you João!!
I just need to know how to put the text I want with that filter!! I'm a little noob so if you can please help? Is it with "" or %%??

Brenden M

unread,
Jul 24, 2023, 1:23:51 PM7/24/23
to Tasker
Hi there Alex,

I do believe it would just be the following:

%evtprm3

You'd be able to put in the field for Send SMS, no other characters:

The text with the code I got was %evtprm3

Then, you could if you want test it yourself by sending yourself a text (use your own number in Text Received event condition and Send SMS action).

Use the rest of steps outlined by João, and see if you send yourself a text and get the correct result of the sent SMS with your own content.

Brenden M

unread,
Jul 24, 2023, 1:26:56 PM7/24/23
to Tasker
Oh yah...

Look at "Pattern Matching" in the userguide! That might help you get JUST the code you want if sending the whole text is unwanted (but whole text is easier to send)

João Dias

unread,
Jul 25, 2023, 4:37:50 AM7/25/23
to tas...@googlegroups.com
For example, if you only want to forward it if the text contains the word "special" set the filter in the Event Condition to:

*special*

. Check out Tasker Pattern Matching: https://tasker.joaoapps.com/userguide/en/matching.html

alexm...@gmail.com

unread,
Jul 25, 2023, 6:52:26 AM7/25/23
to Tasker
Perfect João!! Now I have what I need!! 
Thank you for your patience!!
Reply all
Reply to author
Forward
0 new messages