Automation to copy file from phone to NAS when enter wifi

A beginner here.

I currently use Syncthing on my NAS and android phone to one way transfer files from my phone to my NAS. Works fine.

But, playing around, I was wondering if there is a way to do this with an automation from HA/HA Companion.

I arrive home, connect to my wifi, and files from a certain directory (my gpx tracks for the day) are copied to my NAS openmaps directory.

Yes Syncthing does exactly this, but my requirements are a simple task which I thought might lend itself to a HA automation.

I was wondering if I can use something like the localsend rest api? or scp/sftp?

Has/does anyone do this?
Thanks