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 / How to attach 1st page...
Power Automate
Unanswered

How to attach 1st page of PDF file after converting PDF to JPG in an email body ?

(0) ShareShare
ReportReport
Posted on by 2
Dear All,
 
I want to create following flow in power automate:
 
1. Recurrence (i.e. every minute)
2. Find files in folders (.pdf file)
3. Get file content
4. convert file to image (.pdf to .jpg)
5. Compose Action (to convert .jpg to base64)
6. Send an Email (V2)
 
Actions 4 & 5, try to attach the image in the email body section. However, it is not working. I have attached an error screenshot below.
 
 
 
Please, suggest a solution - how to attach an image in an email body section
 
(Note: whole PDF has 6 pages, I need only 1st page as an attachment in an email body section)
Categories:
I have the same question (0)
  • Suggested answer
    Riyaz_riz11 Profile Picture
    3,844 Super User 2025 Season 2 on at

    Use Compose action:

    data:image/jpeg;base64,@{base64(outputs('Get_file_content'))}

    Replace Get_file_content with the actual name of your action that retrieves the image content.

    HTML
    <p>Here is the first page of your PDF as an image:</p>
    <img src="data:image/jpeg;base64,@{base64(outputs('Get_file_content'))}" />
     
    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
  • CU29051607-1 Profile Picture
    2 on at
    Hello Riyaz,
     
    Thank you for the response!
     
    I have tried this but facing some problem. Can you please help me to resolve this?
     
    Please check attached scrrenshot.

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

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard