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 / Document Library Varia...
Power Automate
Answered

Document Library Variable not working - Populate a Microsoft word template

(1) ShareShare
ReportReport
Posted on by 2
I am in my Dev environment and have the following fields for the step: Populate a microsoft word template - I am using enviroment variables to fill these as the solution will be moved to many other environments with different sharepoint sites set up. Below are the fields and the env variables i've set up.
  • Location:
    • Name: Sharepoint
    • Data type: Data source
    • Connection: *Account with access to sharepoint site*
    • Param type: Site
    • Current site value: My sharepoint site where my template is stored. 
       
  • Document library:
    • Name: DocLib
    • Data type: data source
    • Connector: Sharepoint (listed above)
    • Connection *Same as above*
    • Site: Sharepoint (listed above)
    • Current list: Templates 
 
With these two variables in place i can not find my file - error:

The dynamic invocation request failed with error: { "error": { "code": "invalidRequest", "message": "The provided drive id appears to be malformed, or does not represent a valid drive." } }.
flow1.png
Categories:
I have the same question (0)
  • Verified answer
    Expiscornovus Profile Picture
    33,876 Most Valuable Professional on at
     
    That actions uses the Graph API in the back-end and doesn't use the guid of the library but the drive id of the library instead in the parameters (also see the screenshot below).
     
    However, your data source variable does not return that drive id but the guid of the library instead. So, my suggestion would be to use an environment variable of type text instead of a data source type variable and store the drive id in that new variable.
     
     



     
    Happy to help out 😁

    I share more #PowerAutomate and #SharePointOnline content on my Blog, Bluesky profile or Youtube Channel
  • TG-24061804-0 Profile Picture
    2 on at
    Hello,
     
    i need to digging up that topic again.
     
    I tried to use the ID in the enviroment variable but that did not work. I tried an intern variable with the libary ID. It worked.... different. Instead of the named content control fields there are only numbers and i can´t pick a word document.
     
    It only worked, whe there`s still a pre-selected word document.
     
    Greets

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 474

#2
11manish Profile Picture

11manish 268

#3
David_MA Profile Picture

David_MA 243 Super User 2026 Season 1

Last 30 days Overall leaderboard