EventToWebHookConfig
The configuration for posting a payload to a WebHook when an event gets triggered which has the url as a field to store where to post the payload to.
type EventToWebHookConfig implements IEventActionConfig {
id: String!
trigger: EventTrigger!
code: String
createdAt: DateTime!
lastModifiedAt: DateTime!
createdBy: Int
lastModifiedBy: Int
names(
language: String
): [LocalizedString!]!
url: String!
signatureSalt: String
basicAuthUsername: String
}
Fields
EventToWebHookConfig.id
● String!
non-null scalar
The ID of the event, uuid v7 format
EventToWebHookConfig.trigger
● EventTrigger!
non-null enum
The event to trigger the action defined in the event action config
EventToWebHookConfig.code
● String
scalar
The event code to use when the trigger is [CUSTOM_EVENT]
EventToWebHookConfig.createdAt
● DateTime!
non-null scalar
The creation date of this EventActionConfig
EventToWebHookConfig.lastModifiedAt
● DateTime!
non-null scalar
The last modified date of this EventActionConfig
EventToWebHookConfig.createdBy
● Int
scalar
ID of the user who created this EventActionConfig
EventToWebHookConfig.lastModifiedBy
● Int
scalar
ID of the user who last modified this EventActionConfig
EventToWebHookConfig.names
● [LocalizedString!]!
non-null object
EventToWebHookConfig.names.language
● String
scalar
Filter for filtering LocalizedString entities by language
EventToWebHookConfig.url
● String!
non-null scalar
The URL of the webhook to send the payload to
EventToWebHookConfig.signatureSalt
● String
scalar
The salt used to generate HMAC-SHA256 signature for webhook authentication.
When configured, the webhook will include an 'X-Propeller-Signature' header with format 'sha256=<hex_signature>'.
To verify the signature:
- JSON stringify the payload
- Generate HMAC-SHA256 using this salt and the stringified payload
- Compare with the received signature using crypto.timingSafeEqual() to prevent timing attacks
Example (Node.js): const expectedSig = crypto.createHmac('sha256', salt).update(JSON.stringify(payload), 'utf8').digest('hex'); const receivedSig = signature.replace('sha256=', ''); return crypto.timingSafeEqual(Buffer.from(expectedSig, 'hex'), Buffer.from(receivedSig, 'hex'));
EventToWebHookConfig.basicAuthUsername
● String
scalar
The username for basic HTTP authentication
Interfaces
IEventActionConfig
interface
Returned By
eventToWebHookConfigCreate
mutation ● eventToWebHookConfigUpdate
mutation