Start with a LinkedIn DM because it reminds them you’re connected.
“Hey NAME, it has been a while since EVENT/SHARED MEMORY. I saw a job post for a TITLE on the COMPANY website — any chance you could refer me internally? I know it makes a big difference.”
If there’s no response after a few days, follow up off LinkedIn: “Hey NAME, I sent you a message on LI but I know not everyone checks it…”