Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Suggested answer

get attach in outlook and populate template

(1) ShareShare
ReportReport
Posted on by 48
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?
  • angeldiaz96 Profile Picture
    angeldiaz96 48 on at
    get attach in outlook and populate template
    Hello Robu1,
    Thanks for your help,
    But I have some questions about your answer.
    To get the attachment (excel) from the email I use the "get attachment" option that Outlook has.

    Then use the "get file content" function but Excel Business connectors don't have this. Or are you referring to OneDrive Business?

    I forgot to mention that the attachment (excel) does not have a table format, so it is necessary to create it for reading.

  • Suggested answer
    Robu1 Profile Picture
    Robu1 1,015 Super User 2025 Season 1 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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,318 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,111 Most Valuable Professional

Leaderboard