How to use "do a search for" in backend workflow with enabled privacy rules without using the "Ignore privacy rules when running the workflow" option?


I have an API workflow which handles a webhook from another service. I am currently getting to know privacy rules (way too late I know) and since enabled I cannot use the “do a search for” functionality which is expected.

My privacy rule

When I now do a search for this “Lead”-thing I can obviously not get any data back. The only workaround I found so far which will probably work is to use option “Ignore privacy rules when running the workflow” but this is probably not the best way to go right?

I still need to understand the concept of privacy rules because I just don’t understand how to handle them if the action I am using has nothing to do with “the current user” or “the current thing”. The user in this scenario is anonymous and the thing is unrelated. So why is there not a 3rd option like when “authenticated backend workflow asks for this datatype” …?

Thank you!

There’s no inherent problem here because you’re in full control of what can be returned from the backend through search constraints. What exactly is the webhook? Surely it must relate to a user?

It would be nice to have a ‘run as/authenticate as User’ dynamic field on the backend workflow (so I can, for example, run the workflow as Do a search for User:unique ID = webhook’s customer’s unique ID) but that probably doesn’t exist because of technical limitations…

1 Like

Thank you for your answer.

The webhook is coming from pdfmonkey and contains the information about the created pdf. As a result of this I am sending out an email through api from mailjet. Within the json body of the api call I am defining variables that can be used inside the email. These are for example this leads name or email.

Well as long as you can associate the webhook with the PDF you’ve created (perhaps you have a PDF data type/file generation data type which contains the unique ID of the PDF job), you will be fine.

1 Like

That is the case. Thank you!