Add ICS file to an Sendgrid Email

Hello community !

I’m using the SendGrid API to send my emails, and I’m looking to include an ICS file containing an event as an attachment in my API call. Has anyone ventured down this path?
Thanks in advance for your help.

Hi,

A ICS file is not more than a txt file with another extension (*.ICS). You can create a text file and rename that to “name.ICS”.

The TXT file can look like this:

BEGIN:VCALENDAR
VERSION:2.0
BEGIN:VEVENT
SUMMARY:EventName
DTSTART:20251009T220000Z
DTEND:20251009T230000Z
DTSTAMP:20240308T151107Z
UID:1709910667596-EventName
DESCRIPTION:Description
LOCATION:Home
ORGANIZER:Me
STATUS:CONFIRMED
PRIORITY:0
END:VEVENT
END:VCALENDAR
1 Like

Two ways I’d try.

First way

Generate the text as @martijntenpas suggests:

  1. In your send email workflow step, create attachment and set the content to “Arbitrary text” which you then populate with generated ICS text.

Second way

Get this plugin (I made it): iCal Feeder - Make iCalendar feeds Plugin | Bubble . They both do the same thing, but the plugin wraps a robust and tested NodeJS library so it might be easier and more reliable - but honestly use the first method unless/until you need something more complex.

  1. In the first step of the workflow, use the plugin’s Generate iCal Feed action to generate the ICS data.
  2. Use the output of that step as the attachment in your send email step.

I haven’t tested either method, but it seems like it would be straightforward.

1 Like

Indeed it works fine thank you !