Skip to content

Cannot send ics attachment and have it display as invitation in Gmail #1138

@gcatto

Description

@gcatto

Issue Summary

I have been trying to get including an ics attachment working for Gmail, so that it shows up as an invitation that the user can accept, reject, etc. I've been trying to use issues such as #217 (and others, from other sendgrid languages) to try to get this to work, but I have had no success. I was hoping someone could point me to (recent) examples or walk me through where I am going wrong.

If I include method: 'REQUEST in the .ics file and method=REQUEST in the attachment type, it does not show up in Gmail as an invitation at all.

If I remove those, it shows up but without the inline buttons to attend, reject, etc.:
image

Code Snippet

const msg = {
  to: '',
  from: '',
  subject: '',
  html: html
};

msg.attachments = [{
  content: Buffer.from(icsValue).toString('base64'),
  filename: 'invite.ics',
  type: 'text/calendar; method=REQUEST',
  disposition: 'attachment',
}];

sgMail.send(msg);

I am using adamgibbons/ics for creating the .ics file, and I am including method: 'REQUEST', and the output from running this is the icsValue in the snippet above.

Technical details:

  • sendgrid-nodejs version: 7.0.0; also tried 7.1.1
  • node version: 12.18.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: supportticket that should be redirected to support

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions