Reference Account Attributes in IdentityNow Workflow Emails

Hi,

I have a workflow that send an email notification after provisioning and trying to get the account attribute samaccountname in the email body.

I’m using the sp:get-accounts step, but when I try to reference $.getAccounts.accounts[0].attributes.sAMAccountName, the email shows the literal expression. Any working examples of the proper $.getAccounts.accountssyntax would be greatly appreciated.

Hi Selvarani,

Try something like this: $.getAccounts.accounts[?(@.sourceName=="Active Directory")].attributes.sAMAccountName

Note that if the value is blank, your email may contain the json expression. In a case like that, add a wait step if it’s a timing issue, or a workaround is to concat a space and trim the end

"transforms": [
    {
        "id": "sp:transform:concatenate:string",
        "input": {
            "variableB": " "
        }
    },
    {
        "id": "sp:transform:trim:string",
        "input": {
            "postfix": true,
            "prefix": false
        }
    }
],

Hi Margo,

I tried that as well, but no luck. It shows the literal expression in the email,

image