You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

无法发布新Google Sheets编辑器插件:应用配置无效及Project Key关联问题求助

Troubleshooting "Project Key is not associated..." Error for Google Sheets Add-on Deployment

Let me walk you through some targeted fixes for this frustrating error— I’ve run into similar issues when transitioning container-bound scripts to standalone Sheets add-ons, so these steps should help:

1. Verify Your Deployment Has a Proper Version Number

The error mentions the "script version doesn't exist"— this is often the core culprit. Google requires standalone add-ons to use versioned deployments (not temporary/test deployments):

  • Open your Apps Script project, go to the Deploy menu → Manage deployments.
  • Look for deployments labeled with a numeric version (e.g., Version 1, Version 2). If you only see deployments marked as "Draft", create a new one:
    • Click New deployment → Select Google Sheets add-on as the type.
    • Under Version, choose New version (don’t leave it as "Draft").
    • Save the new deployment and copy its Deployment ID— use this one in the Marketplace SDK.

2. Double-Check GCP Project Association & Enabled APIs

It’s not enough to just link the GCP project in script settings— you need to ensure full alignment:

  • In your Apps Script project, go to Project Settings → Confirm the Google Cloud Platform (GCP) Project number matches the GCP project where you’re configuring the Marketplace SDK.
  • In the GCP Console for that project, go to APIs & Services → Enabled APIs & services. Make sure Google Workspace Marketplace SDK is enabled (if not, search for it and enable it immediately).
  • Sometimes, re-linking the GCP project fixes sync issues: Remove the current GCP project from script settings, save, then re-add it and save again.

3. Validate OAuth Scopes & Deployment Permissions

Mismatched scopes or restrictive permissions can block the association:

  • In Apps Script, go to Project Settings → Check the OAuth consent screen is configured (even for internal deployments, you need to set this up with your organization’s domain).
  • Ensure your script uses the minimum required scopes for your email merge functionality:
    https://www.googleapis.com/auth/spreadsheets
    https://www.googleapis.com/auth/gmail.send
    https://www.googleapis.com/auth/script.send_mail
    
  • For testing, temporarily set your deployment’s access to Anyone, even anonymous (in Deploy → Manage deployments → Edit deployment). If the error goes away, you can later restrict it back to your organization once the association is confirmed.

4. Ensure Marketplace SDK Configuration Matches Add-on Type

Since you’re building a Google Sheets-specific add-on (not a Workspace-wide add-on), double-check these settings in the Marketplace SDK:

  • Under Configuration → Add-on type, make sure only Google Sheets is checked (uncheck any other Workspace apps if present).
  • Under Deployment, confirm you’re pasting the correct Script ID (from Apps Script Project Settings) and the versioned Deployment ID (from the managed deployment you created earlier).
  • If you’re deploying internally, go to Publishing → Visibility and select Private to your organization— ensure the domain matches your script and GCP project’s domain.

5. Clear Caches & Force Sync

Google’s services sometimes have caching delays that cause this error:

  • Use an incognito/private browser window to open the GCP Marketplace SDK page and re-enter the Script ID and Deployment ID.
  • In Apps Script, go to Deploy → Manage deployments, edit your versioned deployment, save it again (even without changes) to trigger a sync.
  • Wait 10-15 minutes after making changes— sometimes sync between Apps Script and GCP takes longer than expected.

6. Confirm Account Permissions

Make sure the account you’re using has full access to both resources:

  • You must be the owner of the Apps Script project.
  • You must have Owner or Editor permissions on the GCP project.
  • If you’re using a Google Workspace account, ensure your admin hasn’t restricted add-on deployments for your organization.

内容的提问来源于stack exchange,提问作者Neven Subotic

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.30 12:49:07