Programmatic Retrieval of Embeddable Getty Images - n8n Workflow

Use this n8n workflow to automatically search Getty Images, extract image IDs, and retrieve the official embed code (iframe) for seamless integration into your CMS.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Content publishers and bloggers who need to programmatically embed licensed Getty Images.
Automation specialists building content ingestion pipelines.
Developers needing reusable n8n templates for web scraping and API interaction.
Users looking for advanced examples of how to utilize the HTTP Request n8n node.

Overview

This robust n8n workflow provides a solution for integrating Getty Images' embed feature directly into automated publishing systems. By simulating a search and then extracting the necessary unique identifiers, this n8n workflow bypasses manual searching and directly requests the official embed code. The process ensures that only results found are processed, utilizing the powerful IF n8n node for flow control. If you need to streamline your content creation and ensure proper licensing through Getty's embeddable iframe, this specific n8n automation is an excellent starting point. It's a high-value example demonstrating complex data extraction techniques within an n8n environment.

How it Works

This automation begins with an n8n trigger, initiating the process of finding and embedding the image.


  1. Input Definition: The When clicking ‘Test workflow’ n8n trigger starts the process. The Replaceable input n8n node defines the initial search terms or parameters.

  2. Initial Search: The Getty Images Editorial Search n8n node sends an HTTP request to the Getty Images search endpoint.

  3. Result Parsing: The Parse results page for first image n8n node (using HTML parsing) extracts the data associated with the first image result.

  4. Flow Check: The Continue if a result exists n8n node ensures that the workflow only proceeds if a valid search result was found. If not, the Raise error when no results n8n node halts the execution.

  5. ID Extraction (Success Path): The Extract the Getty image_id from url n8n node processes the extracted data to isolate the unique Getty image ID.

  6. Embed Code Request: The Request Getty Images Embed code n8n node uses the extracted ID to make a specific HTTP request to the Getty embed API (e.g., https://embed.gettyimages.com/preview/).

  7. Snippet Finalization: The Get Embeddable iframeSnippet n8n node then isolates and formats the retrieved iframe HTML snippet.

  8. Delivery: The final output is ready to be consumed by a CMS, represented by the placeholder Replace with CMS node (a NoOp n8n node in this template). This n8n workflow also includes a parallel path to fetch image details and the actual preview image binary via separate HTTP Request n8n nodes.

Installation Guide

To install this robust n8n workflow, follow these steps:


  1. Import: Copy the provided JSON data. In your n8n instance, click 'New' -> 'Import from JSON' and paste the code.

  2. Initial Setup: Locate the Replaceable input n8n node and configure the search parameters you wish to use for testing.

  3. Credential Setup (Getty): The HTTP Request n8n nodes (Getty Images Editorial Search, Request Getty Images Embed code) require appropriate headers, typically including an API key or authentication tokens if the endpoints are protected. Ensure your API connection settings within these n8n node instances are correctly configured.

  4. CMS Integration: Replace the Replace with CMS node with your actual destination n8n node (e.g., WordPress, Webflow, Database, Google Sheets ops) to finalize the publishing step.

  5. Execution: Activate the n8n workflow and use the manual n8n trigger to test the data flow.

Node Details

When clicking ‘Test workflow’ (Manual Trigger): Serves as the initial n8n trigger for testing the workflow logic.
Getty Images Editorial Search (HTTP Request n8n node): Performs the initial web request to search for the desired content.
Parse results page for first image (HTML n8n node): Essential for web scraping; uses CSS selectors to isolate the URL containing the image ID from the search HTML.
Continue if a result exists (IF n8n node): Implements core logic flow control. Checks if the parsing was successful before proceeding to prevent errors.
Extract the Getty image_id from url (Set n8n node): Cleans and transforms the retrieved URL data to specifically isolate the numerical image identifier.
Get photo details / Preview image (view binary) (HTTP Request n8n node): Used in a parallel path to fetch image metadata and the actual preview file, demonstrating advanced n8n workflow capabilities.
Request Getty Images Embed code (HTTP Request n8n node): The crucial step that calls the embed API endpoint using the extracted ID to retrieve the iframe code.
Get Embeddable iframeSnippet (Set n8n node): Finalizes the data preparation by extracting and naming the embed code, making the output cleaner for the subsequent CMS n8n node.

Related n8n Workflows

Paid

Nodes: 8 Nodes
Updated: December 26 2025
View all
Created by

If you have any questions about any of the templates I've built, please reach out to me on LinkedIn (https://www.linkedin.com/in/ludwiggerdes) or via my website down below. 👇

Featured*