TL;DR
In order to automatically create document in Viewer you need to provide 2 inputs: Record Id and Template Id in the Viewer Flow custom action. Easy and Fast ๐

Define the document template
Before setting up a trigger flow to automatically generate a document, you need to define the document template.
Set up the trigger flow
Once you have your document template in place, it's time to set up the trigger flow.
Specify the trigger conditions
In order for the trigger flow to work effectively, you need to specify the trigger conditions. These conditions determine when the document generation process should be initiated.
Make sure to define the trigger to Include a Run Asynchronously path
Add Viewer Action
Next add action to the "Run Asynchronously" path , search for "Viewer" and select "Create file immediately [Viewer]" .
Configure "Create file immediately" Action
Add record Id for the primary object and select the desired template , You can use the autocomplete or manually add the information
Preview and Test- Debug will not work
After you save the flow you can test it. Pay attention as using debug will not work, you need to activated and test in a real process .