Legacy Dev Forum Posts

 View Only

Sign Up

Substitution is not working for in-queue and workflow flows

  • 1.  Substitution is not working for in-queue and workflow flows

    Posted 06-05-2025 19:34

    Ihor | 2022-10-19 18:42:28 UTC | #1

    I'm trying to use substitution when creating flow resource using terraform and I am getting the following error

    rchSession.startWithAuthToken - Caught unhandled exception during callback function execution. Ending session. Exception info: expected a string but got a object value for: [object Object]: null

    the same works fine for inbound call flows.


    charlie.conneely | 2022-10-20 11:00:48 UTC | #2

    Hello. Would you mind providing a little more context around your configuration? It would help me in trying to recreate the issue. If you're referencing another component in your substitutions map, you could try wrapping the reference in quotation marks e.g. "${data.genesyscloud_user.user.id}" This may not apply to your situation, but it's my first instinct going off of the error message.


    Ihor | 2022-10-20 13:43:18 UTC | #3

    Hi Charlie!

    Here is an example of the flow:

    resource "genesyscloud_flow" "xxxxxxx" { filepath = "/xxx/xxx/xxx.yaml"

    substitutions = { cprovider = var.cprovider }

    }

    In the yaml file i use this substitution:

                                  • callData:

    name: Call Data Action timeout: lit: minutes: 1 category: Sample: dataAction: Sampledataaction: inputs: caseId: exp: State.caseId provider: lit: {{c_provider}}


    charlie.conneely | 2022-10-20 15:08:43 UTC | #4

    I was able to recreate the problem, and the solution was wrapping {{c_provider}} in quotation marks in your yaml file. Yaml seems to be treating the value in c_provider as numeric when the value of var.c_provider doesn't contain any alphabetic characters (you might notice that when it does, you won't see the same error.) Hope that helps


    This post was migrated from the old Developer Forum.

    ref: 16791