Class Attachment
Stay organized with collections
Save and categorize content based on your preferences.
Attachment
Represents an attachment created by an add-on. This can be used within the context of different
Google extensibility products to generate new attachments, such as for Calendar events.
var attachment = CardService.newAttachment()
.setResourceUrl("https://fakeresourceurl.com")
.setTitle("Attachment title")
.setMimeType("text/html")
.setIconUrl("https://fakeresourceurl.com/iconurl.png");
Detailed documentation
setIconUrl(iconUrl)
Sets the icon URL for the attachment.
Parameters
Name
| Type
| Description
|
iconUrl
| String
| The URL address of the attachment icon.
|
Return
Attachment
— This object, for chaining.
setMimeType(mimeType)
Sets the MIME type for the attachment.
Parameters
Name
| Type
| Description
|
mimeType
| String
| The MIME type of the content in the attachment resource.
|
Return
Attachment
— This object, for chaining.
setResourceUrl(resourceUrl)
Sets the resource URL for the attachment.
Parameters
Name
| Type
| Description
|
resourceUrl
| String
| The URL address of a resource.
|
Return
Attachment
— This object, for chaining.
setTitle(title)
Sets the title for the attachment.
Parameters
Name
| Type
| Description
|
title
| String
| The title of the attachment.
|
Return
Attachment
— This object, for chaining.
Except as otherwise noted, the content of this page is licensed under the
Creative Commons Attribution 4.0 License
, and code samples are licensed under the
Apache 2.0 License
. For details, see the
Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2022-03-22 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]