Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.
SOLVED

Way to tell if a document was added to specific folder

Avatar

Level 4

I have a few scenarios where I use watch events to listen for new documents.  However now I want to create one to listen for a document added to a specific folder in projects.
Is there any specific way to do this in the watch event directly or would I have to listen for all added documents and then somehow test for whether it lives in that folder?
I don't see anyway to identify the folder a document lives in.

 

Thanks in advance for your help

Frank 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@FrankatMSC 

@CrisDonaldson is correct: There is no event "document added to folder"; folders are just a collection of tags associated with the document. 

 

The problem is you won't get the folders in the event bundle so you'd have to have some means of tracking that collection. 

 

You could

  • create a field "folderIDs" in a hidden (admin-only) section
  • listen for document creation or updates 
  • look up the document record and get its folders collection - or the attribute folderIDs, as well as the "DE:folderIDs" field
  • compare the value of DE:folderIDs with the current collection and identify the new folder (ie delta between these IDs)
  • If it's a folder you're tracking - take action

 

View solution in original post

3 Replies

Avatar

Level 2

You would have to watch for all documents and then filter based on the folder name or folder ID.

Avatar

Level 4

Thank you both for your suggestions.  I'm looking into ways of tracking the folder ID's.  If I get a solid way to solve this I'll post it.     

Avatar

Correct answer by
Community Advisor

@FrankatMSC 

@CrisDonaldson is correct: There is no event "document added to folder"; folders are just a collection of tags associated with the document. 

 

The problem is you won't get the folders in the event bundle so you'd have to have some means of tracking that collection. 

 

You could

  • create a field "folderIDs" in a hidden (admin-only) section
  • listen for document creation or updates 
  • look up the document record and get its folders collection - or the attribute folderIDs, as well as the "DE:folderIDs" field
  • compare the value of DE:folderIDs with the current collection and identify the new folder (ie delta between these IDs)
  • If it's a folder you're tracking - take action