{
  "name": "RecruitAffiliates.ai: new affiliate to a Google Sheet",
  "flow": [
    {
      "id": 1,
      "module": "gateway:CustomWebHook",
      "version": 1,
      "parameters": {
        "hook": null,
        "maxResults": 1
      },
      "mapper": {},
      "metadata": {
        "designer": {
          "x": 0,
          "y": 0
        },
        "restore": {}
      }
    },
    {
      "id": 2,
      "module": "http:ActionSendData",
      "version": 3,
      "parameters": {
        "handleErrors": true,
        "useNewZLibDeCompress": true
      },
      "filter": {
        "name": "New affiliates only",
        "conditions": [
          [
            {
              "a": "{{1.type}}",
              "b": "affiliate.signed_up",
              "o": "text:equal"
            }
          ]
        ]
      },
      "mapper": {
        "url": "https://api.affiliaterail.com/v1/finder/prospects/{{1.data.prospect_id}}",
        "method": "get",
        "headers": [
          {
            "name": "Authorization",
            "value": "Bearer rail_live_REPLACE_WITH_A_READ_ONLY_KEY"
          }
        ],
        "qs": [],
        "bodyType": "",
        "parseResponse": true,
        "timeout": "",
        "shareCookies": false,
        "rejectUnauthorized": true,
        "followRedirect": true,
        "useQuerystring": false,
        "gzip": true,
        "useMtls": false,
        "followAllRedirects": false
      },
      "metadata": {
        "designer": {
          "x": 300,
          "y": 0
        }
      }
    },
    {
      "id": 3,
      "module": "google-sheets:addRow",
      "version": 2,
      "parameters": {
        "__IMTCONN__": null
      },
      "mapper": {
        "mode": "select",
        "valueInputOption": "USER_ENTERED",
        "insertDataOption": "INSERT_ROWS",
        "insertUnformatted": false,
        "spreadsheetId": "REPLACE_WITH_YOUR_SHEET_ID",
        "sheetId": "Sheet1",
        "includesHeaders": true,
        "values": {
          "0": "{{2.data.name}}",
          "1": "{{2.data.url}}",
          "2": "{{2.data.email}}",
          "3": "{{1.created_at}}",
          "4": "{{1.data.source}}"
        }
      },
      "metadata": {
        "designer": {
          "x": 600,
          "y": 0
        }
      }
    }
  ],
  "metadata": {
    "instant": true,
    "version": 1,
    "scenario": {
      "roundtrips": 1,
      "maxErrors": 3,
      "autoCommit": true,
      "autoCommitTriggerLast": true,
      "sequential": false,
      "confidential": false,
      "dataloss": false,
      "dlq": false,
      "freshVariables": false
    },
    "designer": {
      "orphans": []
    }
  }
}