Plain text from Word
Audience:
Low-code EngineersSkill Prerequisites:
Tokens
Reads the text of a Word document and stores it in a token as a single plain string. Formatting, images and layout are dropped. The document can be a portal file, found by file ID or path, or a file at a URL.
note
This action requires the Word feature (PAAWORD) to be licensed. It's part of the separate PlantAnApp.Word add-on package. If you don't see the action in the Documents group, the add-on isn't installed.
Typical Use Cases
- Search an uploaded document for keywords, for example to route or tag a submission
- Save the text of a document in the database so it can be searched
- Pass the text of a document to another action, for example an AI prompt or an API call
Don't use it to
- Keep the document's structure, such as paragraphs, headings or table layout. The text comes back as one line.
- Read text from headers, footers or footnotes. Only the document body is read.
- Read a PDF. Use Plain text from PDF instead.
Related Actions
| Action Name | Description |
|---|---|
| Plain text from PDF | Reads the text of a PDF file into a token. |
| Html to Word (.docx) - Experimental | Creates a Word document from HTML and CSS. |
| Replace Tokens in Word Document | Creates a Word document from a template by filling in content controls. |
Input Parameter Reference
| Parameter | Description | Supports Tokens | Default | Required |
|---|---|---|---|---|
| Word File Identifier Method | How to find the Word file: File ID, File Path or File URL. Only the matching parameter below is shown. | No | none selected | Yes |
| Word File ID | Shown for File ID. The file ID of a portal file, for example [DocumentFileId]. The value must be a number. | Yes | empty string | Yes, for File ID |
| Word File Path | Shown for File Path. Select a .doc or .docx file from the portal, or in expression mode enter a path relative to the portal root. For example, if the file is Portals/0/Documents/Policy.docx, enter Documents/Policy.docx. | Yes | none selected | Yes, for File Path |
| Word File URL | Shown for File URL. The URL of the Word file, for example https://example.com/files/policy.docx. The file is downloaded with a GET request. | Yes | empty string | Yes, for File URL |
Output Parameters Reference
| Parameter | Description |
|---|---|
| Store Plain Text | The name of the token that stores the extracted text, for example DocumentText. Use it later as [DocumentText]. |
What's extracted
- All text in the document body, in document order, including text in tables.
- Headers, footers, footnotes and comments aren't read.
- The pieces of text are joined with a single space. There are no line breaks, so paragraphs and table cells run together.
- Word sometimes splits a word into several pieces, for example when part of it has different formatting. Those pieces are also joined with a space, so a word can come back split, for example
Bold erfor a word that's partly bold.
Considerations
- Use
.docxfiles. The action accepts files with the.docor.docxextension, but it reads them as Word Open XML (.docx) documents. An older binary.docfile can't be opened and the action fails. Save it as.docxin Word first. - File URL. The server's
Content-Typemust identify a Word document. If the server doesn't send a content type, the URL must end in a file name with an extension. If the request doesn't succeed, the action fails and the error shows the HTTP status. - File not found. If no file matches the File ID or File Path, or the File ID isn't a number, the action fails with
No file was found with the selected identifier method. - Wrong file type. Other file types fail with an
Invalid file formaterror. End users seeInvalid file format. Please provide a Word document. - Large documents produce a long token. Keep that in mind before saving it or showing it on a page.
- License. If the Word feature isn't licensed, the action can't run. See the note at the top of this page.
Examples
tip
To understand how to use the below examples, please see Running Examples.
1. Read a portal file by path
This action reads Portals/<PortalID>/Documents/Policy.docx and stores the text in [PolicyText].
{
"Title": "Plain text from Word",
"ActionType": "PlantAnApp.Word.PlainTextFromWord",
"Description": "Read the policy document",
"Condition": null,
"Parameters": {
"InputSelectedIdentifierMethodType": {
"Expression": "",
"Value": "FilePath",
"IsExpression": false,
"Parameters": {}
},
"InputFileId": "",
"InputFilePath": {
"Expression": "Documents/Policy.docx",
"Value": "",
"IsExpression": true,
"Parameters": {}
},
"InputFileUrl": "",
"OutputTokenName": "PolicyText"
}
}
2. Read a file from a URL
This action downloads https://example.com/files/terms.docx and stores its text in [TermsText].
{
"Title": "Plain text from Word",
"ActionType": "PlantAnApp.Word.PlainTextFromWord",
"Description": "Read the terms document from a URL",
"Condition": null,
"Parameters": {
"InputSelectedIdentifierMethodType": {
"Expression": "",
"Value": "FileUrl",
"IsExpression": false,
"Parameters": {}
},
"InputFileId": "",
"InputFilePath": {
"Expression": "",
"Value": "",
"IsExpression": false,
"Parameters": {}
},
"InputFileUrl": "https://example.com/files/terms.docx",
"OutputTokenName": "TermsText"
}
}
Revised 09/26/2026