I wish that Mark did not mark "recreating the Flow" as the answer for this post because this bug still persists.
The closest way I've been able to recreate this issue on a consistent basis is to create a flow with a given set of connectors (SharePoint, OneDrive, etc.). The Flow can work flawlessly and seem great. Then, if I go back and now want to add an additional connector (custom or OOTB such as Outlook) I will get an error that the given connector is not available. It'll read like the following:
Unable to process template language expressions in action 'Send_an_email_notification_2' inputs at line '1' and column '2505': 'The template language expression 'json(decodeBase64(triggerOutputs().headers['X-MS-APIM-Tokens']))['$connections']['shared_sendmail']['connectionId']' cannot be evaluated because property 'shared_sendmail' doesn't exist, available properties are 'shared_excelonlinebusiness, shared_onedriveforbusiness, shared_sharepointonline'. Please see https://aka.ms/logicexpressions for usage details.'.
The Flow originally was created with SharePoint, Excel Online, and OneDrive (as seen in the available properties listed in the error). Then once I went to add the Send Mail connector a week later to just send a simple notification email, it reports that it "cannot be evaluated..." because the property / connector doesn't exist....
BUT I JUST ADDED THE CONNECTOR RIGHT TO THE FLOW. HOW IS IT NOT AVAILABLE?!?
Flow absolutely has a bug handling connectors (seems to be consistently related to OneDrive for Business associated Flows if that helps narrow it down). Please don't tell me to just re-create it.
I was also forced to
LEGEND!! Thank you. Been dying for 2 days wondering what the hell was going on because everything seemed to be set up correctly. Tried this and it worked. Literally jumped up and fist-pumped as my 5 year old next to me was in class online. I think i scared the teacher haha.
Folks have been complaining of these connection problems since 2018 !! I have these problems every day with connections timing out, recreating, exporting, re importing, triggering manaully etc. These are not acceptable solutions. (but thanks for offering).... The flows should not fail under these conditions. MS should review these connectors and resolve these issues to make these professional quality tools that we pay for.
Check out the News & Announcements to learn more.
Check out the new Power Platform Community Connections gallery!
Congratulations, the new Super User Season 2 for 2021 has started!
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.