Hello,
I am encountering a “Permission Denied” error when trying to trigger a Google Workflow from a Cloud Scheduler job. Despite configuring the necessary roles and permissions, the job fails to execute. Below are the details of my setup and what I have tried so far:
-
Cloud Scheduler Job Configuration:
- Target type: HTTP
- URL: https://workflowexecutions.googleapis.com/v1/projects/{project_id}/locations/{project_location}/workflows/{workflow_name}/executions
- HTTP method: POST
- Auth header: OAuth token added
- Service Account: Custom service account created specifically for this purpose.
-
Roles Assigned to Service Account:
- Cloud Run Invoker
- Cloud Scheduler Admin
- Service Account User
- Workflows Invoker
Despite these settings, the execution logs in Cloud Logging indicate a “PERMISSION DENIED” error. The exact log output is as follows:
{
“insertId”: “16r0g0jfbinms5”,
“jsonPayload”: {
“jobName”: “projects/gld-sbx-dataoffice-01-daa9/locations/europe-west1/jobs/actualisation_du_classement”,
“url”: “https://europe-west1-gld-sbx-dataoffice-01-daa9.cloudfunctions.net/crea_table_classement”,
“@type”: “type.googleapis.com/google.cloud.scheduler.logging.AttemptFinished”,
“status”: “PERMISSION_DENIED”,
“debugInfo”: “URL_ERROR-ERROR_OTHER. Original HTTP response code number = 403”,
“targetType”: “HTTP”
},
“httpRequest”: {
“status”: 403
},
“resource”: {
“type”: “cloud_scheduler_job”,
“labels”: {
“project_id”: “gld-sbx-dataoffice-01-daa9”,
“location”: “europe-west1”,
“job_id”: “actualisation_du_classement”
}
},
“timestamp”: “2024-10-01T16:44:05.776865155Z”,
“severity”: “ERROR”,
“logName”: “projects/gld-sbx-dataoffice-01-daa9/logs/cloudscheduler.googleapis.com%2Fexecutions”,
“receiveTimestamp”: “2024-10-01T16:44:05.776865155Z”
}
I’ve also manually triggered the workflow using the same service account and it executes without any issues.
Could anyone help identify what might be missing or misconfigured in my setup? Any insights or suggestions would be greatly appreciated.
Thank you!
For additionalinformation i have follow this tutorial :https://www.youtube.com/watch?v=t7e0dNSCmzI