Download Database as dump (.sql-file) and tables as text-files in a ZIP-Format

Hi there,
I need to download a dump file of a MSSQL database (as .sql) and certain tables from this database as text-files. As a final result I need those .sql and .txt-files zipped in the download folder of the browser or any other filesystem.
My prefered way of doing this would be to do it via a python script in a workflow which can be scheduled.
Did someone did something that goes roughly in this direction and can show me the concept?