AutomationFlowsSocial Media › Send Connection Requests

Send Connection Requests

Send Connection Requests. Uses postgres, httpRequest. Scheduled trigger; 6 nodes.

Cron / scheduled trigger★★★★☆ complexity6 nodesPostgresHTTP Request
Social Media Trigger: Cron / scheduled Nodes: 6 Complexity: ★★★★☆ Added:

This workflow follows the HTTP Request → Postgres recipe pattern — see all workflows that pair these two integrations.

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
{
  "name": "Send Connection Requests",
  "nodes": [
    {
      "parameters": {
        "triggerTimes": {
          "item": [
            {
              "hour": "*",
              "minute": "0"
            }
          ]
        }
      },
      "name": "Cron",
      "type": "n8n-nodes-base.cron",
      "typeVersion": 1,
      "position": [
        250,
        300
      ]
    },
    {
      "parameters": {
        "query": "SELECT id, linkedin_url FROM prospects WHERE status = 'pending' ORDER BY created_at ASC LIMIT 10;"
      },
      "name": "Postgres Pending Prospects",
      "type": "n8n-nodes-base.postgres",
      "typeVersion": 1,
      "position": [
        450,
        300
      ]
    },
    {
      "parameters": {
        "batchSize": 1
      },
      "name": "SplitInBatches",
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 1,
      "position": [
        650,
        300
      ]
    },
    {
      "parameters": {
        "authentication": "headerAuth",
        "url": "={{$env.UNIPILE_API_URL}}/linkedin/send-connection",
        "method": "POST",
        "jsonParameters": true,
        "options": {
          "continueOnFail": true
        },
        "bodyParametersJson": "{ \"profile_url\": \"{{$json.linkedin_url}}\" }"
      },
      "name": "Unipile Send Connection",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        850,
        300
      ]
    },
    {
      "parameters": {
        "query": "UPDATE prospects SET status = 'requested', connection_requested_at = NOW(), updated_at = NOW() WHERE id = {{$json.id}}; INSERT INTO activity_logs (prospect_id, action_type, action_status, details) VALUES ({{$json.id}}, 'send_connection_request', 'success', jsonb_build_object('linkedin_url', {{$json.linkedin_url}}));"
      },
      "name": "Postgres Mark Requested",
      "type": "n8n-nodes-base.postgres",
      "typeVersion": 1,
      "position": [
        1050,
        250
      ]
    },
    {
      "parameters": {
        "query": "UPDATE prospects SET status = 'failed', updated_at = NOW() WHERE id = {{$json.id}}; INSERT INTO activity_logs (prospect_id, action_type, action_status, details) VALUES ({{$json.id}}, 'send_connection_request', 'failure', jsonb_build_object('error', {{$json.error.message}}, 'linkedin_url', {{$json.linkedin_url}}));"
      },
      "name": "Postgres Mark Failed",
      "type": "n8n-nodes-base.postgres",
      "typeVersion": 1,
      "position": [
        1050,
        350
      ]
    }
  ],
  "connections": {
    "Cron": {
      "main": [
        [
          {
            "node": "Postgres Pending Prospects",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Postgres Pending Prospects": {
      "main": [
        [
          {
            "node": "SplitInBatches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SplitInBatches": {
      "main": [
        [
          {
            "node": "Unipile Send Connection",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Unipile Send Connection": {
      "main": [
        [
          {
            "node": "Postgres Mark Requested",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Postgres Mark Failed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Send Connection Requests. Uses postgres, httpRequest. Scheduled trigger; 6 nodes.

Source: https://github.com/RitikMittal32/linkedInAIAutomation/blob/980f57fae2d9193ab1a666c34cac70951a2a7ed7/n8n/send_connections.json — original creator credit. Request a take-down →

More Social Media workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Social Media

Automatically discovers trending topics in your niche and generates ready-to-use content ideas with AI. Twitter/X trending topics and hashtags Reddit hot posts from niche subreddits Google Trends dail

HTTP Request, Email Send, Slack +1
Social Media

Automatically generates engaging marketing posts using OpenAI and publishes them across LinkedIn, Twitter (X), and Facebook. Creates platform-optimized content with hashtags, emojis, and proper format

HTTP Request, Postgres
Social Media

Opportunity Grab Workflow. Uses httpRequest, reddit, twitter, postgres. Scheduled trigger; 8 nodes.

HTTP Request, Reddit, Twitter +1
Social Media

Comment Capture Engine. Uses airtable, httpRequest. Scheduled trigger; 52 nodes.

Airtable, HTTP Request
Social Media

Marketing teams and social media managers in Japan who want to automate content creation while maintaining high quality standards and cultural appropriateness. Perfect for businesses that need consist

HTTP Request, Notion, Email Send