How to select a (parent) page in advance
When you use the Create new page action in your operation, select Predefined page in the Parent Page Selection input.
When you instead use the Update (overwrite) existing page action or any action that uses a page in your operation, select Predefined page in the Page Selection input.
For the Page input (or the Parent Page input for the Create new page action) you have almost unlimited options to select the page. Here are some examples:
Constant page
To reference a constant page simply enter the page ID.
123456Custom field
If a custom field contains the page ID use the $fieldHelper.
$!fieldHelper.getValueAsString("My field with the page ID")Custom field on different issue
A custom field on another issue contains the page ID. That issue can be found via a JQL search. Note: The JQL string can contain variables as well.
#set($otherIssue = $!issueHelper.findIssue("key = TEST-123"))
$!fieldHelper.getValueAsString($otherIssue, "My field with the page ID")The other issue is selected in an Issue Picker custom field.
#set($otherIssue = $!issueHelper.getIssue($!fieldHelper.getValueAsString("My Issue Picker field")))
$!fieldHelper.getValueAsString($otherIssue, "My field with the page ID")With the space key and page title
You can also select a page if you only know the space key and page title.
$confluenceHelper.findPage("SpaceKey", "A Page Title").getId()Of course the space key and page title can be variable and come from other custom fields or anything else.
#set($issueWithSpaceKey = $!issueHelper.findIssue("key = TEST-123"))
#set($spaceKey = $!fieldHelper.getValueAsString($issueWithSpaceKey, "Field with space key"))
$confluenceHelper.findPage($!spaceKey, $!fieldHelper.getValueAsString("Field with page title")).getId()