How to Convert HTML to JPG with Power Automate
Convert HTML or a rendered browser page to JPG in Power Automate with cloud and desktop workflows, troubleshooting, sizing guidance, and a faster API option.
Direct answer: For a cloud flow, use the current Power2Apps Converter action that accepts HTML or an HTML URL and returns JPG/JPEG data. Set the width and height, then pass the returned file content to SharePoint, OneDrive, or another storage action. If you need a picture of a page already rendered in a browser, use Power Automate Desktop’s browser screenshot action instead.
The two routes solve different problems:
| Requirement | Use |
|---|---|
| Convert supplied HTML or an HTML URL in a cloud flow | Power2Apps Converter HTML-to-JPG/JPEG action |
| Capture exactly what a browser currently displays | Power Automate Desktop browser screenshot action |
1. Convert HTML or an HTML URL in a cloud flow
What you need
- A Power Automate cloud flow.
- The Power2Apps Converter connector enabled in your environment.
- HTML text or a URL that the connector can retrieve.
- A destination such as SharePoint or OneDrive if you want to save the image.
Build the flow
- Create an automated, instant, or scheduled cloud flow.
- Add the trigger that supplies your HTML or URL. For example, use an HTTP request trigger, a form response, or a list item.
- Add the current Power2Apps Converter action whose name explicitly refers to converting HTML to JPG or JPEG. Microsoft lists this action in the Power2Apps Converter connector reference. Older HTML-to-image actions are marked deprecated, so select the current action in the designer.
- Provide the HTML input or HTML URL required by the action.
- Set
WidthandHeightin pixels. The documented default for each is 500 pixels. - Choose the response mode exposed by the action. The reference includes Base64 String and Bytes modes; use the mode that matches the next action and reduces payload size for large files.
- Add a file-creation or upload action. Map the image output field shown by the current designer to the file content input. Field labels and output tokens can change, so inspect dynamic content rather than copying an old recipe.
- Set a filename ending in
.jpgor.jpeg, then run the flow with a small HTML sample.
Typical cloud-flow shape
Trigger
-> Power2Apps Converter: HTML to JPG/JPEG
HTML or URL: supplied by trigger
Width: 1200
Height: 800
Response mode: Bytes (or Base64 String)
-> SharePoint: Create file
File name: converted-page.jpg
File content: image output from converter
The connector reference establishes the HTML/URL input, dimensions, and response modes. It does not establish a universal maximum size, full-page behavior, CSS compatibility, or how every external resource is rendered. Test the actual document, fonts, images, and styles used by your flow.
Supplying HTML safely
Keep the HTML as one string in the action input. If it comes from JSON, map the property through dynamic content instead of manually escaping it. If it comes from a variable, initialize a string variable before the converter action. External images, web fonts, scripts, and stylesheets may require network access from the conversion service; a self-contained document with absolute resource URLs is easier to diagnose.
Choosing dimensions
| Use case | Starting dimensions | Reason |
|---|---|---|
| Email or thumbnail | 600–900 px wide | Small payload and quick downstream delivery |
| Dashboard card | 1000–1400 px wide | Readable labels without excessive file size |
| Print-oriented image | Set dimensions from the final layout | JPG pixels do not automatically preserve print dimensions |
These are planning values, not connector guarantees. Increase dimensions only when the output needs more detail; larger images increase transfer and storage work.
Saving to SharePoint or OneDrive
SharePoint and OneDrive provide file actions after conversion. They are storage stages, not the HTML-to-JPG engine. Map the converter’s current image output to the file-content field and use a deterministic filename, such as a record ID plus a timestamp. If a destination rejects Base64 text, switch the converter to Bytes when available, or use the designer’s documented conversion expression for that output type.
2. Capture a rendered page with Power Automate Desktop
Use this route when the requirement is a screenshot of a page or element after a browser has rendered it. Microsoft’s browser automation reference describes an action that takes a screenshot of the web page or an element currently displayed in the browser and saves it to a file or the clipboard: Browser automation actions reference.
- Open Power Automate Desktop and create a desktop flow.
- Launch or attach to the browser and navigate to the target page.
- Wait for the page and any required element to finish loading.
- Add the browser screenshot action.
- Choose the full page or the target web element, then save the image to a file or clipboard.
- Use a
.jpgfilename if the action or a following image-conversion step supports JPEG output. If the action produces another format, add a separate conversion step that is available in your environment. - Call the desktop flow from a cloud flow only after confirming your machine, gateway, browser profile, and sign-in state are available.
This is a browser automation workflow, not conversion of an arbitrary HTML string. It is the better choice when JavaScript, user state, viewport layout, or an already displayed element determines the image.
3. HTML conversion versus browser screenshot
| Question | Cloud HTML-to-JPG action | Desktop screenshot |
|---|---|---|
| Input | HTML content or URL | Rendered browser page or element |
| Runs without a logged-in desktop | Yes, as a cloud connector action | No; it depends on browser automation infrastructure |
| JavaScript and session state | Behavior depends on the connector | Uses the active browser session |
| Output control documented here | Width, height, and response mode | Screenshot saved to file or clipboard |
| Best fit | Generate images from supplied markup or a URL | Capture what a user sees |
4. Options and adjacent connectors
- Power2Apps Converter: the clearest documented cloud route for HTML or URL to JPG/JPEG. It exposes width and height, each with a documented default of 500 pixels, plus response modes intended to reduce response size for large files.
- Encodian Convert: Microsoft Learn lists an HTML-to-image action in its connector index. Verify the current vendor documentation for supported formats, limits, authentication, and data handling before standardizing on it.
- Content Conversion: Microsoft’s Content Conversion connector is documented for HTML to plain text, not HTML to JPG. Its 5 MB content maximum and 70-level DOM-depth limit apply to that text conversion connector, not to Power2Apps image conversion. The connector is also documented as unavailable for new implementations in GCC/GCC High.
- OneDrive Convert file: this is a generic conversion action in preview. Do not treat it as a documented HTML-to-JPG route. Microsoft’s HTML timing workaround for OneDrive concerns conversion to PDF.
5. Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| The action cannot be found | Using a deprecated action name or a connector not installed in the environment | Search for the current Power2Apps Converter HTML-to-JPG/JPEG action and check environment connector availability. |
| Output is only 500 pixels | Width and height were left at documented defaults | Set both dimensions explicitly for the target use. |
| File action rejects the result | Response is Base64 text while the destination expects bytes, or the reverse | Use the action’s Bytes response mode when available, or map the exact dynamic-content field exposed by the current designer. |
| Images or fonts are missing | External resources are inaccessible, relative, blocked, or still loading | Use absolute HTTPS URLs, embed critical assets where practical, and test the same HTML in a minimal flow. |
| Layout differs from a browser | Cloud conversion and browser rendering are different routes | Use Power Automate Desktop when the rendered browser view is the requirement. |
| Desktop screenshot is blank | Navigation or dynamic content had not finished | Add a wait for the page or a specific element before the screenshot action. |
| Only part of a long page appears | Viewport screenshot selected instead of a full-page or element capture | Check the screenshot action’s capture target and use an element or full-page option when exposed. |
| Flow is slow or times out | Large HTML, remote assets, oversized dimensions, or desktop startup time | Reduce dimensions, simplify markup, limit external resources, and separate conversion from downstream storage for clearer retries. |
6. Reliability, performance, and cost planning
Reliability
- Use a small known HTML fixture as a health check before processing production content.
- Record the source URL or document ID, dimensions, response mode, and destination filename with each run.
- Make storage filenames deterministic so a retry updates the intended file instead of creating duplicates.
- For desktop flows, verify the browser profile, gateway, machine availability, and authentication state before scheduling unattended runs.
Performance
- Keep markup and external assets as small as the visual requirement allows.
- Choose the smallest dimensions that preserve readability.
- Use the response mode that avoids unnecessary Base64 expansion when the next action accepts bytes.
- For browser screenshots, wait for the specific content you need instead of using a long fixed delay.
Cost and limits
The reviewed Microsoft references establish connector inputs and behavior, but they do not provide a verified price comparison or a universal image-size limit for Power2Apps HTML-to-image conversion. Check your tenant’s licensing, connector plan, run limits, and vendor terms before committing to a production volume. Do not apply the Content Conversion connector’s 5 MB or 70-level limits to Power2Apps.
7. Or skip the browser setup
If your source is already available at a URL, ScreenshotNeo can return a clean PNG, JPEG, WebP, or PDF from one GET request. See the ScreenshotNeo API documentation for the current parameters.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
import requests
r = requests.get(
"https://api.screenshotneo.com/v1/shot",
params={"access_key": "YOUR_API_KEY", "url": "https://example.com"},
timeout=90,
)
r.raise_for_status()
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://example.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`Screenshot failed: ${res.status}`);
const fs = await import('node:fs/promises');
await fs.writeFile('shot.webp', Buffer.from(await res.arrayBuffer()));
ScreenshotNeo removes cookie banners, newsletter popups, and chat widgets before capture. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and the response identifies the result with X-Page-Verdict and X-Billed headers. Its MCP server lets Claude, Cursor, and other MCP clients call take_screenshot, get_page_info, and capture_pdf. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots. Create a free ScreenshotNeo account.
8. FAQ
Can Power Automate convert an HTML string directly to JPG?
Yes. Use the current Power2Apps Converter action that explicitly accepts HTML and returns JPG/JPEG output. Confirm the input and output fields in your tenant’s designer.
Can I convert a URL instead of HTML?
The Power2Apps connector reference lists HTML or an HTML URL as input. Rendering details for external resources should be verified with your actual page.
Is Content Conversion the right connector?
No for JPG output. The documented Content Conversion action converts HTML to plain text. Its limits apply to that text connector.
When should I use Power Automate Desktop?
Use it when the required image is the page or element currently rendered in a browser, including browser session state and client-side layout.
Does the Power2Apps action guarantee full-page capture?
The reviewed reference documents width, height, and response modes, but does not establish full-page behavior. Test a long document before relying on it.


