Skip to main content
When each newsletter or blog brief needs an image, a useful first automation is a candidate list for an editor to review. This guide connects a manual n8n workflow to Lightdrift’s image-search API. It requests up to five candidates for one brief and keeps their source and rights metadata together. The editor still decides whether an image fits and can be used. Download the importable workflow JSON. The example directory and README contain the offline verifier and compatibility evidence. Verification boundary: offline fixture checks passed. Live n8n UI import, credential binding, and authenticated execution have not been verified for this example. The workflow does not select an approved image, download media, or publish a newsletter or blog post.

1. Import the workflow with live requests off

You need an n8n instance with the built-in nodes and JavaScript Code nodes enabled. Check the tested node versions and compatibility limits against your instance. Save the linked JSON as workflow.json. In the n8n workflow editor’s top-right … menu, choose Import from File, select the file, and save. These are the example’s documented import steps; labels and instance permissions may differ. Keep the workflow inactive. Its only trigger is manual. Inspect these five connected nodes before execution: The default-off gate stops the normal full workflow before the search request. It is not a self-resetting flag or an account-wide spending limit. Running the HTTP node directly with previous input, editing nodes, or adding triggers changes these bounds.

2. Configure your private credential and brief

Create or manage your own key in Lightdrift API keys. In Search Lightdrift, use Generic Credential Type and Header Auth. Replace the labelled placeholder by selecting your credential or creating one:
  • Header Name: X-API-Key.
  • Header Value: your own Lightdrift API key, entered only in the private n8n credential.
Save the credential and select it on the node. Do not put the key in the query, Code node, HTTP body, shared workflow JSON, or execution screenshots. The exported example contains a placeholder credential reference, not a usable secret. n8n may report the missing credential before running any nodes until you bind it. In Your search settings, enter a brief such as Coastal lighthouse at sunrise with open space for a newsletter headline. Keep Boolean allowLiveRequest false. The validation node constructs this request; no key belongs in it:
Other API search defaults still apply. Composition is a request, not a guarantee. The commercial filter uses source-declared permissions; it does not clear every intended use. Keep the example’s lig128_n8n_search_v1 experiment value. A request tag alone does not establish attribution capture or adoption.

3. Run the offline verifier first

With Git and Node.js available, download the example and run its checks:
The clone downloads repository files. The verifier itself makes no network calls or paid searches and needs no API key or n8n server. It runs the workflow’s validation and mapping code against synthetic fixtures, checking the gate, request bounds, credential placeholder, and preservation of rights and response fields. Expect PASS followed by an OFFLINE ONLY limitation. Fixture .invalid URLs, unknown permissions, and fictional query IDs are test data. They are not real candidates or evidence of working authentication. Fixtures are not pinned into the importable workflow.

4. Optionally authorize one search using your own credit

Review your account balance and current pricing first. On September 26, 2026, the pricing endpoint returned 0.005persearch(0.005 per search (5 per 1,000). Asking for five candidates does not mean five searches; account entitlements and billing rules still apply.
  1. Confirm your brief and selected credential, then set Boolean allowLiveRequest to true.
  2. Click Execute workflow once, starting the entire workflow at Manual start. Do not execute the HTTP node in isolation.
  3. Inspect Review image candidates. Save query_id as the request receipt and check execution and usage in your own account.
  4. Set allowLiveRequest back to false and save immediately, including after an error.
Leaving the flag true and executing again can consume more credit. A non-2xx response stops the workflow; no automatic retry is configured. After a timeout or interrupted connection, completion is uncertain: check account usage before choosing to repeat the request. If credentials or access fail, use the authentication troubleshooting guide. This workflow uses REST X-API-Key, not an Images MCP OAuth session or the public Docs MCP connection. For balance or rate-limit failures, inspect your account and plans and limits. Zero candidates can be a valid response and is not, by itself, an authentication failure.

5. Carry source and license review into the editorial step

The last node returns one item even when there are no results. It includes query_id, result_count, candidates, a review reminder, and the full original response. Each candidate carries its asset ID, title, score, source, dimensions, file and thumbnail URLs, source page, and complete rights object when available. Null fields remain unknown; scores are not calibrated probabilities. Before an editor places a candidate in content:
  • Open source_page (from rights.provenance_url) and check the source declaration and subject accuracy.
  • Review license, license_verbatim, commercial, derivatives, share_alike, attribution_required, attribution, and basis. Unknown/null permission flags are not permission. Follow the rights guidance; source metadata is not clearance for every use involving people, logos, or artwork.
  • Preserve the query ID, asset ID, source link, rights metadata, and required credit alongside the selected image in the editorial record. Carry required attribution through the eventual export or publication.
Search output is a candidate list, not an approved or licensed publication. This workflow ends at review. It has no schedule, automatic selection, downloads, or CMS writes. If you later add a download step, use it without the Lightdrift credential: documented asset URLs redirect to signed links valid for one hour. Never forward your API key to an image host or source site. To stop, leave the gate false or remove the workflow. Remove a dedicated n8n credential only if no other workflow needs it; revoke an exposed API key in your account. Create an account to try one brief. Guide copy version lig151_n8n_guide_v1 (1.0.0), checked September 26, 2026 against the public API contract, response documentation, and example version 1.0.0. Publication and offline verification do not demonstrate live import, useful selection, repeat use, or payment.