EmailTrigger.UpdateEmailTriggerAsync
Description
Updates the properties of the specified Email Trigger inside the connected AI Command Center.
Signature [C#]
Task UpdateEmailTriggerAsync(EmailTrigger emailTrigger);
Properties
Input
| Parameter | Type | Required / default | Description |
|---|---|---|---|
emailTrigger | EmailTrigger | Required | Specify the details to be updated. |
Remarks
Use UpdateEmailTriggerAsync API to update details of Email Trigger inside the connected AI Command Center.
Example
C#
public async Task UpdateEmailTrigger()
{
IControlRoomContext context = LoginControlRoom();
try
{
string updateTriggerName = "updateTrigger";
EmailTrigger emailTrigger = new EmailTrigger()
{
Id = 1,
Name = updateTriggerName
};
await context.EmailTriggers.UpdateEmailTriggerAsync(emailTrigger);
}
finally
{
context.Close();
}
}
Connection helper
public IControlRoomContext LoginControlRoom()
{
string RequiredSetting(string name) => Environment.GetEnvironmentVariable(name) ?? throw new InvalidOperationException($"Set {name} before running this example.");
string serverUrl = RequiredSetting("INTELLIBUDDIES_SERVER_URL");
string userName = RequiredSetting("INTELLIBUDDIES_USERNAME");
string password = RequiredSetting("INTELLIBUDDIES_PASSWORD");
string connectionString = $"ServerUrl={serverUrl};UserName={userName};Password={password}";
IControlRoomContext context = new ControlRoomContext(connectionString);
context.Open();
return context;
}
See Get started for namespaces, configuration, and context cleanup, and SDK usage for error handling.