I am using a slightly modified version of the script below to automate Survey123 reporting and emailing https://github.com/nzjs/Automated-Survey123-Reports/blob/master/S123Repor