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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Extract Specific Text ...
Power Automate
Suggested Answer

Extract Specific Text From A Word Document

(2) ShareShare
ReportReport
Posted on by 21
Hi everyone,
 
I'll preface this with that I am new to Power Automate, but the functions I'm working on are things I understand the logic of from doing similar jobs in Google Tag Manager.
I'm pulling from that experience and doing what I can to piece together how to make this work with PA.
 
I'm working on an automation flow that will do a couple of things for me.
The goals of this are to:
 
1. Automatically send emails out to leads with project proposals I have prepared for said leads.
2. Send follow up emails X days out from the day of the initial proposal send.
 
There's a bit more nuance to it from a marketing sequence side, but functionally that's it.
Right now, I'm only focused on the first of those two goals. Within the first goal, I'm currently only concerned with extracting the information from the word document in question.
Using it to populate emails is easy enough.
 
The following is what I've done so far to provide context to my two questions which are at the very end.
 
The steps I've built so far to accomplish that first goal include:
 
1. Trigger: When a file is created or modified (properties only) SharePoint
2. Action: Get File Content SharePoint
--------Site Address: XXXXX - looking at the site the folder being monitored by the trigger is located.
--------File Identifier: triggerBody()?['{Identifier}']
3. Action: Create File OneDrive
--------This creates a document in my work computers Temporary Files folder, in my documents folder. 
--------File Name: triggerBody()?['{Name}']
--------File Content: body('Get_file_content')
 
I'm building this out with the trigger monitoring a SharePoint folder I created just for testing this.

Whenever I paste a new file into it, the flow begins. ( this works)
 
Then, the "get file content" action works off of the "Identifier" found in the initial trigger (this works)
 
Third, I have a temporary holding folder on my work laptop where power automate creates a file, and populates it's name with that of the original file which activated the trigger.
The same is done with the body content / text (these are word documents) (this works)
 
Currently I'm able to recreate files on my work computer which were pasted into the target folder which begins the sequence.
 
Next, I need to find a way to extract the text so it can be parsed through and specific, designated values can be extracted. Those values are the leads' name, business name, and email address. It won't happen fast, but I should be able to do this with some tutorials.
 
However, I want to avoid having to go to OneDrive. The reason I've done it this way is because I've read that there's no way to extract text from a specific part of a word document in SharePoint the way there is in OneDrive. It should be possible for me to get this working, but after testing the trigger and first two actions I have already built several times today, it only works so long as my work laptop is turned on, and logged in, as the OneDrive is connected to my laptop. If someone else is preparing a client proposal and pastes it into the trigger folder - nothing happens without my laptop being turned on, and my account being logged in on said laptop.
 
I have two questions based on what I have in front of me at the moment.
1. Is there a way pull specific information out of a word doc in SharePoint to be used in the same way that I have read can be done through OneDrive?
2. If option 1 using SharePoint is not possible - is there a way to separate the steps involving OneDrive from requiring any single specific computer to be turned on at all times?
 
Thank you!
Categories:
I have the same question (0)
  • Suggested answer
    Jon Unzueta Profile Picture
    1,827 Super User 2025 Season 2 on at
     

    Thanks for the detailed breakdown—you're already doing a great job navigating Power Automate as a newcomer. Let’s tackle your two questions step by step:


    1. Can you extract specific information from a Word document stored in SharePoint (without using OneDrive)?

    Yes, you can extract text from Word documents stored in SharePoint, but there are some caveats:

     Option: Use the “Word Online (Business)” connector

    This connector allows you to read content from Word documents stored in SharePoint. Specifically, you can:

    • Extract plain text from the document.
    • Use content controls (like Rich Text or Plain Text controls) to target specific fields (e.g., Name, Business Name, Email).

    🔧 How to do it:

    1. Ensure your Word document uses Content Controls:

      • In Word, go to Developer tab → Insert Plain Text Content Control.
      • Label each control clearly (e.g., “LeadName”, “BusinessName”, “Email”).
    2. In Power Automate:

      • Use “Get file content using path” (SharePoint).
      • Use “Populate a Microsoft Word template” or “Read from a Word document” (Word Online (Business)).
      • Extract values from the content controls.

    This method avoids OneDrive entirely and works directly with SharePoint-hosted documents.


    2. If using OneDrive is necessary, can you avoid relying on a specific computer being turned on?

    Yes, and this is very important for scalability and reliability.

     How to fix this:

    Your current setup uses OneDrive linked to your local machine, which is why it depends on your laptop being online. Instead, you should:

    • Use OneDrive for Business (cloud-based, not tied to your local machine).
    • When creating the file, use the OneDrive for Business connector in Power Automate.
    • Ensure the OneDrive folder is part of your organization’s cloud storage, not your personal device.

    This way, the flow runs entirely in the cloud and is not dependent on your laptop.


    ✅ Summary of Recommendations

    Goal Recommendation
    Extract data from Word in SharePoint Use Word Online (Business) with Content Controls
    Avoid laptop dependency
    Use OneDrive for Business or stick with SharePoint + Word Online
     
    🏷️ Tag me if you have any further questions or if the issue persists.
    ✅ Click "Accept as Solution" if my post helped resolve your issue—it helps others facing similar problems.
    ❤️ Give it a Like if you found the approach useful in any way.
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,452 Super User 2025 Season 2 on at
     
    Can you please share the details that specifically are related to your SharePoint comment? I do not understand it and you do not provide any details other than saying it doesn't work, but that is too broad of a statement.
     
    As for your laptop, its not so much about your laptop exactly as it is that you are using your personal OneDrive and you need to use Business OneDrive and also share the location of the files with everyone, which I do not recommend.
     
    Using SharePoint is the correct choice, but as I am confused but your comment, I cannot speak to it exactly.
    If these suggestions help resolve your issue, Please consider Marking the answer as such and also maybe a like.

    Thank you!
    Sincerely, Michael Gernaey
  • DS-29071753-0 Profile Picture
    21 on at
    Hey Jon,
     
    Thanks for the in depth response. I haven't been able to get everything working yet, but I'm already learning now knowing I have a dev mode in MS Word.
     
    I don't see Populate a Microsoft Word template as being helpful specifically for what I need, but that's good to know for future uses.
    Read From A Word Document, however, looks perfect. The only issue is I don't see that action available when I look at the actions I can pick from under Word Online (Business).
     
    The screenshot below shows everything I can pick from that's listed as a Word Online (Business) option.

     
    Maybe there's a mix up here, or maybe this is something separate my company needs to buy access to?

    Separate thing, I'm not sure how to tag you in this forum. I'll do it the only way I know how and hope it works.
    Otherwise, I can see your contact info on your profile and I'll shoot you a message over LinkedIn. I'm Dustin.
     
    Thanks again for the help here!
    @Jon Unzueta
    @JonUnzueta
    @Jon_Unzueta
     
     Are any of these actually tagging you?
     
     
  • Tomac Profile Picture
    3,953 Moderator on at
    @DS-29071753-0 There are no built-in free actions to pull text from a Word document. You'll need to use a 3rd party action such as Encodian's Microsoft Word options. These do have an associated cost, though.
     
    As for the suggestion from Jon, it's untested copy/paste ai output, and it appears to be telling you to use an action that simply doesn't exist.
     
    @Michael E. Gernaey hit the nail on the head for the OneDrive issue, you'll need to use your OneDrive for Business account instead of your personal OneDrive account. But, also as Michael said, SharePoint is the right storage location and once you're using the Encodian (or other 3rd party, but Encodian is the most popular) actions you shouldn't have issues around a storage location.
     
    If this comment resolved your questions, please remember to mark it as the answer (and mark Michael's post as well, since he answered the OneDrive portion)
  • takolota1 Profile Picture
    4,974 Moderator on at
    If you don’t want to use a 3rd party account & have access to an Azure account then there is a function in this template Azure Function App to extract/read things from a Word file:
  • Suggested answer
    Jon Unzueta Profile Picture
    1,827 Super User 2025 Season 2 on at

    You're trying to extract specific text from a Word document using Power Automate, and you've noticed that the "Read from a Word document" action is missing from the Word Online (Business) connector. You're also wondering whether this is a licensing issue or a configuration problem.

    Let me clarify what's going on and how you can proceed.


    ✅ Why “Read from a Word Document” Is Missing

    The Word Online (Business) connector currently supports only a limited set of actions, most notably:

    • Populate a Microsoft Word Template
      This action is used to insert data into predefined content controls in a Word document  .

    However, reading arbitrary text from a Word document—especially outside of content controls—is not currently supported by the Word Online (Business) connector. This is a known limitation and has been discussed in community forums  .

     


    🛠️ Workaround Options

    If you need to extract text from a Word document, here are some alternatives:

    1. Use OneDrive or SharePoint + File Content

    • Store the Word document in OneDrive for Business or SharePoint.
    • Use “Get file content” to retrieve the .docx file.
    • Use AI Builder or Encodian to parse the document and extract text.

    2. Use Encodian or Third-Party Connectors

    Encodian offers a “Extract Text from Word Document” action that works well with .docx files stored in OneDrive or SharePoint. You can:

    • Pass the file content to Encodian
    • Receive extracted text as output
    • Use it in subsequent flow steps

    3. Use Power Automate Desktop

    If you're working locally, Power Automate Desktop allows you to:

    • Open Word documents
    • Read paragraphs, tables, and bookmarks
    • Extract and manipulate text directly

    🔐 Licensing Considerations

    • The Word Online (Business) connector is available with standard Power Automate licensing.
    • AI Builder and Encodian require premium licenses or add-ons.
    • If your organization has restricted connectors, you may need admin approval to enable them  .

    🧭 Next Steps

    1. Check with your admin if Encodian or AI Builder is available in your environment.
    2. If you're using SharePoint or OneDrive, I can help you build a flow that extracts text using file content and a third-party parser.
    3. If you're open to using Power Automate Desktop, I can guide you through setting up a local automation to read Word content.
  • DS-29071753-0 Profile Picture
    21 on at
    Hi @Tomac
     
    (Does tagging like this work? I've read the instrucitons for the forum and using the @ sign doesn't bring up any options to pick from who I want to tag like I'm reading is supposed to happen, and it didn't work when I tried to tag Jon the other day...)
     
    Looks like I have access to the Encodian options. 
    I am also working from a paid 365 account, however I don't know what specific package my company has. I reached out to my boss to see if he knows.
     
    I read from @takolota1 's response that there's an option using Azure, so I'm looking into seeing if whatever access level we have includes any Azure access. If there's an option to pay for less tools to get the same job done, I'll go for that. 

    If we don't have access to Azure, then what you're describing with Encodian looks like the way to go.
    For now I'm gonna go ahead and look into Encodian - I doubt it would survive as a service if Azure was readily available to 365 accounts.

    So, if I can extract text with Encodian, is there a reliable way to identify specific sections of text?
    I have been able to go into the word doc and add Rich Text Content - so I should able to have specific sections here serve as a key that can be looked for to pull out the values of. It's just a matter of whether Encodian can do that or not.
     
    -------------------------
     
     
    The following may be a moot point considering it sounds like the solution I need is to keep everything in SharePoint and not involve OneDrive for what I'm trying to do. But must for learning:
     
    Regarding OneDrive, the example I gave is while already using the OneDrive (for business) connector. I just rebuilt the "create file" step to make sure of that. 

    The parameters for the OneDrive for Business connector step, Create File, are:
    • Folder Path: /Documents/Temporary Files
    • File Name: @{triggerBody()?['{Name}']}
    • File Content: @{body('Get_file_content')}
    When I test what's built so far, which is just this:
     
    Then when I look at the code view of the Create File action, it reads:
     
    {
      "type": "OpenApiConnection",
      "inputs": {
        "parameters": {
          "folderPath": "/Documents/Temporary Files",
          "name": "@triggerBody()?['{Name}']",
          "body": "@body('Get_file_content')"
        },
        "host": {
          "apiId": "/providers/Microsoft.PowerApps/apis/shared_onedriveforbusiness",
          "connection": "shared_onedriveforbusiness",
          "operationId": "CreateFile"
        }
      },
      "runAfter": {
        "Get_file_content": [
          "Succeeded"
        ]
      },
      "runtimeConfiguration": {
        "contentTransfer": {
          "transferMode": "Chunked"
        }
      }
    }
     
    So you can see it confirmed in the code that it's using OneDriveforBusiness.
     
  • Tomac Profile Picture
    3,953 Moderator on at
    @DS-29071753-0 Tagging works weird on these forums. You basically have 30 seconds from pageload to tag somebody by typing the at symbol, after that the tag function gets disabled. That tends to be why you see tags only at the very beginning of a post.
     
    Encodian is not part of any Microsoft package, it's an independent service that you will have to subscribe to. As for using the Encodian actions, I can't help you there - I've never used them myself. Lots of smart folks here find them very handy though, so I'm comfortable recommending them. From what I understand, Encodian is good about documentation and support.
     
    As for your new OneDrive question - I'm not actually sure what your question is? You made a statement but didn't really ask anything? WHat you posted looks fine though.
  • DS-29071753-0 Profile Picture
    21 on at
    @Tomac
    Gotcha on the tagging... I love how that's a decision someone had to have made... lol

    Makes sense for the Encodian stuff. Looks like their free tier is enough for what we need with the volume we'd be pushing through their tool. So just a matter of learning what the options are there.

    Sorry for the ambiguity with the OneDrive question.
    I believe it was you that pointed out that I needed to use the OneDriveforBusiness connection, specifically, and not a personal OneDrive connector. My confusion was coming from - the situation I'm describing is while I already am using the OneDrive for Business connector. Is there something else I should be seeing here with OneDrive? I'm moving away from using it now that I know about Encodian, but it's still odd that I was having an issue that sounds unique to OneDrive (personal), when I was using One Drive for Business. I'm trying to understand the discrepancy there.
  • Tomac Profile Picture
    3,953 Moderator on at
    @DS-29071753-0 Gotcha. I honestly don't know why OneDrive for Business would require your laptop to be turned on, unless there's a weird configuration that doesn't save the files to OneDrive's cloud storage. By default OneDrive for Business runs on top of SharePoint so it's just putting the files in a SP folder with special permissions. You may want to look into how that directory is configured in OneDrive's web interface.
     
    Anyway, glad you've found the right path forward. Remember to mark the helpful comments here as the answer to help future users who search for this issue.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard