Genesys Cloud - Developer Community!

 View Only

Sign Up

Expand all | Collapse all

Flow publish failed.

  • 1.  Flow publish failed.

    Posted 07-25-2025 07:26

    Hello, I am trying to publish a Inbound Message Flow using Cx as code (terraform) but it fails with below message.

     Error: Flow publish failed. JobID: ***************************************, no tracing messages available.

    │   with genesyscloud_flow.classifier_flow,
    │   on genesys_translate.tf line 233, in resource "genesyscloud_flow" "classifier_flow":
    │  233: resource "genesyscloud_flow" "classifier_flow" {

    this is the code i am using --

    resource "genesyscloud_flow" "classifier_flow" {
      filepath          = "./a.yaml"
      file_content_hash = filesha256("./a.yaml")
    }

    and my yaml file look like this -

    inboundShortMessage:
      name: new_flow
      description: ""
      division: Home
      startUpRef: "/inboundShortMessage/states/state[Initial State_10]"
      defaultLanguage: en-us
      supportedLanguages:
        en-us:
          defaultLanguageSkill:
            noValue: true
      settingsErrorHandling:
        errorHandling:
          disconnect:
            none: true
      states:
        - state:
            name: Initial State
            refId: Initial State_10
            actions:
              - sendResponse:
                  name: Send Response
                  messageBody:
                    lit: hello from inboundmessage flow
              - disconnect:
                  name: Disconnect
    if anyone has any idea how to resolve this issue.
    I basically trying to import architecture flow in Genesys cloud account

    #Architect
    #CXasCode

    ------------------------------
    Smriti Shomya
    ------------------------------


  • 2.  RE: Flow publish failed.

    Posted 07-25-2025 09:42

    Try giving absolute path in   filepath and  file_content_hash



    ------------------------------
    Lalit Shukla
    Technical lead
    ------------------------------



  • 3.  RE: Flow publish failed.

    Posted 07-25-2025 09:54

    i tried with absolute path but still get same error it tried to create flow but end with giving this error.



    ------------------------------
    Smriti Shomya
    ------------------------------



  • 4.  RE: Flow publish failed.

    Posted 07-25-2025 10:39
    Edited by Lalit Shukla 07-25-2025 10:40

    Flow name in .yaml you have give new_flow, and other place a. and classifier_flow. That could be the reason of failure try giving same name at each place 



    ------------------------------
    Lalit Shukla

    ------------------------------



  • 5.  RE: Flow publish failed.

    Posted 07-25-2025 10:53

    i use this---

    resource "genesyscloud_flow" "new_flow" {
      filepath          = "C:/terraform/terraform_1.12.2_windows_386/new_flow.yaml"
      file_content_hash = filesha256("C:/terraform/terraform_1.12.2_windows_386/new_flow.yaml")
    }

    with yaml file 

    inboundShortMessage:
      name: new_flow
      description: ""
      division: Home
      startUpRef: "/inboundShortMessage/states/state[Initial State_10]"
      defaultLanguage: en-us
      supportedLanguages:
        en-us:
          defaultLanguageSkill:
            noValue: true
      settingsErrorHandling:
        errorHandling:
          disconnect:
            none: true
      states:
        - state:
            name: Initial State
            refId: Initial State_10
            actions:
              - sendResponse:
                  name: Send Response
                  messageBody:
                    lit: hello from agent
              - disconnect:
                  name: Disconnect
    but still get same error 


    ------------------------------
    Smriti Shomya
    ------------------------------



  • 6.  RE: Flow publish failed.

    Posted 07-28-2025 00:33

    if anyone has ideas about this error, I'd really appreciate your help.



    ------------------------------
    Smriti Shomya
    ------------------------------



  • 7.  RE: Flow publish failed.

    Posted 07-28-2025 05:04

    I used your code and it published successfully, so it could be something environmental. What version of the provider are you using? You could also try using terraform logging to see if that provides any useful information. What I have found helpful in the past is using Archy with debugging enabled.



    ------------------------------
    Savino Ricci
    Technical Consultant
    ------------------------------



  • 8.  RE: Flow publish failed.

    Posted 07-28-2025 05:32

    thank you, I found the solution, there is some issue with permission



    ------------------------------
    Smriti Shomya
    ------------------------------



  • 9.  RE: Flow publish failed.

    Posted 08-20-2025 06:16
    Edited by Lucas Woodward 08-20-2025 06:20

    I had the same issue last night, and a Google search brought me to this thread. So I thought add my solution to this thread too.

    As with the original poster, I was getting the nondescript error:

    genesyscloud_flow.inbound_message_flow: Creating...
    genesyscloud_flow.inbound_message_flow: Still creating... [00m10s elapsed]
    ╷
    │ Error: flow publish failed. JobID: 768be933-bf3e-4426-9d7f-45d6bf38a2cf, no tracing messages available
    │ {"resourceType":"genesyscloud_flow","method":"GET","path":"/api/v2/flows/jobs/768be933-bf3e-4426-9d7f-45d6bf38a2cf","statusCode":200,"correlationId":"6b00af1b-126e-45bc-a5b4-a45f5433efe1"}
    │ 
    │ 
    │   with genesyscloud_flow.book_purchase_digital_bot,
    │   on flow.tf line 30, in resource "genesyscloud_flow" "book_purchase_digital_bot":
    │   30: resource "genesyscloud_flow" "book_purchase_digital_bot" {

    I also enabled additional logging by setting the TF_LOG environment variable, but the provider's logs didn't contain any hints at the reason the flow was failing to be published.

    export TF_LOG=debug

    I came to the conclusion that this 'flow published failed' is a generic error and that the underlying APIs used by the Genesys Cloud TF Provider / Archy don't supply a reason for why a publish failed. This was corroborated by me calling the API endpoints directly.

    Fix

    In my case the issue was that the Queue name I referenced in the bot's YAML definition didn't exist in the organisation.

    #...
    - path: 
        name: Request a refund  
        actions:  
          - transferToAcd:  
              name: Transfer to ACD  
              targetQueue:  
                lit:  
                  name: Book Refund Queue # < THIS QUEUE DIDN'T EXIST
    #...



    ------------------------------
    Lucas Woodward
    Orchestrator of the Year Finalist (2025)

    LinkedIn - https://www.linkedin.com/in/lucas-woodward-the-dev
    Newsletter - https://makingchatbots.com
    ------------------------------



  • 10.  RE: Flow publish failed.

    Posted 08-20-2025 09:10

    Lucas, you couldn't find anything in any of the logs that helped? And you have all logging turned on?

    Weird.



    ------------------------------
    George Ganahl GCCX-AI, GCP, GCSME, ICCE, ICHD, etc.
    Technical Adoption Champion
    Genesys
    2024 Community Member of the Year
    ------------------------------



  • 11.  RE: Flow publish failed.

    Posted 08-20-2025 17:40
    Edited by Lucas Woodward 08-20-2025 17:43

    I thought it was strange too, and still suspect I'm wrong.

    I came to this conclusion though by:

    1. Turning on the logging as TF's docs suggest, which did increase the verbosity of the command but did not contain any specific errors.
    2. Calling the API endpoints the docs say the `genesyscloud_flow` resource is using; most notably GET /api/v2/flows/jobs/{jobId}

    The response from manually calling the endpoint above is below, which shows a failure occurred but not why - even when called with `?expand=messages`. 

    {
      "id": "6a99a90a-7cf7-4244-b629-e84d68938957",
      "status": "Failure",
      "command": "Publish",
      "selfUri": "/api/v2/flows/jobs/6a99a90a-7cf7-4244-b629-e84d68938957"
    }

    My mistake was pretty obvious though as soon as I looked through my flow's YAML.



    ------------------------------
    Lucas Woodward
    Orchestrator of the Year Finalist (2025)

    LinkedIn - https://www.linkedin.com/in/lucas-woodward-the-dev
    Newsletter - https://makingchatbots.com
    ------------------------------



  • 12.  RE: Flow publish failed.

    Posted 08-20-2025 19:04

    I guess the sdk_debug.log just had whatever you saw when you hit the API directly...



    ------------------------------
    George Ganahl GCCX-AI, GCP, GCSME, ICCE, ICHD, etc.
    Technical Adoption Champion
    Genesys
    2024 Community Member of the Year
    ------------------------------



  • 13.  RE: Flow publish failed.

    Posted 08-21-2025 03:19

    I am sure that previously, this type of error was explicity thrown if a queue did not exist in the Org. I am getting the same results as Lucas even with logging set to TRACE.

    However, trying to publish with Archy with debug enabled\disabled does throw the error. This at the point of calling api/v2/routing/queues.

    - ERROR! find 'Queue' by value of 'QueueZ' - no matches for 'QueueZ'. -- [ArchNetworkValueRetrieval]
    - ERROR! find 'Queue' by value of 'QueueZ' - Failed to find item QueueZ. -- [ArchNetworkValueRetrieval]
    - ERROR! promise unhandled exception caught.  Error: no matches. -- [ArchAsyncTracker]
    - a promise was added, resetting count to 1. -- [ArchAsyncTracker]
    validating flow 'Test' (id: __script_flow__db391373-30cd-46fc-9564-57c030828821)
    - validateAsync - async flow operation manager validate... -- [Name:'Test', Type:'ArchFlowInboundCall']
    - calling url. -- [POST::https://api.mypurecloud.de/api/v2/flows/actions/validate?flow=__script_flow__db391373-30cd-46fc-9564-57c030828821&flowType=inboundcall]
    node:internal/process/promises:389
          new UnhandledPromiseRejection(reason);
          ^
    
    UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "no matches".
        at throwUnhandledRejectionsMode (node:internal/process/promises:389:7)
        at processPromiseRejections (node:internal/process/promises:470:17)
        at process.processTicksAndRejections (node:internal/process/task_queues:96:32) {
      code: 'ERR_UNHANDLED_REJECTION'
    }


    ------------------------------
    Savino Ricci
    Technical Consultant
    ------------------------------



  • 14.  RE: Flow publish failed.

    Posted 08-21-2025 09:23

    Ah, so the Archy log does show it. I thought it must appear somewhere



    ------------------------------
    George Ganahl GCCX-AI, GCP, GCSME, ICCE, ICHD, etc.
    Technical Adoption Champion
    Genesys
    2024 Community Member of the Year
    ------------------------------