Notion Page to Word/PDF Document Generator
On request or status change, the flow reads a Notion page's content, renders it into a branded Word document (and PDF), files it to a SharePoint library, and writes the document link back to the Notion page. Useful for turning Notion proposals, SOWs, or reports into formal, shareable documents on demand.
Provided as-is, without warranty of any kind. Review and test each pattern in a non-production environment before deploying it to live automations. See our Terms.
Overview
This flow turns a Notion page into a formal, shareable document. On a schedule it scans a Notion database for pages flagged for generation, reads each page's blocks, renders the content into a branded HTML document (saved as a Word-openable .doc), converts it to PDF via OneDrive, archives both files to a SharePoint library, and writes the document link back to the Notion page.
Why it matters: Notion is excellent for drafting but not for polished, shareable deliverables. Generating a branded Word/PDF on demand bridges authoring in Notion with professional output - no copy-paste into a template.
Ships Off (demo). Brand company name and accent colour are flow variables you can change without touching env vars.
Use Case
Operations and Sales teams draft proposals, SOWs, and reports in Notion and want a one-click (here, scheduled) way to produce a branded Word/PDF, store it in SharePoint, and link it back to the source page - without manual formatting.
Flow Architecture
Daily 07:00 Recurrence
RecurrenceScans for pages flagged for generation (swap for a PowerApps/instant trigger for true on-demand).
Initialize Config & Brand
Initialize variableBinds 10 env vars (Notion token/version, DB id, status property/value, title property, doc-link property, site URL, output + working folders) plus brand company name and accent colour.
Query & Filter Flagged Pages
Notion - Query_a_database + Filter arrayReads all rows, keeps pages whose status equals the configured Generate value.
For Each Page
Apply to each (concurrency 1)Reads the page blocks, renders branded HTML, writes a working .html to OneDrive, converts it to PDF, archives the PDF and Word-openable .doc to SharePoint, builds the document URL, PATCHes the link back to Notion, and increments the counter.
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_NotionDocDatabaseId | String | REPLACE_WITH_NOTION_DOC_DATABASE_ID | Source pages database id. |
| flowlibs_NotionApiToken | String | REPLACE_WITH_NOTION_INTEGRATION_SECRET | Notion integration secret (HTTP write-back). |
| flowlibs_NotionApiVersion | String | 2022-06-28 | Notion-Version for the HTTP write-back. |
| flowlibs_GenerateStatusProperty | String | Status | Notion property that flags a page for generation. |
| flowlibs_GenerateStatusValue | String | Generate | Value that triggers generation. |
| flowlibs_NotionTitleProperty | String | Name | Title property used for the document title/filename. |
| flowlibs_DocLinkProperty | String | Document URL | URL property the link is written back to. |
| flowlibs_SharePointSiteURL | String | https://your-tenant.sharepoint.com | Output SharePoint site. |
| flowlibs_OutputLibraryFolderPath | String | /Shared Documents/Generated Documents | Archive library/folder (server-relative). |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Notion | shared_notionip | Query_a_database Retrieve_block_children |
| OneDrive for Business | shared_onedriveforbusiness | CreateFile ConvertFile |
| SharePoint | shared_sharepointonline | CreateFile |
| HTTP | shared_http | PATCH /v1/pages |
Note — All connections are referenced as solution connection references; the flow is portable between environments as long as a connection is mapped at import time.
Customization Guide
Almost every realistic variant of this flow can be implemented by changing environment variable values. A few cases require small edits inside the flow definition — those are called out explicitly below.
- True on-demand generation
- Replace the Recurrence trigger with a PowerApps (V2) or manual button trigger that accepts a Notion page id, and skip the query/filter.
- Branded Word template
- Upload a .docx template with content controls and swap the HTML-doc steps for Word Online PopulateMicrosoftWordTemplate (then GetFilePDF).
- Adobe PDF Services
- Swap the OneDrive conversion for Adobe PDF Services for higher-fidelity rendering.
- e-sign
- Chain to DocuSign/PandaDoc for signature after archiving.
- Rich block coverage
- Extend the Select map to handle headings, lists, to-dos, tables, and multi-run formatting.
- Mark as generated
- Extend the write-back to also set the status to Generated to prevent re-processing.
Key Expressions
The flow is intentionally light on Power Fx / WDL gymnastics — the heaviest expressions are the branch-name concatenation and the approval outcome check. They are listed below in the order they appear in the flow.
EXPR.01Filter flagged pages
Keeps pages whose status/select equals the Generate value.
EXPR.02Page title
Document title from the configured property.
EXPR.03PDF document URL
Absolute URL of the archived PDF.
EXPR.04Notion write-back body
Writes the document URL into the link property.
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.