Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

The reliable pattern is: detect a new or changed Notion page, read its visual fields, render an image from a template, write the resulting URL or file back to an OGImage property, and have your publishing site use that property for og:image. Re-run the same flow whenever the title, subtitle, author, category, or any other image input changes.

You can implement that pattern with a hosted workflow such as Orshot, call an image API such as og-image.org or OGMagic, or run your own renderer. The right choice depends on how much template and infrastructure control you need.

What the automation must do

An Open Graph (OG) image is generated content, not a permanent decoration. A post can change after publication, so the workflow needs both creation and update paths:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Authenticate to Notion. Create a Notion internal connection and obtain its workspace-specific integration token.
  2. Grant database access. Share the blog database with that connection and give only the read/write capability the workflow requires.
  3. Detect changes. Use a hosted “new or updated page in Notion” trigger, Notion database automation, or a connection webhook.
  4. Read the page. Fetch the title and every field that appears in the design, such as subtitle, author, category, date, or featured image.
  5. Render. Send those values to a hosted template service, a parameterized API, or your own runtime renderer.
  6. Persist the result. Write the returned URL or file reference to a dedicated page property, commonly named OGImage and typed as File & media.
  7. Publish it. Map that property to the page’s og:image metadata.

Keep the source fields and the generated property separate. That makes it possible to compare the current input with the last generated version, retry a failed render, and avoid replacing a valid image with an error response.

Prepare the Notion database and connection

Create an internal connection

In Notion, create an internal connection for this automation and copy its integration token. Treat the token like a password: store it in your workflow’s secret store or environment variables, never in a page property or client-side JavaScript.

Share only the blog database

Share the specific blog database with the connection. Grant the minimum access needed. A renderer that only reads pages needs read access; a workflow that writes the generated image back needs permission to update the relevant property. Avoid granting workspace-wide access when the workflow only handles one database.

Add explicit properties

Use predictable property names so your automation does not depend on display labels in a template. A practical set is:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Title: the page title used as the main text.
  • Subtitle: optional supporting text.
  • Author, Category, and Published: optional metadata shown in the design.
  • OGImage: a File & media property (or a URL property if your publishing stack stores external URLs).
  • OGImageInputHash: optional text used to record which source values produced the current image.
  • OGImageStatus: optional text or select value such as pending, ready, and error.

If your site expects a URL rather than a Notion-hosted file, use a storage service whose URLs remain available for as long as social crawlers need them. Do not assume that every temporary file URL is durable.

Choose how pages trigger generation

Hosted workflow trigger

Orshot documents the exact trigger-to-write-back pattern: “New or updated posts get a fresh open graph image, with the URL written back to the page for your site to use.” This is the shortest route when you want a visual workflow instead of maintaining a worker. Configure the Notion trigger, map page fields into the template, then update the page’s OGImage property with the returned value.

Notion database automation

Notion automations can edit properties, add or edit pages, and send webhooks. A useful arrangement is an automation that marks a page pending or sends a webhook when a source field changes, while your renderer performs the image work and writes back the result.

Connection webhook

Notion Help describes connection webhooks as a way for connections to monitor changes in pages and databases. A webhook gives you a direct event-driven entry point, but your endpoint must authenticate the event, acknowledge it quickly, and process retries safely.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Polling

Polling is a fallback when event delivery is unavailable. Query for pages changed since the last checkpoint, process a bounded batch, and store the checkpoint only after successful handling. Polling is simpler to reason about but adds delay and API traffic.

Build the rendering step

Hosted template workflow

Use this when your design is stable and you want the least code. Map Notion values to named template fields, define fallback text for empty properties, and return a URL or file reference. Keep the template version in your workflow configuration so a redesign does not make old pages impossible to reproduce.

Parameterized image API

og-image.org and OGMagic expose parameterized generation approaches. Your worker constructs a request from validated page data, receives an image result, stores it if necessary, and writes the final reference to Notion. Validate text length and characters before sending values; a long title should be truncated or wrapped according to the template rather than allowed to overflow.

Custom runtime renderer

A runtime renderer using a Satori/Next.js-style approach gives maximum control over fonts, layout, conditional elements, and deployment. It also makes you responsible for dependency updates, font packaging, cold starts, concurrency, monitoring, storage, and retries. Use it when those controls justify the operational work.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Write the result back without creating loops

The most common automation bug is an infinite loop: the trigger notices a page update, the workflow writes OGImage, the write fires the trigger again, and the cycle repeats. Prevent it with one or more of these guards:

  • Trigger only when source fields used by the design change, not when OGImage or status fields change.
  • Store an input hash made from title, subtitle, author, category, and other visual values. Skip rendering when the hash is unchanged.
  • Use a status transition: accept pending, render once, then write ready.
  • Make updates idempotent: writing the same generated URL twice must be harmless.
  • Record a renderer/template version so a deliberate redesign can invalidate all affected pages.

On success, write the image reference and mark the page ready. On failure, preserve the previous working image, mark the attempt as error, and retain a concise error code for investigation.

Map the property to og:image

Your publishing application should read the page’s OGImage value when building HTML and emit it in the document head. The image URL must be publicly fetchable by social crawlers; a URL that works only for an authenticated Notion user will not produce a preview.

Generate the tag from the latest successfully stored value, not from a transient render response. If no image exists yet, use your site’s deliberate fallback rather than emitting an empty og:image.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Compare the three implementation models

Model Template control Hosting work Best fit Main risk
Turnkey automation (Orshot) Controlled by the service’s template workflow Low Teams wanting the documented Notion trigger → render → write-back path Less control over custom runtime behavior
Direct API (og-image.org or OGMagic) High control over request construction and storage Moderate Developers with an existing worker and storage layer You must implement validation, retries, and URL lifecycle handling
Custom renderer Maximum Highest Products needing bespoke layouts, fonts, or deployment control You own rendering reliability, scaling, and maintenance

Evaluate more than the first successful render. Compare trigger latency, API and hosting cost, image URL durability, retry behavior, permission scope, template versioning, and operational complexity.

Reliability, retries, and cost controls

Make retries safe

Events can be duplicated or arrive out of order. Include the Notion page ID and an input hash in each job. Before writing, check whether a newer hash is already ready; if so, discard the stale result. Retry transient network and service errors with backoff, but send malformed data and permission failures to a manual queue instead of retrying forever.

Handle deleted and unpublished pages

Decide what deletion means for your site. You may remove the corresponding image reference, leave it for historical pages, or mark the page unavailable. For drafts, suppress public metadata until the page is published.

Control rendering volume

Do not regenerate for edits that cannot affect the image, such as an internal note. Filter trigger fields, debounce rapid edits, and batch work where your provider supports it. Cache identical input hashes and retain the last successful image.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Complete implementation checklist

  1. Create the internal Notion connection and store its token securely.
  2. Share the blog database with the connection using least privilege.
  3. Create OGImage, status, and optional input-hash properties.
  4. Choose a hosted workflow, direct API, or custom renderer.
  5. Define the template’s required and optional fields, including fallbacks.
  6. Configure new-page and source-field-update triggers.
  7. Add loop protection and idempotency.
  8. Persist the generated URL or file reference only after a successful render.
  9. Map the property to og:image in the publishing site.
  10. Test a new page, a title edit, a rapid sequence of edits, a failed render, a permission failure, and a page deletion.
  11. Monitor pending and error states and retain enough logs to identify the page, input hash, template version, and failure class.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If your publishing flow already exposes a public post URL, ScreenshotNeo can capture the rendered page directly with one request. It accepts the cookie or consent banner like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each cleanup step can be disabled. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response reports the result in X-Page-Verdict and X-Billed headers.

For a public post page, use the API documented at https://screenshotneo.com/docs/:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com/blog/post-slug -o shot.webp
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://example.com/blog/post-slug"}, timeout=90)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://example.com/blog/post-slug' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

ScreenshotNeo also provides an MCP server with take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients. It supports full-page capture, CSS-element capture, dark mode, device presets, custom viewports, retina scale, waits, custom CSS and JavaScript, request blocking, headers, cookies, user agents, timezone and geolocation, resizing, caching, signed links, asynchronous jobs, webhooks, bulk capture, usage reporting, and an OpenAPI specification.

The Free plan includes 1,000 screenshots per month with no card. Paid plans start at $5 for 3,000 shots; every feature is available on every plan. Create a free ScreenshotNeo account.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Troubleshooting

The trigger never fires

Confirm the database is shared with the internal connection, the trigger watches the correct database, and the edited property is included in the trigger conditions. For webhooks, verify that your endpoint is reachable and acknowledges events promptly.

Notion returns an authorization error

Use the token belonging to the connection that was granted access to this database. Re-share the database after changing permissions, and verify that the workflow is writing only to properties the connection can update.

The image contains blank or fallback text

Inspect the property type and extraction logic. Notion title, rich-text, select, date, and files are represented differently. Add explicit empty-value fallbacks and log the normalized values sent to the renderer.

Every edit creates multiple images

Exclude generated properties from the trigger, debounce rapid edits, and compare the input hash before rendering. Also check whether both a database automation and a webhook are handling the same event.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The social preview still shows the old image

Verify that the page’s emitted og:image points to the newly stored value and that the URL is publicly reachable. Social platforms may cache previews independently; changing the source property does not guarantee an immediate recrawl.

A failed job replaced a good image

Change the write order: render and validate first, then replace the existing property. Keep the old value when a request times out, returns an error, or produces an unusable file.

Frequently Asked Questions

Can one workflow generate different designs for different categories?

Yes. Route each page to a template based on a validated category or another explicit property, and include the selected template version in your input hash so a template change triggers regeneration.

Should the generated image be stored inside Notion or in external storage?

Use the storage model your publishing site can serve reliably. A Notion File & media property is convenient, while external storage can provide a more durable public URL; verify access and retention behavior before relying on either.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How do I regenerate every existing post after a redesign?

Change the template version or add a migration flag to the input hash, then enqueue pages in bounded batches. Keep the previous image until each replacement succeeds.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.