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 / convert emails into pd...
Power Automate
Suggested Answer

convert emails into pdf from a list

(0) ShareShare
ReportReport
Posted on by
II'm new to Power Automate Desktop. I'm having trouble understanding how to input commands into the workflow. Here's the situation: I want to automate the conversion of emails in my Outlook inbox to PDF and copy them to a predefined file. I've used a loop, but after converting the first email, it doesn't move on to the second as expected and repeats the process with the first email indefinitely. I need to know how I can ensure that after converting the first email to PDF, it converts the second, then the third, and so on.
Categories:
I have the same question (0)
  • Suggested answer
    MParikh Profile Picture
    521 Super User 2026 Season 1 on at
    Hi @CU12011937-0,
    The issue you're experiencing is a common loop problem—your flow is likely referencing the same email variable (e.g., the first item in your list) inside the loop body, rather than the current iteration item. That's why it keeps converting only the first email indefinitely.
    Here's how to fix it:
    Step 1: Get Your Emails into a List
    Use the "Get emails from Outlook" action to retrieve all emails and store them in a list variable (e.g., %EmailList%).
    Step 2: Use a For Each Loop Correctly
    Add a "For each" action and set it to iterate over %EmailList%. This will automatically create a %CurrentItem% variable that updates with each iteration.
    Step 3: Reference CurrentItem Inside the Loop
    Inside your loop, make sure every action that touches the email uses %CurrentItem% instead of %EmailList[0]% or a hardcoded index. For example:
    Email body → %CurrentItem.Body%
    Email subject (for filename) → %CurrentItem.Subject%
    Received date → %CurrentItem.ReceivedTime%
    Step 4: Save Each PDF with a Unique Name
    When saving to PDF, build a dynamic filename using the current email's properties:
    %OutputFolder%\%CurrentItem.Subject%_%CurrentItem.ReceivedTime%.pdf
    This ensures each email creates a separate file rather than overwriting the same one.
    Quick Checklist
    • Loop iterates over the full list, not a single item
    • All actions inside the loop use %CurrentItem%, not %EmailList[0]%
    • PDF filename is dynamic (using subject/date), not static
    If you're still stuck, share a screenshot of your current flow actions and I can pinpoint the exact line that needs adjustment.
    Hope this helps!
     

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 377

#2
11manish Profile Picture

11manish 279

#3
David_MA Profile Picture

David_MA 234 Super User 2026 Season 1

Last 30 days Overall leaderboard