Files: Convert file to text

Use this action to save the text of a flat text file to a field. This action can also convert a text file into base64 or hex.

This action will only work with TXT files. For PDF files, you can use the corresponding PDF: Extract text to a field action.

For similar functionality with Word documents, first convert a Word file to a PDF with the PDF: Create PDF Document action and then apply the PDF: Save Text in Field action.

Use case

This action stores the body of an unformatted TXT file as a field. The stored text field is then available for parsing with other text actions, or in other parts of a process.

This action is useful for converting text to base64. Many APIs require text or headers in base64 format.

How to configure this action

This action will attempt to convert any file into text, even if an incorrect file type like a JPEG or PDF is used. If a non-TXT file is used, the results will be indecipherable or unusable.

Some non-TXT files may properly convert to text, like SVG files, but generally only TXT files are guaranteed to work.

Fields for this action

  • File

    • Select a file for which the text will be extracted and saved to a field. Use {{field-names}} format.
    • 💡   Tip: This file must be a flat TXT file.
  • Encoding

    • Enter UTF8, base64, or hex to save the results to the field in that format.
    • Leave this blank if you’re not sure, in which case UTF8 will be used.
      • UTF8 is typically appropriate for text files.
      • Base64 is best for binary files.
      • Hex may be used less commonly for memory locations or MAC addresses.
  • Output field name

    • The name of the field in which the extracted text should be saved.

What will this output?

This action will output one text field. The name of the field is the value entered in the Output field name defined during configuration. The field value will be the content of the file.

Fields for this action

  • Output field name

    • The results of the conversion, in the encoding specific during configuration.

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.