After having defined the structure of the flat file, you can use the Flat File adapter to compose a flat file from this structure.

Drag the compose operation to your diagram as described on Flat File Adapter. Provide the data in the flat file structure and provide an encoding or localization if necessary.
You can compose to an object of type Blob or to the filesystem. The path and file name of the file you want to compose to can be given dynamically via input parameter name, or statically via the definitions of an alias.