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 / Converting files .txt ...
Power Automate
Suggested Answer

Converting files .txt and .docx files to PDF - to be used with AI builder prompts.

(2) ShareShare
ReportReport
Posted on by 4
Hey, I am coming from a Make.com / n8n background and just now exploring Power Automate and Copilot Studio Flows within an enterprise environment. So I am not used to a lot of the restrictions. 

I am trying to understand the best methods for taking prompt outputs and repurposing them into PDF format to then pass through another prompt. 


Here's where I'm encountering some obstacles

1. Dynamic variables created in prompts (AI Builder) can only ingest PDF format.



2. Output from AI prompts are in plain text and cannot be converted to pdf by OneDrive convert file node. 

3. Using the node - Create Microsoft Word Document - Word Online (Business) outputs a sharepoint link which does not allow me to pass the content of the document into a subsequent prompt. 


What would help me:

1. How to convert .txt files to pdf without using a third party node outside of the Microsoft ecosystem (for company permissions/data privacy) 
 
2. How to create a readable docx or pdf from the AI prompt output.

3. How to download the file from Create Microsoft Word Document - Word Online (Business) to pass to the next node in the flow. 


 
Categories:
I have the same question (0)
  • Suggested answer
    Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at
    Hi 
     
    Can you try with populate word template action which populates the txt file content to word template> create word file > convert word file to pdf ?
     
     
     
     

    Thanks & Regards,
    Nived N

    Stay connected:
    LinkedIn | YouTube | Blogs

    Was this answer helpful?
    If yes, please mark it as the solution by selecting the checkbox in the discussion thread.
    Your feedback motivates me to keep contributing. Thank you!

  • Suggested answer
    Riyaz_riz11 Profile Picture
    3,893 Super User 2025 Season 2 on at
    Hi,
     
    Step 1: Convert Text Output into a Word Document
    Use only standard Microsoft Word actions:
    Compose the text output from your AI prompt using the "Compose" action.
    Use Word Online (Business) action: Create a Word document from template.
    You can keep a blank .docx template in SharePoint or OneDrive.
    Fill in the text via dynamic content from the Compose step.
    This action produces a link in SharePoint, but importantly, also returns the file content if you run "Get File Content" next.
     
     Step 2: Convert Word Document to PDF
    Use OneDrive for Business Convert file action (standard connector, no premium):
    Add Create file (OneDrive for Business) to save the generated .docx there.
    File Name: e.g. Generated.docx
    File Content: output from Word Online Create action.
    Add Convert file (OneDrive for Business):
    Input: the file ID of the Word document you just created.
    Format: PDF.
    Add Create file (SharePoint) to save the PDF back to your SharePoint library.
    Name: e.g. Generated.pdf
    File Content: File content output from Convert action.

    Step 3: Use the PDF in the Next AI Prompt
    Once you have the PDF file stored and its content available:
    If using AI Prompt (Copilot Studio):
    Pass the PDF file's content or link into the prompt's File / Document input.
    If using AI Builder Document Processing:

    If I have answered your question, please mark it as the preferred solution ✅ . If you like my response, please give it a Thumbs Up 👍.
    Regards,
    Riyaz

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 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard