3

I have been trying a bunch of different stuff to get this to work, lots of great info here. I thought I might as well ask to get some answers for sure or see if anybody had any ideas!

Some background: SharePoint 2013; I'm creating a change management record system by allowing my group to email the description of what they are changing, along with any supporting documents as attachments, to a SharePoint document library made specifically for this purpose.

The document library is email-enabled, and when emailing to it, a folder with the email subject is created, which inside contains a ".eml" copy of the email body/text and any attachments that were on the email.

--This is all working as intended so far--

Now, I'm trying to attach an Approval workflow to it such that the members of the team get sent a message with a link to the email item (or maybe just the folder, I'm open to whatever works) along with the Outlook "Open this Task..." link up at the top for approve/reject/etc.

This setup works exactly as intended if:

  • 1) The workflow is set up as "Document" or "This List" and configured to kick off on "item created"
  • 2) There are NO attachments (i.e. the folder in the library contains only the .eml file). If there are attachments, it triggers a workflow for EVERY item... I just want one workflow per 'submission'.

I've tried setting up the workflow based on "Folder" and "item created", since that seems to be what the email does, but nothing ever triggers in that configuration.

I've also considered using "Document Sets" -- since this is pretty much exactly the use case for them -- but there doesn't seem to be a way to change the "Incoming Email" settings to have it create a document set or something like that.

tl;dr:

  • trying to set up workflow for incoming email

  • incoming email groups items into folders by subject (.eml + attachments)

  • doesn't trigger if set up as Folder workflow with "Start on item created"

  • does trigger if set up as Document/This List workflow with "Start on item created"

  • If set up as Document/This List, it triggers on each individual item rather than per email

Any ideas or insight on how I can get this to work how I envision? Thanks!

4
  • Just an update to bring it full circle in case anyone ends up here in the future :) The above suggestion was correct, the Sharepoint admins had to get involved. The admin was awesome, and managed to tweak my workflow so it did exactly what I needed. Thanks for the input!
    – dmkmills
    Commented Sep 19, 2014 at 22:30
  • I am looking to do something very similar...was this done with SP online?
    – Stephen
    Commented Dec 3, 2015 at 17:44
  • No, this was with a local instance of Sharepoint on our own servers. Not sure if the option exists on the cloud/hosted solution...
    – dmkmills
    Commented Dec 7, 2015 at 20:22
  • After much research...its doesnt.
    – Stephen
    Commented Dec 8, 2015 at 9:58

2 Answers 2

6

I've run into this several times, it isn't enabled by default. It needs to be enabled via PowerShell:

$spWebService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
 $spWebService.DeclarativeWorkflowAutoStartOnEmailEnabled = $true
 $spWebService.Update()
2
  • Ah, got it. So I should ask the SharePoint admins if "Declarative Worlflow Autostart on Email" is Enabled? I assume they will need to be the ones to run the PS script... but who knows, maybe it's already on -- I mean, an email does trigger a workflow if it's set to Document. I will update when I find out. Thanks!
    – dmkmills
    Commented Aug 7, 2014 at 16:38
  • Correct, the server admins need to check this. Commented Aug 7, 2014 at 16:50
0

Small addition to that is that you check the status of this switch:

$spWebService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
$spWebService.DeclarativeWorkflowAutoStartOnEmailEnabled

Source: https://social.technet.microsoft.com/Forums/lync/en-US/6a246070-b107-43bb-8c99-99fda4fccc1d/workflow-not-being-triggered-by-incoming-email?forum=sharepointgeneral

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.