question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Clasp can't seem to see bound script projects

See original GitHub issue

Expected 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.

image

Steps to Reproduce the Problem

  1. Create a spreadsheet document in the G Drive of the same account you’re logged into Clasp with.
  2. Add a script project to the spreadsheet.
  3. clasp list

Specifications

  • Node version 10.3.0
  • Clasp version 1.3.1
  • Windows 10 x64 v 1803

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:10
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
ShowMeBillyJocommented, Jun 10, 2018

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.

1reaction
virusakoscommented, Jun 7, 2018

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found