Skip to content
Go to Micro

Delete a triggered automation and its filter trees

client.TriggeredAutomations.Delete(ctx, automationObjectType, automationID, body) error
DELETE/v2/prism/{teamId}/{automationObjectType}/triggered_automations/{automationId}

Delete a triggered automation and its filter trees

ParametersExpand Collapse

Object types that support triggered automations. Must match the triggered-automation whitelist in @micro/database migrate-sql (TRIGGERED_AUTOMATION_OBJECTS).

One of the following:
const TriggeredAutomationDeleteParamsAutomationObjectTypeMessage TriggeredAutomationDeleteParamsAutomationObjectType = "message"
const TriggeredAutomationDeleteParamsAutomationObjectTypeAction TriggeredAutomationDeleteParamsAutomationObjectType = "action"
const TriggeredAutomationDeleteParamsAutomationObjectTypeEvent TriggeredAutomationDeleteParamsAutomationObjectType = "event"
const TriggeredAutomationDeleteParamsAutomationObjectTypeDocument TriggeredAutomationDeleteParamsAutomationObjectType = "document"
const TriggeredAutomationDeleteParamsAutomationObjectTypeIdentity TriggeredAutomationDeleteParamsAutomationObjectType = "identity"
const TriggeredAutomationDeleteParamsAutomationObjectTypeLinkedinMessage TriggeredAutomationDeleteParamsAutomationObjectType = "linkedin_message"
const TriggeredAutomationDeleteParamsAutomationObjectTypeDeal TriggeredAutomationDeleteParamsAutomationObjectType = "deal"
const TriggeredAutomationDeleteParamsAutomationObjectTypeOrganization TriggeredAutomationDeleteParamsAutomationObjectType = "organization"
const TriggeredAutomationDeleteParamsAutomationObjectTypeContact TriggeredAutomationDeleteParamsAutomationObjectType = "contact"
automationID string
formatuuid
body TriggeredAutomationDeleteParams
TeamID param.Field[string]Optional
formatuuid

Delete a triggered automation and its filter trees

package main

import (
  "context"

  "github.com/micro-so/micro-sdk-go"
  "github.com/micro-so/micro-sdk-go/option"
)

func main() {
  client := micro.NewClient(
    option.WithAPIKey("My API Key"),
    option.WithTeamID("My Team ID"),
  )
  err := client.TriggeredAutomations.Delete(
    context.TODO(),
    micro.TriggeredAutomationDeleteParamsAutomationObjectTypeMessage,
    "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    micro.TriggeredAutomationDeleteParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
}
Returns Examples