{"name":"GitHub releases to X with PubNio (approve in a data table, check before posting)","nodes":[{"parameters":{"owner":{"__rl":true,"value":"","mode":"name"},"repository":{"__rl":true,"value":"","mode":"name"},"events":["release"],"options":{}},"id":"f849d0aa-fcbc-447f-a6b7-b099131fa918","name":"GitHub release","type":"n8n-nodes-base.githubTrigger","typeVersion":1,"position":[0,0]},{"parameters":{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"loose","version":2},"conditions":[{"id":"7a14b917-179e-4329-a6f4-ad9bda6bb1d2","leftValue":"={{ $json.body.action }}","rightValue":"published","operator":{"type":"string","operation":"equals"}}],"combinator":"and"},"looseTypeValidation":true,"options":{}},"id":"ba40cb9c-0725-4c69-a9eb-2c7f4e7e8dd4","name":"Published release?","type":"n8n-nodes-base.if","typeVersion":2.2,"position":[220,0]},{"parameters":{"mode":"runOnceForEachItem","jsCode":"// The release ID is the stable row ID: GitHub resends the same delivery,\n// and the next step drops releases already queued.\nconst release = $json.body.release;\nconst repo = $json.body.repository.full_name;\nconst notes = String(release.body || '').split(/\\n\\s*\\n/).map((p) => p.trim()).filter(Boolean).slice(0, 3);\nreturn { json: {\n  source_id: 'release-' + release.id,\n  text: repo + ' ' + release.tag_name + ' is out: ' + (release.name || release.tag_name) + '\\n' + release.html_url,\n  detail: notes.join('\\n\\n'),\n} };"},"id":"75c0060b-1e86-43fe-ad1b-7796ee0d865b","name":"Compose post","type":"n8n-nodes-base.code","typeVersion":2,"position":[440,0]},{"parameters":{"operation":"rowNotExists","dataTableId":{"__rl":true,"value":"pubnio_releases","mode":"name"},"filters":{"conditions":[{"keyName":"source_id","keyValue":"={{ $json.source_id }}"}]}},"id":"c4d84215-9667-46f3-a4e3-a9b230c929cb","name":"Skip items already queued","type":"n8n-nodes-base.dataTable","typeVersion":1.1,"position":[660,0]},{"parameters":{"operation":"insert","dataTableId":{"__rl":true,"value":"pubnio_releases","mode":"name"},"columns":{"mappingMode":"defineBelow","value":{"source_id":"={{ $json.source_id }}","text":"={{ $json.text }}","detail":"={{ $json.detail }}","approved":"={{ false }}"},"matchingColumns":[]},"options":{}},"id":"cbd757b9-9cf1-4ab4-a667-14b66e60712c","name":"Queue for approval","type":"n8n-nodes-base.dataTable","typeVersion":1.1,"position":[880,0]},{"parameters":{"rule":{"interval":[{"field":"minutes","minutesInterval":15}]}},"id":"c9bfaea9-5e44-4f7c-ac71-18787719aeee","name":"Every 15 minutes","type":"n8n-nodes-base.scheduleTrigger","typeVersion":1.2,"position":[0,400]},{"parameters":{"assignments":{"assignments":[{"id":"dd2be734-b9f9-4269-af20-bce67a2cab22","name":"baseUrl","value":"https://pubnio.com","type":"string"},{"id":"e56d1d73-a062-4926-ac77-e2240ddd9cc8","name":"workspaceId","value":"","type":"string"},{"id":"5df55fa6-9570-4c73-a99d-1b4b0cd22ab2","name":"xAccountId","value":"","type":"string"}]},"options":{}},"id":"f90992d6-c5d0-446e-ad1d-ef40f99f43c7","name":"PubNio settings","type":"n8n-nodes-base.set","typeVersion":3.4,"position":[220,400]},{"parameters":{"operation":"get","dataTableId":{"__rl":true,"value":"pubnio_releases","mode":"name"},"filters":{"conditions":[{"keyName":"approved","condition":"isTrue"}]},"returnAll":true},"id":"794438f8-f630-42d3-ade5-59321667458f","name":"Read approved rows","type":"n8n-nodes-base.dataTable","typeVersion":1.1,"position":[440,400]},{"parameters":{"mode":"runOnceForEachItem","jsCode":"// One approved data table row becomes one post.\nconst s = $('PubNio settings').first().json;\nconst text = (value) => String(value ?? '').trim();\nconst row = {\n  rowId: text($json.source_id),\n  approved: $json.approved === true,\n  key: text($json.pubnio_key),\n  postId: text($json.pubnio_post_id),\n  status: text($json.pubnio_status),\n  sentAt: text($json.pubnio_sent_at),\n  outcome: text($json.pubnio_outcome),\n};\n// The release link is the root post; up to three release-note paragraphs follow as a thread.\nconst thread = text($json.detail).split(/\\n\\s*\\n/).map((p) => p.trim()).filter(Boolean);\nconst target = { accountId: s.xAccountId };\nif (thread.length) target.settings = { thread };\nconst body = { text: text($json.text), targets: [target] };\nreturn { json: { ...row, body } };"},"id":"5e4c8a9d-2936-4bc7-a5dc-045e058b7c4f","name":"Normalize row","type":"n8n-nodes-base.code","typeVersion":2,"position":[660,400]},{"parameters":{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"loose","version":2},"conditions":[{"id":"d79882c6-faf4-47b1-ab76-88301ef2212e","leftValue":"={{ $json.approved }}","rightValue":"","operator":{"type":"boolean","operation":"true","singleValue":true}},{"id":"b973b620-9eb5-408d-af09-f9b439685bca","leftValue":"={{ $json.rowId }}","rightValue":"","operator":{"type":"string","operation":"notEmpty","singleValue":true}}],"combinator":"and"},"looseTypeValidation":true,"options":{}},"id":"8b762865-a45c-4322-a81d-caa558285f9f","name":"Approved?","type":"n8n-nodes-base.if","typeVersion":2.2,"position":[880,400]},{"parameters":{},"id":"61cf3264-ffa5-4d27-a627-990a36595d85","name":"Not approved: skip","type":"n8n-nodes-base.noOp","typeVersion":1,"position":[1100,700]},{"parameters":{"mode":"runOnceForEachItem","jsCode":"// Decide what one approved row needs. The idempotency key is a hash of the\n// row ID, saved on the row before the first request, so a rerun after a\n// timeout sends the same key and PubNio replays its first answer.\nconst hash = (value) => {\n  let h1 = 1779033703, h2 = 3144134277, h3 = 1013904242, h4 = 2773480762;\n  for (let i = 0; i < value.length; i++) {\n    const k = value.charCodeAt(i);\n    h1 = h2 ^ Math.imul(h1 ^ k, 597399067);\n    h2 = h3 ^ Math.imul(h2 ^ k, 2869860233);\n    h3 = h4 ^ Math.imul(h3 ^ k, 951274213);\n    h4 = h1 ^ Math.imul(h4 ^ k, 2716044179);\n  }\n  h1 = Math.imul(h3 ^ (h1 >>> 18), 597399067);\n  h2 = Math.imul(h4 ^ (h2 >>> 22), 2869860233);\n  h3 = Math.imul(h1 ^ (h3 >>> 17), 951274213);\n  h4 = Math.imul(h2 ^ (h4 >>> 19), 2716044179);\n  h1 ^= h2 ^ h3 ^ h4; h2 ^= h1; h3 ^= h1; h4 ^= h1;\n  return [h1, h2, h3, h4].map((h) => (h >>> 0).toString(16).padStart(8, '0')).join('');\n};\nconst row = $json;\nconst replayWindowMs = 23 * 60 * 60 * 1000; // PubNio replays a key for 24 hours.\nconst finished = ['published', 'provider_draft', 'failed', 'cancelled', 'rejected', 'needs_review'];\nconst fresh = !row.key;\nconst key = row.key || 'n8n-' + $workflow.id + '-' + hash(String(row.rowId));\nconst sentAt = fresh ? new Date().toISOString() : row.sentAt;\n// One media import per row and URL; a resend after a rejection gets a new sentAt, so a new import.\nconst mediaKey = row.mediaUrl ? key + '-m' + hash(row.mediaUrl + '|' + sentAt).slice(0, 16) : '';\nlet action = 'submit';\nif (row.postId) action = finished.includes(row.status) ? 'done' : 'sync';\nelse if (finished.includes(row.status)) action = 'done';\n// A saved key without a readable send time fails closed: it may be older than the replay window.\nelse if (!fresh && !(Date.now() - Date.parse(row.sentAt) <= replayWindowMs)) action = 'stale';\nelse if (fresh && row.problem) action = 'invalid';\nreturn { json: { ...row, key, sentAt, mediaKey, fresh, action } };"},"id":"49534643-002d-4ff2-a7a1-4917308c9dde","name":"Plan action","type":"n8n-nodes-base.code","typeVersion":2,"position":[1100,300]},{"parameters":{"rules":{"values":[{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict","version":2},"conditions":[{"id":"f16f1a06-8590-474b-af01-d769bbf0d61a","leftValue":"={{ $json.action }}","rightValue":"submit","operator":{"type":"string","operation":"equals"}}],"combinator":"and"},"renameOutput":true,"outputKey":"submit"},{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict","version":2},"conditions":[{"id":"ce2b47ba-5bae-40b3-a291-5fc5e66e2082","leftValue":"={{ $json.action }}","rightValue":"sync","operator":{"type":"string","operation":"equals"}}],"combinator":"and"},"renameOutput":true,"outputKey":"sync"},{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict","version":2},"conditions":[{"id":"44263f17-c189-4fdc-a8bb-f0bcb73c5a9a","leftValue":"={{ $json.action }}","rightValue":"stale","operator":{"type":"string","operation":"equals"}}],"combinator":"and"},"renameOutput":true,"outputKey":"stale"},{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict","version":2},"conditions":[{"id":"962653d8-eb6a-4982-ae8c-91f9efe30c55","leftValue":"={{ $json.action }}","rightValue":"invalid","operator":{"type":"string","operation":"equals"}}],"combinator":"and"},"renameOutput":true,"outputKey":"invalid"},{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict","version":2},"conditions":[{"id":"38b6eb60-8e12-4b02-a943-ca2838465a75","leftValue":"={{ $json.action }}","rightValue":"done","operator":{"type":"string","operation":"equals"}}],"combinator":"and"},"renameOutput":true,"outputKey":"done"}]},"options":{}},"id":"eb004cbc-56ca-4ec5-a5ca-e5df52f2a420","name":"Route by action","type":"n8n-nodes-base.switch","typeVersion":3.2,"position":[1320,300]},{"parameters":{"mode":"runOnceForEachItem","jsCode":"// Map PubNio's answer onto the row. A 202 only means PubNio accepted the\n// work; the row says published only when a delivery reports it.\nconst plan = $('Plan action').item.json;\nconst res = $input.item.json;\nconst body = res.body && typeof res.body === 'object' ? res.body : {};\nconst code = Number(res.statusCode);\nconst reject = (out) => Object.assign(out, { status: 'rejected', key: '', sentAt: '' });\nconst active = ['submitting', 'confirming', 'queued', 'scheduled'];\nconst settled = ['unresolved', 'failed', 'published', 'provider_draft', 'cancelled'];\nconst pick = (states) => active.find((s) => states.includes(s)) || settled.find((s) => states.includes(s)) || 'queued';\nconst line = (t) => [\n  t.provider + ' ' + t.placement + ': ' + t.status,\n  t.status === 'scheduled' && t.scheduledAt ? 'at ' + t.scheduledAt : '',\n  t.localDate ? '(queue slot ' + t.localDate + ' ' + t.localTime + ' ' + t.timezone + ')' : '',\n  t.url || '',\n  t.issue ? '[' + t.issue + ']' : '',\n  t.nextAction ? 'Next: ' + t.nextAction : '',\n].filter(Boolean).join(' ');\nconst out = {\n  rowId: plan.rowId,\n  key: plan.key,\n  sentAt: plan.sentAt,\n  postId: plan.postId || '',\n  status: plan.status || '',\n  outcome: plan.outcome || '',\n  error: '',\n  revision: plan.draftRevision || '',\n  media: plan.sentMedia || '',\n  retryFailed: plan.retryFailed,\n};\nif (code >= 200 && code < 300) {\n  const targets = body.deliveries || body.targets || [];\n  out.postId = body.postId || out.postId;\n  out.status = body.status || pick(targets.map((t) => t.status));\n  out.outcome = targets.map(line).join('\\n');\n  if (body.revision) out.revision = body.revision;\n  if (plan.mediaUrl !== undefined) out.media = plan.mediaUrl;\n  return { json: out };\n}\nconst problem = body.code || String(body.type || '').split('/').filter(Boolean).pop() || 'http_' + code;\nout.error = [\n  code + ' ' + problem + (body.title ? ': ' + body.title : ''),\n  ...(body.issues || body.errors || []).map((i) => (i.code || 'invalid') + ' at ' + (i.path || []).join('.') + ': ' + i.message),\n  body.currentRevision ? 'The draft is now revision ' + body.currentRevision + '.' : '',\n  body.nextAction ? 'Next: ' + body.nextAction : '',\n].filter(Boolean).join('\\n');\n// A read or a draft step failed: keep the post and its last known state.\nif (plan.postId) out.status = code === 404 ? 'needs_review' : plan.status;\n// The key was used for another body, or the same text and media already went to\n// this account in the last 24 hours: resending cannot help, so a person decides.\nelse if (problem === 'idempotency_conflict' || problem === 'duplicate_content') out.status = 'needs_review';\n// In progress, rate limited, or a server error: the outcome is unknown, so the\n// next run resends the same key and PubNio replays the first answer.\nelse if (code === 409 || code === 429 || code >= 500) out.status = 'sending';\n// PubNio refused the request and stored nothing. Fix the row, then clear\n// pubnio_status to send it again.\nelse reject(out);\nreturn { json: out };"},"id":"43e0f540-e375-4e96-a798-71985a927c7b","name":"Record PubNio answer","type":"n8n-nodes-base.code","typeVersion":2,"position":[3300,200]},{"parameters":{"mode":"runOnceForEachItem","jsCode":"// The request got no answer (timeout or network). PubNio may have accepted\n// it, so keep the key: the next run resends it and PubNio replays.\nconst plan = $('Plan action').item.json;\nconst error = $json.error || {};\nconst out = {\n  rowId: plan.rowId,\n  key: plan.key,\n  sentAt: plan.sentAt,\n  postId: plan.postId || '',\n  status: plan.postId ? plan.status : 'sending',\n  outcome: plan.outcome || '',\n  error: '',\n  revision: plan.draftRevision || '',\n  media: plan.sentMedia || '',\n  retryFailed: plan.retryFailed,\n};\nout.error = 'No answer from PubNio: ' + (error.message || error.description || 'request failed');\nreturn { json: out };"},"id":"45730910-01ba-4808-ae7c-88e4fff03ec7","name":"Record missing answer","type":"n8n-nodes-base.code","typeVersion":2,"position":[3300,400]},{"parameters":{"operation":"update","dataTableId":{"__rl":true,"value":"pubnio_releases","mode":"name"},"filters":{"conditions":[{"keyName":"source_id","condition":"eq","keyValue":"={{ $json.rowId }}"}]},"columns":{"mappingMode":"defineBelow","value":{"pubnio_key":"={{ $json.key }}","pubnio_post_id":"={{ $json.postId }}","pubnio_status":"={{ $json.status }}","pubnio_outcome":"={{ $json.outcome }}","pubnio_error":"={{ $json.error }}","pubnio_sent_at":"={{ $json.sentAt }}"},"matchingColumns":[]},"options":{}},"id":"df85359b-2199-4c48-ad14-254f6a5147ec","name":"Write result to row","type":"n8n-nodes-base.dataTable","typeVersion":1.1,"position":[3520,300]},{"parameters":{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"loose","version":2},"conditions":[{"id":"d5f1dc1b-68f4-4854-a21b-866350e7b00a","leftValue":"={{ $('Plan action').item.json.fresh }}","rightValue":"","operator":{"type":"boolean","operation":"true","singleValue":true}}],"combinator":"and"},"looseTypeValidation":true,"options":{}},"id":"7724a513-4fe0-405b-a7e3-4e6001c6f4ac","name":"First send?","type":"n8n-nodes-base.if","typeVersion":2.2,"position":[1560,100]},{"parameters":{"method":"POST","url":"={{ $('PubNio settings').first().json.baseUrl }}/api/v1/posts/validate","authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth","sendQuery":true,"queryParameters":{"parameters":[{"name":"workspaceId","value":"={{ $('PubNio settings').first().json.workspaceId }}"}]},"sendHeaders":true,"headerParameters":{"parameters":[{"name":"PubNio-Version","value":"2026-12-02"}]},"sendBody":true,"specifyBody":"json","jsonBody":"={{ JSON.stringify($('Plan action').item.json.body) }}","options":{"response":{"response":{"fullResponse":true,"neverError":true,"responseFormat":"json"}},"timeout":30000}},"id":"e8d01057-26c0-43da-acd0-0b08266c63e3","name":"Check post with PubNio","type":"n8n-nodes-base.httpRequest","typeVersion":4.2,"position":[1780,100],"onError":"continueErrorOutput"},{"parameters":{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"loose","version":2},"conditions":[{"id":"c988deb2-36c4-4772-ad63-9dabadfe9ff6","leftValue":"={{ $json.statusCode === 200 && $json.body.canPublish === true }}","rightValue":"","operator":{"type":"boolean","operation":"true","singleValue":true}}],"combinator":"and"},"looseTypeValidation":true,"options":{}},"id":"a21ca4b0-d825-41ed-a817-bd428a9a8a1b","name":"Passes checks?","type":"n8n-nodes-base.if","typeVersion":2.2,"position":[2000,100]},{"parameters":{"mode":"runOnceForEachItem","jsCode":"// PubNio's preflight found problems: nothing was sent. Edit the row and\n// clear pubnio_status to try again.\nconst plan = $('Plan action').item.json;\nconst body = $json.body || {};\nconst issues = [...(body.errors || []), ...((body.targets || []).flatMap((t) => t.errors || []))];\nconst unique = [...new Map(issues.map((i) => [i.code + (i.path || []).join('.'), i])).values()];\nconst error = unique.map((i) => (i.code || 'invalid') + ' at ' + (i.path || []).join('.') + ': ' + i.message).join('\\n') || ('validate returned ' + $json.statusCode);\nreturn { json: { rowId: plan.rowId, key: '', sentAt: '', postId: '', status: 'rejected', outcome: '', error } };"},"id":"40c8b7b1-ddec-411b-aee8-bb72eb42b56d","name":"Record check issues","type":"n8n-nodes-base.code","typeVersion":2,"position":[2220,300]},{"parameters":{"operation":"update","dataTableId":{"__rl":true,"value":"pubnio_releases","mode":"name"},"filters":{"conditions":[{"keyName":"source_id","condition":"eq","keyValue":"={{ $('Plan action').item.json.rowId }}"}]},"columns":{"mappingMode":"defineBelow","value":{"pubnio_key":"={{ $('Plan action').item.json.key }}","pubnio_status":"sending","pubnio_sent_at":"={{ $('Plan action').item.json.sentAt }}","pubnio_error":""},"matchingColumns":[]},"options":{}},"id":"a943aa4c-caeb-4c61-ac35-92222f42cb38","name":"Save key before sending","type":"n8n-nodes-base.dataTable","typeVersion":1.1,"position":[2220,100]},{"parameters":{"method":"POST","url":"={{ $('PubNio settings').first().json.baseUrl }}/api/v1/posts","authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth","sendQuery":true,"queryParameters":{"parameters":[{"name":"workspaceId","value":"={{ $('PubNio settings').first().json.workspaceId }}"}]},"sendHeaders":true,"headerParameters":{"parameters":[{"name":"Idempotency-Key","value":"={{ $('Plan action').item.json.key }}"},{"name":"PubNio-Version","value":"2026-12-02"}]},"sendBody":true,"specifyBody":"json","jsonBody":"={{ JSON.stringify($('Plan action').item.json.body) }}","options":{"response":{"response":{"fullResponse":true,"neverError":true,"responseFormat":"json"}},"timeout":30000}},"id":"c25b5806-8613-41d7-ab5e-2d2d14f5773a","name":"Create post in PubNio","type":"n8n-nodes-base.httpRequest","typeVersion":4.2,"position":[3540,100],"onError":"continueErrorOutput"},{"parameters":{"method":"GET","url":"={{ $('PubNio settings').first().json.baseUrl }}/api/v1/posts/{{ $('Plan action').item.json.postId }}","authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth","sendQuery":true,"queryParameters":{"parameters":[{"name":"workspaceId","value":"={{ $('PubNio settings').first().json.workspaceId }}"}]},"sendHeaders":true,"headerParameters":{"parameters":[{"name":"PubNio-Version","value":"2026-12-02"}]},"options":{"response":{"response":{"fullResponse":true,"neverError":true,"responseFormat":"json"}},"timeout":30000}},"id":"9f803cd6-8821-443e-a54e-24dd39df902d","name":"Read post status","type":"n8n-nodes-base.httpRequest","typeVersion":4.2,"position":[1780,500],"onError":"continueErrorOutput"},{"parameters":{"mode":"runOnceForEachItem","jsCode":"// Nothing is sent for these rows. A key that went out more than 23 hours ago\n// (or whose send time is unreadable) without a post ID may already have\n// posted, and PubNio replays a key for 24 hours only. A row the workflow\n// cannot send as written is rejected until a person fixes it.\nconst plan = $json;\nconst out = {\n  rowId: plan.rowId,\n  key: plan.key,\n  sentAt: plan.sentAt,\n  postId: plan.postId || '',\n  status: 'needs_review',\n  outcome: plan.outcome || '',\n  error: '',\n  revision: plan.draftRevision || '',\n  media: plan.sentMedia || '',\n  retryFailed: plan.retryFailed,\n};\nif (plan.action === 'invalid') {\n  Object.assign(out, { status: 'rejected', key: '', sentAt: '', error: plan.problem });\n  return { json: out };\n}\nout.error = 'Key ' + plan.key + ' was sent at ' + (plan.sentAt || 'an unknown time') + ' and no post ID came back. Find the post in PubNio and paste its ID into pubnio_post_id, or clear pubnio_key, pubnio_sent_at, and pubnio_status to send it as a new post.';\nreturn { json: out };"},"id":"891c4075-28ca-4f04-a966-7c39c2399ad0","name":"Record row problem","type":"n8n-nodes-base.code","typeVersion":2,"position":[1780,700]},{"parameters":{},"id":"273413ea-7fe4-4d03-a161-7c109e51a6ef","name":"Nothing to do","type":"n8n-nodes-base.noOp","typeVersion":1,"position":[1780,900]},{"parameters":{"content":"## GitHub release → X\n\nA published release is queued once; a person approves it in the data table; the scheduled part checks a first send with PubNio's validate call and sends it only when the check passes. Check issues land in `pubnio_error` without sending anything. A resend after a lost answer skips the check and replays its key.\n\n**Data table `pubnio_releases`** (create it under Overview → Data tables): `source_id`, `text`, `detail` (string), `approved` (boolean), and strings `pubnio_key`, `pubnio_post_id`, `pubnio_status`, `pubnio_outcome`, `pubnio_error`, `pubnio_sent_at`. Approve a row by setting `approved` to true in the table.\n\n**Setup:** GitHub credential on **GitHub release**; `workspaceId` and `xAccountId` in **PubNio settings**; Header Auth credential `PubNio API key`.","height":320,"width":680},"id":"d9bc0c18-8904-4d70-af00-11b987a3ac24","name":"Setup","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[-40,-340]}],"connections":{"GitHub release":{"main":[[{"node":"Published release?","type":"main","index":0}]]},"Published release?":{"main":[[{"node":"Compose post","type":"main","index":0}]]},"Compose post":{"main":[[{"node":"Skip items already queued","type":"main","index":0}]]},"Skip items already queued":{"main":[[{"node":"Queue for approval","type":"main","index":0}]]},"Every 15 minutes":{"main":[[{"node":"PubNio settings","type":"main","index":0}]]},"PubNio settings":{"main":[[{"node":"Read approved rows","type":"main","index":0}]]},"Read approved rows":{"main":[[{"node":"Normalize row","type":"main","index":0}]]},"Normalize row":{"main":[[{"node":"Approved?","type":"main","index":0}]]},"Approved?":{"main":[[{"node":"Plan action","type":"main","index":0}],[{"node":"Not approved: skip","type":"main","index":0}]]},"Plan action":{"main":[[{"node":"Route by action","type":"main","index":0}]]},"Record PubNio answer":{"main":[[{"node":"Write result to row","type":"main","index":0}]]},"Record missing answer":{"main":[[{"node":"Write result to row","type":"main","index":0}]]},"Route by action":{"main":[[{"node":"First send?","type":"main","index":0}],[{"node":"Read post status","type":"main","index":0}],[{"node":"Record row problem","type":"main","index":0}],[{"node":"Record row problem","type":"main","index":0}],[{"node":"Nothing to do","type":"main","index":0}]]},"First send?":{"main":[[{"node":"Check post with PubNio","type":"main","index":0}],[{"node":"Save key before sending","type":"main","index":0}]]},"Check post with PubNio":{"main":[[{"node":"Passes checks?","type":"main","index":0}],[{"node":"Record missing answer","type":"main","index":0}]]},"Passes checks?":{"main":[[{"node":"Save key before sending","type":"main","index":0}],[{"node":"Record check issues","type":"main","index":0}]]},"Save key before sending":{"main":[[{"node":"Create post in PubNio","type":"main","index":0}]]},"Create post in PubNio":{"main":[[{"node":"Record PubNio answer","type":"main","index":0}],[{"node":"Record missing answer","type":"main","index":0}]]},"Read post status":{"main":[[{"node":"Record PubNio answer","type":"main","index":0}],[{"node":"Record missing answer","type":"main","index":0}]]},"Record row problem":{"main":[[{"node":"Write result to row","type":"main","index":0}]]},"Record check issues":{"main":[[{"node":"Write result to row","type":"main","index":0}]]}},"settings":{"executionOrder":"v1"},"pinData":{},"meta":{"templateCredsSetupCompleted":false}}