2.4.0 (latest) 2.3.0 2.2.0 2.1.0 2.0.0 1.1.0 1.0.0

    public sealed class ContextualTrigger : IMessage<ContextualTrigger>, IEquatable<ContextualTrigger>, IDeepCloneable<ContextualTrigger>, IBufferMessage, IMessage

Reference documentation and code samples for the Google.Apps.Script.Type class ContextualTrigger.

Defines a trigger that fires when the open email meets a specific criteria.
When the trigger fires, it executes a specific endpoint, usually
in order to create new cards and update the UI.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> ContextualTrigger

## Implements

[IMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.md.txt)[ContextualTrigger](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apps.Script.Type/latest/Google.Apps.Script.Type.Gmail.ContextualTrigger.md.txt), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[ContextualTrigger](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apps.Script.Type/latest/Google.Apps.Script.Type.Gmail.ContextualTrigger.md.txt), [IDeepCloneable](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.md.txt)[ContextualTrigger](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apps.Script.Type/latest/Google.Apps.Script.Type.Gmail.ContextualTrigger.md.txt), [IBufferMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.md.txt), [IMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.md.txt)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Apps.Script.Type.Gmail](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apps.Script.Type/latest/Google.Apps.Script.Type.Gmail.md.txt)

## Assembly

Google.Apps.Script.Type.dll

## Constructors

### ContextualTrigger()

    public ContextualTrigger()

### ContextualTrigger(ContextualTrigger)

    public ContextualTrigger(ContextualTrigger other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `ContextualTrigger` |

## Properties

### OnTriggerFunction

    public string OnTriggerFunction { get; set; }

Required. The name of the endpoint to call when a message matches the
trigger.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### TriggerCase

    public ContextualTrigger.TriggerOneofCase TriggerCase { get; }

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `ContextualTriggerTriggerOneofCase` |   |

### Unconditional

    public UnconditionalTrigger Unconditional { get; set; }

UnconditionalTriggers are executed when any mail message is opened.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `UnconditionalTrigger` |   |