Text: Create text file

Use this action to output a text field into a flat text file and designate the file extension. The action can create any flat text file with any file extension, like .XML, .MARKDOWN, or .CSV.

Use case

This action opens up many opportunities to integrate with content management systems or systems using proprietary file types. For example,

  • Use the SFTP: Upload a file action to create a text file and upload it to an SFTP folder.
  • Set up an SFTP New file Trigger and trigger new automation from an uploaded file.
  • Use this action to create a text file to download in a manual task.

How to configure this action

This action creates flat text files, so file types like .DOCX, .PPTX, .PSD are not supported. For other types of files, actions like Word: Create a Word Document or PowerPoint: Populate a template can output and create unique files.

For some text file types, specific formatting is still required. For example, a .CSV file needs the necessary double quotes and commas to import correctly, and an .XML file needs the proper declarations like version or encoding.

In unique cases, files with no extension or just an extension may be required by systems. This action can create these unusual files.

Fields for this action

  • File content

    • Enter the text or {{field-name}} to save to the text file. This can be a combination of text and field references.
  • File name and extension

    • Enter the file name and extension for the created file, such as webreport.txt.
  • Output Field Prefix

    • To help keep output fields organized, choose an output field prefix to add to the beginning of each output field name as this action may output more than one field.
    • The step’s name is used as the prefix by default.

What will this output?

This action may generate multiple fields. To help keep output fields organized, the prefix above will be added to the beginning of each of the output field names, separated by two dashes. Each field will result as:{{output-field-prefix--output-field}}. Learn more

Output fields for this action

  • File

    • The newly created file. This is a file type field.
  • File name

    • The full name of the file, including extension.
  • File size in bytes

    • The size of the file in bytes.
  • File extension

    • The extension of the file.
  • File type

    • The file type, such as text/plain.

Sorry about that. What was the most unhelpful part?

Thanks for your feedback

We update the Help Center daily, so expect changes soon.

Link Copied

Paste this URL anywhere to link straight to the section.

Need more help?

If you're signed in to Catalytic Community, you can ask other users a question. You'll be redirected to Community where you can add more info.