This site has moved to the integrated Appfire documentation and information site for our apps.

From February 2024 this site is no longer updated.

Take a look here! If you have any questions please email support@appfire.com

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Sending an email on on-approve  event if one of the assignees approves the page

A JSON trigger can be configured to send an email when a user undertakes an approval decision. The trigger consists of

  • the on-approve event
  • the state condition to specify the approval state
  • the send-email action

The on-reject event is used for a separate event if an action is required on a user rejection decision.

[
  {
    "event":"on-approve",
    "conditions":[
      {
        "state":"Review"
      }
    ],
    "actions":[
      {
        "action":"send-email",
        "recipients":[
          "@creator"
        ],
        "notification":{
          "subject":"${content.title} has been approved",
          "title":"${content.title} has been approved",
          "body":"Hello, ${content.link} in the ${content.space} has been approved by one approver"
        }
      }
    ]
  },
]
eventon-approve
  • trigger will only listen for a user approve decision - condition added to constrain the event to the Review state
conditionstate:Review
  • state condition for the trigger event
actionsend-email
  • email sent to the content author (@creator). An email is sent for each approval decision by a user


 JSON format to add to workflow builder
[{"event":"on-approve","conditions":[{"state":"Review"}],"actions":[{"action":"send-email","recipients":["@creator"],"notification":{"subject":"${content.title} has been approved","title":"${content.title} has been approved","body":"Hello, ${content.link} in the ${content.space} has been approved by one approver"}}]}]

To include an email for a user rejecting the content a second separate event must be added using the on-reject event.

 on-approve and on-reject multiple event trigger
[
  {
    "event":"on-approve",
    "conditions":[
      {
        "state":"Review"
      }
    ],
    "actions":[
      {
        "action":"send-email",
        "recipients":[
          "@creator"
        ],
        "notification":{
          "subject":"${content.title} has been approved",
          "title":"${content.title} has been approved",
          "body":"Hello, ${content.link} in the ${content.space} has been approved by one approver"
        }
      }
    ]
  },
  {
    "event":"on-reject",
    "conditions":[
      {
        "state":"Review"
      }
    ],
    "actions":[
      {
        "action":"send-email",
        "recipients":[
          "@creator"
        ],
        "notification":{
          "subject":"${content.title} has been rejected",
          "title":"${content.title} has been rejected",
          "body":"Hello, ${content.link} in the ${content.space} has been rejected by one approver"
        }
      }
    ]
  }
]

JSON format to add to workflow builder

[{"event":"on-approve","conditions":[{"state":"Review"}],"actions":[{"action":"send-email","recipients":["@creator"],"notification":{"subject":"${content.title} has been approved","title":"${content.title} has been approved","body":"Hello, ${content.link} in the ${content.space} has been approved by one approver"}}]}, {"event":"on-reject","conditions":[{"state":"Review"}],"actions":[{"action":"send-email","recipients":["@creator"],"notification":{"subject":"${content.title} has been rejected","title":"${content.title} has been rejected","body":"Hello, ${content.link} in the ${content.space} has been rejected by one approver"}}]}]


(info) It is mandatory in the send-email trigger action to add at least one recipient and include notification with subject and body values

A range of JSON trigger actions is available including the set-message action.

List of trigger actions


  • No labels