Hello everyone,
First of all, thanks for taking the time to read this.
I have an automation where i search some assets that have Email as Attribute and some objects can have more than 1 email but separated by a comma.
My variable {{lookupObjects.Mail}} returns the emails like this:
email1@test.com, email2@test.com, email3@test.com
how can I iterate over those emails and add them as approvers? on the same issue
i tried multiple things but still cannot make it
Welcome to the community.
You should advanced branch over the variable and in the branch do an advanced edit
The advanced branch will turn into a smart value to be used in the branch*
Then an edit action and then in the advanced option:
{
"update" : {
"Approvers" : [
{
"add" : { "id" : "{{smart value from advanced branch*}}" }
}
]
}
}
Hello Marc,
First, thanks for taking the time for reading and answering!
I have tried this, but it gives me this error:
"(Specify a valid value for customfield_10003 (customfield_10003))"
You can see my rule in the images.
The customfield_19348 is named "approversMail"
I copy the value from {{lookupObjects.Mail}} to that customfield in a subtask when creating it with info from their parent.
On the advanced editing, should I use email or mail insead of "id"?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Then within the branch a web request action is required.
To create a request to fetch the accountID and set the ID in advanced based on the {{webResponse.body.id}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, im still not sure how the URL would be.
I tried several but none worked
/rest/api/3/user/search?query={{Mail}}
/rest/api/3/user?accountId={{Mail}}
/rest/api/3/user?emailAddress={{Mail}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use rest/api/3/user/search?query={{Mail.urlEncode}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks Marc, I really appreciate your follow ups.
However, I tried and had no success :(
Seems the body is empty, not sure why
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In the edit action, set {{webResponse.body.accountId}}
OR create a variable before editing.
variable smart value: {{webResponse.body.accountId}}
The edit the issue, using the variable
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Marc, thanks again for the follow up.
I tried what you said and had no success :/
Seems that variable is not working, im not sure why
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Create a varible based on the smart value {{webResponse.body.accountId}}
Then a log action to show the value of the variable.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Marc, thanks a lot for your answer.
Log shows empty still, dont know why :/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.