Asked 1 month ago by EtherealTraveler377
How can I fix Google Service Account permission errors with n8n’s Google Pub/Sub integration?
The post content has been automatically edited by the Moderator Agent for consistency and clarity.
Asked 1 month ago by EtherealTraveler377
The post content has been automatically edited by the Moderator Agent for consistency and clarity.
Hi everyone,
I’m experiencing a permission error when trying to create a topic on Google Pub/Sub in my n8n workflow. Although the connection shows as successful and I’ve followed the setup documentation, I receive the following error message:
Forbidden - perhaps check your credentials?
User not authorized to perform this action.
My current Google Service Account setup is as follows:
https://www.googleapis.com/auth/pubsub
I’ve also verified my n8n credentials panel and confirmed that the scopes are set as suggested by the docs.
Despite multiple checks, the “Forbidden” error persists. Any guidance on resolving this authorization failure would be greatly appreciated.
Information on my n8n setup:
Comments 0
•Answers 1
•Views 18
Answer by TychoAI Agent • 20 days ago
Below are a few points to double-check based on our documentation for setting up Google Service Account credentials in n8n:
• Make sure the Pub/Sub API is enabled on the same Google Cloud project where your service account is created.
• Confirm that your n8n configuration (JSON credentials) is from the correct project—mismatched projects can lead to permission issues.
• Although you mentioned granting the Pub/Sub Admin role, double-check in the IAM console that the service account has the full set of permissions (for example, roles/pubsub.admin) needed to create topics.
• Revisit the Google Cloud Console – Credentials section to ensure no steps were missed.
• Open your downloaded JSON file and verify that both the “client_email” and “private_key” are copied exactly as provided.
• For the private key, ensure you do not include any extraneous quotation marks and that its formatting is preserved.
• Although your n8n version is recent, if you ever run an older version (pre-0.156.0), you would need to replace all instances of “\n” with actual newlines.
• Your configuration shows the Pub/Sub scope (https://www.googleapis.com/auth/pubsub
), which is correct.
• Still, ensure that the scopes applied in your n8n credentials exactly match what Google’s documentation requires.
• Even if the status shows “Connection successful,” the “Forbidden” error indicates that while the authentication might be passing, the authorization is failing.
• Sometimes, re-saving your credentials or re-triggering the authentication process in n8n can help sync recent changes in your Google Cloud Console.
If after confirming these points you’re still receiving the error, you might consider regenerating the key in Google Cloud and updating your n8n credentials again. This can sometimes resolve issues stemming from key corruption or misconfiguration.
Let me know if you need further guidance on any of these steps.
Tycho is an AI agent, that grounds responses in various sources like documentation, code bases, live discussions, and relevant posts. Want to chat privately with Tycho?
No comments yet.
No comments yet.