Automatically Send Emails From A Queue

When creating and sending an email from D365, the default functionality will populate the FROM sender as the user creating the email. Depending on a users role within the organisation, if they work on a team managing cases or other shared work, emails may need to all come from one email address. The users email address needs to be accurate in the system so we can’t change that, but we can use a queue combined with a workflow to send emails from queue rather than the user.

First, go to Settings, Business Management then click on Queues.

Create your queue (if you don’t have one already) by using your group email address in the incoming email. Save the queue.

At the top of the queue, click on Open Mailbox. From here, a user with Global Administrator (Office 365) access should click on Approve Email. One approved, then Test & Enable Mailbox to allow emails to be sent out from this email address via D365.

Once the queue is set up and the mailbox is approved and enabled, create a new workflow. Make sure it’s a real-time workflow so it will run before the email gets sent out. Make sure it starts After the record is created.

*UPDATE – 11/10/2018* – originally I had stated in the post to also tick Record status changes and change that to Before. Although the email ended up getting sent and received, the status of the email record in CRM remained as ‘Pending Send’. Removing this as part of the scope sends out the email and allows the status of the email to change to ‘Sent’. Thanks to Una Clancy and several other people for the comment about this, which prompted me to investigate further! *END UPDATE*

Your workflow should look something like this. Created By isn’t needed if this should be changed for all users. However, if it should only happen for SOME users, or under specific circumstances (if regarding a case for example) make sure you build this in to the conditions.

When updating the email, set the properties to use the queue you set up as the From object.

When a user creates a new email, their name will still show as the From person.

Once Send is clicked the workflow will run, and the From will be switched from the user creating the email to the queue you selected instead. This way the users will not have to remember to change it over each time they create a new email.

9 thoughts on “Automatically Send Emails From A Queue

  1. Hi Megan.
    Thank you for this interesting post.
    Can it be used when sending bulk email against marketing list?
    The queue can be used only to send but not to receive emails?
    Regards, Emma

    1. Hi Emma, queues are used to send OR receive emails. So you could use a queue to receive incoming emails to and then use a record creation rule to create cases for each email. Or, you might have an email like or so you don’t want responses coming back in to CRM, and only use it to send from. When you set up the Queue and activate the mailbox you can determine if you use it for Incoming Emails, Outgoing Emails or both. And yes, you could use your Queue to send your bulk emails for sure! You would just need to have a workflow similar to what I have described in this post to make it change to send from the Queue.

      1. Hello Megan,

        thanks for your tip regarding setting the From e-mail to a Queue e-mail.
        I have tested it and it work – that is, the e-mail I get is sent from the Queue.
        However, when I open the Mail activity I can see, that D365 does not consider the mail sent and the real-time workflow has thrown an exception saying: “Cannot update parties unless email is in draft status”

        I don’t know if you have checked that out if that problem is also on your instance?
        From what I can read, it seems to be a timing/race-condition between the Mail activity and the real-time workflow.

        1. Hi Andy, thanks for the comment and checking out my blog. I haven’t seen that issue. The only thing I am wondering, do you have the condition of running the workflow after the email is created and before the status changes?

  2. Hi Megan, thanks for sharing this post.

    I had the same scenario, and I followed your instructions. Everything is successful, but there is one problem. Every 30 min I am getting the same email that I sent, and that process will not stop unless I deactivate the workflow and queue. Any ideas what that could be?

    1. Hi Una,

      Thanks so much for taking the time to review and ask a question. I took a moment to troubleshoot and came up with the answer. Take a look through the post again and you will see the update. Thanks again and apologies for any frustrations caused!

  3. Thanks Megan,

    I found the issue there was another workflow running at same time on email entity and mine workflow was running on every status change. so i put in a condition to say only run when status = draft and its now working and changing the status on emails to sent. thanks for your time.

Leave a Reply

Your email address will not be published. Required fields are marked *

Recent Articles