While you can accomplish all connector-related tasks using the online Apps Script environment, some of them can become repetitive and error-prone over time.
dscc-gen is an opinionated tool that's meant to address these repetitive
tasks so you can focus on solving your business problem instead of errors that
can be avoided through automation.
- npm 5.2.0 or later
- Some familiarity with the command-line.
dscc-gen can also be used with existing projects. First,
scriptId, then run the following command (replacing
YOUR_SCRIPT_ID with your
npx @google/dscc-gen connector --script_id YOUR_SCRIPT_ID
You'll be prompted for a few details for your connector. If you don't already
have a deployment called "Production", one will be created for you. None of your
existing code will be modified, but you will have access to
dscc-gen can do.
To create a new community-connector with
dscc-gen, run the following command:
npx @google/dscc-gen connector
You'll be prompted for a few details for your new connector. First-time users
will be asked to authenticate
clasp is a tool for creating &
modifying Apps Script projects from the command-line.
After completing the prompts,
dscc-gen will create a new Apps Script project
and print out everything it can do.
||Open your project in Apps Script.|
||Push your local changes to Apps Script.|
||Watch for local changes, and push them to Apps Script.|
||Format your code using community standards.|
||Open the deployment with your latest code in Looker Studio.|
||Open your Production deployment in Looker Studio.|
||Update your production deployment to use your latest code.|
How should I Use it?
dscc-gen often goes a little like this:
- Identify a feature you'd like to add to your connector.
npm run watch, so local changes will be pushed to Apps Script.
npm run tryLatestand check that your new feature is working as expected.
npm run updateProductionto update your production deployment to have your new feature.
npm run tryProductionand double check that the new feature works.
Get your script Id
To get your
scriptId, navigate to your existing project, then copy the section
of the url after
/d/ and before
/edit. For example: the following url:
- Original Url:
- Script Id: