createPage Documentation
Purpose
This node is designed to create a new page within a specified OneNote section in the Vantage analytics and data platform. This functionality allows users to programmatically manage their OneNote pages by defining a title and content, enhancing integration capabilities between analytics data and OneNote for improved organization and workflow.
Settings
The node incorporates several configurable settings. Each setting determines specific operational behavior and appearance for the page being created. Below is an exhaustive delineation of each setting.
1. sectionId
- Input Type: String (optional)
- Description: The
sectionIddetermines in which OneNote section the new page will be created. If this setting is not provided, the function will default to creating the page in the Vantage notebook’s 'Workflows' section. Changing this setting allows users to categorize pages more effectively within different sections of OneNote, aligning page organization with project needs. - Default Value: None (defaults to the 'Workflows' section if not specified)
2. title
- Input Type: String (required)
- Description: The
titlesetting is mandatory and specifies the title of the new page being created. This title directly impacts how the page is identified and referred to within OneNote. Setting this value is crucial as no page can be created without it. An empty title will trigger an error response. - Default Value: None (must be provided)
3. content
- Input Type: String (optional)
- Description: The
contentsetting contains the HTML body that will make up the content of the page. This allows for rich formatting and inclusion of various content types (text, images, links, etc.) within the OneNote page. Changing this setting directly affects the visual and functional content within OneNote. If no content is specified, an empty page will be created. - Default Value: Empty string (
'')
How It Works
The node operates as follows:
- Integration Setup: It starts by establishing a connection to the OneNote service using a secure connection.
- Section Handling: It checks for the
sectionIdto determine the section where the new page will be created. If thesectionIdis not provided, it defaults to creating the page in the 'Workflows' section. - Title Requirement: The function verifies the presence of the
title. If it is absent, an error message is returned. - Page Creation: Once all parameters are validated, it invokes the
integration.createPage()method to create a new page with the specified title and content. - Response Handling: Finally, it formats the output to include key details about the newly created page, such as its ID, title, and web URL, or returns an error if any issues occur during the process.
Data Expectations
The node expects the following data:
-
Inputs:
sectionId(optional): ID of the OneNote section as a string.title(required): The title of the new page as a string.content(optional): The HTML content of the page as a string.
-
Outputs:
- On success: Returns an object with:
output1: Contains data with the newly created page's ID, title, and URL.
- On failure: Returns an error message detailing the failure reason.
- On success: Returns an object with:
Use Cases & Examples
Use Cases
-
Project Documentation: A team uses
createPageto automatically generate pages for each project milestone, where the title represents the milestone and the content outlines tasks completed and those still in progress. -
Knowledge Base Creation: An analytics team integrates OneNote as a knowledge repository, using
createPageto create new pages for each data visualization or report, including charts and insights generated from Vantage. -
Meeting Notes: A project manager leverages
createPageto create a new OneNote page for each meeting, summarizing discussions and actions with titles formatted as "Meeting Notes - [Date]".
Example Configuration
Use Case: Generating a Meeting Notes page automatically after a meeting.
Configuration Data:
{
"inputs": {
"sectionId": "A1B2C3D4",
"title": "Meeting Notes - 2023-03-15",
"content": "<h1>Project Update</h1><p>Discussed progress and next steps.</p>"
},
"config": {
"sectionId": null,
"title": null,
"content": null
}
}In this example, a new page titled "Meeting Notes - 2023-03-15" will be created under the specified section (with ID A1B2C3D4), containing the provided content formatted in HTML. This ensures that all meeting notes are consistently recorded and easily retrievable in OneNote.