Hi @Felix-Edouard, Julien (Business France),
Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.
It looks like you're encountering an issue with the "Create file" action in your Flow, specifically with the InvalidTemplate error. This error indicates that the template language expression cannot be evaluated because the property shared_onedriveforbusiness_1 doesn't exist. Instead, the available properties are shared_sharepointonline_1, shared_onedriveforbusiness, and shared_office365.
First, ensure that the connection reference shared_onedriveforbusiness_1 is correctly configured in your Flow. It seems like the connection reference might be incorrect or missing.
- To verify this, open your Flow in the Power Automate portal and go to the action where the error occurs here check the connection reference used in this action. Make sure it matches one of the available properties (shared_sharepointonline_1, shared_onedriveforbusiness, or shared_office365).
Second if the connection reference is incorrect, update it to match one of the available properties. For example, you can use shared_onedriveforbusiness instead of shared_onedriveforbusiness_1.
- To do this in the same action, click on the connection reference field and select the correct connection reference from the dropdown list and save your Flow and test it again.
Also Make sure that the secrets configuration is correct. The expression json(decodeBase64(secrets('X-MS-APIM-Tokens')))['$connections'] should correctly decode and parse the secrets.
- To verify this, go to the settings of your Flow and check the secrets configuration to ensure it contains the necessary connection information, also ensure that the secrets are correctly encoded and stored.
If the issue persists, try using a different connection reference to see if the problem is specific to the OneDrive connection. For example, you can use shared_sharepointonline_1 or shared_office365:
- For this in the "Create file" action, change the connection reference to shared_sharepointonline_1 or shared_office365 and save your Flow and test it again to see if the error is resolved.
I hope the above provided information might help you, if you have any further queries, please feel free to reach out to us.