Adding Advanced Filtering to Document-based Trigger Module | Community
Skip to main content
Level 2
May 2, 2022
Question

Adding Advanced Filtering to Document-based Trigger Module

  • May 2, 2022
  • 1 reply
  • 847 views

I have a scenario that's being built off a Document Upload trigger, but this scenario needs to be narrowed down to only trigger for new uploads within a certain folder structure (for example: folder A is ignored by Fusion, but folder B triggers Fusion). Crucially, this folder structure will be applied to a number of different project templates and thus scaled appropriately to projects leveraging those templates.

I know this can be done using the Optional Filter on the trigger module, but having no experience writing API code, I'm unsure of how to create such a filter and add it into my scenario. Any insight/assistance is appreciated!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

CrisDonaldson
Level 3
May 9, 2022

The trigger webhook should look for new data only and the filter parameters should be where Folder Name is equal to "Folder B". Let me know if you need any additional help. I am a Fusion consultant.

AndyEg1Author
Level 2
May 9, 2022

Hi Christina - thank you for the reply! I've never worked with API programming before, so I don't even know where I'd start with the syntax for this. Would you be able to provide a skeleton syntax for how this would look?

Thank you!

CrisDonaldson
Level 3
May 10, 2022

Hi Andy,

It would look something like this (see attachment). I would do the Watch Events webhook and watch for new Document uploads, then a Read a Record module and choose the Folders collection, then have the filter between that module and the next module only look for the Folder Name or Folder ID.

Hope that helps.

Cristina