How to redirect user to template variable modal?

Hi devs, I would like to programatically create new page from space template. However, I am encountering a blocker for templates containing Variable macro.

On Confluence, when you select a template containing Variable macro from the sidebar, a modal will appear which lets user to set the value for the variables before going to the editor.

Is there a way to programmatically redirect user to template variable modal as shown below? Thank you in advance

Can you clarify a bit what you want the user to experience?

Are you trying to create a page programmatically (APIs) then redirect the user to the template variable drawer?

Yes, when the user clicks on my macro, I want to create a draft page using API and redirect the user to this draft page with the template variable drawer open. They can then set values for variable and edit the draft page before publishing it.

1 Like

It isn’t something that is currently do-able programmatically.

I see, that’s too bad but thanks for the reply

1 Like