Google Calendar Event Cancelled to Teams Alert
When a Google Calendar event is cancelled, notify attendees in a Teams channel and remove the linked Planner task.
Provided as-is, without warranty of any kind. Review and test each pattern in a non-production environment before deploying it to live automations. See our Terms.
Overview
FlowLibs - Google Calendar Event Cancelled to Teams Alert is an intermediate-level cloud flow that watches a Google Calendar for cancelled (deleted) events and reacts in two places at once: it posts a structured cancellation notice to a configured Microsoft Teams channel, and it removes any matching task from a linked Microsoft Planner plan. The flow runs on a 5-minute polling recurrence and is split per-event so each cancelled item produces its own run. It ships in the Off state — no runtime cost until a maker authorizes the three connections (Google Calendar, Teams, Planner) and points the env vars at the desired calendar, channel, and plan.
Use Case
Project Managers regularly accept meeting invites in Google Calendar that have a corresponding Planner task as the "work item" the meeting is meant to drive (kick-offs, design reviews, stakeholder syncs). When the meeting gets cancelled, the team often misses the cue: the Planner card stays "active" and the channel never hears the cancellation. This flow closes that loop. The moment a calendar event is deleted upstream, attendees see a Teams notice in the project channel and the orphaned Planner card is purged so the board reflects reality.
Flow Architecture
When Google Calendar Event Is Deleted
OnDeletedEventInCalendarPolls the calendar identified by flowlibs_GCalCalendarId every 5 minutes and emits a batch of cancelled events. splitOn: @triggerOutputs()?['body/items'] flattens the batch so the rest of the flow runs once per event.
Init varEventTitle
Initialize variableCaptures the cancelled event's title. coalesce(...) guards against missing fields so a partially populated event doesn't fail the run.
Init varEventStart
Initialize variableCaptures the cancelled event's start time, with coalesce(...) as a fallback for missing values.
Init varEventOrganizer
Initialize variableCaptures the cancelled event's organizer, with coalesce(...) as a fallback for missing values.
Init varAttendeesHtml
Initialize variableCaptures a placeholder attendee HTML block. Left as a placeholder by default; can be replaced with a built-out attendee list.
Init varTeamsMessageHtml
Initialize variableAssembles the HTML body of the Teams post — title, original start, organizer, attendee list, and a note that the linked Planner task has been removed.
Post Cancellation Notice To Teams
shared_teams.PostMessageToConversationPosts as Flow bot into the channel identified by flowlibs_TeamsGroupId + flowlibs_TeamsChannelId. Uses the flat slash-path parameter format (body/recipient/groupId, body/recipient/channelId, body/messageBody) — the only format the new designer renders correctly.
List Tasks In Linked Planner Plan
shared_planner.ListTasks_V3Pulls every task in the configured plan (flowlibs_PlannerGroupID + flowlibs_PlannerPlanID).
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_GCalCalendarId | String | primary | The calendar to watch (e.g. primary or a calendar address). |
| flowlibs_TeamsGroupId | String | <configure> | Target Team's Microsoft 365 group ID. Set to your Team's group GUID. |
| flowlibs_TeamsChannelId | String | <configure> | Channel within that Team to post in. Set to the channel ID where cancellation notices should appear. |
| flowlibs_PlannerGroupID | String | <configure> | Microsoft 365 group that owns the Planner plan. |
| flowlibs_PlannerPlanID | String | <configure> | Plan ID containing the linked tasks. |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Google Calendar | shared_googlecalendar | OnDeletedEventInCalendar (trigger) |
| Microsoft Teams | shared_teams | PostMessageToConversation |
| Microsoft Planner | shared_planner | ListTasks_V3 DeleteTask |
Note — All connections are referenced as solution connection references; the flow is portable between environments as long as a connection is mapped at import time.
Customization Guide
Almost every realistic variant of this flow can be implemented by changing environment variable values. A few cases require small edits inside the flow definition — those are called out explicitly below.
- Authorize the three connections
- When you first open the flow, authorize Google Calendar (with the account that owns the calendar), Teams, and Planner.
- Set flowlibs_GCalCalendarId
- Point to the target calendar — primary for the connected user's main calendar, or the email-style ID of any other calendar visible to that user.
- Set flowlibs_TeamsGroupId and flowlibs_TeamsChannelId
- Copy the IDs from the target Team/channel's URL or via the Teams admin center.
- Set flowlibs_PlannerGroupID and flowlibs_PlannerPlanID
- Use the M365 Group + Plan that holds the linked tasks. The connected Planner identity must be a member of that group.
- Adjust the matching rule
- If your tasks aren't named identically to the calendar event, edit Filter Tasks Matching Cancelled Event Title and change equals(...) to contains(...) or pattern-match a subset of the title.
- Tune the polling cadence
- Edit the trigger's recurrence block. The default 5 minutes balances responsiveness against API quota; longer intervals reduce calls.
- Enrich the Teams post
- Replace the placeholder varAttendeesHtml value with a real attendee build-out — iterate triggerOutputs()?['body/attendees'] and concat(...) the email/name fields together. Left as a placeholder by default to keep the demo small.
- Turn the flow On
- Switch the flow to On in the Power Automate UI when ready.
Key Expressions
The flow is intentionally light on Power Fx / WDL gymnastics — the heaviest expressions are the branch-name concatenation and the approval outcome check. They are listed below in the order they appear in the flow.
EXPR.01Trigger split-on
Flattens the batch trigger so each cancelled event drives its own run.
EXPR.02Resilient title pull
Defaults if Google omits the field on a deleted recurring instance.
EXPR.03Filter Array predicate
Case-insensitive title match against every Planner task.
EXPR.04Per-iteration task ID
Feeds the DeleteTask action's required path parameter.
EXPR.05Env var binding pattern
Used five times — every external identifier resolves through a solution env var so the flow is fully portable.
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.