AutomationFlowsGeneral › Syncmessages

Syncmessages

Syncmessages. Uses scheduleTrigger, httpRequest, splitInBatches, splitOut. Scheduled trigger; 8 nodes.

Cron / scheduled trigger★★★★☆ complexity8 nodesHttp Request
General Trigger: Cron / scheduled Nodes: 8 Complexity: ★★★★☆

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "minutes",
              "minutesInterval": 10
            }
          ]
        }
      },
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.3,
      "position": [
        -960,
        144
      ],
      "id": "6fbaa2b2-f353-457c-8357-1a6c19553a23",
      "name": "Schedule Trigger"
    },
    {
      "parameters": {
        "url": "http://host.docker.internal:8000/api/n8n/users/active",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        -736,
        144
      ],
      "id": "d2ff4145-dc9f-4aa5-b8fd-8563f9f4bf99",
      "name": "Get Active Users",
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "=http://host.docker.internal:8000/api/n8n/sync/calendar/{{ $json.user_id }}",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {}
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        -96,
        144
      ],
      "id": "23d53504-ec00-4d1c-b306-dec14a933bdc",
      "name": "Sync Calendar",
      "alwaysOutputData": false,
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "=http://host.docker.internal:8000/api/n8n/sync/slack/{{ $('Loop Over Users').item.json.user_id }}",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {}
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        48,
        144
      ],
      "id": "09cf3d1a-e492-4db2-9b05-a06837120a22",
      "name": "Sync Slack",
      "alwaysOutputData": false,
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "=http://host.docker.internal:8000/api/n8n/sync/gmail/{{ $('Loop Over Users').item.json.user_id }}",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        192,
        144
      ],
      "id": "30152bcb-99d4-4e47-82d2-78438f89b7b9",
      "name": "Sync Gmail",
      "alwaysOutputData": false,
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "options": {
          "reset": false
        }
      },
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        -320,
        144
      ],
      "id": "8a47a921-409b-4f92-8cd2-5efc68b30c39",
      "name": "Loop Over Users",
      "alwaysOutputData": false
    },
    {
      "parameters": {
        "fieldToSplitOut": "data",
        "options": {}
      },
      "type": "n8n-nodes-base.splitOut",
      "typeVersion": 1,
      "position": [
        -528,
        144
      ],
      "id": "75076c82-3d74-4b97-b1a6-bcf6cfaea5ac",
      "name": "Split Out"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "=http://host.docker.internal:8000/api/n8n/sync/github/{{ $('Loop Over Users').item.json.user_id }}",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        336,
        144
      ],
      "id": "0ac9e90c-3d97-4893-8b89-55766383329a",
      "name": "Sync Github",
      "alwaysOutputData": true,
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "onError": "continueRegularOutput"
    }
  ],
  "connections": {
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Get Active Users",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Active Users": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sync Calendar": {
      "main": [
        [
          {
            "node": "Sync Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sync Slack": {
      "main": [
        [
          {
            "node": "Sync Gmail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sync Gmail": {
      "main": [
        [
          {
            "node": "Sync Github",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Users": {
      "main": [
        [],
        [
          {
            "node": "Sync Calendar",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Loop Over Users",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sync Github": {
      "main": [
        [
          {
            "node": "Loop Over Users",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "meta": {
    "templateCredsSetupCompleted": true
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

About this workflow

Syncmessages. Uses scheduleTrigger, httpRequest, splitInBatches, splitOut. Scheduled trigger; 8 nodes.

Source: https://github.com/okobb/LockIn/blob/36c479f7f1534d2f2f259091284a18e838e56296/workflows/SyncMessages.json — original creator credit. Request a take-down →

More General workflows → · Browse all categories →