{
  "name": "Rendex — Auto-Generate OG Images from Airtable Rows",
  "flow": [
    {
      "id": 1,
      "module": "airtable:TriggerWatchRecords",
      "version": 3,
      "parameters": {
        "__IMTCONN__": 1000001
      },
      "mapper": {
        "base": "appYOUR_BASE_ID",
        "table": "tblYOUR_TABLE_ID",
        "limit": "10",
        "formula": ""
      },
      "metadata": {
        "designer": {
          "x": 0,
          "y": 0,
          "name": "Airtable — Watch Records"
        },
        "notes": "On import, select your Airtable connection, then pick the Base and Table that hold the title / subtitle / author columns (plus an empty ogImageUrl field to write back to)."
      }
    },
    {
      "id": 2,
      "module": "http:ActionSendData",
      "version": 3,
      "parameters": {
        "handleErrors": false,
        "useNewZLibDeCompress": true
      },
      "mapper": {
        "url": "https://api.rendex.dev/v1/render/link",
        "method": "post",
        "headers": [
          {
            "name": "Authorization",
            "value": "Bearer rdx_YOUR_API_KEY"
          }
        ],
        "qs": [],
        "bodyType": "raw",
        "contentType": "application/json",
        "data": "{\n  \"format\": \"png\",\n  \"width\": 1200,\n  \"height\": 630,\n  \"html\": \"<div style='width:1200px;height:630px;box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;padding:72px;font-family:system-ui,sans-serif;color:#fff;background:linear-gradient(135deg,#0f172a,#ea580c)'><h1 style='font-size:64px;line-height:1.1;margin:0'>{{title}}</h1><p style='font-size:28px;margin:20px 0 0;color:#fed7aa'>{{subtitle}}</p><p style='font-size:22px;margin-top:auto;color:#fdba74'>by {{author}}</p></div>\",\n  \"data\": {\n    \"title\": \"{{1.title}}\",\n    \"subtitle\": \"{{1.subtitle}}\",\n    \"author\": \"{{1.author}}\"\n  }\n}",
        "serializeUrl": false,
        "shareCookies": false,
        "parseResponse": true,
        "followRedirect": true,
        "useQuerystring": false,
        "followAllRedirects": false,
        "timeout": "",
        "ca": "",
        "rejectUnauthorized": true,
        "gzip": true,
        "useMtls": false
      },
      "metadata": {
        "designer": {
          "x": 300,
          "y": 0,
          "name": "Rendex — Create Render Link"
        },
        "restore": {
          "expect": {
            "method": {
              "mode": "chose",
              "label": "POST"
            },
            "bodyType": {
              "label": "Raw"
            },
            "contentType": {
              "label": "JSON (application/json)"
            }
          }
        },
        "notes": "POSTs an HTML template + the row's fields to Rendex's hosted /v1/render/link. parseResponse is ON so {{2.url}} (the edge-cached og:image URL) is mappable downstream. Map {{1.title}} / {{1.subtitle}} / {{1.author}} from the Airtable trigger. Replace rdx_YOUR_API_KEY with your key."
      }
    },
    {
      "id": 3,
      "module": "airtable:ActionUpdateRecord",
      "version": 3,
      "parameters": {
        "__IMTCONN__": 1000001
      },
      "mapper": {
        "base": "appYOUR_BASE_ID",
        "table": "tblYOUR_TABLE_ID",
        "id": "{{1.id}}",
        "record": {
          "ogImageUrl": "{{2.url}}"
        }
      },
      "metadata": {
        "designer": {
          "x": 600,
          "y": 0,
          "name": "Airtable — Update a Record"
        },
        "notes": "Writes the hosted og:image URL back to the same row. Map the record id from the trigger ({{1.id}}) and set your ogImageUrl field to {{2.url}} (the Render Link response). Re-select Base/Table after import."
      }
    }
  ],
  "metadata": {
    "instant": false,
    "version": 1,
    "scenario": {
      "roundtrips": 1,
      "maxErrors": 3,
      "autoCommit": true,
      "autoCommitTriggerLast": true,
      "sequential": false,
      "confidential": false,
      "dataloss": false,
      "dlq": false,
      "freshVariables": false
    },
    "designer": {
      "orphans": []
    },
    "zone": "us1.make.com"
  }
}
