I have a scheduled cloud flow that should run every 3 months. for each run I want to send a different e-mail.
with the compose function I create an number output value for the month (december = 12).
with the "switch" and "case" function , if the value equals 12 I send an e-mail. when I add those 2 functions and I try to save my flow, I always get this error message:
{"message":"Request failed with status code 400","name":"AxiosError","code":"ERR_BAD_REQUEST","config":{"transitional":{"silentJSONParsing":true,"forcedJSONParsing":true,"clarifyTimeoutError":false},"transformRequest":[null],"transformResponse":[null],"timeout":0,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1,"maxBodyLength":-1,"env":{},"headers":{"Accept":"application/json, text/plain, */*","Content-Type":"application/json","accept-language":"en-US","x-ms-client-session-id":"3ec066f0-cb0f-11f0-9062-5fb206e6b131","x-ms-client-request-id":"45efeb9d-1bb0-4879-94ec-de872fc1f258","authorization":""},"operationName":"PROCESSSIMPLE:PATCH/PROVIDERS/MICROSOFT.PROCESSSIMPLE/ENVIRONMENTS/FLOWS/","params":{"api-version":"1","$expand":"properties.connectionreferences.apidefinition,properties.definitionsummary.operations.apioperation,operationDefinition,plan,properties.throttleData,properties.estimatedsuspensiondata,properties.licenseData,properties.billingContext,properties.throttlingBehavior,properties.powerFlowType,properties.protectionStatus","telemetryMetadata":"{\"modifiedSources\":\"Portal\"}"},"method":"patch","url":"https://5162741ef526e9639d6129318afedc.14.environment.api.powerplatform.com/powerautomate/flows/72524e5a-e99b-4a61-ba8f-d9e03463bbd8","data":"{\"properties\":{\"connectionReferences\":{\"shared_office365\":{\"id\":\"/providers/Microsoft.PowerApps/apis/shared_office365\",\"connectionName\":\"shared-office365-3711e7a8-9360-4dc3-91c7-a4993216f607\"}},\"definition\":{\"$schema\":\"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#\",\"contentVersion\":\"undefined\",\"parameters\":{\"$authentication\":{\"defaultValue\":{},\"type\":\"SecureObject\"},\"$connections\":{\"defaultValue\":{},\"type\":\"Object\"}},\"triggers\":{\"Recurrence\":{\"type\":\"Recurrence\",\"recurrence\":{\"frequency\":\"Minute\",\"interval\":\"2\",\"startTime\":\"2025-11-26T22:30:00.000Z\",\"timeZone\":\"Romance Standard Time\"}}},\"actions\":{\"Compose\":{\"type\":\"Compose\",\"inputs\":\"@formatDateTime(utcNow(), 'MM')\",\"runAfter\":{}},\"Switch\":{\"type\":\"Switch\",\"expression\":{},\"default\":{\"actions\":{}},\"cases\":{\"Case\":{\"actions\":{\"Send_an_email_(V2)\":{\"type\":\"OpenApiConnection\",\"inputs\":{\"parameters\":{\"emailMessage/To\":\"bart.willocx@organon.com\",\"emailMessage/Subject\":\"test 2\",\"emailMessage/Body\":\"<p class=\\\"editor-paragraph\\\">test 2</p>\",\"emailMessage/Importance\":\"Normal\"},\"host\":{\"apiId\":\"/providers/Microsoft.PowerApps/apis/shared_office365\",\"operationId\":\"SendEmailV2\",\"connectionName\":\"shared_office365\"}}}},\"case\":11}},\"runAfter\":{\"Compose\":[\"SUCCEEDED\"]}}}},\"displayName\":\"test 2\",\"environment\":{\"name\":\"5162741e-f526-e963-9d61-29318afedc14\"}},\"name\":\"72524e5a-e99b-4a61-ba8f-d9e03463bbd8\",\"telemetryMetadata\":{\"modifiedSources\":\"Portal\"}}","team":"PowerAutomate","bodyDetails":{"locale":"en-US"},"axios-retry":{"retryCount":0,"lastRequestTime":1764195477310},"context":{"ppapiContext":{"endpoint":"5162741ef526e9639d6129318afedc.14.environment.api.powerplatform.com"}},"knownServiceId":"ppapi-pauto","activityId":"84584db7-12b2-47e9-b1ae-e423ad9bb396"},"request":{},"response":{"data":{"error":{"code":"TemplateValidationError","message":"The power flow's logic app flow template was invalid. The object expression '{}' at line '1' and column '761' of action 'Switch' has '0' top level properties. Only '1' is allowed."}},"status":400,"statusText":"","headers":{"access-control-allow-origin":"*","access-control-expose-headers":"Content-Type,Date,Server,Access-Control-Allow-Origin,Access-Control-Expose-Headers,Content-Length,x-ms-ppapigateway,x-ms-gateway-clusters,x-ms-request-id,x-ms-correlation-request-id,x-ms-flow-mobile-ios-version,x-ms-armresiliency,x-ms-flow-routing-request-id,Strict-Transport-Security","cache-control":"no-cache, no-store","content-length":"237","content-type":"application/json; charset=utf-8","date":"Wed, 26 Nov 2025 22:17:57 GMT","strict-transport-security":"max-age=31536000; includeSubDomains","x-ms-armresiliency":"False","x-ms-correlation-request-id":"af574a2c-1899-4393-a621-d4742d565ee3","x-ms-flow-mobile-ios-version":"3.0.421","x-ms-flow-routing-request-id":"EASTUS:20251126T221757Z:7d6bef2f-f726-4f81-bfc9-3b96483b4700","x-ms-gateway-clusters":"prdil102eus","x-ms-ppapigateway":"_prdil102eusgb0_7","x-ms-request-id":"eastus:7d6bef2f-f726-4f81-bfc9-3b96483b4700"},"config":{"transitional":{"silentJSONParsing":true,"forcedJSONParsing":true,"clarifyTimeoutError":false},"transformRequest":[null],"transformResponse":[null],"timeout":0,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1,"maxBodyLength":-1,"env":{},"headers":{"Accept":"application/json, text/plain, */*","Content-Type":"application/json","accept-language":"en-US","x-ms-client-session-id":"3ec066f0-cb0f-11f0-9062-5fb206e6b131","x-ms-client-request-id":"45efeb9d-1bb0-4879-94ec-de872fc1f258","authorization":""},"operationName":"PROCESSSIMPLE:PATCH/PROVIDERS/MICROSOFT.PROCESSSIMPLE/ENVIRONMENTS/FLOWS/","params":{"api-version":"1","$expand":"properties.connectionreferences.apidefinition,properties.definitionsummary.operations.apioperation,operationDefinition,plan,properties.throttleData,properties.estimatedsuspensiondata,properties.licenseData,properties.billingContext,properties.throttlingBehavior,properties.powerFlowType,properties.protectionStatus","telemetryMetadata":"{\"modifiedSources\":\"Portal\"}"},"method":"patch","url":"https://5162741ef526e9639d6129318afedc.14.environment.api.powerplatform.com/powerautomate/flows/72524e5a-e99b-4a61-ba8f-d9e03463bbd8","data":"{\"properties\":{\"connectionReferences\":{\"shared_office365\":{\"id\":\"/providers/Microsoft.PowerApps/apis/shared_office365\",\"connectionName\":\"shared-office365-3711e7a8-9360-4dc3-91c7-a4993216f607\"}},\"definition\":{\"$schema\":\"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#\",\"contentVersion\":\"undefined\",\"parameters\":{\"$authentication\":{\"defaultValue\":{},\"type\":\"SecureObject\"},\"$connections\":{\"defaultValue\":{},\"type\":\"Object\"}},\"triggers\":{\"Recurrence\":{\"type\":\"Recurrence\",\"recurrence\":{\"frequency\":\"Minute\",\"interval\":\"2\",\"startTime\":\"2025-11-26T22:30:00.000Z\",\"timeZone\":\"Romance Standard Time\"}}},\"actions\":{\"Compose\":{\"type\":\"Compose\",\"inputs\":\"@formatDateTime(utcNow(), 'MM')\",\"runAfter\":{}},\"Switch\":{\"type\":\"Switch\",\"expression\":{},\"default\":{\"actions\":{}},\"cases\":{\"Case\":{\"actions\":{\"Send_an_email_(V2)\":{\"type\":\"OpenApiConnection\",\"inputs\":{\"parameters\":{\"emailMessage/To\":\"bart.willocx@organon.com\",\"emailMessage/Subject\":\"test 2\",\"emailMessage/Body\":\"<p class=\\\"editor-paragraph\\\">test 2</p>\",\"emailMessage/Importance\":\"Normal\"},\"host\":{\"apiId\":\"/providers/Microsoft.PowerApps/apis/shared_office365\",\"operationId\":\"SendEmailV2\",\"connectionName\":\"shared_office365\"}}}},\"case\":11}},\"runAfter\":{\"Compose\":[\"SUCCEEDED\"]}}}},\"displayName\":\"test 2\",\"environment\":{\"name\":\"5162741e-f526-e963-9d61-29318afedc14\"}},\"name\":\"72524e5a-e99b-4a61-ba8f-d9e03463bbd8\",\"telemetryMetadata\":{\"modifiedSources\":\"Portal\"}}","team":"PowerAutomate","bodyDetails":{"locale":"en-US"},"axios-retry":{"retryCount":0,"lastRequestTime":1764195477310},"context":{"ppapiContext":{"endpoint":"5162741ef526e9639d6129318afedc.14.environment.api.powerplatform.com"}},"knownServiceId":"ppapi-pauto","activityId":"84584db7-12b2-47e9-b1ae-e423ad9bb396"},"request":{}},"isAxiosError":true}
don't know what's wrong here, any help please. I can setup this flow with multiple "condition" actions and this works. Don't know why the "switch" function is failing.