web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How to send an email from CRM that shows-up as Meeting invite?

(0) ShareShare
ReportReport
Posted on by

Hi, 

I want to send an email invitation for a meeting to the contact such that it appears as a meeting invite on Outlook. How can this be achieved?

Please advise. 

Thanks, 

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    Below are few details:

    I know one way is to create an Appointment, sync it with Outlook, add attendees and send invite. But can we do this from within CRM? We have a custom meeting entity and we can add our contacts and employees as attendees. But we want to send an email to all those attendees from within CRM such that it appears as a meeting invite/Appointment.

  • Abed Haniyah Profile Picture
    4,287 on at

    Dear Fahad,

    You can create a workflow to send an email when you create or update appointments.

    Regards,

    Abed.

  • Suggested answer
    Community Member Profile Picture
    on at

    Create a mail message as a custom workflow activity and send it via SMTP :

    • Develop a custom workflow activity with appropriate input parameters (start time, end time, smtp server name etc.) which you can configure to map to CRM entity fields.
    • In your C# code, you will need to generate a iCal event. You could do this by reading and understanding the iCal spec and generating a string manually in the correct format like this, or just use a library like the the DDay.iCal library. Note, if you use this library, you will either need to deploy this dll in the GAC, or merge it using ILMerge when you build the workflow activity.
    • Convert the iCal object back to a string.
    • Send the iCal as an email via smtp (note, smtp likely won't work from CRM online sandbox, only on premise) but change the content type of the MailMessage to "text/calendar"
    • Message should arrive as an acceptable calendar in Outlook which will display based on how you have configured the iCal event properties.
    • Configure the workflow activity against the appropriate entity (Appointment / Service activity).

    Sample approach in code below - note, not production ready. You need to understand the iCal properties you want to set and slot this into the boilerplate workflow activity code accordingly.

    // 3rd party libraries to reference
        using DDay.iCal;
        using DDay.iCal.Serialization.iCalendar;
        ...
        ...
        // Create the iCal
        IICalendar iCal = new iCalendar();
        iCal.Method = "Request";
        ...
        ...
        IEvent evt = iCal.Create<Event>();
        evt.Summary = summary;
        evt.Start = new iCalDateTime(eventstartDt).SetTimeZone(local);
        evt.End = new iCalDateTime(eventendDt).SetTimeZone(local);
        var serializer = new iCalendarSerializer(iCal);
        var iCalString = serializer.SerializeToString(iCal);
        ...
        ...
        var mailMessage = new MailMessage
        {
           Subject = Summary.Get(_executionContext),
           From = new MailAddress(FromEmailAddress.Get(_executionContext))
        };
    
        // Create the Alternate view object with Calendar MIME type
        var ct = new System.Net.Mime.ContentType("text/calendar");
        if (ct.Parameters != null) ct.Parameters.Add("method", "REQUEST");
    
        //Provide the framed string here
        AlternateView avCal = AlternateView.CreateAlternateViewFromString(iCalString, ct);
        mailMessage.AlternateViews.Add(avCal);
    
        // Send email
        try
        {
           smtpClient.Send(mailMessage);
    
        }
        catch (Exception ex)
        {
           // Log it.
        }


    Ref: http://stackoverflow.com/questions/24434099/send-meeting-notification-from-dynamics-crm-workflow

    I hope it will help 

  • Community Member Profile Picture
    on at

    Dear Abed,

    Thanks for your response. Will that be shown as a meeting invite to the sendee?

  • Abed Haniyah Profile Picture
    4,287 on at

    Unfortunately ,no

  • Abed Haniyah Profile Picture
    4,287 on at

    please check : blog.clickdimensions.com/.../add-email-sends-to-your-crm-calendar.html

  • Aileen Gusni Profile Picture
    44,524 on at

    Fahad,

    Create an appointment everytime you create a custom meeting entity..

    And create a plugin  ..

    Example:

    blog.mycrmgroup.com/.../Event-Invitation-tracking-in-Microsoft-Dynamics-CRM-2011.aspx

    Another third party:

    blog.mycrmgroup.com/.../Event-Invitation-tracking-in-Microsoft-Dynamics-CRM-2011

    Hope this helps.

    Thanks.

  • Community Member Profile Picture
    on at

    Thanks Aileen,

    Your first link is not working.  Can we do it not using any 3rd party tool?

  • Aileen Gusni Profile Picture
    44,524 on at
  • Community Member Profile Picture
    on at

    Thanks Aileen,

    But this is not what I am looking for. I think a better way to do so is to programmatically send an email invitation. This could be handled via a plugin or custom workflow activity.

    Best,

    Fahad

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans