작업 선언
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
schema.org의 작업은 구조화된 데이터에서 실행할 수 있는 동사 또는 활동을 나타냅니다. 여러 유형의 작업이 지원되며 모두 유사한 구조화된 데이터로 정의할 수 있습니다.
바로가기 작업
schema.org 항목을 사용하여 콘텐츠에 마크업을 추가하는 경우 해당 항목에 이동 작업을 추가할 수 있습니다. 예를 들어 EmailMessage
항목에 ViewAction
바로가기 링크를 추가하려면 다음 예와 같이 이메일의 potentialAction
속성을 채우세요.
JSON-LD
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://watch-movies.com/watch?movieId=abc123",
"name": "Watch movie"
},
"description": "Watch the 'Avengers' movie online"
}
</script>
마이크로데이터
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="potentialAction" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="target" href="https://watch-movies.com/watch?movieId=abc123"/>
<meta itemprop="name" content="Watch movie"/>
</div>
<meta itemprop="description" content="Watch the 'Avengers' movie online"/>
</div>
이메일에서 스키마를 지원하지 않는 다른 이메일 클라이언트는 위의 마크업을 자동으로 무시합니다.
모바일 딥 링크
바로가기 작업은 Android 및 iOS의 네이티브 모바일 앱에 있는 콘텐츠로 직접 연결할 수도 있습니다. 앱으로 딥 링크하려면 아래와 같이 android-app://
및 ios-app://
스키마로 인코딩된 추가 target
URL을 포함합니다.
JSON-LD
"target": [
“<web url>”,
“android-app://<android package name>/<scheme>/<host>/<path+query>”,
“ios-app://<App store ID>/<scheme>/<host><path+query>"
]
마이크로데이터
<link itemprop="target" href="<web url>"/>
<link itemprop="target" href="android-app://<android package name>/<scheme>/<host>/<path+query>”/>
<link itemprop="target" href="ios-app://<App store ID>/<scheme>/<host>/<path+query>"/>
이전 EmailMessage
예시를 확장합니다.
JSON-LD
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"name": "Watch movie",
... information about the movie ...
"potentialAction": {
"@type": "ViewAction",
"target": [
"https://watch-movies.com/watch?movieId=abc123",
"android-app://com.watchmovies.app/http/watch-movies.com/watch?movieId=abc123",
"ios-app://12345/movieapp/watch-movies.com/watch?movieId=abc123"
]
}
}
</script>
마이크로데이터
<div itemscope itemtype="http://schema.org/EmailMessage">
<meta itemprop="name" content="Watch movie"/>
... information about the movie ...
<div itemprop="potentialAction" itemscope itemtype="http://schema.org/ViewAction">
<meta itemprop="target" content="https://watch-movies.com/watch?movieId=abc123"/>
<meta itemprop="target" content="android-app://com.watchmovies.android/http/watch-movies.com/watch?movieId=abc123"/>
<meta itemprop="target" content="ios://12345/movieapp/watch-movies.com/watch?movieId=abc123"/>
</div>
</div>
사용자에게 앱이 없는 경우 작업은 사용자를 제공된 웹 URL로 안내합니다.
인앱 액션 수
인앱 액션은 사용자를 다른 웹사이트로 보내지 않고 Gmail 내에서 바로 처리됩니다. 인앱 작업은 이동 작업과 같이 선언되지만 사용자 에이전트 (예: Gmail)가 작업을 인라인으로 쉽게 처리할 수 있도록 하는 추가 정보가 포함되어 있습니다.
target
로 작업을 선언하는 대신 적절한 구성으로 작업에 HttpActionHandler
를 선언해야 합니다.
예를 들어 사용자에게 승인, 확인, 인정을 요구하는 이메일에 확인 버튼을 추가할 수 있습니다. 사용자가 버튼을 클릭하면 Google에서 서비스로 HTTP 요청을 발행하여 확인을 기록합니다. ConfirmAction
유형은 한 번만 상호작용할 수 있습니다.
다음 예에서는 비용 보고서에 관한 이메일에 ConfirmAction
버튼을 추가합니다.
JSON-LD
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ConfirmAction",
"name": "Approve Expense",
"handler": {
"@type": "HttpActionHandler",
"url": "https://myexpenses.com/approve?expenseId=abc123"
}
},
"description": "Approval request for John's $10.13 expense for office supplies"
}
</script>
마이크로데이터
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="potentialAction" itemscope itemtype="http://schema.org/ConfirmAction">
<meta itemprop="name" content="Approve Expense"/>
<div itemprop="handler" itemscope itemtype="http://schema.org/HttpActionHandler">
<link itemprop="url" href="https://myexpenses.com/approve?expenseId=abc123"/>
</div>
</div>
<meta itemprop="description" content="Approval request for John's $10.13 expense for office supplies"/>
</div>
만료되는 작업
대부분의 경우 작업은 제한된 기간 동안만 관련이 있습니다. 여행 예약과 같이 날짜가 알려진 항목과 연결된 작업은 자동으로 만료됩니다. 여행이 끝난 후에는 Gmail에 작업이 표시되지 않습니다.
만료일은 작업에 명시적으로 추가할 수도 있습니다. 예를 들어 쿠폰을 클립하거나 혜택 코드를 저장하는 작업은 제한된 시간 동안만 유효할 수 있습니다. 작업이 표시되는 시간 범위를 설정하려면 작업의 startTime
및 endTime
속성을 설정합니다.
JSON-LD
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ConfirmAction",
"name": "Save coupon",
"handler": {
"@type": "HttpActionHandler",
"url": "https://my-coupons.com/approve?couponId=abc123"
},
"startTime": "2015-06-01T12:00:00Z",
"endTime": "2015-06-05T12:00:00Z"
}
}
</script>
마이크로데이터
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="potentialAction" itemscope itemtype="http://schema.org/ConfirmAction">
<meta itemprop="name" content="Save coupon"/>
<div itemprop="handler" itemscope itemtype="http://schema.org/HttpActionHandler">
<link itemprop="url" href="https://my-coupons.com/approve?couponId=abc123"/>
</div>
<meta itemprop="startTime" content="2015-06-01T12:00:00Z" />
<meta itemprop="endTime" content="2015-06-05T12:00:00Z" />
</div>
</div>
추가 자료
작업에 관한 자세한 내용은 다음을 참고하세요.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-29(UTC)
[null,null,["최종 업데이트: 2025-08-29(UTC)"],[],[],null,["# Declare Actions\n\nAn Action in schema.org represents a verb or activity that can be performed on a piece of structured data. Multiple types of [actions](/workspace/gmail/markup/actions/actions-overview) are supported and they can all be defined with similar structured data.\n\nGo-To Actions\n-------------\n\nIf you add markup to your content with schema.org entities, you can add Go-To actions for them. For example, to make an `EmailMessage` entity have a `ViewAction` Go-To link, populate the email's `potentialAction` property, as in the following example: \n\n### JSON-LD\n\n \u003cscript type=\"application/ld+json\"\u003e\n {\n \"@context\": \"http://schema.org\",\n \"@type\": \"EmailMessage\",\n \"potentialAction\": {\n \"@type\": \"ViewAction\",\n \"target\": \"https://watch-movies.com/watch?movieId=abc123\",\n \"name\": \"Watch movie\"\n },\n \"description\": \"Watch the 'Avengers' movie online\"\n }\n \u003c/script\u003e\n\n### Microdata\n\n \u003cdiv itemscope itemtype=\"http://schema.org/EmailMessage\"\u003e\n \u003cdiv itemprop=\"potentialAction\" itemscope itemtype=\"http://schema.org/ViewAction\"\u003e\n \u003clink itemprop=\"target\" href=\"https://watch-movies.com/watch?movieId=abc123\"/\u003e\n \u003cmeta itemprop=\"name\" content=\"Watch movie\"/\u003e\n \u003c/div\u003e\n \u003cmeta itemprop=\"description\" content=\"Watch the 'Avengers' movie online\"/\u003e\n \u003c/div\u003e\n\nNote that the markup above is automatically ignored by other email clients that do not support schemas in emails.\n\nMobile Deep Linking\n-------------------\n\nGo-To actions can also link directly to content in native mobile apps on\n[Android](https://developer.android.com/training/app-indexing/deep-linking.html) and\n[iOS](https://developer.apple.com/library/ios/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/Inter-AppCommunication/Inter-AppCommunication.html#//apple_ref/doc/uid/TP40007072-CH6-SW1). To deep link to\nan app, include additional `target` URLs encoded with the `android-app://` and `ios-app://` schemes as shown below: \n\n### JSON-LD\n\n \"target\": [\n \"\u003cweb url\u003e\",\n \"android-app://\u003candroid package name\u003e/\u003cscheme\u003e/\u003chost\u003e/\u003cpath+query\u003e\",\n \"ios-app://\u003cApp store ID\u003e/\u003cscheme\u003e/\u003chost\u003e\u003cpath+query\u003e\"\n ]\n\n### Microdata\n\n \u003clink itemprop=\"target\" href=\"\u003cweb url\u003e\"/\u003e\n \u003clink itemprop=\"target\" href=\"android-app://\u003candroid package name\u003e/\u003cscheme\u003e/\u003chost\u003e/\u003cpath+query\u003e\"/\u003e\n \u003clink itemprop=\"target\" href=\"ios-app://\u003cApp store ID\u003e/\u003cscheme\u003e/\u003chost\u003e/\u003cpath+query\u003e\"/\u003e\n\nExtending the previous `EmailMessage` example: \n\n### JSON-LD\n\n \u003cscript type=\"application/ld+json\"\u003e\n {\n \"@context\": \"http://schema.org\",\n \"@type\": \"EmailMessage\",\n \"name\": \"Watch movie\",\n ... information about the movie ...\n \"potentialAction\": {\n \"@type\": \"ViewAction\",\n \"target\": [\n \"https://watch-movies.com/watch?movieId=abc123\",\n \"android-app://com.watchmovies.app/http/watch-movies.com/watch?movieId=abc123\",\n \"ios-app://12345/movieapp/watch-movies.com/watch?movieId=abc123\"\n ]\n }\n }\n \u003c/script\u003e\n\n### Microdata\n\n \u003cdiv itemscope itemtype=\"http://schema.org/EmailMessage\"\u003e\n \u003cmeta itemprop=\"name\" content=\"Watch movie\"/\u003e\n ... information about the movie ...\n \u003cdiv itemprop=\"potentialAction\" itemscope itemtype=\"http://schema.org/ViewAction\"\u003e\n \u003cmeta itemprop=\"target\" content=\"https://watch-movies.com/watch?movieId=abc123\"/\u003e\n \u003cmeta itemprop=\"target\" content=\"android-app://com.watchmovies.android/http/watch-movies.com/watch?movieId=abc123\"/\u003e\n \u003cmeta itemprop=\"target\" content=\"ios://12345/movieapp/watch-movies.com/watch?movieId=abc123\"/\u003e\n \u003c/div\u003e\n \u003c/div\u003e\n\nIf the user doesn't have your app, the action takes the user to the web URL you provide.\n\nIn-App Actions\n--------------\n\nIn-App Actions are handled in-place, inside Gmail, without sending the user to another website. In-App Actions are declared like [Go-To Actions](#go-to_actions), but contain extra information that makes it easy for user-agents (such as Gmail) to handle the action inline.\n\nInstead of declaring an action with a `target`, you need to declare an `HttpActionHandler` for the action with the proper configuration.\n\nFor instance, you can add a confirm button to emails requiring users to approve, confirm, and acknowledge something. Once the user clicks on the button, an HTTP request will be issued from Google to your service, recording the confirmation. `ConfirmAction` can only be interacted with once.\n\nThe following example adds a `ConfirmAction` button to an email about an expense report: \n\n### JSON-LD\n\n \u003cscript type=\"application/ld+json\"\u003e\n {\n \"@context\": \"http://schema.org\",\n \"@type\": \"EmailMessage\",\n \"potentialAction\": {\n \"@type\": \"ConfirmAction\",\n \"name\": \"Approve Expense\",\n \"handler\": {\n \"@type\": \"HttpActionHandler\",\n \"url\": \"https://myexpenses.com/approve?expenseId=abc123\"\n }\n },\n \"description\": \"Approval request for John's $10.13 expense for office supplies\"\n }\n \u003c/script\u003e\n\n### Microdata\n\n \u003cdiv itemscope itemtype=\"http://schema.org/EmailMessage\"\u003e\n \u003cdiv itemprop=\"potentialAction\" itemscope itemtype=\"http://schema.org/ConfirmAction\"\u003e\n \u003cmeta itemprop=\"name\" content=\"Approve Expense\"/\u003e\n \u003cdiv itemprop=\"handler\" itemscope itemtype=\"http://schema.org/HttpActionHandler\"\u003e\n \u003clink itemprop=\"url\" href=\"https://myexpenses.com/approve?expenseId=abc123\"/\u003e\n \u003c/div\u003e\n \u003c/div\u003e\n \u003cmeta itemprop=\"description\" content=\"Approval request for John's $10.13 expense for office supplies\"/\u003e\n \u003c/div\u003e\n\nExpiring Actions\n----------------\n\nIn many cases, actions are only relevant for a limited period of time. Actions associated to entities with known dates, like travel reservations, will automatically expire. Gmail doesn't display the action after the trip has passed.\n\nExpirations can also be explicitly added to actions. For example, an action to clip a coupon or save an offer code might only be valid for a limited time. To set the time window for when an action is displayed, set the `startTime` and `endTime` properties of the action: \n\n### JSON-LD\n\n \u003cscript type=\"application/ld+json\"\u003e\n {\n \"@context\": \"http://schema.org\",\n \"@type\": \"EmailMessage\",\n \"potentialAction\": {\n \"@type\": \"ConfirmAction\",\n \"name\": \"Save coupon\",\n \"handler\": {\n \"@type\": \"HttpActionHandler\",\n \"url\": \"https://my-coupons.com/approve?couponId=abc123\"\n },\n \"startTime\": \"2015-06-01T12:00:00Z\",\n \"endTime\": \"2015-06-05T12:00:00Z\"\n }\n }\n \u003c/script\u003e\n\n### Microdata\n\n \u003cdiv itemscope itemtype=\"http://schema.org/EmailMessage\"\u003e\n \u003cdiv itemprop=\"potentialAction\" itemscope itemtype=\"http://schema.org/ConfirmAction\"\u003e\n \u003cmeta itemprop=\"name\" content=\"Save coupon\"/\u003e\n \u003cdiv itemprop=\"handler\" itemscope itemtype=\"http://schema.org/HttpActionHandler\"\u003e\n \u003clink itemprop=\"url\" href=\"https://my-coupons.com/approve?couponId=abc123\"/\u003e\n \u003c/div\u003e\n \u003cmeta itemprop=\"startTime\" content=\"2015-06-01T12:00:00Z\" /\u003e\n \u003cmeta itemprop=\"endTime\" content=\"2015-06-05T12:00:00Z\" /\u003e\n \u003c/div\u003e\n \u003c/div\u003e\n\nFurther Reading\n---------------\n\nFor more details about Actions, see:\n\n- [Handling Action Requests](/workspace/gmail/markup/actions/handling-action-requests)\n- [Securing Actions](/workspace/gmail/markup/actions/securing-actions)\n- [Android Deep Linking](https://developer.android.com/training/app-indexing/deep-linking.html)\n- [iOS Deep Linking](https://developer.apple.com/library/ios/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/Inter-AppCommunication/Inter-AppCommunication.html#//apple_ref/doc/uid/TP40007072-CH6-SW1)\n\n| **Note:** Some of the schemas used by Google are still going through the standardization process of [schema.org](http://schema.org), and therefore, may change in the future. [Learn More](/workspace/gmail/markup/reference/schema-org-proposals)."]]