Create docx document from template

Recently I have started getting the error.

InvalidTemplate . Unable to process template language expressions in action ‘Create_DOCX_document_from_template’ inputs at line ‘1’ and column ‘1931’: ‘The template language expression ‘json(decodeBase64(triggerOutputs().headers[‘X-MS-APIM-Tokens’]))[’$connections’][‘shared_plumsail_1’][‘connectionId’]’ cannot be evaluated because property ‘shared_plumsail_1’ doesn’t exist, available properties are ‘shared_sharepointonline’. Please see https://aka.ms/logicexpressions for usage details.’.

My json is:

{
“PharmacistName”: @{items(‘Apply_to_each’)[‘Pharmacist_x0020_Name’]},
“PharmacistEmail”: @{items(‘Apply_to_each’)[‘Pharmacist_x0020_Email’]},
“PharmacistID”: @{items(‘Apply_to_each’)[‘Pharmacist_x0020_ID’]},
“PharmacistPO”: @{items(‘Apply_to_each’)[‘Pharmacist_x0020_Postal_x0020_Ad’]}
}

I have a demo in Wednesday , and not sure what to do

Hello @rahul16011988,

Please send me

  1. The flow screenshot + a screenshot with the error
  2. The docx template

You can blur any private information or send it in a direct message.

Best regards,
Petr Bushuev
Plumsail team

Hi Petr,
Did you manage to find a solution for the referred error? I am having same error message. (but using XLSX template).
See error below:
InvalidTemplate . Unable to process template language expressions in action ‘Create_XLSX_document_from_template’ inputs at line ‘1’ and column ‘2483’: ‘The template language expression ‘json(decodeBase64(triggerOutputs().headers[‘X-MS-APIM-Tokens’]))[’$connections’][‘shared_plumsail’][‘connectionId’]’ cannot be evaluated because property ‘shared_plumsail’ doesn’t exist, available properties are ‘shared_sharepointonline’. Please see https://aka.ms/logicexpressions for usage details
Rgds,
LeoPOTemplate.xlsx (19.6 KB)
jsonfile.txt (5.8 KB)

Hi @leonunescouto,

Please try the action again. I’ve tested it and didn’t get any errors.

Best regards,
Petr Bushuev
Plumsail team

Hi Petr, unfortunately I am having the same error.

Hi @leonunescouto,

  1. How do you provide the json to the action? Could you share a screenshot with the action edit mode?

  2. Does it work with any other template and json on your side?

Best regards,
Petr Bushuev
Plumsail team

  1. Using a string variable.
  2. That was my very first try as I am evaluating Plumsail Documents. (will try to create another template in couple hours and then I will let you know.

Thanks for your assistance,

Leo

json variable content.txt (5.8 KB)

Hello Petr,
This time I got different error. Workflow ran ok but the merged file was in blank. I am attaching the template, the final file and the JSON file. (also a picture of my flow.)
What can be causing that?
Cheers,
Leo
POTemplate.xlsx (19.7 KB)
po4.xlsx (19.5 KB)
Array.txt (1.5 KB)

Hello @leonunescouto,

The provided template doesn’t have the variables which are specified in the JSON. The template has variables like i.item, i.vessel, i.part, however, there are different variables in the json, isn’t it?

Best regards,
Petr Bushuev
Plumsail team

Sorry Petr,
I attached a wrong file… this was the json file for that template.
json variable content.txt (5.8 KB)

Hi Petr,

Sorry, I was the one who initiated the thread but then left. The issue that I faced was resolved after I deleted the entire flow and recreated from scratch, and it started working. Then second day my another flow stopped working which had the same connector, again deleted, recreated and it worked. Upon research I found out it is something related to connector(s), not just plumsail but the inbuilt/ootb connectors. I would appreciate if you shift your focus from json verification. In my case something stopped working which was working before. Perhaps checking with MS will be of help.