Microsoft Power Automate integration
10 min read · Reviewed

Power Automate Mockups: HTTP Flows and Custom Connector

Connect approved SharePoint, Microsoft Forms, Dataverse or spreadsheet records to render jobs. Use HTTP actions for a first flow, then import the custom connector starter if your team needs reusable named actions.

By Mockups Generator · HTTP flows and custom connector starter

FROM EVENT TO IMAGEExample workflow
↗Your trigger

New artwork or an order

Good things grow source artworkGeometric color study source artwork
{ }Render API

Template + design + settings

Background render job
◎Signed webhook

Verify the completion event

Continue your workflow

Before you start

  • A Mockups Generator account, an available render allowance and a named API key from API access.
  • A ready template, its exact artwork-area ID from GET /api/v1/templates/{template_id}, and an approved sample export.
  • An owned artwork asset ID, or a direct public image URL. Prefer saved assets for repeated work.
  • A source-record ID plus an artwork version for a stable idempotency key, and a place to persist the accepted job ID.
  • A Power Automate environment that permits HTTP or custom connectors, the required license and an allowed data loss prevention policy.

Download the setup resources

Examples contain placeholders, not live credentials. Follow the format label: configuration recipes are instructions, while workflow and connector files can be imported into their platform. Platform account permissions and a small live test are required.

  • Swagger 2.0 JSON

    Power Automate custom connector starter

    Importable Swagger 2.0 definition for JSON render jobs, status, recovery, collection review and account queries. Enter a bearer credential in a private connection.

  • Configuration JSON

    HTTP flow setup and mappings

    Configure submission, explicit polling, deadline and file delivery. This recipe is not a managed solution package.

  • Postman JSON

    Shared Postman collection

    Importable requests for assets, JSON jobs, reviewed plans, recovery and file downloads. Set your key locally.

  1. 1

    Choose a trigger and durable record

    Trigger on an approved SharePoint list item, Dataverse row or form response. Keep Template ID, Slot ID, Asset ID, Artwork Version, Run Key and Job ID on the record. Use one operation version per intended render and guard against record updates starting another export.

  2. 2

    Create the HTTP submission action

    Set method POST, URI to your workspace origin plus /api/v1/render-jobs, Content-Type to application/json and Authorization to the full Bearer credential. Use protected environment or connection settings for secrets, and enable Secure Inputs and Secure Outputs where the action supports them. Add a stable Idempotency-Key header.

  3. 3

    Map the JSON body

    Use the request example and substitute your template, slot and asset values. Keep options as an object. Inspect a test run's non-secret response and save its id in the source record. If using Parse JSON, include id, status and nullable result_url rather than assuming every submission is immediately done.

  4. 4

    Use an explicit bounded completion loop

    After submission, read status and set a Status variable. Use Do until for done, error or cancelled, with a five-second Delay and another authenticated GET in each iteration. Set a count limit and a timeout, for example 360 iterations and PT30M. Refresh Status on every read. If an HTTP action applies an automatic async pattern, disable that pattern for this explicit polling design.

  5. 5

    Branch on the terminal state

    Only done should enter image delivery. error or cancelled should write the API detail to the record and enter a review or recovery path. A timeout branch must retain Job ID; it should not submit another paid operation with a fresh key.

  6. 6

    Download and upload binary content

    Use an authenticated HTTP GET to /api/v1/render-jobs/{id}/result. Map its file body to OneDrive or SharePoint Create file with a sensible filename. Check the action's binary content representation and avoid treating the body as JSON text or encoding it again. If a signed-storage redirect appears, do not send the API key to that other host.

  7. 7

    Import reusable connector actions

    Under Custom connectors, create from an OpenAPI file and choose the supplied Swagger 2.0 JSON. Verify host, action definitions and the Authorization API-key header, then create a private connection containing the full Bearer value. Test one named action before sharing the connector. The supplied starter covers JSON operations; use HTTP for multipart uploads and authenticated binary downloads.

HTTP flow request and expressions

The API returns 202 with a JSON id, not the complete Azure-style Location polling contract. Therefore this recipe reads status explicitly using the returned ID. Keep the submission action name stable so expressions still point to the correct response. Named connector actions expose the same job fields.

{
  "template_id": "REPLACE_TEMPLATE_ID",
  "options": {
    "format": "png",
    "mode": "full",
    "slots": {
      "REPLACE_SLOT_ID": {
        "asset_id": "REPLACE_ASSET_ID",
        "fit": "contain"
      }
    }
  }
}

Job ID: body('Submit_render')?['id']
Status: body('Read_status')?['status']
Result path: concat('/api/v1/render-jobs/', variables('JobId'), '/result')

Custom connector scope and licensing

The downloadable definition is Swagger 2.0, the format supported by Microsoft's custom connector import workflow. It includes named JSON actions and response schemas, with bearer credentials sent through an API-key header connection. Review validation in your tenant, verify licensing and DLP policy, and change the host for a different deployment. This is a starter definition, not a certified Microsoft marketplace connector or a full deployment solution.

Official platform documentation for this setup

Reviewed collections and approvals

Preflight a multi-artwork areas specification and inspect valid, warnings, total and the sample. Store the returned plan_id and plan_hash in the source record, then use an approval action before paying for the batch. Submit only the stored token and idempotency_key after approval. Do not regenerate the review on a retry. Check the review's expires_at before a first submission, because a long human approval can outlive the plan.

Failure scopes and resumed delivery

Group submit, status and delivery into scopes with Configure run after paths for failed and timed-out actions. Save the existing Job ID in every path. A destination failure can retry Download image and Create file without repeating Submit render. If two flows may deliver the same job, use a record-level delivery guard or unique file identity to avoid duplicated publishing.

Verify completion and move a real file

Treat 202 as acceptance. Persist id, then poll the canonical job endpoint with the same bearer credential. queued, running and cancelling mean wait; done means download; error and cancelled need a recovery branch. A protected result URL cannot be pasted into a destination that has no way to send your API key. Download the bytes through an authenticated action, then upload a file to your destination. A temporary signed link can expire, so refresh it or use the canonical result endpoint. Do not forward the bearer key across a redirect to another origin.

Retries, duplicate events and interrupted runs

Use one key for one intended operation, such as order-1042-artwork-v1. Keep it stable on a lost-response retry. The same inputs and key return the same render job; changed inputs return 409 and need an explicit new version. Do not repeat a synchronous paid render just because the previous step timed out. Retry reads and idempotent submissions with bounded backoff for temporary network or 5xx errors. Fix 401 credentials, 404 ownership, 402 allowance and 422 validation before retrying. When a polling deadline is reached, save the job ID and resume checking it later; the server continues independently.

Troubleshooting checklist

Check the actual HTTP status and detail field before changing the workflow. Test a single ready template and saved asset first, then add multi-area placements and collection output. Avoid enabling schedules until the downloaded file and its destination record have both been inspected.

Field or conditionMapping or action
401Use the full Bearer value and a non-revoked API key; a website key is for the iframe only.
404Confirm the template, asset or job belongs to this account or is an accessible public template.
409Read detail: result not ready, changed inputs, stale revision and expired review need different actions.
402 / 429Check account allowance / reduce concurrency and back off for rate limits.
422Inspect the slot ID, ready status, nested options and direct-image URL. JSON options must be an object.
Broken destination imageDownload with authentication and upload bytes; protected URLs are not public attachments.

Official references

Platform requirements were checked against these official sources on . API examples are checked against the current application. Validate credentials, imports and destination behavior in your own platform account.

FAQ

Common questions

1.Can I import the live OpenAPI 3.1 file directly as this connector?

Use the provided Swagger 2.0 starter for Power Automate custom connector import. The live OpenAPI explorer remains the complete deployment reference, but it uses a newer format.

2.Do I need a premium license?

HTTP and custom connector use can require premium licensing and tenant permission. Check your current Microsoft plan, environment and data loss prevention policy before scheduling a production flow.

3.Is this Microsoft's built-in asynchronous Location pattern?

No. The submit response provides a job ID and JSON status. The guide uses its documented GET status endpoint in an explicit bounded loop.

Put the guide into practice

Review the workflow and requirements before creating your next output.

Review JSON job contractsFree plan · no credit card · no watermarks
PSD compatibility reportsSaved projectsAPI with webhooks