Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Power Automate sample to embed image in email body #99

Merged

Conversation

Solanki-Manish
Copy link
Contributor

By submitting this pull request, you agree to the contribution guidelines

If you aren't familiar with how to contribute to open-source repositories using GitHub, or if you find the instructions on this page confusing, sign up for one of our Sharing is Caring events. It's completely free, and we'll guide you through the process.

To submit a pull request with multiple authors, make sure that at least one commit is a co-authored commit by adding a Co-authored-by: trailer to the commit's message. E.g.: Co-authored-by: name <name@example.com>

Put an x in all the items that apply ([x], without spaces), make notes next to any that haven't been addressed.

  • Bug fix?
  • New sample?
  • Related issues: fixes #X, partially #Y, mentioned in #Z
  • Needs API permissions?
  • Has other prerequisites? (E.g. requires a list, document library, etc.)

What's in this Pull Request?

This sample gets an image content from SharePoint document library and embed in it email body to share it with recipient(s). The flow calls graph API by utilizing premium Invoke an HTTP request action to overcome size limitation (~1 MB) when embedding image using URI method.

Checklist

This checklist is mostly useful as a reminder of small things that can easily be forgotten – it is meant as a helpful tool rather than hoops to jump through.

Put an x in all the items that apply ([x], no spaces), make notes next to any that haven't been addressed.

  • My pull request affects only ONE sample.
  • I have updated the README file.
  • My README has at least one static high-resolution screenshot (i.e. not a GIF)
  • My README contains complete setup instructions, including pre-requisites and permissions required

@Katerina-Chernevskaya
Copy link
Contributor

Hi @Solanki-Manish ,

Thank you for the sample! It is great!
However, it needs a slight adjustment to ensure that the images sent are displayed correctly. The attachment part works perfectly, no issues there. But the image in the email body is not showing up:
image

The problem might be related to the image not being linked to the correct CID in the email body. You need to ensure that the CID of the attached file matches the one in the email body. Here is an example of how to do this:
image

After making this change, the image in the email body displays correctly.
Please refine the sample and resubmit it for review – I would be happy to merge it! And one more minor request – please name the folder in lowercase only, without capital letters.

Thank you!

BR,
Kate

@Katerina-Chernevskaya Katerina-Chernevskaya added the Needs Attention Something needs to be fixed with the PR before merging label Jul 15, 2024
Copy link
Contributor

@Katerina-Chernevskaya Katerina-Chernevskaya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Solanki-Manish ,

Thank you for the quick fixing and for your contribution! I'm going to merge the sample.

BR,
Katerina Ch.

@Katerina-Chernevskaya Katerina-Chernevskaya merged commit cb7be59 into pnp:main Jul 16, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Attention Something needs to be fixed with the PR before merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants