fix(integrations): unwrap CRM success_response envelope when fetching credentials#25
Closed
gomessguii wants to merge 2 commits into
Closed
fix(integrations): unwrap CRM success_response envelope when fetching credentials#25gomessguii wants to merge 2 commits into
gomessguii wants to merge 2 commits into
Conversation
… credentials
GlobalConfigService fetched OAuth credentials from the CRM's service endpoints
(/api/v1/integrations/{provider}/credentials) and read the fields at the top
level of the JSON body. But those endpoints inherit Api::ServiceController and
wrap the payload as {"success": true, "data": {...}, "meta": ...}. So every
credential lookup read None for client_id/client_secret/redirect_uri even when
configured — the provider connect flow then failed (e.g. Google Calendar agent
authorization returned 500 "Missing credentials").
Read the fields from the `data` envelope instead, across all 13 provider
credential fetches (google_calendar, google_sheets, github, notion, stripe,
monday, atlassian, asana, hubspot, linear, paypal, canva, supabase).
_fetch_all_config (/global_config) is unchanged — that endpoint returns fields
at the top level (no envelope) and was already correct.
Verified: parsing the real staging /integrations/google_calendar/credentials
response now yields client_id/client_secret (redirect_uri still requires
GOOGLE_CALENDAR_REDIRECT_URI to be configured in the CRM global config).
There was a problem hiding this comment.
Sorry @gomessguii, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
…s MM/DD)
The agent's injected 'Current datetime' system-data (and the {current_datetime}
template var) used %d/%m/%Y, so an LLM read e.g. 11/07/2026 as MM/DD -> Nov 7
instead of Jul 11, scheduling calendar events on the wrong date. Emit ISO 8601
(YYYY-MM-DD HH:MM), plus the weekday in the system-data block, so day/month
order is unambiguous.
Member
Author
|
Fechando — superseded pela #28, que já trouxe o unwrap do envelope (+ tenant + redirect_uri) pra develop. |
gomessguii
deleted the
guilhermegomes/fix-integration-credentials-envelope
branch
July 11, 2026 16:16
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.
@/tmp/claude-1000/-home-guilherme-evolution-evocloud-evo-crm-community/2e0cd245-fd9d-4440-ab4d-b1a1bbea22db/scratchpad/pr-proc-body2.md