In my custom application, I have a Connection configuration which “Communication” configuration is the following:
{
"url": "https://myserver/endpoint",
"headers": {
"Authorization": "Bearer {{connection.apiKey}}"
},
"response": {
"metadata": {
"type": "email",
"value": "{{first(body).owner}}" // <<< NOT WORKING
},
"error": {
"message": "[{{statusCode}}] {{body.error}}"
}
},
"log": {
"sanitize": [
"request.headers.authorization"
]
}
}
The endpoint returns the following body when requested:
[
{
"accountId": "018ade1a-c617-723e-ba1a-ce40d894271b",
"owner": "bob.wilson@pickaform.com",
"createdAt": "2023-09-28T23:23:31.223Z",
"status": "active",
"id": "018ade1a-c617-723e-ba1a-ce40d894271b"
}
]
The goal is to retrieve the “owner” property in the metadata of the connection.
The returned array of the API always has a single item, and I would like to get this first item, then grab its “owner” property.
I tried many different syntaxes, and none of them work.
Any suggestion?