In this tutorial you will learn how to configure ConfiForms to provide sequential approvals workflow using actions defined by IFTTT macro rules.

This tutorial is not very simple, and you have to pay attention to details. And it is an alternative to the tutorial: Creating form with sequential approvals workflow in Confluence with ConfiForms

To learn the basics about ConfiForms see Creating a simple form in Confluence with ConfiForms


Same setup as in Creating form with sequential approvals workflow in Confluence with ConfiForms , but instead of Field Definition Rule for  "statelabel" with a formula field we will have a number of IFTTT macros (macro updates the original record based on the condition we set)


We will have 3 user groups who should be able to approve a proposal in a sequential way, one by one and only when a proposal is in a certain state.

3 user groups (security groups in Confluence) are as follows:

The form is very simple and has 2 common fields to capture the proposal text in a plaintext format and to set a readonly field to show the proposal approval state as a text.

For each user group we will setup own field control of type "checkbox" to change current approval state to next state. Fields are restricted to be editable by certain user group only

So in total we will have 5 fields here:




And we will have 4 IFTTT rules which handle the approval state for us

  1. The record get's created with state "Created"
  2. When it is approved by Devs it get's a state "Approved By Devs" (condition in IFTTT:  approvedByDevs:true)
  3. When it is approved by PMs it get's a state "Approved by PMs" (condition in IFTTT:  approvedByPM:true)
  4. When it is approved by Finance it get's a state "Approved by Finance" (condition in IFTTT:  approvedByFin:true)


3 IFTTTs are set on modify event and 1 is on created



The whole storage format for the form is listed below:

<ac:structured-macro ac:macro-id="81b6f18d-2cd2-4604-b9f3-7a3ea40d77fd" ac:name="confiform" ac:schema-version="1">
  <ac:parameter ac:name="additionalFormAdmins">devs,pm,fin</ac:parameter>
  <ac:parameter ac:name="formName">proposals</ac:parameter>
  <ac:parameter ac:name="saveButtonLabel">Register proposal</ac:parameter>
  <ac:parameter ac:name="registrationFormTitle">Register</ac:parameter>
  <ac:rich-text-body>
    <p>
      <ac:structured-macro ac:macro-id="5e9e1e46-2d3d-4847-b4c4-01e7345b2a6c" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">proposaltext</ac:parameter>
        <ac:parameter ac:name="fieldLabel">Proposal text</ac:parameter>
        <ac:parameter ac:name="type">textarea</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="e4ddb043-92a7-4608-81f3-1e5b2138c58c" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">statelabel</ac:parameter>
        <ac:parameter ac:name="fieldLabel">State</ac:parameter>
        <ac:parameter ac:name="type">text</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="2e4eeef9-293e-4054-9e94-4297ea87ee17" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="editRestrictions">devs</ac:parameter>
        <ac:parameter ac:name="fieldName">approvedByDevs</ac:parameter>
        <ac:parameter ac:name="fieldLabel">Approved (Devs)</ac:parameter>
        <ac:parameter ac:name="type">checkbox</ac:parameter>
      </ac:structured-macro>
    </p>
    <ac:structured-macro ac:macro-id="cad189f1-b3b6-4f33-8b79-95bd09898572" ac:name="confiform-field-definition" ac:schema-version="1">
      <ac:parameter ac:name="editRestrictions">pm</ac:parameter>
      <ac:parameter ac:name="fieldName">approvedByPM</ac:parameter>
      <ac:parameter ac:name="fieldLabel">Approved By (PMs)</ac:parameter>
      <ac:parameter ac:name="type">checkbox</ac:parameter>
    </ac:structured-macro>
    <p>
      <ac:structured-macro ac:macro-id="15424339-b023-4f46-8924-5798fa2246bb" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="editRestrictions">fin</ac:parameter>
        <ac:parameter ac:name="fieldName">approvedByFin</ac:parameter>
        <ac:parameter ac:name="fieldLabel">Approved By (Finance)</ac:parameter>
        <ac:parameter ac:name="type">checkbox</ac:parameter>
      </ac:structured-macro>
      <ac:structured-macro ac:macro-id="bace5ca5-6709-4915-ab2a-d460871e892d" ac:name="confiform-entry-register" ac:schema-version="1">
        <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
        <ac:rich-text-body>
          <p> </p>
        </ac:rich-text-body>
      </ac:structured-macro>
      <ac:structured-macro ac:macro-id="4cf642af-0a9e-41ab-817c-53dbf575db48" ac:name="confiform-field-definition-rules" ac:schema-version="1">
        <ac:parameter ac:name="condition">id:[empty]</ac:parameter>
        <ac:parameter ac:name="fieldName">approvedByDevs,approvedByPM,approvedByFin</ac:parameter>
        <ac:parameter ac:name="action">Hide field</ac:parameter>
        <ac:parameter ac:name="actionFieldName">statelabel</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="dc49fcc8-7dd0-4ebe-b062-da5f88970cea" ac:name="confiform-field-definition-rules" ac:schema-version="1">
        <ac:parameter ac:name="condition">id:[empty]</ac:parameter>
        <ac:parameter ac:name="fieldName">statelabel</ac:parameter>
        <ac:parameter ac:name="action">Hide field</ac:parameter>
        <ac:parameter ac:name="actionFieldName">statelabel</ac:parameter>
      </ac:structured-macro>
    </p>
    <ac:structured-macro ac:macro-id="e0764127-8f55-4ff0-bbc8-d942186acae6" ac:name="confiform-ifttt" ac:schema-version="1">
      <ac:parameter ac:name="action">Create ConfiForms Entry</ac:parameter>
      <ac:parameter ac:name="event">onCreated</ac:parameter>
      <ac:parameter ac:name="title">entryId=[entry.id]&amp;statelabel=Created</ac:parameter>
      <ac:rich-text-body>
        <p> </p>
      </ac:rich-text-body>
    </ac:structured-macro>
    <ac:structured-macro ac:macro-id="a6829260-ae72-47a8-8ab6-10e2052f3e3a" ac:name="confiform-ifttt" ac:schema-version="1">
      <ac:parameter ac:name="condition">approvedByDevs:true</ac:parameter>
      <ac:parameter ac:name="action">Create ConfiForms Entry</ac:parameter>
      <ac:parameter ac:name="event">onModified</ac:parameter>
      <ac:parameter ac:name="title">entryId=[entry.id]&amp;statelabel=Approved By Devs</ac:parameter>
      <ac:rich-text-body>
        <p> </p>
      </ac:rich-text-body>
    </ac:structured-macro>
    <ac:structured-macro ac:macro-id="d7732e21-cc32-4e70-97f2-a2af333ff262" ac:name="confiform-ifttt" ac:schema-version="1">
      <ac:parameter ac:name="condition">approvedByPM:true</ac:parameter>
      <ac:parameter ac:name="action">Create ConfiForms Entry</ac:parameter>
      <ac:parameter ac:name="event">onModified</ac:parameter>
      <ac:parameter ac:name="title">entryId=[entry.id]&amp;statelabel=Approved By PMs</ac:parameter>
      <ac:rich-text-body>
        <p> </p>
      </ac:rich-text-body>
    </ac:structured-macro>
    <ac:structured-macro ac:macro-id="d635786d-7a00-478f-a308-7cb7dfb6f030" ac:name="confiform-ifttt" ac:schema-version="1">
      <ac:parameter ac:name="condition">approvedByFin:true</ac:parameter>
      <ac:parameter ac:name="action">Create ConfiForms Entry</ac:parameter>
      <ac:parameter ac:name="event">onModified</ac:parameter>
      <ac:parameter ac:name="title">entryId=[entry.id]&amp;statelabel=Approved By Finance</ac:parameter>
      <ac:rich-text-body>
        <p> </p>
      </ac:rich-text-body>
    </ac:structured-macro>
  </ac:rich-text-body>
</ac:structured-macro>



This is about everything about form configuration, let's proceed with an actual approvals workflow.

We use ListView macro to show the data and have setup multiple edit buttons what are visible to certain user groups. Here is how it looks in the editor

So, we reference the form by name ("proposals") and put references to field definitions using ConfiForms Field macros. So far, so good. Simple and straightforward. The trick though is with configuration of ConfiForms Edit Controls. We want it to appear only for certain user groups and only when a record is in certain condition. Let's see it in details: