0

Open the generated attachment at the end of the code

Hi! How can I tell him to open the created ICS-file at the end automatically?

I was trying to import the event from gmail in google calendar automatically (without click in the mail to add the event to the calendar) but it doesn't work. I've set it with automatic event import but nothing to do. So I have to open it on my mac with ical and after it will syncronize with gmail

createTextFile(this, "BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
BEGIN:VEVENT
UID:event-" + Evento + 'Nr. persone' + "persone" + ".ics
SUMMARY:" + 'Fase di' + " " + Evento.Evento + ":" + " " + 'Nr. Montatori' + " " + concat(Persone.Personale.'Nome / Impresa') + "
DTSTART;TZID=Europe/London:" + format('Inizio montaggio', "YYYYMMDDTHHmmss") + "
DTEND;TZID=Europe/London:" + format('Fine montaggio', "YYYYMMDD") + "
LOCATION:" + Fiera.'Nome struttura' + "
DESCRIPTION:" + 'Fase di' + " " + Evento.Evento + " " + "-" + 'Nr. Montatori' + ":" + " " + concat(Persone.Personale.'Nome intero') + "
STATUS:CONFIRMED
END:VEVENT
END:VCALENDAR", "event-" + Evento + ".ics");
let result := dialog("Ciao", "Vuoi aggiungere la fase di " + 'Fase di' + " " + Evento.Evento + "  al calendario?", ["Si", "No"]);
if result = "Si" then
let filetosend := file(this, "event-" + Evento + ".ics");
let emailText := "Ciao, 
<br><br>abbiamo aggiunto il seguente evento al tuo calendario:<br><br>Evento: <b>" + 'Fase di' + " " + Evento.Evento + "</b><br>Starting: <b>" + 'Inizio montaggio' + "</b><br>Ending: <b>" + 'Fine montaggio' + "</b><br><br>" + Evento.Evento + "-" + Evento.Edizione;
Evento.Edizione + "<br><br><br>";
sendEmail({
from: "info@*******.bz",
to: "********@gmail.com",
subject: 'Fase di' + " " + Evento.Evento,
text: text(emailText),
html: emailText,
attachments: filetosend
});
'Ultimo aggiornamento calendario smontaggio' := now()
end

1 reply

null
    • Walcher_Messebau_GmbH
    • 3 yrs ago
    • Reported - view

    If anyone, in case, can tell me how to automatically import events from gmail to google calendar, it would be very helpful.

    This is how google calendar is configured now

     

    Schermata 2020-07-30 alle 12.43.57

Content aside

  • 3 yrs agoLast active
  • 1Replies
  • 620Views