FORUMS

[GUIDE] Send Whatsapp messages using Tasker

359 posts
Thanks Meter: 79
 
Post Reply Email Thread
10th September 2015, 10:22 AM |#21  
Senior Member
Flag Manchester
Thanks Meter: 43
 
More
Is there a way to set this up on a phone, already with whatsapp registered?

Also, can you explain what you mean by

"Tho send a Whatsapp message, you have to perform this Task with 2 parameters:

1) Phone . Formatted like this :
[email protected] (single contact)
[email protected] (group chat)

"
8th March 2017, 09:56 PM |#22  
Senior Member
Thanks Meter: 22
 
More
Quote:
Originally Posted by hotsync100

I'm using a new method to send Whatsapp messages with tasker ..

You only need:
1) ROOT
2) Sqlite
3) Tasker

Tho send a Whatsapp message, you have to perform this Task with 2 parameters:

1) Phone . Formatted like this :
58[email protected] (single contact)
58[email protected] (group chat)

2) Text to send.

Note: Previosuly you need to fill the variable %Sqlite3 with the full path of sqlite ..
Example if you use Titanium Backup: /data/data/com.keramidas.TitaniumBackup/files/sqlite3

Attachment 2603748

Send Whatsapp (192)
A1: Variable Set [ Name:%phone To:%par1 Do Mathsff Appendff ]
A2: Variable Set [ Name:%data To:%par2 Do Mathsff Appendff ]
A3: Variable Add [ Name:%Cont Value:1 Wrap Around:8 ]
A4: Variable Search Replace [ Variable:%phone Search:* Ignore Caseff Multi-Lineff One Match Onlyff Store Matches In: Replace Matchesn Replace With: ]
A5: Variable Set [ Name:%key_id To:%TIMES-%Cont Do Mathsff Appendff ]
A6: Run Shell [ Command:%Sqlite3 /data/data/com.whatsapp/databases/msgstore.db "INSERT INTO messages (key_remote_jid, key_from_me, key_id,status, needs_push, data, timestamp, media_url, media_mime_type, media_wa_type, media_size, media_name, latitude, longitude, thumb_image, remote_resource, received_timestamp, send_timestamp, receipt_server_timestamp, receipt_device_timestamp, raw_data, media_hash, recipient_count, media_duration, origin) VALUES ('%phone',1,'%key_id',0,0,'%data',%TIMEMS,'','','0 ',0,'',0.0,0.0,' ','',%TIMEMS,-1,-1,-1,0,'',0,0,0);
update chat_list set message_table_id = (select max(messages._id) from messages) where chat_list.key_remote_jid = '%phone' ; " Timeout (Seconds):0 Use Rootn Store Output In: Store Errors In: Store Result In: Continue Task After Errorn ]
A7: Kill App [ App:WhatsApp Use Rootn Continue Task After Errorn ]

Hi, what are the values of %par1 and %par2?
Why is %phone set as %par1 if at first you say it should have the specified format?

Regards,
2nd April 2017, 08:31 PM |#23  
TK Studio's Avatar
Senior Member
Flag Coburg
Thanks Meter: 245
 
Donate to Me
More
AutoResponder for WhatsApp (+Tasker)
I think there's an easier solution. Try this cool app, which also works with Tasker:
https://play.google.com/store/apps/d...responderforwa
1st May 2017, 03:59 PM |#24  
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by hotsync100

I'm using a new method to send Whatsapp messages with tasker ..

You only need:
1) ROOT
2) Sqlite
3) Tasker

Tho send a Whatsapp message, you have to perform this Task with 2 parameters:

1) Phone . Formatted like this :
58[email protected] (single contact)
58[email protected] (group chat)

2) Text to send.

Note: Previosuly you need to fill the variable %Sqlite3 with the full path of sqlite ..
Example if you use Titanium Backup: /data/data/com.keramidas.TitaniumBackup/files/sqlite3

Attachment 2603748

Send Whatsapp (192)
A1: Variable Set [ Name:%phone To:%par1 Do Mathsff Appendff ]
A2: Variable Set [ Name:%data To:%par2 Do Mathsff Appendff ]
A3: Variable Add [ Name:%Cont Value:1 Wrap Around:8 ]
A4: Variable Search Replace [ Variable:%phone Search:* Ignore Caseff Multi-Lineff One Match Onlyff Store Matches In: Replace Matchesn Replace With: ]
A5: Variable Set [ Name:%key_id To:%TIMES-%Cont Do Mathsff Appendff ]
A6: Run Shell [ Command:%Sqlite3 /data/data/com.whatsapp/databases/msgstore.db "INSERT INTO messages (key_remote_jid, key_from_me, key_id,status, needs_push, data, timestamp, media_url, media_mime_type, media_wa_type, media_size, media_name, latitude, longitude, thumb_image, remote_resource, received_timestamp, send_timestamp, receipt_server_timestamp, receipt_device_timestamp, raw_data, media_hash, recipient_count, media_duration, origin) VALUES ('%phone',1,'%key_id',0,0,'%data',%TIMEMS,'','','0 ',0,'',0.0,0.0,' ','',%TIMEMS,-1,-1,-1,0,'',0,0,0);
update chat_list set message_table_id = (select max(messages._id) from messages) where chat_list.key_remote_jid = '%phone' ; " Timeout (Seconds):0 Use Rootn Store Output In: Store Errors In: Store Result In: Continue Task After Errorn ]
A7: Kill App [ App:WhatsApp Use Rootn Continue Task After Errorn ]

can we also send images using this sql command?
1st May 2017, 04:32 PM |#25  
Member
Flag Bhubaneswar
Thanks Meter: 14
 
More
New method is good
26th May 2017, 03:27 PM |#26  
Senior Member
Thanks Meter: 22
 
More
Thanks.

It is working for single contact but failed for group. Is my own number included in the "[email protected]" ? Please help.

it is hard for me to make it work. I repeatedly clear whatsapp data because of wrong doing. More than 5 maybe...

Quote:
Originally Posted by kurokirasama

Hi, what are the values of %par1 and %par2?
Why is %phone set as %par1 if at first you say it should have the specified format?
Regards,

par1 is %phone (phone number)
par2 is %text (the message)

I get confused too because there also %data variable

To make it clear, you need to make 2 task.

Task 1 for setting phone number and the message
Task 2 for sending it

For example:
=====
TASK 1:
=====
Code:
WA-SingleNumber (38)
	A1: Variable Set [ Name:%phone To:6***********1 Recurse Variables:eek:ff Do Maths:eek:ff Append:eek:ff ] 
	A2: Variable Set [ Name:%text To:TEST Recurse Variables:eek:ff Do Maths:eek:ff Append:eek:ff ] 
	A3: Variable Set [ Name:%phone To:%[email protected] Recurse Variables:eek:ff Do Maths:eek:ff Append:eek:ff ] 
	A4: Perform Task [ Name:WhatsappSend Priority:10 Parameter 1 (%par1):%phone Parameter 2 (%par2):%text Return Value Variable: Stop:eek:ff ]


=====
TASK2
=====
Code:
WhatsappSend (67)
	A1: Variable Set [ Name:%wa_key_id To:%TIMES Recurse Variables:eek:ff Do Maths:eek:ff Append:eek:ff ] 
	A2: Variable Set [ Name:%wa_received_timestamp To:%TIMEMS Recurse Variables:eek:ff Do Maths:eek:ff Append:eek:ff ] 
	A3: Variable Set [ Name:%wa_timestamp To:%TIMEMS Recurse Variables:eek:ff Do Maths:eek:ff Append:eek:ff ] 
	A4: Run Shell [ Command:%SQLITE3 /data/data/com.whatsapp/databases/msgstore.db "INSERT INTO messages (key_remote_jid, key_from_me, key_id,status, needs_push, data, timestamp, media_url, media_mime_type, media_wa_type, media_size, media_name, latitude, longitude, thumb_image, remote_resource, received_timestamp, send_timestamp, receipt_server_timestamp, receipt_device_timestamp, raw_data, media_hash, recipient_count, media_duration, origin) VALUES ('%par1',1, '%wa_key_id-1' ,0,0,'%par2','%wa_timestamp','','','0',0,'',0.0,0.0,'', '','%wa_received_timestamp',-1,-1,-1,0,'',0,0,0);update chat_list set message_table_id = (select max(messages._id) from messages) where chat_list.key_remote_jid = '%par1';"* Timeout (Seconds):0 Use Root:eek:n Store Output In:%WAOUTPUT Store Errors In: Store Result In: Continue Task After Error:eek:n ] 
	A5: Kill App [ App:WhatsApp Use Root:eek:n Continue Task After Error:eek:n ] 
	A6: Flash [ Text:eek:k Long:eek:ff ]


Tested work for single contact
As you can see, i must use %par1 and %par2 included in Run Shell Code (see A4)
22nd March 2020, 12:39 PM |#27  
Junior Member
Thanks Meter: 1
 
More
Quote:
Originally Posted by ariefcfa

Thanks.

It is working for single contact but failed for group. Is my own number included in the "[email protected]" ? Please help.

it is hard for me to make it work. I repeatedly clear whatsapp data because of wrong doing. More than 5 maybe...



par1 is %phone (phone number)
par2 is %text (the message)

I get confused too because there also %data variable

To make it clear, you need to make 2 task.

Task 1 for setting phone number and the message
Task 2 for sending it

For example:
=====
TASK 1:
=====

Code:
WA-SingleNumber (38)
	A1: Variable Set [ Name:%phone To:6***********1 Recurse Variables:eek:ff Do Maths:eek:ff Append:eek:ff ] 
	A2: Variable Set [ Name:%text To:TEST Recurse Variables:eek:ff Do Maths:eek:ff Append:eek:ff ] 
	A3: Variable Set [ Name:%phone To:%[email protected] Recurse Variables:eek:ff Do Maths:eek:ff Append:eek:ff ] 
	A4: Perform Task [ Name:WhatsappSend Priority:10 Parameter 1 (%par1):%phone Parameter 2 (%par2):%text Return Value Variable: Stop:eek:ff ]


=====
TASK2
=====
Code:
WhatsappSend (67)
	A1: Variable Set [ Name:%wa_key_id To:%TIMES Recurse Variables:eek:ff Do Maths:eek:ff Append:eek:ff ] 
	A2: Variable Set [ Name:%wa_received_timestamp To:%TIMEMS Recurse Variables:eek:ff Do Maths:eek:ff Append:eek:ff ] 
	A3: Variable Set [ Name:%wa_timestamp To:%TIMEMS Recurse Variables:eek:ff Do Maths:eek:ff Append:eek:ff ] 
	A4: Run Shell [ Command:%SQLITE3 /data/data/com.whatsapp/databases/msgstore.db "INSERT INTO messages (key_remote_jid, key_from_me, key_id,status, needs_push, data, timestamp, media_url, media_mime_type, media_wa_type, media_size, media_name, latitude, longitude, thumb_image, remote_resource, received_timestamp, send_timestamp, receipt_server_timestamp, receipt_device_timestamp, raw_data, media_hash, recipient_count, media_duration, origin) VALUES ('%par1',1, '%wa_key_id-1' ,0,0,'%par2','%wa_timestamp','','','0',0,'',0.0,0.0,'', '','%wa_received_timestamp',-1,-1,-1,0,'',0,0,0);update chat_list set message_table_id = (select max(messages._id) from messages) where chat_list.key_remote_jid = '%par1';"* Timeout (Seconds):0 Use Root:eek:n Store Output In:%WAOUTPUT Store Errors In: Store Result In: Continue Task After Error:eek:n ] 
	A5: Kill App [ App:WhatsApp Use Root:eek:n Continue Task After Error:eek:n ] 
	A6: Flash [ Text:eek:k Long:eek:ff ]


Tested work for single contact
As you can see, i must use %par1 and %par2 included in Run Shell Code (see A4)


is this method still working?
22nd March 2020, 11:19 PM |#28  
TK Studio's Avatar
Senior Member
Flag Coburg
Thanks Meter: 245
 
Donate to Me
More
Quote:
Originally Posted by dix93

is this method still working?

What do you want to achieve?
Maybe you can use the AutoResponder for WhatsApp app?
https://play.google.com/store/apps/d...responderforwa
23rd March 2020, 12:22 AM |#29  
Junior Member
Thanks Meter: 1
 
More
Quote:
Originally Posted by TK Studio

What do you want to achieve?
Maybe you can use the AutoResponder for WhatsApp app?
https://play.google.com/store/apps/d...responderforwa

Yeah but this costs 15€ for tasker integration, if I can achieve this with an homemade script I prefer.
Further more I know that when you use a different app out of Whatsapp they may ban you.
23rd March 2020, 03:13 PM |#30  
TK Studio's Avatar
Senior Member
Flag Coburg
Thanks Meter: 245
 
Donate to Me
More
Quote:
Originally Posted by dix93

Yeah but this costs 15€ for tasker integration, if I can achieve this with an homemade script I prefer.
Further more I know that when you use a different app out of Whatsapp they may ban you.

Hey, they don't monitor and detect apps, they detect behaviour. So it wouldn't matter which tool you use.
Post Reply Subscribe to Thread

Tags
python, sqlite, tasker, whatsapp, yowsup

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes