I am working on a workflow that includes a Manage Accessstep to grant an access profile to user.Everything works fine, however, the standard out-of-the-box notification for access requests is being triggered.
I would like to prevent this notification only when the access is granted by the workflow, without disabling the normal OOB notifications for regular user-initiated access requests.
Is there a recommended way to suppress these notifications specifically for workflow-generated access grants?
Off the top of my head, I’d probably just disable the out of the box email template by adding no_send or Stop as the first word in the Subject line. That should prevent the
notification from going out entirely. If you only need these notifications for specific scenarios, you could always build a custom workflow that sends emails
using the Send Email action with your own conditions for when it should trigger.
I would also perhaps try getting creative with the subject line, you might be able to use some Velocity logic to conditionally output #stop based on certain variables.
It’s not possible to directly determine if an action originated from Workflows. However, if there is a specific access name consistently used when submitting requests via Workflow, that can be leveraged to suppress emails., Example-
#foreach($requestDetail in $requestDetails) #foreach($requestedObjectDetail in $requestDetail.getSuccessDetails().get(‘ACCESS_PROFILE’)) #if($requestedObjectDetail.objectName.indexOf(‘Guest User’)!=-1)#stop #end#end#end Your request for access was submitted
On the email template that you would like to disable, you can configure the “no_send” keyword in the subject based off the requestor (owner of the workflow if you are using the Manage Access step). For instance, if you use a “service identity” to submit the access request then you can use velocity logic to output “no_send” if they are the requestor. An example below:
#if($requesterName == "SVC_AccessRequest")no_send#end${requesterName} Has Requested Access on Your Behalf
You can use additional velocity functions like startsWith or endsWith to generalize this as well!