Substitution is not working for in-queue and workflow flows

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.

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.

Hi Charlie!

Here is an example of the flow:

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

substitutions = {
c_provider = var.c_provider
}

}

In the yaml file i use this substitution:

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

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