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?
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.
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.