In Dynamics365 CRM i'm using Word templates to generate word documents.

When I click on the template, D365 automatic downloads a generated document with data from D365.
I want that document not in my downloads map but I want this document in a SharePoint document library which is connected to d365. Can i create a flow or something about this?