I’ve been stuck on this issue for a while now.

I built a call center app that integrates with DialPad’s API. Currently, I sync users associated with DialPad, allowing them to register for an account if their email address matches one in DialPad.

The problem I’m facing is handling agents who no longer work for the company and have been removed from DialPad. I also want to revoke their access to their account in my app when this happens.

I can’t figure out how to set up an API call in a backend workflow to return the user list (ideally as part of a nightly sync that both adds and removes users simultaneously). The API returns a list of arrays, and I’m unsure how to compare the results with my database to identify users who no longer appear in the API response but still exist in my system.

How can I retrieve the API results and efficiently compare them to remove users who are no longer active in DialPad?

Best is to look if dialpad have webhook for this kind of event

If not, I think you may need to split your process in two parts:
A) Create new users. Use the API call that get the list of users and use Schedule API Workflow on a list. If the item exist, you can update it (if needed) and if not, create a new one
B) Schedule an API workflow on a list of user from your DB and there’s probably an API endpoint to get this specific user (with dialpad user ID). If this return something, that’s fine, if not, delete thing. (Don’t forget to activate continue if error checkbox in API Connector)

Another solution could be to use the First API call, get the list of USER ID and use minus list like API call ID:minus list Do a search for user’s each item dialpidID (Create new user for each item that remain and update all item with a field like a date for last “validation” date. Delete everything that remain after that was not updated “today”. This option will probably take less WU.

There’s a lot of possible way to achieve this. But the best is to first look for webhooks.