XR should send meeting invites for a Release

XLR should be able to send automated meeting invites (generate calendar invites) for overnight releases. Is it possible?

Thanks

Hi Trojan3107,
what do you mean be Invites ? You can sent automated mail or slack/teams notifications, are you asking for automatically generating calender invites like for iCal, Outlook ? That is not possible out of the box.
What you would need to do:

Wrap that code in a plugin which than could generate your ics file and sent a mail with attachements.

1 Like

Thanks for the info Mzieger.

I’m trying to send calendar invite through “jython script task” since there is no inbuilt XLR task for the same. But I get below error.

Exception during execution:
ImportError: No module named win32com in <script> at line number 1

Here is my script.

import win32com.client
outlook = win32com.client.Dispatch("Outlook.Application")

    def sendMeeting():    
      appt = outlook.CreateItem(1) # AppointmentItem
      appt.Start = "2020-12-20 11:30" # yyyy-MM-dd hh:mm
      appt.Subject = "IR MEETING INVITATION"
      appt.Duration = 60 # In minutes (60 Minutes)
      appt.Location = "ONLINE"
      appt.MeetingStatus = 1 # 1 - olMeeting; Changing the appointment to meeting. Only after changing the meeting status recipients can be added
      
      appt.Recipients.Add("abc@outlook.com") 
      appt.Save()
      appt.Send()

I’ve added unzipped “pywin32” lib folder inside XLR_Home/ext directory, also added features.script.sandbox.enabled =false in xl-release.conf but the issue still persists. Do I need to add something in synthetic.xml as well?

Please suggest.

Thanks.

Hi,

make sure that the directory structure is ext/win32com not ext/pywin32

Other things to note: The Python runtime is Jython, which is on version 2.7 and does not allow C extensions. To avoid trouble I would use a more lightweight library, maybe ics (check if it is Python 2 compatible)

Kind regards,

Hes Siemelink

1 Like

Hi please also have a look here:

And follow those instructions to use 3rd party libs in Jython:

Use custom python modules in XL Release

Example Sample Using git module.

  1. Download the library code e.g. https://files.pythonhosted.org/packages/d2/e8/0bd80cc9e1422f5449d663479459c3c032ff7acaf6609a63324d23bde9ac/GitPython-3.0.5.tar.gz
  2. untar/unzip and take out the actual module folder from it. In the above case, its the git folder.
  3. Now go under XLR_HOME/lib folder
  4. Create a new folder called Lib ( case sensitive )
  5. Copy the git module folder under Lib. Will look like this XLR_HOME/lib/Lib/git
  6. Find the jython standalone jar name by doing a file search ls jython* .
  7. Now run this command to update the jython jar with the contents of the Lib folder jar -uvf jython-standalone-2.7.1.patch2618.jar Lib

if would give an output like this while it adds the git python module

adding: Lib/(in = 0) (out= 0)(stored 0%) adding: Lib/git/(in = 0) (out= 0)(stored 0%) adding: Lib/git/db.py(in = 1963) (out= 802)(deflated 59%) adding: Lib/git/cmd.py(in = 42869) (out= 12482)(deflated 70%) adding: Lib/git/config.py(in = 28415) (out= 8096)(deflated 71%) adding: Lib/git/compat.py(in = 9436) (out= 3080)(deflated 67%) adding: Lib/git/test/(in = 0) (out= 0)(stored 0%) adding: Lib/git/test/test_stats.py(in = 971) (out= 412)(deflated 57%)

  1. Restart XLR and you should be able to use git module in jython script task.
1 Like