tr Skip to content
Black Friday FlowMattic for life, 12 payments of $33.25 Or $399 once. Nothing added for splitting Ends in --Days --Hrs --Min --Sec See the deal

When image URL received via webhook, generate background using PhotoRoom and send the new image URL as webhook response

Post an image URL to a FlowMattic webhook, have PhotoRoom generate a new background for that image, and get the PhotoRoom result back in the webhook’s reply, turning your WordPress site into a small image API.

Webhook PhotoRoom Webhook Response

3 steps Setup ~5 min Used on 1.7k sites Free to import

The When image URL received via webhook, generate background using PhotoRoom and send the new image URL as webhook response workflow on the FlowMattic canvas, with 3 steps across Webhook, PhotoRoom, Webhook Response
The workflow as it appears in the builder after import. Each step opens for editing.

What this workflow does

If an app, script or form of yours needs product photos with fresh backgrounds, calling PhotoRoom yourself means handling its API in every place you use it. This workflow puts one endpoint in front of it. Anything that can send an HTTP request gets a new image back from the same call.

The Webhook trigger gives you a URL on your site. When a request arrives with an image URL, FlowMattic passes it to PhotoRoom, whose Generate Background action creates a background for the image from a prompt. The last step, Webhook Response, sends data from the PhotoRoom step back to whoever made the request, such as the new image's URL.

The prompt can be fixed in the PhotoRoom step or taken from the request, so callers can describe the background they want. Unless you turn on the webhook's authentication setting, anyone who has the URL can start a run and use your PhotoRoom account. Task History shows each request and what PhotoRoom returned.

Product photos from a store admin tool

A small script posts each new product photo URL to the webhook and saves the image link that comes back as the product's lifestyle shot.

Background options for a design request form

A form on another site sends an image and a style prompt, and shows the customer the PhotoRoom result from the webhook reply.

Testing prompts for a catalogue

Send the same photo with different prompts from a REST client and compare the returned images before you settle on a style.

How this workflow runs

What happens at each step once the workflow is on, and what you need before you import it.

  1. Step 1Trigger
    Webhook Capture Webhook Response

    Gives you a webhook URL and starts a run when a request reaches it. Send the image URL, and a prompt if you want callers to set one, then map those values in the next step.

  2. Step 2Action
    PhotoRoom Generate Background

    Passes the image to PhotoRoom's Generate Background action, which builds a backdrop described by a prompt. Map the image URL from the request and either type a fixed prompt or map one from the payload. Connect your PhotoRoom account.

  3. Step 3Action
    Webhook Response Set Webhook Response

    Builds the reply that goes back to the caller of the webhook. Map the PhotoRoom output that holds the new image, which a test run shows, so the caller receives it in the response.

What you need

  • FlowMatticCore
  • PhotoRoom AccountAccount

After importing, map your own data. To keep the template universal, not every step is pre-filled. Open each step in the builder and connect your accounts and fields (channels, lists, sheets, recipients) before you switch the workflow on.

Make it yours

Changes worth making after you import it.

  • Turn on Require authentication on incoming requests in the Webhook trigger, and send the key with each call, so only your own tools can run PhotoRoom jobs through this endpoint.
  • Send one request with a real image after import. The test fills both the webhook data and the PhotoRoom response, so you can pick the exact value for the Webhook Response step.
  • Add a Filter after the trigger that stops the run when the image URL is empty, so a malformed request never reaches PhotoRoom.

Questions about this workflow

What does the caller get back from the PhotoRoom webhook?

Whatever you map in the Webhook Response step. Map the PhotoRoom value that holds the new image after a test run, and add any other details you want the caller to receive.

Can the caller choose the PhotoRoom background prompt?

Yes, if you include a prompt in the request and map it in the Generate Background step. Leave it unmapped and type a fixed prompt if every image should get the same style.

Do I need a PhotoRoom account for this webhook template?

Yes. The Generate Background step runs through your PhotoRoom account, which you connect when you import the workflow. Check PhotoRoom's own terms for API usage.

Can I remove the background instead of generating one?

PhotoRoom also offers a Remove Background action in FlowMattic. Swap it in for Generate Background, or add it as an extra step, and remap the Webhook Response step.

Import this workflow into your WordPress site

Download the JSON, import it from the Workflows screen and connect your accounts. Every run stays on your server, with no per-task fees.

30-day money-back guarantee Unlimited workflows and runs Self-hosted

Customers who run it every day

Rated 4.8 out of 5 by customers
Read more reviews

Great product, saves a lot of money on automation subscription. Also great support and response from the team.

Team Genius

Flowmattic is one of most advanced integration platform , A perfect alternative of zapier with unlimited task and founder and his team always ready to stand even at 2am midnight so really dedicated