web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Changing location of r...
Power Automate
Suggested Answer

Changing location of related documents in sharepoint

(2) ShareShare
ReportReport
Posted on by 72
I'm trying to edit the location of shared documents of activity type in an activity table to a location of my choosing, and folder of my naming in power automate, is this possible:



EDIT: I'm trying to change the Folder name since it contains the ID, I want to use a different naming converntion, is this possible in power automate?
Categories:
I have the same question (0)
  • Suggested answer
    CU17051647-0 Profile Picture
    2 on at

    Hi there!

    Yes, it is possible to dynamically set or update the document location and folder name for activity records (like tasks or emails) in Dynamics 365 using Power Automate, though it requires working directly with Dataverse.

    What You Can Do


    • Use Power Automate to create the SharePoint folder (via SharePoint HTTP request or Graph API).

    • Use the Dataverse connector to create a record in the sharepointdocumentlocation table.

      • Set your custom folder name

      • Set the correct parent location (must exist)

      • Bind the folder to the activity record using the regardingobjectid 

      Note: The folder must exist in SharePoint before creating the sharepointdocumentlocation record, or you can create it first in the same flow.

    Reference Guide

    This blog offers a very helpful walkthrough:

    Automatically create custom SharePoint folder structure for an entity in Dynamics 365 CE

    Let me know if you want help setting up the flow or the JSON for the Dataverse record!


    If this post helped you, please click "Does this answer your question?" and give it a like to help others in the community find the answer too!

    José Martínez Lago
    Solution Architect | Dynamics 365 & Power Platform

    Empowering low-code consultants to deliver high-impact solutions

    Blog: thatsagoodquestion.info
    LinkedIn: martinezlago

  • Suggested answer
    Lagortinez Profile Picture
    130 Moderator on at

    Hi there!

    Yes, it is possible to dynamically set or update the document location and folder name for activity records (like tasks or emails) in Dynamics 365 using Power Automate, though it requires working directly with Dataverse.

    What You Can Do

    • Use Power Automate to create the SharePoint folder (via SharePoint HTTP request or Graph API).

    • Use the Dataverse connector to create a record in the sharepointdocumentlocation table.

      • Set your custom folder name

      • Set the correct parent location (must exist)

      • Bind the folder to the activity record using the regardingobjectid 

      Note: The folder must exist in SharePoint before creating the sharepointdocumentlocation record, or you can create it first in the same flow.

    Reference Guide

    This blog offers a very helpful walkthrough:

    Automatically create custom SharePoint folder structure for an entity in Dynamics 365 CE

    Let me know if you want help setting up the flow or the JSON for the Dataverse record!


    If this post helped you, please click "Does this answer your question?" and give it a like to help others in the community find the answer too!

    José Martínez Lago
    Solution Architect | Dynamics 365 & Power Platform

    Empowering low-code consultants to deliver high-impact solutions


    Blog: thatsagoodquestion.info
    LinkedIn: martinezlago

  • CU09051456-0 Profile Picture
    72 on at
    Hi @Lagortinez,

    I don't think there is a sharedDocumentLocation table in my solution, there is Sharepoint document, but its not appearing in the dropdown of the list row action:
     
    Is there an explanation on how these related documents are setup, I'm new to power apps, is there a documentation somewhere? or a specific link I could look it up

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 959

#2
Valantis Profile Picture

Valantis 872

#3
Haque Profile Picture

Haque 589

Last 30 days Overall leaderboard