hi,
with gdrive, need to deal with oath and web browser, sure that can be worked around but never tried it, as i do not use google products.
the easy workaround would be to use gdrive service files.
another rcloner had a similar issue about scripting rclone config
, might spark some ideas.
in that case, the issue was how to crypt a config file.
that workaround used the linux command expect
, python has pyexpect
https://forum.rclone.org/t/possible-to-set-a-password-for-the-rclone-config-file-without-using-rclone-config-2/27703