class Utilities method .newBlob()

Utilities is the Apps Script service.

.newBlob() is the method name you will see after a dot in your code.

What it does

Creates a blob object from text or binary data.

Why it's used

  • Package text or bytes to attach to email or save to Drive.
  • Build files in memory before upload.

Common errors

  • Forgetting parentheses on newBlob. Write Utilities.newBlob(), not Utilities.newBlob or newBlob by itself.
  • Skipping dots between chained calls. Each step needs a dot, like Utilities.newBlob().
  • Adding spaces where they do not belong. Write Utilities.newBlob(), not Utilities .newBlob(), Utilities.newBlob (), or Utilities . newBlob().
  • Wrong capitalization. Use Utilities and newBlob, not utilities or newblob.

Explore

Related methods

Better Sheets tutorials

No tagged tutorials yet. Fetch Apps Script from the harvest table and this page fills automatically.

Related blog posts

Written guides about Utilities.newBlob().

Browse the blog