Change data type in a workflow

I’m using the Regex Replace tool to edit sequence names of a fasta file to make them compatible with the next tool in my history. Regex Replace outputs txt but the datatype needs to be fasta for the next tool. Eventually I’d like to convert this history to a workflow. My question is, how can I edit the datatype in the workflow? Can this be automated in some way?

Here’s a link to my history. Thanks in advance!!

The way to do this in a workflow is here in the wf editor:

(in the Configure Output section near the bottom of the step configuration panel).

This is equivalent to changing the datatype of the dataset in your history manually, but that action is not recorded when you’re extracting the workflow from the history, so you will have to remember and change the datatype after the corresponding steps in the workflow yourself.