How to disable automated ICS/Invitation emails for Attendees

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Juantreses
    Junior Member
    • Aug 2025
    • 25

    #1

    How to disable automated ICS/Invitation emails for Attendees

    Hi community,

    We are running EspoCRM 9.3.0 (Self-hosted) with the Google Integration (v1.8.4). We have built a custom BookingService (PHP) that handles meeting creation.

    Current issue: Whenever our custom code creates a Meeting and adds a Lead/Contact as an Attendee, Espo (or the Google extension) automatically sends a default system invitation email with an ICS file.

    We already have our own confirmation/cancellation logic in PHP using custom Email Templates (different templates per calendar type). Currently, clients receive two emails: our branded one and the default system one.

    Our goal: We want to prevent the system-generated invitation from being sent, so only our custom-coded email reaches the client.

    We do not want to remove the attendees from the meeting, as we need the meeting to show up in the Lead/Contact detail view.

    Questions:
    1. Is there a specific flag we can pass to the saveEntity options or set on the Meeting entity to skip the attendee invitation specifically? (e.g., _skipNotifications, silent, or something Google-specific?) I did a quick search for invitation related logic in the google module and in espo core, but did not immediately find something I was looking for. Some pointers as how the invitation gets triggered might be sufficient to help me out.
    2. Does the Google Integration v1.8.4 hook into the afterSave event to trigger these emails via the Google API, and is there a way to suppress the sendUpdates flag from our PHP code?
    3. Is there a recommended way in Espo 9.x to bypass the Attendee notification logic while still maintaining the relationship for the detail view?

    Any insights into which Core or Google-extension classes handle this trigger would be greatly appreciated so we can look for a clean override.

    Addendum:
    If I would know how the invitation mail is build would also be great because it would be even nicer to integrate the ICS into our own custom mail. Although this raises the question how much control the attendee has when the meeting is in their calendar. Can they just delete it, reschedule it, etc. from their google calendar? I guess not since the sync is based on the organiser's calendar. But I don't want to open this can of worms if it gives the lead/contact any control over the meeting.
  • Juantreses
    Junior Member
    • Aug 2025
    • 25

    #2
    Might it be an option to add all states to the completedStatusList since the sender does this?
    PHP Code:
    private function checkStatus(Meeting|Call $entitystring $type): void
        
    {
            
    $entityType $entity->getEntityType();
            if (
    $type === self::TYPE_CANCELLATION) {
                if (!
    in_array($entity->getStatus(), $this->getCanceledStatusList($entityType))) {
                    throw new 
    Forbidden("Can't send invitation for not canceled event.");
                }
                return;
            }
            
    $notActualStatusList = [
                ...(
    $this->metadata->get("scopes.$entityType.completedStatusList") ?? []),
                ...
    $this->getCanceledStatusList($entityType),
            ];
            if (
    in_array($entity->getStatus(), $notActualStatusList)) {
                throw new 
    Forbidden("Can't send invitation for not actual event.");
            }
        } 
    Does this have any implications? Where do I do this? Can't seem to find anything in the admin panel where to add it, however their is a translation regarding this in the entityManager file, so I would expect it on the status field of Meeting and Call

    Comment

    • yuri
      EspoCRM product developer
      • Mar 2014
      • 9656

      #3
      Hi,

      I don't think Espo sends ICS invitation automatically. Maybe they are sent by Google?

      For automatic invitation sending one would need to configure a workflow rule.

      Comment


      • Juantreses
        Juantreses commented
        Editing a comment
        Thanks for the response. This is probably it. Didn't know Google did this.

        So I'll disable syncing event attendees to stop this.
    Working...