Martin Klefas
03/20/2025, 10:53 PM{{ body | tojson }}
and then the automation is trying to receive it with
{
"event": {
"__prefect_kind": "jinja",
"template": "{{ triggering_event.payload.body.Message }}"
}
}
But this approach (and every other) fails with some variation on:
Events
Automation action failed
Details
Raw
{
"id": "3cd564fd-57a5-4d9e-bf08-6d6b848678fd",
"account": "10cd2793-5f23-4975-8d46-84afe327fe95",
"event": "prefect-cloud.automation.action.failed",
"occurred": "2025-03-20T22:43:13.260Z",
"payload": {
"action_index": 0,
"action_type": "run-deployment",
"invocation": "7f8e662d-e2fb-4122-bc0b-df2a82afec13",
"reason": "Validation error occurred for 'run-deployment' - Error creating flow run: Validation failed for field 'event'. Failure reason: '' is not of type 'object'",
"validation_error": "Error creating flow run: Validation failed for field 'event'. Failure reason: '' is not of type 'object'",
"status_code": 409
},
Is there a guide somewhere?Martin Klefas
03/20/2025, 10:56 PMAlexander Azzam
03/21/2025, 1:07 AMMartin Klefas
03/21/2025, 7:52 AM{
"id": "xxxx",
"account": "xxxx",
"event": "prefect-cloud.webhook.received",
"occurred": "2025-03-20T22:43:12.716Z",
"payload": {
"method": "POST",
"headers": {
"host": "api.prefect.cloud",
"x-amz-sns-message-type": "Notification",
"x-amz-sns-message-id": "xxxx",
"x-amz-sns-topic-arn": "xxxx",
"x-amz-sns-subscription-arn": "xxxx",
"content-type": "text/plain; charset=UTF-8",
"content-length": "2073",
"user-agent": "Amazon Simple Notification Service Agent",
"accept-encoding": "gzip,deflate",
"x-request-id": "xxxx"
},
"body": "{\n \"Type\" : \"Notification\",\n \"MessageId\" : \"3b34d9aa-7b3f-5b7c-be71-b9fce77f3657\",\n \"TopicArn\" : \"xxxx\",\n \"Subject\" : \"Wasabi S3 Notification\",\n \"Message\" : \"{\\\"Records\\\":[{\\\"eventVersion\\\":\\\"0.1\\\",\\\"eventSource\\\":\\\"wasabi:s3\\\",\\\"awsRegion\\\":\\\"eu-north-1\\\",\\\"eventTime\\\":\\\"2025-03-20T22:43:12.393Z\\\",\\\"eventName\\\":\\\"s3:ObjectCreated:Put\\\",\\\"userIdentity\\\":{\\\"principalId\\\":\\\"102\\\"},\\\"requestParameters\\\":{\\\"sourceIPAddress\\\":\\\"193.237.215.124\\\"},\\\"responseElements\\\":{\\\"x-amz-id-2\\\":\\\"Kr/5s4hYaDBvidpqXuEaRU5iavAVSmhFYE0kj6WxDS+7c6IfpzIPdoZ7PAWA4vNHyReLw0dkUrfc\\\",\\\"x-amz-request-id\\\":\\\"E26CB84184B7A029:A\\\"},\\\"s3\\\":{\\\"s3SchemaVersion\\\":\\\"1.0\\\",\\\"configurationId\\\":\\\"FileCreated\\\",\\\"bucket\\\":{\\\"name\\\":\\\"xxxx\\\",\\\"ownerIdentity\\\":{\\\"principalId\\\":\\\"250825\\\"},\\\"arn\\\":\\\"xxxx\\\"},\\\"object\\\":{\\\"key\\\":\\\"dockerfile_cpu\\\",\\\"size\\\":2434,\\\"eTag\\\":\\\"56b57a25f786797cf60d7828052c4790\\\",\\\"sequencer\\\":\\\"1\\\"}},\\\"enhancedParameters\\\":{\\\"Content-Type\\\":\\\"application/octet-stream\\\",\\\"principalName\\\":\\\"xxxx\\\",\\\"wasabiCanonicalId\\\":\\\"9IAO1G9PDK3CIEV39EKD1\\\",\\\"x-amz-meta-s3b-last-modified\\\":\\\"20250320T160950Z\\\",\\\"x-amz-meta-sha256\\\":\\\"6326a5e03fcd39948d078902bcf7799cd61c27b9bfd90755b0d18d84315d0873\\\"}}]}\\n\",\n \"Timestamp\" : \"2025-03-20T22:43:12.552Z\",\n \"SignatureVersion\" : \"1\",\n \"Signature\" : \"MVkb8rK2cFZw7VgGvV/s8A4CnfpOdkm/9qtJRd5T+oQ0wFC8GLQR2qIRFGh6+MC+DnEX/teC30ugI4f4v2vt3h2t8T9bp/c9e+biTZT8U1FiwNoHm9/P5evuDAeEBeNx+fiIPvvkZButd+UFmoarjrqNi05A84b/lwHMSim+9K7N4KH5xRHnzrbePgbcTOYPesrbJ6TlnXytfu/nAr4Cp+YdtYEiePvmNy7hAiGLxxOdOf3X3BvwsmPEwOqnEj6rS4SeUqfqDjV9ntOmU/3y2dy3c4ZwEl97lbolGV+J4L4JXz4hGDxDT4txECyFFIL5kI03YMTdqYWdMA8WX+y61w==\",\n \"SigningCertURL\" : \"xxxx\",\n \"UnsubscribeURL\" : \"xxxx"\n}",
"raw_body": "{\n \"Type\" : \"Notification\",\n \"MessageId\" : \"3b34d9aa-7b3f-5b7c-be71-b9fce77f3657\",\n \"TopicArn\" : \xxxx\",\n \"Subject\" : \"Wasabi S3 Notification\",\n \"Message\" : \"{\\\"Records\\\":[{\\\"eventVersion\\\":\\\"0.1\\\",\\\"eventSource\\\":\\\"wasabi:s3\\\",\\\"awsRegion\\\":\\\"eu-north-1\\\",\\\"eventTime\\\":\\\"2025-03-20T22:43:12.393Z\\\",\\\"eventName\\\":\\\"s3:ObjectCreated:Put\\\",\\\"userIdentity\\\":{\\\"principalId\\\":\\\"102\\\"},\\\"requestParameters\\\":{\\\"sourceIPAddress\\\":\\\"193.237.215.124\\\"},\\\"responseElements\\\":{\\\"x-amz-id-2\\\":\\\"Kr/5s4hYaDBvidpqXuEaRU5iavAVSmhFYE0kj6WxDS+7c6IfpzIPdoZ7PAWA4vNHyReLw0dkUrfc\\\",\\\"x-amz-request-id\\\":\\\"E26CB84184B7A029:A\\\"},\\\"s3\\\":{\\\"s3SchemaVersion\\\":\\\"1.0\\\",\\\"configurationId\\\":\\\"FileCreated\\\",\\\"bucket\\\":{\\\"name\\\":\\\"xxxx\\\",\\\"ownerIdentity\\\":{\\\"principalId\\\":\\\"250825\\\"},\\\"arn\\\":\\\"xxxx\\\"},\\\"object\\\":{\\\"key\\\":\\\"dockerfile_cpu\\\",\\\"size\\\":2434,\\\"eTag\\\":\\\"56b57a25f786797cf60d7828052c4790\\\",\\\"sequencer\\\":\\\"1\\\"}},\\\"enhancedParameters\\\":{\\\"Content-Type\\\":\\\"application/octet-stream\\\",\\\"principalName\\\":\\\"xxxx\\\",\\\"wasabiCanonicalId\\\":\\\"9IAO1G9PDK3CIEV39EKD1\\\",\\\"x-amz-meta-s3b-last-modified\\\":\\\"20250320T160950Z\\\",\\\"x-amz-meta-sha256\\\":\\\"6326a5e03fcd39948d078902bcf7799cd61c27b9bfd90755b0d18d84315d0873\\\"}}]}\\n\",\n \"Timestamp\" : \"2025-03-20T22:43:12.552Z\",\n \"SignatureVersion\" : \"1\",\n \"Signature\" : \"xxxx",\n \"SigningCertURL\" : \"xxxx",\n \"UnsubscribeURL\" : \"xxxx"\n}"
},
"received": "2025-03-20T22:43:12.717Z",
"related": [
{
"prefect.resource.id": "prefect-cloud.webhook.xxxx",
"prefect.resource.name": "SNS-Trigger",
"prefect.resource.role": "webhook"
}
],
"resource": {
"prefect.resource.id": "prefect-cloud.webhook.xxxx",
"prefect.resource.name": "SNS-Trigger"
},
"workspace": "xxxx"
}
It'd be fine if all of this came down to the flow - I can work on it from there.Martin Klefas
03/21/2025, 4:57 PM{
"event": {
"template": "{{ event.payload.body }}",
"__prefect_kind": "jinja"
}
}