Export to file and send with sftp
This might take you 4 minutes to read.
I have customers that need to send an export of users with some special rolegroup memberships to a sftp-server. I created this script and created a scheduled task.