Hi Members,
Is it possible to take a screenshot of the Power Apps current screen and send an email as an displayed image in the email body?
This is really needed requirement for me and I got stuck here. Million thanks for any help.
Solved! Go to Solution.
Hi @bapala
I had a moment to test the existing component exactly as it is on Github now, without any modification from me.
I have some good news for you @bapala
I found that as of this writing, I was able to bring the managed solution in, and import the code component and add it to a Canvas App Screen without any error.
Also, when clicking the custom button, it was actually working properly for me and I can see the screenshot!
Please try with the following steps and see if it works for you:
1. Follow all the steps I gave in my initial post to enable Power Apps code component framework on the environment, to download the managed solution, to import the managed solution, and to add the Code component to the Canvas app.
2. Add the custom code component to the Screen
- a. Click on the Plus icon on the left side
- b. Click on the chevron to the left of Code components
- c. Click on screenshot under Code components.
3. Add an Image control to the Screen
- a. Click Insert
- b. Type in image
- c. Click Image
4. Suppose the name of the control as it was added to the Screen in Step 2 above, is screenshot1.
For the Image property of the Image Control use the below formula
screenshot1.OutPut
5. Go ahead and click on the custom code component button.
You should see the Image control update momentarily with the actual screenshot of what was on the screen!
6. If you want this in the e-mail body, check this thread as a guide:
However, I strongly recommend you use the Office 365 Outlook Connector - SendEmailV2, instead of the Mail Connector that is used in the accepted answers
You can also check this below for alternate approach
Check if it helps @bapala
Note that if you can get Steps 1-5 working to show the screenshot in an Image control , but not Step 6 in an e-mail, the issue is not with the component, but instead the issue is that you must do it in a specific way to display a base64 image in the body of an e-mail. So if that is the case, you should keep on trying it - however if you have an issue with step 6 in particular, go ahead and reply with some details what you tried.
I hope it helps you @bapala
CAUTION: I am unfamiliar with the following component and I did not author it, and I also did not even test it to see if it really works. Please use caution and import the below to a separate non-production environment first if possible.
To my awareness, this is probably not possible without using a custom Power Apps Code Component.
I found one here that might accomplish the goal. I did not even use it or test it myself,
so be careful, to try it in a non-production environment first if possible.
Please import the above to a separate non-production environment first if possible.
If you want to try it, you must follow these steps:
First, navigate to https://admin.powerplatform.microsoft.com/
Now perform the following steps:
1. Click Environments on the left
2. From the list of environments, click the purple text that has the name your environment
3. Click Settings
4. Click the chevron next to Product to expand it
5. From the expanded list under Product, click on Features
6. Scroll down to about 3/4 of the page
7. On the right side, look for Power Apps component framework for canvas apps and look for the setting called Allow publishing of canvas apps with code components and toggle this to On
----------------------------------
8. Now go to
and click on Screenshot_1_0_0_1_managed.zip
9. Click Download
10. Now you must take that zip file you just downloaded, and follow these instructions below:
How to Import a Solution - learn.microsoft.com
Please import the above to a separate non-production environment first if possible, I did not even import it myself or test it myself, so you should import it to a separate non-production environment first if possible.
11. Now, you must follow these instructions below to add this component to your Canvas App:
How to add Code Components to a Canvas App - learn.microsoft.com
Now check if it works for you.
Please reply with whether it worked for you or not. If there is any issue and it does not work, I might consider to take a look at that particular code component, or write you a custom one myself. Note that development of custom Power Apps Component Framework Code Components is advanced, so my availability to write or modify these in context of the forums is limited. However if you think you really need some additional help with this, you can reply with whether it worked for you or not - if it did not work, or if you have any issue with the above steps, and in case I have some time I might check on it.
Check if the above helps @bapala
Thank You for your detailed explanation, @poweractivate. Much appreciated.
I have already tried this in my personal default environment, but seems like the code component might have some issues and not able to fix them from my side. Spent most of my time (in a day) on it but no luck.
I am a newbie for PCF's and not able to develop one on my own. It would be great to have a solution for this as more people are looking for this (I see many people posted for a solution in the forum).
Please take a look if you have time and let us know here if the code component works for you.
Thanks again. 🙂
I am so sorry that it did not work for you @bapala
In case I have some time I might consider to take a look at the code component, check for the issues and give you a working version in a github repo of mine - or even write one myself and give you the link to a github repo of mine.
I would ask you to be patient, I am not sure if I could do this right away - however, I will see if I could check my availability and try to make time for it.
Thanks a lot @poweractivate.
This is not in a rush now. It can be wait. For others benefit, you may consider to look into in your free time.
Hi @bapala
I had a moment to test the existing component exactly as it is on Github now, without any modification from me.
I have some good news for you @bapala
I found that as of this writing, I was able to bring the managed solution in, and import the code component and add it to a Canvas App Screen without any error.
Also, when clicking the custom button, it was actually working properly for me and I can see the screenshot!
Please try with the following steps and see if it works for you:
1. Follow all the steps I gave in my initial post to enable Power Apps code component framework on the environment, to download the managed solution, to import the managed solution, and to add the Code component to the Canvas app.
2. Add the custom code component to the Screen
- a. Click on the Plus icon on the left side
- b. Click on the chevron to the left of Code components
- c. Click on screenshot under Code components.
3. Add an Image control to the Screen
- a. Click Insert
- b. Type in image
- c. Click Image
4. Suppose the name of the control as it was added to the Screen in Step 2 above, is screenshot1.
For the Image property of the Image Control use the below formula
screenshot1.OutPut
5. Go ahead and click on the custom code component button.
You should see the Image control update momentarily with the actual screenshot of what was on the screen!
6. If you want this in the e-mail body, check this thread as a guide:
However, I strongly recommend you use the Office 365 Outlook Connector - SendEmailV2, instead of the Mail Connector that is used in the accepted answers
You can also check this below for alternate approach
Check if it helps @bapala
Note that if you can get Steps 1-5 working to show the screenshot in an Image control , but not Step 6 in an e-mail, the issue is not with the component, but instead the issue is that you must do it in a specific way to display a base64 image in the body of an e-mail. So if that is the case, you should keep on trying it - however if you have an issue with step 6 in particular, go ahead and reply with some details what you tried.
I hope it helps you @bapala
Hi @poweractivate,
In my initial try, I didn't use any image control to see the captured image. This was the part I have missed hence had some issues.
Now, it was clear with your detailed explanation and I am able to see the screenshot on click of button.
Million thanks to you. It might help others as well.