Advertisement
Guest User

Untitled

a guest
Mar 26th, 2025
18
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.29 KB | None | 0 0
  1. Task: CalendarEventListener_v2
  2.  
  3. A1: Multiple Variables Set [
  4. Names: %from_account_regex=lnam.*
  5. %to_account=Google:[email protected]
  6. %delete_old_event=1
  7. Values Splitter: =
  8. Structure Output (JSON, etc): On ]
  9.  
  10. <Loop events>
  11. A2: For [
  12. Variable: %ce_event
  13. Items: %cc_event_ids_added()
  14. Structure Output (JSON, etc): On ]
  15.  
  16. A3: Get Calendar Events [
  17. Event ID: %ce_event ]
  18.  
  19. A4: If [ %ce_account ~R %from_account_regex ]
  20.  
  21. A5: Variable Set [
  22. Name: %event_to_delete
  23. To: %ce_event_id
  24. Structure Output (JSON, etc): On ]
  25.  
  26. A6: Get Calendar Reminders [
  27. Event ID: %ce_event ]
  28.  
  29. A7: Get Calendar Attendees [
  30. Event ID: %ce_event ]
  31.  
  32. A8: Variable Clear [
  33. Name: %ce_event_id ]
  34.  
  35. <Add new event>
  36. A9: Edit Calendar Event [
  37. Action: Add
  38. Calendar: %to_account
  39. Title: %ce_title
  40. Description: %ce_description
  41. All Day: %ce_all_day
  42. Start Time: %ce_start_time
  43. End Time: %ce_end_time
  44. Location: %ce_location
  45. Availability: %ce_available
  46. Colour: %ce_color ]
  47.  
  48. A10: If [ %ce_event_id Set ]
  49.  
  50. <Start recursing through attendees>
  51. A11: For [
  52. Variable: %index
  53. Items: %ce_attendee_id()
  54. Structure Output (JSON, etc): On ]
  55.  
  56. A12: Edit Calendar Attendee [
  57. Action: Add
  58. Event ID: %ce_event_id
  59. Attendee ID: %ce_attendee_id(%attendee_id)
  60. Name: %ce_attendee_name(%index)
  61. Email: %ce_attendee_email(%index)
  62. Status: %ce_attendee_status(%index)
  63. Relationship: %ce_attendee_relationship(%index)
  64. Type: %ce_attendee_type(%index) ]
  65.  
  66. <End recursing through attendees>
  67. A13: End For
  68.  
  69. <Start recursing through reminders>
  70. A14: For [
  71. Variable: %index
  72. Items: 1:%ce_reminder_id(#)
  73. Structure Output (JSON, etc): On ]
  74.  
  75. A15: Edit Calendar Reminder [
  76. Action: Add
  77. Event ID: %ce_event_id
  78. Reminder ID: %reminder_ids(%index)
  79. Minutes Prior: %ce_reminder_minutes_prior(%index)
  80. Method: %ce_reminder_method(%index) ]
  81.  
  82. <End recursing through reminders>
  83. A16: End For
  84.  
  85. <Deleting old one>
  86. A17: Edit Calendar Event [
  87. Action: Delete
  88. Event ID: %event_to_delete ]
  89. If [ %event_to_delete Set & %delete_old_event = 1 ]
  90.  
  91. A18: End If
  92.  
  93. A19: End If
  94.  
  95. A20: End For
  96.  
  97.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement