> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.meetgail.com/platform/workflows/node-reference/files-and-documents/create-text-file/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.](/_fern-img/8e3efcfa7ba14580bdc69c3603b30127e98ff9a6b14c50dafb0101557020f0bf.webp) > **Note** > > 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. > Documentation for Gail, the AI platform for financial services. Learn how to set up GailGPT and Gail Agent to automate customer communications for insurance, banking, and finance.