Forwarding 2FA SMS Code to WhatsApp web

Hi there, I saw this medium post and wanted to do something similar for myself.

Forward SMS Verification Codes From iPhone To a Windows PC

I’m an iPhone and a Windows PC user, so whenever I have to login to a website that requires a 2FA SMS Code I have to reach to my phone, open Messages and type the code.

What I’d like is a Shortcut and/or Automation that runs whenever I get an SMS, from anyone, and checks if there’s a 6 digit number on it and forwards the entire message to myself, to WhatsApp.

I already have it working, but I don’t know how to do the “6 digit number” part, so I’m getting all messages which is not ideal.