My automation is simple:
It gets values from my assets and sends them on a webhook to Power Automate.
It starts with a lookupobjects
objectTypeId = 262 AND "Host Status" IN ("Active") AND "Sharepoint" = True and "Groups" is not empty And "groupsharepoint" != True
then for each smart value
Name
{{testing}}
Smart value
{{lookupObjects}}
i send this request
{
"Name":"{{testing.Name}}", // name of the host
"Group name":"{{testing.Groups.Name}}",// name of the host's group
"Key":"{{testing.Groups.Key}}", // name of the host's group key
"Access Type":"Host access",
"Request type":"Create groups"
}
Groups being an object value in my Host asset attribute.
But even after specifying in the lookup object that the Groups field must not be empty, I still receive an empty value from Groups.Name and more often from Groups.Key since every item has a key, I doubt that it is empty
I have added a delay within the for-each loop (I don't know why I thought it would help
)
I have decreased the lookupobjects item limit from 500 to 20 (maybe less item would help)
I have created a field in the host asset so I don't process repeated items. (And "groupsharepoint" != True)
I can't seem to get it right; it's like the values disappear in between the webhook and Power Automate.
This is an example of what im getting in power automate
"body": {
"Name": "Hostname",
"Group name": "PE-DPE, SG_ADMINS, Users, SG_SIR_ADMINS, SG_PATCH01IBM_Admins, SG_LOG02ALF_Admins, GitlabUsers, Salesforce System Administrator, SG_VPN_PRIO_Users, Remote Management Users, SG_Kyntech_SERVERSADMINS, SG_LINSAPROD01ALF_Operators, KAVWSEE Administrators, Print Operators, Access Control Assistance Operators, RDS Management Servers, SG_ARAQA01ALF_Operators, SG_COMP04IBM_Operators, SG_NETW_CCTV_ACCESS, KLOperators, Performance Log Users, Terminal Server License Servers, DnsAdmins, SG_JENKINS01ALF_Operators, Server Operators, Incoming Forest Trust Builders, Backup Operators, Domain Computers, Allowed RODC Password Replication Group, ADSyncBrowse, SG_VPN_CTT, Salesforce Infrastructure, Windows Authorization Access Group",
"Key": "SER04-992323, SER04-1315044, SER04-992355, SER04-992223, SER04-992279",
"Access Type": "Host access",
"Request type": "Create groups"
As you can see, I'm getting x group names, but the group keys are way less