/
How to prevent the parent folder name from appending to the page created in Confluence using CLI
How to prevent the parent folder name from appending to the page created in Confluence using CLI
This article explains how to prevent the parent folder name being appended to the page created in Confluence using the Confluence Command Line Interface app.
Instructions
Follow the steps below to pull the HTML content into the Confluence page without appending the title of the page to each .html files using runFromCsv and addPage CLI actions:
- runFromCsv: Runs all the actions generated from the CSV file with the parameters mentioned.
- addPage: Create a confluence page.
- Create a .csv file with column headers space, title, parent and file and input the values as shown below:
Here, the files are placed in the CLI client location.
Here is a sample HTML file: Run the below CLI action:
--action runFromCsv --file "Files_Folder/HTML.csv" --common "--action addPage --replace --markdown"
The output is displayed on the Confluence page based on the command executed:
Output on the Terminal:Run: --space "CLI" --title "CLI_Title_1" --parent "addPage_CLI" --file "Files_Folder/File1.html" --action addPage --replace --markdown Page created as 'CLI_Title_1' in space CLI as child of 'addPage_CLI'. Page has id 11534344. Run: --space "CLI" --title "CLI_Title_2" --parent "addPage_CLI" --file "Files_Folder/File2.html" --action addPage --replace --markdown Page created as 'CLI_Title_2' in space CLI as child of 'addPage_CLI'. Page has id 11534345. Run: --space "CLI" --title "CLI_Title_3" --parent "addPage_CLI" --file "Files_Folder/File3.html" --action addPage --replace --markdown Page created as 'CLI_Title_3' in space CLI as child of 'addPage_CLI'. Page has id 11534346. Run completed successfully. 3 actions were successful from file: Files_Folder/HTML.csv
If the file(s) are at a different location, you have to enter the full path of the HTML file under the file column.
Related content
addPage
Read with this
How to convert HTML pages to Confluence pages using Confluence CLI
How to convert HTML pages to Confluence pages using Confluence CLI
More like this
How to add a page as a child page using Confluence Command Line Interface
How to add a page as a child page using Confluence Command Line Interface
More like this
How to copy a hierarchy of pages to another space and replace text using Confluence CLI
How to copy a hierarchy of pages to another space and replace text using Confluence CLI
More like this
How to remove page version(s) from a Confluence page using CLI
How to remove page version(s) from a Confluence page using CLI
More like this
Anonymize content in a Confluence page with regex using Confluence CLI
Anonymize content in a Confluence page with regex using Confluence CLI
More like this