Clasp can't seem to see bound script projects
See original GitHub issueExpected Behavior
clasp list
should show all of my script projects, including those bound to G Drive documents like spreadsheets.
Actual Behavior
clasp list
doesn’t show bound script projects.
The FileSubmission
project is owned by someone else and shared with me.
Steps to Reproduce the Problem
- Create a spreadsheet document in the G Drive of the same account you’re logged into Clasp with.
- Add a script project to the spreadsheet.
clasp list
Specifications
- Node version 10.3.0
- Clasp version 1.3.1
- Windows 10 x64 v 1803
Issue Analytics
- State:
- Created 5 years ago
- Reactions:10
- Comments:13 (5 by maintainers)
Top Results From Across the Web
Container-bound Scripts | Apps Script
Note: The clasp tool can't create bound scripts, but it can clone and edit them. Special methods. Bound scripts can call a few...
Read more >clasp - The Apps Script CLI
The Apps Script CLI, or clasp , is a tool that lets you to create, edit, and deploy Apps Script projects locally.
Read more >Is there a way to import/export container bound scripts
"Clasp is an open-source tool, separate from the Apps Script platform, that lets you develop and manage Apps Script projects from your terminal...
Read more >The 6 deadly sins of Google Apps Script Add-on ...
Hey Another Tim,. You're gonna love this one. As you know, you can't have subdirectories in Google Apps Script projects. What you might...
Read more >CLASP Web App, Google Apps Script, Parcel JS ... - YouTube
In this tutorial we'll use CLASP with many other tools like Parcel JS bundler, Nodemon, Node JS and setup a Web App Google...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That documentation isn’t entirely correct. You can also get to bound scripts from https://script.google.com.
Interacting with bound scripts using clasp does work, but the URL method of getting the script ID is unreliable. If you open your script project from https://script.google.com, it’s likely fine. However, if you open it from
Tools -> Script editor
in the bound document, the URL doesn’t match the expected format.Expected:
https://script.google.com/d/<SCRIPT_ID>/edit
Actual:
https://script.google.com/macros/d/<MYSTERY_ID>/edit
The only sure way of getting the right value is from
File -> Project properties -> Info -> Script ID
.I am also interested in container (bound) scripts and I was looking for a way to automate it with clasp.
https://developers.google.com/apps-script/guides/bound
"Creating a bound script
To create a bound script, open a Google Sheets, Docs, or Forms file, then select Tools > Script editor. To reopen the script in the future, do the same thing. Because bound scripts do not appear in Google Drive, that menu is the only way to find or open the script."
I have looked into Google Sheet API, Google Drive API and Google App Scripts API for a way to get the container (bound) script id but I have not found anything.