Repository navigation
feat(google_calendar): Each user signs in, more event operations, fix log-message validation and calendar ID encoding (1.0.0) - #4173
Merged
crazywoola merged 2 commits intoNov 2, 2026
Conversation
…x log-message validation and calendar ID encoding (1.0.0)
crazywoola
approved these changes
Nov 2, 2026
crazywoola
left a comment
Member
There was a problem hiding this comment.
Reviewed the plugin scope, manifest, documentation, and relevant source changes. Approving this revision to run the repository pre-merge plugin validation; merge is contingent on successful validation.
This was referenced Nov 2, 2026
Merged
Closed
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Google Calendar 1.0.0 adds Each user signs in next to the existing OAuth credential, adds the common event operations that were missing, and fixes two bugs in the original tools. It follows the same per-user design as the Microsoft and Atlassian plugins (#4163–#4171) and is the first of the Google series.
Fixes in the original tools
list_calendars,list_events,create_eventandsearch_eventsemit log messages with the SDK's defaultmetadata=None, which recent Dify rejects. The result wastool parameters validation error: 11 validation errors for DifyPluginToolInvokeMessage … message.LogMessage.metadata Input should be a valid dictionary. All 33 log calls now passmetadata={}.#were not found. For exampleen.usa#holiday@group.v.calendar.google.comreturned 404: the ID went into the URL unencoded, so everything after#became a fragment. IDs are now encoded as one path segment.Their names, parameters and output are otherwise unchanged. Existing OAuth credentials keep working.
Each user signs in
A new API-key style credential holds:
GET /google_calendar/callback.The flow:
access_type=offline,prompt=consent select_account, scopesopenid email …/auth/calendar.client_id | Dify user ID, and never appear in tool output.Edge cases handled:
openid email→ userinfo).invalid_granton refresh (revoked, password change, or 7 days on a "Testing" app) or a 401 from the API starts a new sign-in.google_calendar_sign_outforgets the user's sign-in.The original tools get the token through a small
connect()helper, so they work in both modes.tools/user_auth.pykeeps the plugin-specific values (name, scope) at the top, so the next Google plugins reuse it unchanged.New tools (prefixed
google_calendar_: the new Agent rejects duplicate tool names across plugins)google_calendar_get_event(guests and responses, meeting link)google_calendar_update_event, which changes only the given fields:• guests are added, or replaced with
attendees_mode: replace• a time without a UTC offset uses
time_zoneor the event's own time zone• all-day end dates are exclusive (a one-day event ends the next day)
•
send_updateschooses who is notifiedgoogle_calendar_delete_eventgoogle_calendar_check_availability(free/busy for one or more calendars)create_event,list_events,search_eventsEvery new tool returns typed output variables (
success/errorplus its fields).Not changed: the original tool names.
list_events,list_calendars,create_eventandsearch_eventsare also Outlook tool names, so the two plugins can't share one new-style Agent ("Duplicate Dify Tool name"). Renaming them would break existing workflows, so they stay; the README documents the clash. Tool names should probably be namespaced per plugin in Dify itself.Release Notes
#(such as holiday calendars) can be read.Change Type
Screenshots / Videos
The README adds the per-user credential form and Google's unverified-app notice, next to the existing OAuth setup screenshots.
Testing
pytest tests). They cover:invalid_grant→ new link, a 401 → new link, unticked permission, per-user isolation, secret rotation, cancel/error pages, sign-out.list_calendars→list_eventsfor the week →create_event("Dify test", 3–4 PM) →google_calendar_check_availability2–5 PM reported 3–4 PM busy.#calendar ID). Both are fixed.google_calendar_update_eventandgoogle_calendar_delete_event(unit tests only).Checklist