Sharepoint 2013 Anonymous list send email workflow

Hello,

Continuing with the limitation of anonymous access in association to SharePoint lists, it turns out there is another one!

When anonymous users add a new list item and we want to send an email, we will think of either 'Alerts' or 'Custom Workflow'. Using alert will work fine if the email is redirected to SP users.
However if the email wants to go to certain email addresses or the person submitting the item (through email field for example) then 'Custom Workflow' is the way to go.

So I opened SPD 2013 and created some reusable workflows with 'To' set to Association parameter and the Email field on the list item. Also the send email is contained in the Impersonation step.
Workflow is then published and associated to the list. I set the trigger to run the workflow when new item is created.

Testing the workflow while logged in works fine - however when adding a new item anonymously, the workflow is just waiting and never triggered. Having read other people experiencing the same issues, the solution is to create an ItemAdded event receiver to run the workflow using elevated permission.

In my case I have a few lists with their own content types.


After activating the feature, you don't need the triggers set on your workflow settings anymore.

HTH,
Andreas

Post a Comment