In asset management, I have an object type "Customer's Contact" with an attribute called "mail." I've attempted to create an automation rule that retrieves this mail, creates a customer in my JSM Portal, and adds the new customer to the new object's attribute (specifically, an attribute called "JSM User").
I'm using REST API requests for both actions. I can successfully create the users and retrieve the account ID. However, when I try to update the attribute, it doesn't work. It seems that these two actions cannot occur within a single automation rule.
I think that because when I split it into two different rules, it works well(I can update the object's attribute correctly using a PUT web request).
so, for now, this is my workaround: the first rule creates the users, and the second rule looks for new objects once an hour and updates their attributes.
first rule : attached in screenshot

second rule: (lookup object looks for all the empty "JSM Customer" attributes.

then, using GET method ,send web request: orgURL.atlassian.net/rest/api/3/user/search?query={{ObjectsList.mail}}
then, using PUT method, send web request to update the customer in the object's attribute:
https://api.atlassian.com/jsm/assets/workspace/WorkspaceNumber/v1/object/{{ObjectList.key}} with custom data : { "attributes":[ { "objectTypeAttributeId":"81", "objectAttributeValues": [ { "value":"{{webResponse.body.accountId}}" } ] }
Does anyone have ideas on how to make this work in a single rule?