Hi,
we need to send emails to various customers in case of incidents.
The customers are organized in assets which have an email attribute.
As there are more than 100 customers we can't use "lookup objects" action.
So we need to make a REST call to the assets API and retrieve the data via AQL.
The result is a very big JSON with many json objects and many attributes. I do not find a way to retrieve only the Email addresses via smart values notation.
Example JSON
{
"startAt": 0,
"maxResults": 2,
"total": xx,
"values": [
{
"workspaceId": "...",
"globalId": "...",
"id": "123",
"label": "Name 1",
"objectKey": "ORG-111,
"avatar": {... },
"objectType": { ... },
"created": "2024-03-25T13:44:09.953Z",
"updated": "2024-03-25T13:44:09.953Z",
"hasAvatar": false,
"timestamp": 123,
"attributes": [
{
"workspaceId": "...",
"globalId": "...",
"id": "111",
"objectTypeAttributeId": "212",
"objectAttributeValues": [
{
"value": "ORG-123",
"searchValue": "ORG-123",
"referencedType": false,
"displayValue": "ORG-123"
} ],
"objectId": "222" },
...
{
"workspaceId": "....",
"globalId": "...",
"id": "413764",
"objectTypeAttributeId": "277",
"objectAttributeValues": [
{
"value": "support@xy.de",
"searchValue": "support@xy.de",
"referencedType": false,
"displayValue": "support@xy.de"
}
],
"objectId": "30380"
}, ...I need to get alle values from attribute ID 277
I tried something like this but no notation gets me to an end:
{{#webResponse.body.value.attributes}}
{{#if(objectTypeAttributeId.equals("277"))}}
{{objectAttributeValues.value}},
{{/}}
{{/}}Also every other plan to retrieve the email addresses is valid.
Thanks for your help.
Christof