APIs & Integrations

DA8
Member

Exclude files which are already saved to my project

I'm getting all files from https://api.hubapi.com/files/v3/files/search this API and uploading that to my project. Now i what if i only want newly added files. i mean i want to exclude files that are already retrieved. Is there any way to manage like can i add any custom properties to hubspot files which can indicate this?

0 Upvotes
2 Replies 2
Jaycee_Lewis
Community Manager
Community Manager

Exclude files which are already saved to my project

Hey, @DA8 👋 We cannot create custom properties for Files. My instinct is that if you're using the Search API, you'll need to test using the search operators to filter by `createdAt` or `updatedAt`. Or look at building some form of sorting into your app and handle this externally before uploading into your project. 

 

Best,

Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes
DA8
Member

Exclude files which are already saved to my project

Hey @Jaycee_Lewis. Thanks for the response.
I can do filter by`createdAt` or `updatedAt` if i fetching data through some background job regulalry. But what if i'm manually syncing data through some button click? because frequency of manual syncing will not be fixed and it will be depend on user.

0 Upvotes