If you already have a community connector you would like to bring over to deploy via the CLI, use this procedure.

  1. Go to Google Apps Script
  2. Click the connector to open it in the editor
  3. Grab the script ID segment of the URL (https://script.google.com/a/google.com/d/<script-id>/edit)

If you are creating a new local project for the connector: 4. Run npx @google/dscc-gen connector --script_id <script-id>

If you are pushing an existing local project to the connector: 4. Replace the script ID in .clasp.json with the UI-deployed projects script ID and re-deploy from the CLI

This would mean that you had a connector being deployed via CLI that was then replaced by a connector deployed via the UI which you now want to bring back to the CLI.