I have created a workflow that when a user enters a terminated state they are checked if they are owner of any roles. After verifying data on the user is collected and an email is delivered containing the name of the user and the roles that they held.
My problem I’m running into is this seems to only be achievable in an Email action and the Form action when sending an email doesn’t seem to support variables.
I have attempted to define these variables on their own and utilize them but with no success. The JSONPath as I can understand it would only allow me to put in one line of data gathered in the workflow.
Including the workflow with all of my personal data stripped from it, please feel free to review and any assistance to make what I have listed in the Email action function in the Form action would be greatly appreciated! I just don’t seem to be able to find any direction on this that is leading me to where I want to go with this.
Thank you, I wasn’t sure about that call to that field either but I didn’t experience issues when doing my tests.
My goal is to get the form email action to populate something similar to the email action.
My email action is populated with.
Hello ${manager},
${terminatedEmployee} has left the company, they previously were holding ownership of some roles. A second email will follow that will contain a link to a form to let you re-assign this access.
Here is a list of all the roles that ${terminatedEmployee} had previously owned.
I defined variables in their own operation and if I attempt to write anything similar to the form email they do not return any of the stored information.
Is my understanding correct that the notification body is not capable of having readable variables within it? I know I can use the JSONPath to bring in a single variable but I cannot have any plain text with it as it errors instantly.
It should be possible with the only exception being the .JSON() variable you added there. I’ve experienced some issues (might be a bug) with the form converting array based or JSON based variables into the form.
Instead of using the template context and referencing it with ${roleList}, try referencing the variable directly in the form body notification body. So something like this:
Hello {{$.getIdentity1.attributes.firstname}},
{{$.getIdentity.attributes.displayName}} has left the company, they previously were holding ownership of some roles. A second email will follow that will contain a link to a form to let you re-assign this access.
Here is a list of all the roles that {{$.getIdentity.attributes.displayName}} had previously owned.
{{$.hTTPRequest1.body[*].name.JSON()}}