Document from DOCX Template - Variables Unavailable?

Hello,

I am trying to create a Document from a template leveraging Microsoft Flow and the Actions pack. I am unable to access any of the variables initialized/set previously in the flow as values in the document creation and I'm unsure why. Any help or guidance would be greatly appreciated.

Nothing shows when i click to "Show More". The variables are of different types, but most are integer or string, and I've actually used this approach in another flow, so i'm unsure why this is not working any longer.

Just for additional context, i can confirm that the variables are available in other steps in the flow, for example, sending an email, i’m able to reference all of the variables. Also, i’ve tried creating a new/clean document from DOCX template step and have the same results.

Hi, @epaul
Thank you for the message.

For some reason does not exist the possibility to add the string or integer variable to a text area widget after one of the updates in Microsoft Flow. Probably, Microsoft has a bug in Variables. That is why you don't see any variables as a dynamic value of "Template data" parameter.

We hope that Microsoft will fix it.

For now, I can suggest you use "Compose" action as the workaround for your case. You may find the screenshot with the example below:

Just wanted to close the loop on this, i was actually able to reference the variable if i simply wrote the expression. So instead of it showing up in the dynamic content i just wrote the expression:

string(variables(‘XXXXXXX’))

this worked great, allowed me to avoid adding another extraneous step or removing all variables and using only compose steps, and actually, once the workflow was saved and i came back in to edit it, they actually show up in the JSON as the dynamic variables.

Weird, but it worked, appreciate the quick reply, seems like both your option and this one are viable work-arounds.

1 Like