Hello أحمد صلاح عبدالرحيم عثمان
Thank you for posting on the Q&A Forum.
I’ve successfully created a flow following your description. Kindly apply the steps below to your workflow and let me know if they match.
Step 1: Configure the Trigger
Create an Automated cloud flow.
Select the OneDrive for Business trigger: "When a file is created".
Important: For the Folder field, please click the folder icon to browse and select the folder from the Root. Do not paste the URL directly, as this often causes connection errors.
Step 2: Add an intermediate action
Add a new action, search for OneDrive for Business, and select "Create share link for a file or folder".
Configure it as follows:
- File identifier: Select File identifier from the Dynamic Content list (from the "When a file is created" step).
- Link type: View.
- Link scope: Organization (so everyone in your company can access it) or Anonymous.
Step 3: Add the Teams action
Add the action "Post message in a chat or channel".
In the Message field, please paste the following HTML code:<p class="editor-paragraph">Click here to view: <a href=Web URL>Name</a></p>
Crucial Step:
- Delete the text
Web URLinside the code and replace it by selecting Web URL from your Dynamic Content (make sure to pick the one from the "Create share link" action). - Delete the text
Nameand replace it with File name from the Dynamic Content.
The result will look like the screenshot I attached.
Please give this a try and let me know if you encounter any issues along the way. Your feedback is valuable and will help us ensure everything works as expected.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.