$API_TOKEN=<YOUR_API_TOKEN>
$cat > input.json << 'EOF'
<{
< "blueprintJson": {
< "name": "Sample - order intake to CRM",
< "flow": [
< {
< "id": 1,
< "module": "google-sheets:watchRows",
< "version": 2,
< "parameters": {
< "__IMTCONN__": 1000001,
< "limit": 100
< },
< "mapper": {
< "mode": "select",
< "spreadsheetId": "SAMPLE_SHEET_ID",
< "sheetId": "Orders"
< },
< "metadata": {
< "designer": {
< "x": 0,
< "y": 0
< },
< "parameters": [
< {
< "name": "__IMTCONN__",
< "type": "account:google",
< "label": "Connection"
< }
< ]
< }
< },
< {
< "id": 2,
< "module": "builtin:BasicRouter",
< "version": 1,
< "metadata": {
< "designer": {
< "x": 300,
< "y": 0
< }
< },
< "routes": [
< {
< "flow": [
< {
< "id": 3,
< "module": "http:ActionSendData",
< "version": 3,
< "parameters": {
< "handleErrors": false
< },
< "mapper": {
< "url": "https://api.example.com/v1/orders",
< "method": "post",
< "headers": [
< {
< "name": "Authorization",
< "value": "Bearer sk-proj-SAMPLEONLYnotarealkey0123456789abcdefgh"
< }
< ],
< "qs": [],
< "rejectUnauthorized": true
< },
< "metadata": {
< "designer": {
< "x": 600,
< "y": -150
< }
< },
< "onerror": [
< {
< "id": 6,
< "module": "builtin:Break",
< "version": 1,
< "metadata": {
< "designer": {}
< }
< }
< ]
< }
< ]
< },
< {
< "flow": [
< {
< "id": 4,
< "module": "builtin:BasicFeeder",
< "version": 1,
< "mapper": {
< "array": "{{1.line_items}}"
< },
< "metadata": {
< "designer": {
< "x": 600,
< "y": 150
< }
< }
< },
< {
< "id": 5,
< "module": "airtable:ActionCreateRecord",
< "version": 3,
< "parameters": {
< "__IMTCONN__": 1000002
< },
< "mapper": {
< "baseId": "SAMPLE_BASE",
< "table": "Line items",
< "record": {
< "Name": "{{4.sku}}"
< }
< },
< "metadata": {
< "designer": {
< "x": 900,
< "y": 150
< }
< }
< }
< ]
< }
< ]
< }
< ],
< "metadata": {
< "version": 1,
< "scenario": {
< "roundtrips": 1,
< "maxErrors": 3,
< "autoCommit": true,
< "autoCommitTriggerLast": true,
< "sequential": false,
< "slots": null,
< "confidential": false,
< "dataloss": false,
< "dlq": false,
< "freshVariables": false
< },
< "designer": {
< "orphans": []
< }
< }
< }
<}
<EOF
$curl "https://api.apify.com/v2/actors/mediocre_interest~make-scenario-backup/runs?token=$API_TOKEN" \
< -X POST \
< -d @input.json \
< -H 'Content-Type: application/json'