Integration recipe

Publish to pixPLace from Make with the HTTP module

Use two HTTP modules in Make to upload an image by URL and publish a post, with the key in a header and a safe retry.

Who it is for

No-code users who build scenarios in Make and keep their content in Airtable, a spreadsheet or a form.

What it automates

Publish a post for every new item of the scenario: upload the image by URL, then create the post.

Steps

  1. Add the module HTTP, action Make a request, after your trigger or search module.
  2. Fill it as in the first block below: method POST, the upload URL, the Authorization header and a raw JSON body. Turn on Parse response.
  3. Add a second HTTP module for the post and map data.publicUrl from the first module into attachments[].url.
  4. Add an error handler with the Break directive, so a 429 or a 503 is tried again later with the same Idempotency-Key.
  5. When you create the key, tick the `publish` scope. A key without it gets 403 insufficient_scope on these calls.

Examples

Placeholders: ppk_live_XXXXXXXX is your key. The ids and the image address are samples. The API address is always https://pixplace.space/api/v1.

Module 1: HTTP, Make a request (upload)
URL: https://pixplace.space/api/v1/uploads/from-url
Method: POST
Headers:
  Authorization = Bearer ppk_live_XXXXXXXX
  Idempotency-Key = upload-{{1.id}}
Body type: Raw
Content type: JSON (application/json)
Request content: {"url": "{{1.imageUrl}}"}
Parse response: Yes
Module 2: HTTP, Make a request (create the post)
URL: https://pixplace.space/api/v1/posts
Method: POST
Headers:
  Authorization = Bearer ppk_live_XXXXXXXX
  Idempotency-Key = post-{{1.id}}
Body type: Raw
Content type: JSON (application/json)
Request content: {"title": "{{1.title}}", "attachments": [{"url": "{{2.data.publicUrl}}", "type": "IMAGE"}]}
Parse response: Yes

Common errors

StatusCauseWhat to do
400The raw body is not valid JSON, usually because a mapped value contains a quote or a line break.Build the body with a Create JSON module or wrap the mapped text in the toString and replace functions, then map the result.
401The API key is missing, malformed, revoked or sent in the wrong header.Add the key as a header of the module: name Authorization, value Bearer followed by the key. The header must read Authorization: Bearer followed by your ppk_live_ key. Check the key in Settings → Developer.
403The key lacks a scope the call needs: the answer is 403 with error.code insufficient_scope and the missing scope in error.required.Create a new key in Settings → Developer with the `publish` scope ticked and use it instead; repeating the call with the same key fails the same way.
429A per-minute or per-day limit was reached. The Retry-After header and the retryAfter field of the body say how many seconds to wait.Wait that long and repeat with the SAME Idempotency-Key. The Break directive of the error handler repeats the module later. Keep the same Idempotency-Key, built from the item id.
502The server could not download the source URL: it answered 4xx or 5xx, the host does not resolve or the response was compressed.Open the source URL in a private browser window. It must be public and answer 200 without a login.

The full list of statuses, the retry rules and the limits are in Errors and retries.

Other tools