> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.meetgail.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.meetgail.com/_mcp/server.

# Create Text File

> Builds a stored file from content you provide and hands it to later steps.

The Create Text File node takes content you supply and saves it as a file the
rest of the workflow can use. It handles plain text, like a note or a small
report, as well as binary files such as a PDF or an image. Later steps can attach
the file to an email, upload it, or read it back in.

## When to use it

* You want to assemble a short document or summary during a run and send it on.
* You need to turn data the workflow already has into a file another step expects.
* You are producing a small, fixed file rather than a spreadsheet built from a
  list of records (for that, use [Create CSV](/platform/workflows/node-reference/files-and-documents/create-csv)).

## Inputs

| Field      | What it's for                                                                          | Example                        |
| ---------- | -------------------------------------------------------------------------------------- | ------------------------------ |
| File Name  | The name to save the file under, including its extension.                              | `policy-summary.txt`           |
| Media Type | The kind of file you are creating, which tells the workflow how to read the content.   | `text/plain`                   |
| Content    | The file's contents. Plain text for text files; for binary files, the encoded content. | `Policyholder: Sarah Chen ...` |

Any of these can be written as an [expression](/platform/workflows/core-concepts/expressions/using-expressions-in-nodes)
so the file adapts to earlier steps.

## Outputs

| Field | What you get back                                                                              |
| ----- | ---------------------------------------------------------------------------------------------- |
| File  | A reference to the stored file (its name, type, and size) that later steps can attach or read. |

The node either produces the file or reports a problem, so you can route the run
if something goes wrong.

## Example

An agency workflow pulls together a short summary for Sarah Chen's renewal:
policyholder name, policy number, renewal date, and status. A Create Text File
node saves that summary as `policy-summary.txt`, and a later
[Send Email](/platform/workflows/node-reference/communication/send-email) step attaches it
to the message that goes out to her.

![The Create Text File configuration panel, showing the file name, media type, and content fields.](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/gail.docs.buildwithfern.com/8e3efcfa7ba14580bdc69c3603b30127e98ff9a6b14c50dafb0101557020f0bf/docs/pages/platform/workflows/assets/files-and-documents-create-text-file.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260823%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260823T232923Z&X-Amz-Expires=604800&X-Amz-Signature=4f4f96844fbb04d28253296742b3ac1d41ffa1c3dc0eb8ae4af3e7289ec9b0f1&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)

The media type has to match the content. For plain text files the content is
taken as-is, but for binary types like a PDF the content must be properly
encoded. If it is not, the node reports a problem instead of saving a broken
file, so follow it with a step that checks the result before relying on the
file downstream.

## Related nodes

#### [Create CSV](/platform/workflows/node-reference/files-and-documents/create-csv)

Build a spreadsheet file from a list of records instead of freeform content.

#### [Send Email](/platform/workflows/node-reference/communication/send-email)

Attach the file you created to an outgoing email.

#### [Parse CSV](/platform/workflows/node-reference/files-and-documents/parse-csv)

Read a spreadsheet file back into rows the workflow can act on.

#### [Fill PDF Form](/platform/workflows/node-reference/files-and-documents/fill-pdf-form)

Fill a fillable PDF form from data the workflow gathered.