diff --git a/.github/workflows/deploy-integrations-production.yml b/.github/workflows/deploy-integrations-production.yml index cec17b610a4..fa5ba813de0 100644 --- a/.github/workflows/deploy-integrations-production.yml +++ b/.github/workflows/deploy-integrations-production.yml @@ -31,7 +31,7 @@ jobs: uses: ./.github/actions/deploy-integrations with: environment: 'production' - extra_filter: "-F '!intercom' -F '!notion' -F '!calendly'" + extra_filter: "-F '!intercom' -F '!calendly'" force: ${{ github.event.inputs.force == 'true' }} sentry_auth_token: ${{ secrets.SENTRY_AUTH_TOKEN }} token_cloud_ops_account: ${{ secrets.PRODUCTION_TOKEN_CLOUD_OPS_ACCOUNT }} diff --git a/integrations/notion/definitions/configuration.ts b/integrations/notion/definitions/configuration.ts index 9cd73a76a8e..9a840a53a6c 100644 --- a/integrations/notion/definitions/configuration.ts +++ b/integrations/notion/definitions/configuration.ts @@ -10,6 +10,7 @@ export const configuration = { export const identifier = { extractScript: 'extract.vrl', + fallbackHandlerScript: 'fallbackHandler.vrl', } as const satisfies sdk.IntegrationDefinitionProps['identifier'] export const configurations = { diff --git a/integrations/notion/fallbackHandler.vrl b/integrations/notion/fallbackHandler.vrl new file mode 100644 index 00000000000..a4687f5be38 --- /dev/null +++ b/integrations/notion/fallbackHandler.vrl @@ -0,0 +1,16 @@ +verification_token = parse_json!(.body).verification_token + +# Notion sends a verification token in the body of the request to verify the +# webhook endpoint, but this request does not contain a workspace_id, so the +# extract.vrl script fails and the request does not get handled by the +# integration. To circumvent this, we log the verification token so that it +# can be manually retrieved from the logs. + +msg, err = "Notion verification token received: " + verification_token + +if err == null{ + # The log() function is not available in wasm, so we have to get creative: + assert!(false, message: msg) +} + +{}