Create an automation for WhatsApp's chat app?
Ok, I've figured it out myself. Putting it out here if anyone needed it in the future.
 on run {input, parameters}
        set text1 to the clipboard
        if first character of text1 is &quot;0&quot; then
            set text2 to 1 - text1 as integer
            do shell script &quot;open https://api.whatsapp.com/send?phone=&quot; &amp; &quot;994&quot; &amp; 1 - text2
            return
        end if
        do shell script &quot;open https://api.whatsapp.com/send?phone=&quot; &amp; text1
        return input
 end run