Efficient organization query via API
Posted Oct 20, 2023
I'm running a workflow in Tray.io that creates or updates an end user user in the process. Currently using the Tray connector, but can also use raw HTTP requests.
This workflow originating payload includes the user name, email, and company name. I would also like to add this end user to any organization matching the domain on the email address. (Can't query based on company name since users might belong to multiple companies and company string data is less reliable.)
To do this, I could write the call so that it loops through about 17 pages of 100 results, and iterate through the array of domains associated with the organizations until I find a match. This would be incredibly intensive since this workflow would be running on 15 - 25 users daily, in addition to the other tasks in the workflow.
Is there an efficient way/query to SELECT organization WHERE domain=[xyz.com] ?
0
0 comments
Sign in to leave a comment.