...
Demo Video https://www.youtube.com/watch?v=Bdd6J_KnUIo
Pre-condition
Navigate to Manage Apps
Click on Configure button on Macro for Assets
Click on API tab
Click Generate Access Token
Copy the token and the URL you will need them when configure web requests
...
Navigate to Global Automation at
instance_url/jira/settings/automation
Click Create
Select Trigger Object
Add component, select THEN action
Select Send web request
Paste the copied URL from pre-condition into Web request url field
Add ?token=<<<token from pre-condition>>>&spaceKey=<<<THE_SPACEKEY>>>
Select Method POST
Select Custom Data
Add the following body, it will create a Page with the same name as the object
Code Block [ { "title":"{{object.name}}", "parentPageId":"", "macros":<<<MACRO_CONFIG_GOES_HERE>>> } ]
Paste the response from the Get template configuration step (e.g. REST request) in the <<<MACRO_CONFIG_GOES_HERE>>> part of the above code.
Code Block [ { "title":"{{object.name}}", "parentPageId":"", "macros":[ { "id": "THIS_CAN_BE_BLANK", "configuration": { "columns": [], "iql": "key={{object.key}}", "displayAs": "AS_VERTICAL_TABLE", "pageSize": 25, "schemaId": "6", "connectionId": "45157a8a-79ad-46f7-b920-c21211bf79ec" } } ] } ]
Click Turn on Rule
Name the rule something, lets call it Create page from object.
...
Navigate to Global Automation at
instance_url/jira/settings/automation
Click Create
Select Trigger Object
Add component, select THEN action
Select Send web request
Paste the copied URL from pre-condition into Web request url field
Add ?token=<<<token from pre-condition>>>&spaceKey=<<<THE_SPACEKEY>>>&pageId=<<<THE_PAGE_ID_TO_COPY>>>
Select Method PATCH
Select Custom Data
Add the following body, it will create a Page with the same name as the object
Code Block [ { "title":"{{object.name}}", "parentPageId":"", "macros":<<<MACRO_CONFIG_GOES_HERE>>> } ]
Paste the response from the Get template configuration step (e.g. REST request) in the <<<MACRO_CONFIG_GOES_HERE>>> part of the above code.
Code Block [ { "title":"{{object.name}}", "parentPageId":"", "macros":[ { "id": "THIS_CAN_BE_BLANK", "configuration": { "columns": [], "iql": "key={{object.key}}", "displayAs": "AS_VERTICAL_TABLE", "pageSize": 25, "schemaId": "6", "connectionId": "45157a8a-79ad-46f7-b920-c21211bf79ec" } } ] } ]
Click Turn on Rule
Name the rule something, lets call it Create page from object.
...
Create an Object
This will now call the automation that will result in create a new Page with the macro config. Depending on use case it can be a blank page or a copy of a page