One-click approval links

One-click approval links and tokens allow approvers to approve or reject an entry directly from an email without having to open the Workflow detail page.

Links to the admin UI require authentication, whereas links to a page on the front-end with the inbox shortcode do not require authentication. See link below for further information about the shortcode.

Insert the {workflow_approve_link} and {workflow_reject_link} merge tags in the assignee email. The links will expire after 48 hours, but this can be adjusted using the  gravityflow_email_token_expiration_days filter.

Approval links are available only in the approval step assignee email. They're not available in any other steps, any other emails or Gravity Forms notifications.

As of Gravity Flow 2.7.9 - You can also add {workflow_revert_link} if your approval step has defined a Revert to User Input step setting.

Add approval links either by typing the merge tag manually or selecting them from the merge tag list.

Approval step settings showing the email notification design with merge tags

If you're using the inbox shortcode, you'll need to add the page_id attribute to the merge tag like this:

{workflow_approve_link:page_id=[ID]}
{workflow_reject_link:page_id=[ID]}<br>{workflow_revert_link:page_id=[ID]}
e.g. {workflow_reject_link:page_id=5}

You can find the page ID in the URL of the page when you're editing the WordPress page. The page ID is the 'post' parameter in the URL.

You can define what the link text displays via the : text modifier:

{workflow_approve_link:text="Approve this selection"}<br>{workflow_reject_link:text="Reject this selection"}

You can construct your own links by using the URL equivalents:

<a href="{workflow_approve_url:page_id=[ID]}" class="major-cta">Your approval link message</a>
<a href="{workflow_reject_url:page_id=[ID]}" class="minor-cta">Your reject link message</a><br><a href="{workflow_revert_url:page_id=[ID]}" class="major-cta">Your revert/edit link message</a>

Security

One-click approval links that point to the admin UI require authentication. When an assignee clicks on the link they need to log in to the WordPress dashboard. If the assignee already has the authentication cookie on his or her computer then the password prompt will not appear.

However, one-click approval links that point to the front-end inbox shortcode  do not require authentication, meaning the assignee will not be prompted to log in to approve or reject an entry. In this case, the assignee receives a unique URL with a token which allows the assignee to perform the action encoded inside the token. Be aware that anybody who has access to the link can use it to perform the action, so the assignees should be aware of the implications of sharing/forwarding the links.

Note

One-click Approve/Reject links will bypass all validations for Approve/Reject. For e.g. if you have *Required editable fields in the Approval step (since Gravity Flow v2.9) or have set the workflow notes to be required, the one-click Approve/Reject links will Approve/Reject by bypassing those stipulations. This means, if you have such stipulations in your Approval step, consider using the workflow link {workflow_entry_url} instead.