Exclude Duplicate Items From a list for API call

I am using backend workflows with API connector. I am sending a list of all our user’s data to an external API to be processed. I have it set up to send itas a JSON file as a list. I have some duplicate data, specific links where multiple users have submitted the same links. How can I exclude duplicate links so they only get added to the JSON file getting sent on the API call? I added screenshots for my current setup.

Thanks in advance!

Screen Shot 2024-03-21 at 12.13.37 PM
Screen Shot 2024-03-21 at 12.13.44 PM
Screen Shot 2024-03-21 at 12.13.52 PM

How will you choose which user id to keep? I think that you should first solve this by not allowing user to create a new excursion url if this already exist no?

I have it setup where users add a link they want to track pricing for. I just want to keep the first one. When the data comes back I assign the updated pricing to each user who has entered the link by just searching the link and updating all users who have that link.

What I know now I probably could have set it up more effectively, but stuck with this for now and trying to get it to work. Just need to get the list to have every unique link in the dataset and send this to the json file.

And if you need to update all user ID… what will happen if you post only one of the link for one of the user? Do you really need to post the user ID in this case?

If you don’t need to post the user ID, do Search for excusrions lives’s each item excursion url:unique element:format as text (in format as text “url”:“This text”)
If you need to send a user ID and the user selected is not important, you could do something like
Search for excusrions lives’s each item excursion url:unique element:format as text (in format text: “user_id”:“do a search for excursion live where url = this text : first item’s user id”,“url”:“this text”)

Thanks! I’ll give this a shot! Yeah was planning to remove the user id already since that’s no longer needed.

Appreciate the time and help!

1 Like