[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-12-02 UTC."],[[["\u003cp\u003eThe Content Service enables scripts to serve content like text, XML, or JSON, offering flexibility in data delivery.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can utilize the ContentService class to generate and manipulate text output within their scripts.\u003c/p\u003e\n"],["\u003cp\u003eMimeType aids in specifying the desired format for content delivery, accommodating various data types like CSV, JSON, and more.\u003c/p\u003e\n"],["\u003cp\u003eThe TextOutput class provides methods for managing the content, allowing for appending, clearing, and setting the output's format.\u003c/p\u003e\n"],["\u003cp\u003eContent served through scripts can be customized for display in browsers or downloaded as files, offering versatile content handling.\u003c/p\u003e\n"]]],[],null,["Content\n\nThis service allows scripts to serve text in various forms, such as text,\nXML, or JSON. See also the [guide to\nContent Service](/apps-script/content_service). If you\n[deploy the following script as a web app](/apps-script/execution_web_apps),\nyou will see \"Hello, world!\" in the browser: \n\n function doGet() {\n return ContentService.createTextOutput('Hello, world!');\n }\n\nClasses \n\n| Name | Brief description |\n|------------------------------------------------------------------|----------------------------------------------------------|\n| [ContentService](/apps-script/reference/content/content-service) | Service for returning text content from a script. |\n| [MimeType](/apps-script/reference/content/mime-type) | An enum for mime types that can be served from a script. |\n| [TextOutput](/apps-script/reference/content/text-output) | A TextOutput object that can be served from a script. |\n\n[ContentService](/apps-script/reference/content/content-service) \n\nProperties\n\n| Property | Type | Description |\n|--------------|------------------------------------------------------|-------------|\n| `Mime``Type` | [MimeType](/apps-script/reference/content/mime-type) | |\n\nMethods\n\n| Method | Return type | Brief description |\n|------------------------------------------------------------------------------------------------------|----------------------------------------------------------|----------------------------------------------------------------------------------------------------------------|\n| [createTextOutput()](/apps-script/reference/content/content-service#createTextOutput()) | [TextOutput](/apps-script/reference/content/text-output) | Create a new [TextOutput](/apps-script/reference/content/text-output) object. |\n| [createTextOutput(content)](/apps-script/reference/content/content-service#createTextOutput(String)) | [TextOutput](/apps-script/reference/content/text-output) | Create a new [TextOutput](/apps-script/reference/content/text-output) object that can serve the given content. |\n\n[MimeType](/apps-script/reference/content/mime-type) \n\nProperties\n\n| Property | Type | Description |\n|--------------|--------|----------------------|\n| `CSV` | `Enum` | CSV Mime Type |\n| `ICAL` | `Enum` | ICAL Mime Type |\n| `JAVASCRIPT` | `Enum` | JAVASCRIPT Mime Type |\n| `JSON` | `Enum` | JSON Mime Type |\n| `TEXT` | `Enum` | TEXT Mime Type |\n| `VCARD` | `Enum` | VCARD Mime Type |\n\n[TextOutput](/apps-script/reference/content/text-output) \n\nMethods\n\n| Method | Return type | Brief description |\n|-----------------------------------------------------------------------------------------------|----------------------------------------------------------|-----------------------------------------------------------------------------------------------------------|\n| [append(addedContent)](/apps-script/reference/content/text-output#append(String)) | [TextOutput](/apps-script/reference/content/text-output) | Appends new content to the content that will be served. |\n| [clear()](/apps-script/reference/content/text-output#clear()) | [TextOutput](/apps-script/reference/content/text-output) | Clears the current content. |\n| [downloadAsFile(filename)](/apps-script/reference/content/text-output#downloadAsFile(String)) | [TextOutput](/apps-script/reference/content/text-output) | Tells browsers to download rather than display this content. |\n| [getContent()](/apps-script/reference/content/text-output#getContent()) | `String` | Gets the content that will be served. |\n| [getFileName()](/apps-script/reference/content/text-output#getFileName()) | `String` | Returns the file name to download this file as, or null if it should be displayed rather than downloaded. |\n| [getMimeType()](/apps-script/reference/content/text-output#getMimeType()) | [MimeType](/apps-script/reference/content/mime-type) | Get the mime type this content will be served with. |\n| [setContent(content)](/apps-script/reference/content/text-output#setContent(String)) | [TextOutput](/apps-script/reference/content/text-output) | Sets the content that will be served. |\n| [setMimeType(mimeType)](/apps-script/reference/content/text-output#setMimeType(MimeType)) | [TextOutput](/apps-script/reference/content/text-output) | Sets the mime type for content that will be served. |"]]