Notion
0.8.0
Module for interaction with Notion based on classes
Minimum PowerShell version
7.0
See the version list below for details.
Installation Options
Owners
Copyright
(c) Thomas Subotitsch, Fabian Franz Steiner. All rights reserved.
Package Details
Author(s)
- Thomas Subotitsch Fabian Franz Steiner
Tags
Functions
New-NotionRichText New-NotionRichTextAnnotation New-NotionBookmarkBlock New-NotionBreadcrumbBlock New-NotionBulletedListItemBlock New-NotionCalloutBlock New-NotionChildPageBlock New-NotionChildDatabaseBlock New-NotionImageBlock New-NotionPdfBlock New-NotionVideoBlock New-NotionCodeBlock New-NotionColumnBlock New-NotionColumnListBlock New-NotionDividerBlock New-NotionEmbedBlock New-NotionEquationBlock New-NotionFileBlock Add-NotionHeaderToBlock New-NotionHeadingBlock New-NotionLinkPreviewBlock New-NotionNumberedListItemBlock New-NotionParagraphBlock New-NotionQuoteBlock New-NotionSyncedBlock New-NotionTableBlock New-NotionTableOfContentsBlock New-NotionTableRowBlock New-NotionToDoBlock New-NotionToggleBlock Add-NotionBlockToPage Get-NotionBlock Get-NotionBlockChildren New-NotionBlock Remove-NotionBlock Update-NotionBlock Add-NotionDatabaseProperty New-NotionDatabaseProperty Remove-NotionDatabaseProperty Add-NotionPageToDatabase Edit-NotionDatabase Get-NotionDatabase Move-NotionDatabaseToArchive New-NotionDatabase Remove-NotionDatabase Restore-NotionDatabase New-NotionEmoji New-NotionFile Get-NotionPageProperty Update-NotionPageProperty Get-NotionPage Get-NotionPageChildren Move-NotionPageToArchive New-NotionPage Remove-NotionPage Restore-NotionPage New-NotionParent Get-NotionUser Connect-Notion ConvertTo-NotionObject Disconnect-Notion Invoke-NotionApiCall zz1_Type_Accelerator zz2_Type_Accelerator
Dependencies
This module has no dependencies.
Release Notes
## [0.8.0] - 2025-06-23
### Added
- **source/Classes/Block/RichText/01_Rich_Text.ps1**
- Added Factory method `::Create` to instantiate `notion_rich_text` objects from various input types.
- Added prototype of `ConvertFromMarkdown` method to convert Markdown text to `notion_rich_text` objects.
- **source/Classes/Parent/00_parent.ps1**
- Added Recommended Action for unknown parent types in the `ConvertFromObject` method.
- **source/Public/Block/Code/New-NotionCodeBlock.ps1**
- Added Aliases for `text`: `code`, `content`, for better flexibility in block creation.
- **source/Public/Block/_RichText/New-NotionRichText.ps1**
- Included Possibility to pass a Markdown via `-MarkdownText`
- **source/Public/Emoji/New-NotionEmoji.ps1**
- Added new function to create `notion_emoji` objects from strings.
- **tests/Integration/Block/callout.tests.ps1**
- Added integration tests for `New-NotionCalloutBlock` cmdlet, covering various scenarios and rich text handling.
- New Unit Tests for several classes:
- `tests/Unit/Classes/Emoji/Custom_Emoji.Tests.ps1`
- `tests/Unit/Classes/Emoji/Emoji.Tests.ps1`
- `tests/Unit/Classes/Page/PageProperties/pp_checkbox.Tests.ps1`
- `tests/Unit/Classes/Parent/parent.Tests.ps1`
- `tests/Unit/Classes/User/user.Tests.ps1`
- New Unit Tests for several functions:
- `tests/Unit/Public/Block/Callout/New-NotionCalloutBlock.Tests.ps1`
- `tests/Unit/Public/Emoji/New-NotionEmoji.Tests.ps1`
### Changed
- renamed `icon_type` to `notion_icon_type`
### Fixed
- **source/Classes/Block/05_Bookmark.ps1**
- Corrected constructors to (remove call to base class constructor)
- **source/Classes/Block/RichText/Type/01_Rich_text_text.ps1**
- Fixed `ConvertFromObject` in main class and structure class to handle both string and object inputs correctly, ensuring robust rich text handling.
- Also fix href handling in the constructor to ensure it is set correctly when provided.
- **source/Classes/Emoji/02_Custom_Emoji.ps1**
- hardcoded the `type` property to `custom_emoji` in the constructor, as it is required by the Notion API.
- **source/Public/Block/Callout/New-NotionCalloutBlock.ps1**
- Switched to object array for `rich_text` parameter to allow multiple rich text objects, improving flexibility in block creation.
- **source/Public/Block/_RichText/New-NotionRichText.ps1**
- Fixed conversion of rich_text, by passing it as an object to `[rich_text]::ConvertFromObjects`, ensuring consistent handling of rich text objects.
- **source/Public/Parent/New-NotionParent.ps1**
- Switched to factory method `::Create` to ensure the conversion logic is handled by the class itself, improving consistency and maintainability. Also initalize the id to an empty string if not provided, to ensure the object is always in a valid state and can be created without errors.
### Removed
- **source/Classes/Block/RichText/Type/03_Rich_text_equation.ps1**
- Duplicate constructor with one parameter removed, PowerShell does not support this syntax.
### Deprecated
- **source/Public/Block/LinkPreview/New-NotionLinkPreviewBlock.ps1**
- Deprecated `New-NotionLinkPreviewBlock` cmdlet, as the Notion API does not support creating link preview blocks directly.
- Added a error message to inform users about the deprecation.
FileList
- Notion.nuspec
- Notion.psm1
- Notion.psd1
- en-US\about_Notion.help.txt
Version History
Version | Downloads | Last updated |
---|---|---|
0.10.0 | 4 | 6/27/2025 |
0.9.0-previe... | 3 | 6/24/2025 |
0.9.0-previe... | 3 | 6/24/2025 |
0.8.0 (current version) | 11 | 6/23/2025 |
0.7.0 | 5 | 6/19/2025 |
0.6.0 | 5 | 6/16/2025 |
0.5.0 | 5 | 6/14/2025 |
0.5.0-previe... | 3 | 6/14/2025 |
0.4.0 | 4 | 6/14/2025 |
0.4.0-previe... | 3 | 6/4/2025 |
0.4.0-previe... | 3 | 5/29/2025 |
0.4.0-previe... | 3 | 5/29/2025 |
0.3.0 | 8 | 5/18/2025 |
0.2.0 | 5 | 5/18/2025 |
0.2.0-previe... | 3 | 5/2/2025 |
0.2.0-previe... | 3 | 3/24/2025 |
0.2.0-previe... | 3 | 3/24/2025 |
0.2.0-previe... | 3 | 3/24/2025 |
0.2.0-previe... | 3 | 3/2/2025 |
0.2.0-previe... | 3 | 3/2/2025 |
0.2.0-previe... | 3 | 2/22/2025 |
0.2.0-previe... | 3 | 2/22/2025 |