We have several cloud software portals where we manage user access to products that do not allow SCIM provisioning to tie their access directly to their org account. We have an Assets schema for software where we track the license assignees for those products so when a termination or other deprovision action comes in, Jira automation can tell us in which of these products we need to disable access. Since humans sometimes take shortcuts or don't follow SOPs, the Assets object does not always get updated when a user is added or removed from a software portal outside of onboarding/offboarding, so that list is not always 100% accurate. We also use that Assets schema for an at-a-glance view of licenses we have available and licenses we have filled instead of going to each individual portal to check every time. So maybe not 100% the best process, but it is what we have.
The Assets object with License Assignees attribute as a reference object to user object types in a schema called PEOPLE:

I can build a scheduled automation to periodically pull a user list from some of those portals via API, but I am struggling with how to automate adding or removing a user as a License Assignee in the Assets object after I get that information. What I have so far is shown in the screenshot further down below. The off-screen part is the web request that pulls user information from one of the portals in this format:

I split that list out in a for each branch to compare to the users we have as License Assignees for that software in Assets. This all works successfully.

What I can't figure out is how to update the Assets object with any users not already listed. (The Add comment step at the end is just a placeholder for now.) Since I am already in a for each loop, I can't branch on an AQL inside of it to edit the object with currentusers + newuser. I could not find a way via Jira's API to append another user as a license assignee (which is not to say that it is not possible...I just didn't find an answer).
I can't tell if I have just gone down a bad logic path with this automation architecture in the first place, or if there is an answer within or closely related to the structure I built.