Update Table of Contents in Word with Power Automate
PDF4me Update Table of Contents is a Power Automate action that scans a Word document's headings and generates or refreshes its Table of Contents automatically. Use it to add professional, clickable navigation to technical manuals, academic papers, or long reports the moment a document lands in a flow, without opening Word.
What this action does
PDF4me Update Table of Contents reads a Word document's Heading 1 through Heading 6 styles within a configured range, then updates an existing TOC field or creates a new one at the document's start, with control over hyperlinks, tab leaders, letter case, and locale.
Authenticating Your API Request
To access the PDF4me Web API through Power Automate, every request must include a valid API key. Authentication validates your identity and enables the connector to reach PDF4me's Word TOC service from your flow.
Important Facts You Should Not Miss

File Content, File Name, Heading Levels, and Use Hyperlinks sit on the main form; Hide Tab Leader, Use Uppercase, and Culture Name are Advanced parameters.
Parameters
Required: File Content and File Name must always be provided. Heading Levels and Use Hyperlinks carry working defaults, and Hide Tab Leader, Use Uppercase, and Culture Name are Optional Advanced parameters.
| Parameter | Required | What it does | Example |
|---|---|---|---|
| File Content | Required | Base64 content of the source Word file, typically mapped from a prior action like SharePoint or OneDrive Get File Content. Must be a valid .docx or .doc document. | [File Content from Get File] |
| File Name | Required | Name of the Word file including its extension, used for processing and output naming; the output filename matches the input. | document.docx |
| Heading Levels | Optional | Range of Word heading styles to include, for example "1-3" for levels 1 through 3, "1" for a single level, or "1-2,4-6" for combined ranges. Defaults to "1-3". | 1-3 |
| Use Hyperlinks | Optional | Yes makes TOC entries clickable links to their headings; No renders plain text entries. Defaults to Yes. | Yes |
| Hide Tab Leader | Optional | Advanced parameter. Yes removes the dotted line between entry text and page numbers; No keeps it. Defaults to Yes. | Yes |
| Use Uppercase | Optional | Advanced parameter. Yes renders all TOC entries in uppercase; No preserves the heading's original case. Defaults to Yes. | Yes |
| Culture Name | Optional | Advanced parameter. Locale code such as en-US or de-DE for document processing and metadata; leave blank for no culture-specific handling. | en-US |
What Does Update Table of Contents Return?
| Field | Type | What it contains |
|---|---|---|
document | Base64 | Word document with the Table of Contents updated or newly created. |
Success | Boolean | true when the update completed, false if the request failed validation or processing. |
Error Message | String | Description of what went wrong, null when Success is true. |
Errors | Array | Detailed error entries, empty when Success is true. |
{
"document": "[Base64 Word Content with Updated Table of Contents]",
"Success": true,
"ErrorMessage": null,
"Errors": []
}
Common Error Messages
| Error Message | Cause | Solution |
|---|---|---|
Request is empty | Request object is null. | Provide a valid request object. |
Document is empty | Document object is null. | Provide a valid Word document. |
Error loading document from bytes | Invalid or corrupted Word document. | Verify the input document is a valid Word file (.docx). |
No headings found in document | Document has no heading styles applied. | Apply Heading 1 through Heading 6 styles to the sections that should appear in the TOC. |
Invalid heading levels specified | Heading Levels contains an invalid format. | Use a valid format such as "1-3", "1", or "1-2,4-6". |
Invalid culture name provided | Culture Name is not a recognized locale. | Use a valid culture code such as en-US or fr-FR. |
How Do I Set Up Update Table of Contents in Power Automate?
- Add PDF4me → Update Table of Contents to your Power Automate flow.
- Map File Content and File Name from a previous action, such as SharePoint or OneDrive Get File Content.
- Set Heading Levels to the range of heading styles to include, and Use Hyperlinks to control whether entries are clickable.
- Open Advanced parameters if the document needs a non-default tab leader, letter case, or a specific Culture Name locale.
- Run the flow. PDF4me updates or creates the TOC and returns the Word document as
document.
What Heading Levels Range Should I Use?
Use "1-3", the default, for most business documents and reports, since it captures section and subsection headings without pulling in minor sub-subheadings. Use a wider range like "1-6" for complex legal or technical documents where deep nesting needs to be navigable. Use combined ranges like "1-2,4-6" when a document's level-3 headings are decorative or repetitive and should be skipped while still capturing the deeper structure below them.
Typical Setups
Workflow ExamplesCommon Power Automate flow patterns using Update Table of Contents.
- A flow triggers when a technical manual is uploaded to a SharePoint "Manuals" library.
- Get File retrieves the uploaded Word document.
- Update Table of Contents runs with Heading Levels set to "1-4" and Use Hyperlinks set to Yes.
- The indexed manual is saved back to the library, ready for readers to jump between sections.
- A research paper submission flow receives a new manuscript.
- Update Table of Contents runs with Heading Levels "1-3", Hide Tab Leader Yes, and Use Uppercase Yes to match the department's formatting standard.
- The standardized paper is routed to the review committee for evaluation.
- An international document flow prepares a translated Word file for a regional office.
- Update Table of Contents runs with Culture Name set to the target locale, for example "de-DE", alongside the standard Heading Levels and Use Hyperlinks settings.
- The localized, navigable document is distributed to the regional team.
Practical Tips
Cheat Sheet
| Field | Value |
|---|---|
| Action | Update Table of Contents |
| File Content / File Name | Mapped from a prior action, .docx or .doc |
| Heading Levels | "1-3" default, or "1", or "1-2,4-6" |
| Use Hyperlinks | Yes (default) or No |
| Advanced: Hide Tab Leader | Yes (default) or No |
| Advanced: Use Uppercase | Yes (default) or No |
| Advanced: Culture Name | e.g. en-US, de-DE, blank for none |
| No headings found | Apply Word Heading 1-6 styles first |
| Output | document (Base64 Word), Success, Error Message, Errors |
Common Questions
Industry Use Cases & Applications
- Legal Industry
- Education
- Healthcare
- Finance & Banking
- Manufacturing
Legal Industry Use Cases
- Contract Navigation: Generate a detailed TOC for complex, multi-section contracts
- Legal Briefs: Create a navigable structure for lengthy court documents
- Compliance Manuals: Index regulatory requirements and procedures
- Case Documentation: Organize evidence summaries and legal arguments
Education Use Cases
- Textbook Indexing: Create a comprehensive TOC for educational materials
- Research Papers: Standardize academic document structure before submission
- Course Materials: Organize curriculum content and reference resources
- Thesis Documentation: Structure graduate and doctoral work
Healthcare Use Cases
- Medical Manuals: Index clinical procedures and protocols
- Research Documentation: Organize clinical study materials
- Training Materials: Structure healthcare education content
- Compliance Guides: Navigate regulatory requirements quickly
Finance & Banking Use Cases
- Financial Reports: Create a navigable structure for complex reports
- Policy Manuals: Index banking procedures and regulations
- Audit Documentation: Organize compliance and audit materials
- Investment Guides: Structure financial education content
Manufacturing Use Cases
- Technical Manuals: Create a detailed TOC for equipment documentation
- Quality Procedures: Index manufacturing processes and standards
- Safety Guidelines: Organize workplace safety information
- Training Materials: Structure technical education content