{
  "name": "Rendex — Render Once, Fan Out to Many Apps (Router)",
  "flow": [
    {
      "id": 1,
      "module": "gateway:CustomWebHook",
      "version": 1,
      "parameters": {
        "hook": 1000301,
        "maxResults": 1
      },
      "mapper": {},
      "metadata": {
        "designer": {
          "x": 0,
          "y": 0,
          "name": "Trigger"
        },
        "notes": "Send a JSON body like {\"title\":\"Order #1042\",\"detail\":\"Acme Co. — $2,400\",\"priority\":\"high\"}. Swap for any trigger (new order, published post, form)."
      }
    },
    {
      "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  \"html\": \"<div style='width:800px;padding:56px;font-family:system-ui'><h1 style='color:#ea580c'>{{title}}</h1><p style='font-size:20px;color:#475569'>{{detail}}</p></div>\",\n  \"data\": {\n    \"title\": \"{{1.title}}\",\n    \"detail\": \"{{1.detail}}\"\n  },\n  \"format\": \"png\",\n  \"width\": 800\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 — Render Once"
        },
        "restore": {
          "expect": {
            "method": { "mode": "chose", "label": "POST" },
            "bodyType": { "label": "Raw" },
            "contentType": { "label": "JSON (application/json)" }
          }
        },
        "notes": "Renders ONCE before the Router. Uses /v1/render/link (parseResponse ON) so every branch can map the hosted {{2.url}} — Slack and Airtable want a URL, Drive can upload it too. Prefer raw binary for file uploads? Switch to /v1/screenshot, set parseResponse OFF, and map {{2.data}} on the file branches. Replace rdx_YOUR_API_KEY."
      }
    },
    {
      "id": 3,
      "module": "builtin:BasicRouter",
      "version": 1,
      "mapper": null,
      "metadata": {
        "designer": {
          "x": 600,
          "y": 0,
          "name": "Router — fan out"
        }
      },
      "routes": [
        {
          "flow": [
            {
              "id": 4,
              "module": "google-drive:uploadAFile",
              "version": 4,
              "parameters": {
                "__IMTCONN__": 1000302
              },
              "mapper": {
                "folderId": "/",
                "title": "render.png",
                "data": "{{2.url}}"
              },
              "metadata": {
                "designer": {
                  "x": 900,
                  "y": -180,
                  "name": "Google Drive — Upload"
                },
                "notes": "Branch A: archive the render. Select your Drive connection + folder. If you switched module 2 to /v1/screenshot binary, map {{2.data}} here instead of the URL."
              }
            }
          ]
        },
        {
          "flow": [
            {
              "id": 5,
              "module": "slack:CreateMessage",
              "version": 4,
              "parameters": {
                "__IMTCONN__": 1000303
              },
              "filter": {
                "name": "urgent only",
                "conditions": [
                  [
                    {
                      "a": "{{1.priority}}",
                      "o": "text:equal",
                      "b": "high"
                    }
                  ]
                ]
              },
              "mapper": {
                "channel": "#general",
                "text": "New card rendered: {{1.title}} — {{2.url}}"
              },
              "metadata": {
                "designer": {
                  "x": 900,
                  "y": 0,
                  "name": "Slack — Post (urgent only)"
                },
                "notes": "Branch B: announce. The filter gates this branch — it runs only when priority = high. Remove the filter to always post. Slack references the image by the hosted {{2.url}}."
              }
            }
          ]
        },
        {
          "flow": [
            {
              "id": 6,
              "module": "airtable:ActionUpdateRecord",
              "version": 3,
              "parameters": {
                "__IMTCONN__": 1000304
              },
              "mapper": {
                "base": "appYOUR_BASE_ID",
                "table": "tblYOUR_TABLE_ID",
                "id": "{{1.recordId}}",
                "record": {
                  "ogImageUrl": "{{2.url}}"
                }
              },
              "metadata": {
                "designer": {
                  "x": 900,
                  "y": 180,
                  "name": "Airtable — Update record"
                },
                "notes": "Branch C: record. Writes the hosted URL to a field on the row. Re-select Base/Table + connection after import. Map the record id from your trigger."
              }
            }
          ]
        }
      ]
    }
  ],
  "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"
  }
}
