[Privacy control] Adding email privacy breaks related workflows

CONTEXT
I have a social app with profiles and messaging. When a user messages another user in the app, an email notification is sent to the receipent.

PROBLEM
Currently, there are no privacy rules around emails. They are hidden in the UI but a coder friend of mine was able to get at this data easily.

WHAT I TRIED
I tried added privacy rules so that only a user can see their own email address, but now the workflows that send an email notification no longer work. I guess this is because the sender triggers the workflow, and that workflow now cannot access the recipient email.

This seems like a very common use case. What is the right way to implement workflows that are triggered by user A that need to access data for user B (but just not show that data to user A)?

Have you tried creating a privacy role with ā€œView all fieldsā€ unchecked and only selecting the fields you want to expose as well as leaving ā€œFind this in searchesā€ checked?

Yes thatā€™s what I did:


In the work flow, the ā€˜to: emailā€™ is not a search but just a lookup of the pageā€™s user:

But because the current user (me) cannot view the email address of the page user, the workflow does not have access to the page userā€™s email:

Ok, what if the email was sent in an API workflow. You can set up the endpoint to ignore privacy rules there. Thereā€™s a checkbox that youā€™d check.

Create a parameter for the user in the endpoint so that when you use the schedule action, you can pass the parent groupā€™s user. Then the email action in the API workflow will use the parameter valueā€™s email.

You could schedule a single API workflow for the current date/time.

2 Likes

Thatā€™s a good suggestion - Iā€™ll try that out!

Hi @rushabh, how did sending the email through the api workflow work out? Is this simple to implement? Iā€™m trying to do something similar and running into the same issue as you had.

The only difference is for me: this action is already operating for an external api and Iā€™m pulling up the users ā€˜emailā€™ to send out as part of the api workflow, and it doesnā€™t work with the privacy field checked. @romanmg perhaps Iā€™m gonna need some coaching.

@jasondiehl07 I havent done it yet. But in your case, I think its because you cannot pass the email to the API workflow, if the user scheduling the workflow does not have access to the email filed. Try this:

In the API workflow, have the input be the user, instead of the email field. Then pull the email in the specific action. Make sure ā€˜ignore privacy rulesā€™ is checked in the API workflow.

When you schedule the API workflow, send the user instead of the email field. Again make sure the ā€˜ignore privacy rulesā€™ is checked here as well.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.