How to create an event based on any record save ?

Hi There,

We would like to implement the below functionality Upon creation/edition of any record in any of the module (name for example : PS)  : 

 a calendar invite sends to the Contact's primary email address. 

  1. On save/edit of the record an event should be create , with below details  :


  1. Calendar Appointment Subject/Title = [PS record name] Invite
  2. Start Date/Time = PS's Scheduled Start Date Time
  3. End Date/Time = PS's Scheduled End Date Time

Please suggest any way to implement the invite ical feature in sugarcrm.