cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Unable to process template language expressions in Custom Connector

Hi,

 

I'm already sitting the second day on a problem I can not solve - I want to configure the Custom Connector to reach Azure Function from my MS Flow. Configures the FA, generates a proper API Definition (tests Postman as well as from the level of this OpenAPI configurator in AF), exports to PowerApps + Flow, setup connection and ...in MS Flow blocks appear, can be picked but once tested out it failed:

InvalidTemplate. Unable to process template language expressions in action 'GetHttpTriggerCSharp1' inputs at line '1' and column '2484': 'The template language expression' json (decodeBase64 (triggerOutputs (). Headers ['X-MS-APIM-Tokens']) ) ['$ connections'] [' shared_translationcc.5f936381b248f60c56.5fe58c2ca0f3b6e6ce '] [' connectionId ']' can not be evaluated because property 'shared_translationcc.5f936381b248f60c56.5fe58c2ca0f3b6e6ce' does not exist, available properties are 'shared_office365'. Please see https://aka.ms/logicexpressions for usage details. '.

screen
Unfortunately publishing the connector does not help.


I will be grateful for your help.

38 REPLIES 38

Found this issue was due to login credetnials.  In my case, I created a flow, tested it, then later added a step to create a sharepoint folder. Because the sharepoint step wasn't present when I first tested the flow, subsequent tests using the same source data failed.  Once I logged out and back in and retriggered the flow from Dynamics (Using the CDS When a Record is Selected trigger), the system asked for authorization to access both Dynamics and Sharepoint and ran fine.  It was this initilization before adding the steps that needed addtional security that caused the issue. 

Jambo1
Advocate II
Advocate II

@ryanperrymba also came to the conclusions this was a credentials issue. in my case the flow was created by owner A.

 

I came in and made a small update to create an item as co-owner B the step kept failing due to this error. I changed the connection to be owner A and it worked fine.

 

jambo

@ericonline Thanks for the solution to run the flow with "I'll perform the trigger action" instead of "Use data from previous run". That fixed it for me. It seems, "Use data from previous run" uses corrupt connection details as well.

Hi @DennisKuhn1 , It isn't that the connection data is corrup, it is that you've added additional connections / changed them, and the cached data run does not include the updated / correct connection data.  If you add steps to the workflow requiring new connections, the old runs don't contain the connection info for these. 

Anonymous
Not applicable

Worked for me, great save @degvalentine, phew

I was having a I hate flow day but your suggestion worked like a charm, Export and then Import.

Thank you.

Sometimes the issue gets resolved simply by removing the connection for the corresponding connector and adding it back to Flow connections by authentication using the credentials which is the exact same thing that @ryanperrymba did in a different way. 

DeeTronSEAM
Advocate V
Advocate V

Muchos gracias to @degvalentine .  I'd about gotten out the "Remington 12ga 00 MicroAdjuster Tool" and blown a flipping hole in my laptop with all the frustration from "misaligned" connections in my Flows.

 

The Test with I'll Trigger also works, but many of my flows are launched by HTTP Request and it's a pain to setup Postman for every Flow.  So.....

 

I've found that the export(as New) / Delete / Import works 95% of the time.  When it doesn't, I delete the problematic connection from the Flow and create a new one from the now-disconnected action's menu list.  So, yeah, I have a few connections whose names end with "(5)" or other numbers to remind me how much the stupid issue has hit me.

 

One thing to note for those who haven't re-created (via import after delete of original) a PowerApp+Flow package before:

 

Even though the Flow name may be the same from your import, you probably need to "reconnect" the PApp app to any connected flows.  The code may show the right name, but it seems the actual binding is using something else (e.g. a GUID?).

 

To "Reconnect" the PowerApp to a connected Flow, you need to:

  1. edit the app in PowerApps Studio and delete the flow from the Data Sources screen (View menu > Data Sources). 
  2. Now, go to the place(s) that invokes the flow. E.g. MyScreen > MyFlowGoButton.OnSelect.
  3. COPY ALL THE TEXT IN THAT FORMULA INTO SOME OTHER PLACE (e.g. Notepad text file) as PApps is about to erase it all when we do the next step.  
  4. With your cursor back in the formula textbox (e.g. OnSelect property), click on the Action menu and then the Power Automate sub-menu item (button?).  This will open the Data pane where you can select the Flow (i.e. the one you recreated via import as New). POOF! Goodbye old OnSelect formula!
  5. Copy your original formula from the text file MAKING SURE YOUR OLD CODE IS CORRECTED to reflect the Flow name IF the original flow name was different than the one you (re)created with your import.

Nothing like losing 50 lines of PApps no-code "code" to piss you off....well, second to all this nonsense about misaligned connections in the first place.

 

Hope that helps someone.  Kudos to the others who found these various "workarounds."  I can't see how I'd have ever figured any of these out alone...at least not before throwing my laptop at the wall.

Sanitkumar
Frequent Visitor

I am still getting this error after I recreated the flow for 2 times. I am not sure what is wrong.

 

 

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

When you say "recreated," do you mean you completely built it by hand, or that you did an export/delete/import cycle....or something else?

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (3,182)