Skip to main content

Notifications

Power Automate - Building Flows
Suggested answer

get attach in outlook and populate template

(1) ShareShare
ReportReport
Posted on by 40
Hello team,
 
I'm working on a flow that allows me to take an attachment (excel) then take that information and place it in a file and create a table.
Then fill the information in a populate template (word) with that information. I'm a bit stuck on how to get the email information (excel)
and be able to fill the populate template. I've done some tests but I think I need to convert the attachment to json.
 
What ideas do you have for this case?
  • Suggested answer
    Robu1 Profile Picture
    Robu1 845 on at
    get attach in outlook and populate template
     
    Thank you for choosing Microsoft Community.
     
    This is a pretty cool automation project! 
     
    Here's a step-by-step approach that might help you out:
     
    Extract the Excel Attachment: Use Power Automate to trigger when an email with an attachment is received. You can use the "When a new email arrives" trigger and then add a condition to check if the email has attachments.
     
    Convert Excel to JSON: Once you have the attachment, use the "Get file content" action to read the Excel file. Then, use the "Excel Online (Business)" connector to read the rows from the Excel file. You can then use the "Create CSV table" action to convert the Excel data into a CSV format, and finally, use the "Parse JSON" action to convert the CSV data into JSON.
     
    Create a Table in a File: Use the "Create file" action to create a new file where you will store the table. You can use the JSON data to populate this table.
     
    Populate Word Template: Use the "Populate a Microsoft Word template" action to fill in the template with the data from the JSON. You will need to have a Word template with placeholders for the data you want to populate.
     
    Save or Send the Populated Document: Finally, you can save the populated document to a specific location or send it via email.
     
    This should give you a good starting point. If you need more detailed steps or run into any issues, feel free to ask!

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

    Happy to help
     
    Robu 1

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #9 Get Recognized…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,867

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,161

Leaderboard