Skip to main content
Version: Next

WebhookResource

Represents a webhook configuration.

Webhooks send HTTP POST requests to specified URLs when certain events occur (e.g., Actor run succeeds, fails, or times out).

Hierarchy

  • Omit<Schemas[WebhookResource], keyof WebhookResourceRePointed>
  • WebhookResourceRePointed
    • WebhookResource

Index

Properties

optionalinheritedactionType

actionType?: string
HTTP_REQUEST

Type of action the webhook performs: HTTP_REQUEST, SLACK_MESSAGE, GOOGLE_MAIL, GOOGLE_DRIVE or GITHUB_ISSUE.

inheritedcondition

condition: WebhookCondition

inheritedcreatedAt

createdAt: Date

Format: date-time

2019-12-12T07:34:14.202Z

optionalinheriteddescription

description?: null | string
this is webhook description

optionalinheriteddoNotRetry

doNotRetry?: null | boolean
false

inheritedeventTypes

eventTypes: WebhookEventType[]

optionalinheritedgithubIssue

githubIssue?: { body?: string; repository?: string; title?: string; userIntegrationId?: string }

Type declaration

  • optionalbody?: string
    Actor run {{resource.id}} failed.
  • optionalrepository?: string
    apify/apify-docs
  • optionaltitle?: string
    Actor run failed
  • optionaluserIntegrationId?: string
    kLcd8Z4dzXN1z3QzS

optionalinheritedgoogleDrive

googleDrive?: { filename?: string; format?: null | string; transformation?: { fields?: string[]; omit?: string[] }; userIntegrationId?: string }

Type declaration

  • optionalfilename?: string
    results
  • optionalformat?: null | string
    json
  • optionaltransformation?: { fields?: string[]; omit?: string[] }
    • optionalfields?: string[]
      [
      "title",
      "url"
      ]
    • optionalomit?: string[]
      [
      "html"
      ]
  • optionaluserIntegrationId?: string
    kLcd8Z4dzXN1z3QzS

optionalinheritedgoogleMail

googleMail?: { attachmentFormat?: string; attachmentTransformation?: { fields?: string[]; omit?: string[] }; body?: string; emailTo?: string[]; subject?: string; userIntegrationId?: string }

Type declaration

  • optionalattachmentFormat?: string
    csv
  • optionalattachmentTransformation?: { fields?: string[]; omit?: string[] }
    • optionalfields?: string[]
      [
      "title",
      "url"
      ]
    • optionalomit?: string[]
      [
      "html"
      ]
  • optionalbody?: string
    Actor run {{resource.id}} finished.
  • optionalemailTo?: string[]
    [
    "bob@example.com"
    ]
  • optionalsubject?: string
    Actor run finished
  • optionaluserIntegrationId?: string
    kLcd8Z4dzXN1z3QzS

optionalinheritedheadersTemplate

headersTemplate?: null | string
{\n "Authorization": "Bearer ..."}

inheritedid

id: string
YiKoxjkaS9gjGTqhF

inheritedignoreSslErrors

ignoreSslErrors: boolean
false

optionalinheritedisAdHoc

isAdHoc?: null | boolean
false

optionalinheritedisApifyIntegration

isApifyIntegration?: null | boolean
false

optionalinheritedisEnabled

isEnabled?: boolean
true

optionalinheritedlastDispatch

lastDispatch?: null | WebhookLastDispatch

inheritedmodifiedAt

modifiedAt: Date

Format: date-time

2019-12-13T08:36:13.202Z

optionalinheritedpayloadTemplate

payloadTemplate?: null | string
{\n "userId": {{userId}}...

optionalinheritedrequestUrl

requestUrl?: null | string

Format: uri

http://example.com/

URL of the HTTP request sent by the webhook. It is omitted or null for hook actions other than the conventional HTTP case (e.g. Slack or email notifications).

optionalinheritedshouldInterpolateStrings

shouldInterpolateStrings?: null | boolean
false

optionalinheritedslackMessage

slackMessage?: { channelId?: string; messageTemplate?: string; userIntegrationId?: string }

Type declaration

  • optionalchannelId?: string
    C01234ABCDE
  • optionalmessageTemplate?: string
    Actor run {{resource.id}} finished.
  • optionaluserIntegrationId?: string
    kLcd8Z4dzXN1z3QzS

optionalinheritedstats

stats?: null | WebhookStats

optionalinheritedtitle

title?: null | string
Notify on failure

inheriteduserId

userId: string
wRsJZtadYvn4mBZmm