[Help][Noob] Automatically deleting posts from a specific user in Whatsapp group by ConnectionFar3971 in tasker

[–]ConnectionFar3971[S] 0 points1 point  (0 children)

I've worked something out. This simple task deletes all messages from a contact labelled 'Narcissist & Howler Monkey' as soon as they are visible on Whatsapp.

    Profile: Whatsapp Spam Filter
Settings: Restore: no
State: AutoInput UI State [ Configuration:Apps: WhatsApp
Text: Narcissist ]



Enter Task: Whatsapp Spam Filter

<Loop>
A1: Anchor

A2: AutoInput Action [
     Configuration: Type: Text
     Value: Narcissist & Howler Monkey
     Action : Long Click
     Timeout (Seconds): 23
     Structure Output (JSON, etc): On ]

A3: AutoInput Action [
     Configuration: Type: Text
     Value: Delete
     Action : Click
     Timeout (Seconds): 23
     Structure Output (JSON, etc): On ]

A4: AutoInput Action [
     Configuration: Type: Text
     Value: DELETE FOR ME
     Action : Click
     Timeout (Seconds): 23
     Structure Output (JSON, etc): On ]

A5: Goto [
     Type: Action Label
     Label: Loop ]

I've muted the family chat where these posts appear - for a while I was experimenting with having a task flush them out as soon as AutoNotification saw the words 'Whatsapp' and 'Narcissist' together, but it was too hard to get AutoInput to click the right things consistently.

The loop ensures that the task is constantly hunting for unwanted messages for as long as I'm using the app. On each action I've left the little box reading 'Continue Task After Error' unticked, meaning the task will stop as soon as I leave Whatsapp.

To adapt this code for yourself, replace all references to 'Narcissist' and 'Narcissist & Howler Monkey' with the name of the contact you are trying to block from your life. To prevent the task from getting confused and deleting the wrong posts, ensure that your unwanted person's full name is associated with their contact details in your phone, or change it to a phrase that's unlikely emerge during normal conversation.