Child pages
  • Redirect to a created with IFTTT page

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This is an advanced technique to access objects created by IFTTT macros.

If you are new to ConfiForms please take a look here: Creating a simple form or Basic concepts to learn the basics about ConfiForms.

 

What we are trying to achieve:

...

formNamef

...

  • Redirect to a just created page and show it in edit mode. Confluence uses the following scheme for URLs to show page in edit mode

    Code Block
  • http://localhost:1990/confluence/pages/editpage.action?pageId=PAGE_ID

    PAGE_ID is the ID of the page you want to show in edit mode

 

Here is what we have:

  • A form with one field (just text field) and with ConfiForms Registration Control which has the following configuration
    Image Added
  • We have set ${iftttResult_0.id} instead of page ID. Some strange at first, but this is how the result of the IFTTT macro is stored. Number 0 shows that it is a result of 1st (numbering starts from 0) IFTTT macro. So, in variable ${iftttResult_0}

...

 

  • a created page is stored and you can reference it's ID via "id" property, like ${iftttResult_0.id}. You can reference any "get" property of the https://docs.atlassian.com/confluence/latest/com/atlassian/confluence/pages/AbstractPage.html object
  • IFTTT macro which we have defined is very simple. It is executed every time when the entry is created and creates a page. That is why the result stored is the page object.
    Image Added
  • Complete configuration is on the screenshot above. Please note that when "${}" symbols are used on the macro parameters then Confluence macro editor shows metadata for the configured macro like on the screenshot above (actually it is a ConfiForms Registration Control macro with configured "Redirect URL")


    Result:

    When new entry is added you will be redirected to just created Confluence page.


More about IFTTTs here DocumentationAdvanced integrations with IFTTT macros with ConfiForms

...