Google OAuth x n8n API Issue

I am using n8n with my SaaS application. Im essentially allowing each of my users to be able to connect to their Calendar, Gmail, Contacts, etc.

As part of my onboarding im creating a new workflow and credentials for my user.

Here is the current process.

User clicks on a button on my Web App to Authenticate with Google > User selects their account > User grants access and acknowledges the app will be using certain permissions > When the OAuth Code is returned back to the app for Code Exchange, the app processes it and returns back Access/Refresh token and scopes > n8n is called to duplicate a workflow > n8n API (/api/v1/credentials) with the following payload.

Google Calendar Example

{
  "name": "Google Calendar - [email protected]",
  "type": "googleCalendarOAuth2Api",
  "data": {
    "clientId": "abc.googleusercontent.com",
    "clientSecret": "abc",
    "oauthTokenData": {
      "access_token": "abc",
      "refresh_token": "abc",
      "expires_in": 3599,
      "scope": "https://www.googleapis.com/auth/calendar",
      "token_type": "Bearer"
    }
  }
}

.> Returns Success or Failure to app > Redirects user to chat page where they can now interact with their connected accounts.

I have successfully been able to duplicate workflows and connect the newly created credentials so that every user has their own account. But im running into a problem. It seems the credentials are not being configured correctly. I’ve tried everything and im wondering is this is just not possible with the API or im missing something.

Im seeing this error specifically in n8n:

But on the actually credential is showing Account Connected:

Again, my entire purpose for this is to not have to authenticate every single user within the n8n dashboard.

I feel like im 95% of the way there, but im just missing something.