AutomationFlowsAI & RAG › Send Ai-powered Inbound Linkedin Replies with La Growth Machine and Openai

Send Ai-powered Inbound Linkedin Replies with La Growth Machine and Openai

ByBrice MAURIN @cebri on n8n.io

This workflow listens for new La Growth Machine inbox messages, uses OpenAI to draft a context-aware reply based on the lead and recent thread history, and sends the response back via La Growth Machine as a LinkedIn message. Triggers when a new inbox message is received in La…

Event trigger★★★★☆ complexityAI-powered9 nodes@Lagrowthmachine/N8N Nodes LagrowthmachineOpenAI
AI & RAG Trigger: Event Nodes: 9 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #17946 — we link there as the canonical source.

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
{
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "name": "LGM \u2014 AI auto-reply to inbound messages",
  "nodes": [
    {
      "id": "d53ae8d0-c1ef-46fb-a30a-78df179fcb42",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -608,
        96
      ],
      "parameters": {
        "width": 480,
        "height": 784,
        "content": "## LGM \u2014 AI auto-reply to inbound messages\n\n### How it works\n\nThis workflow automatically replies to inbound laGrowthMachine messages with an AI-generated response. It listens for new LGM messages, keeps only received inbound messages, enriches them with campaign context, drafts a response using OpenAI, and sends the reply through LGM.\n\n### Setup steps\n\n- Configure laGrowthMachine trigger credentials and select the message event that should start the workflow.\n- Set the inbound filter condition so only received messages pass through.\n- Update the campaign context fields such as campaignObjective, product, and tone in the Set node.\n- Configure OpenAI credentials and the prompt/model settings used to draft replies.\n- Configure laGrowthMachine send credentials and verify the send node maps the AI draft to the outgoing reply body.\n\n### Customization\n\nAdjust the campaign objective, product details, tone, and OpenAI prompt to match different campaigns or response styles. Add review, approval, or safety filtering before the send step if replies should not be sent automatically."
      },
      "typeVersion": 1
    },
    {
      "id": "ebae2663-245f-4a97-af09-1f7dac385d5e",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -48,
        96
      ],
      "parameters": {
        "color": 7,
        "width": 432,
        "height": 320,
        "content": "## Receive inbound messages\n\nStarts when laGrowthMachine reports a new message and filters the stream so only received inbound messages continue."
      },
      "typeVersion": 1
    },
    {
      "id": "f283da6e-f412-44b4-a5f4-e6ab1ee7aea3",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        432,
        96
      ],
      "parameters": {
        "color": 7,
        "width": 432,
        "height": 320,
        "content": "## Prepare AI draft\n\nAdds the campaign objective, product, and tone context, then uses OpenAI to draft an appropriate reply for the inbound message."
      },
      "typeVersion": 1
    },
    {
      "id": "d263d484-58de-433e-adea-b0b3a40fc41a",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        912,
        96
      ],
      "parameters": {
        "color": 7,
        "width": 240,
        "height": 320,
        "content": "## Send LGM reply\n\nSends the AI-generated reply back through laGrowthMachine."
      },
      "typeVersion": 1
    },
    {
      "id": "lgm-trigger",
      "name": "When Message Received",
      "type": "@lagrowthmachine/n8n-nodes-lagrowthmachine.laGrowthMachineTrigger",
      "position": [
        0,
        260
      ],
      "parameters": {},
      "credentials": {
        "laGrowthMachineApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "filter-received",
      "name": "Filter Inbound Messages",
      "type": "n8n-nodes-base.filter",
      "position": [
        240,
        260
      ],
      "parameters": {
        "conditions": {
          "options": {
            "version": 2,
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "c1",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ $json.received }}",
              "rightValue": true
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "set-context",
      "name": "Set Campaign Details",
      "type": "n8n-nodes-base.set",
      "position": [
        480,
        260
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "a1",
              "name": "campaignObjective",
              "type": "string",
              "value": "Book a 20-min demo call with qualified prospects."
            },
            {
              "id": "a2",
              "name": "product",
              "type": "string",
              "value": "La Growth Machine \u2014 multichannel sales-engagement platform."
            },
            {
              "id": "a3",
              "name": "tone",
              "type": "string",
              "value": "Friendly, concise, human. No corporate fluff. Max 5 sentences."
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "ai-draft",
      "name": "OpenAI Draft Reply",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        720,
        260
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "=You are the SDR replying in an ongoing outreach conversation for {{ $json.product }}. Objective: {{ $json.campaignObjective }}. Tone: {{ $json.tone }}. Reply as the next message in the thread. Return ONLY the reply text."
            },
            {
              "role": "user",
              "content": "=Lead: {{ JSON.stringify($('When Message Received').item.json.lead) }}\nLast messages (newest first): {{ JSON.stringify($('When Message Received').item.json.messages) }}\n\nWrite the best reply to move toward the objective."
            }
          ]
        }
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "lgm-send",
      "name": "Send Reply with LGM",
      "type": "@lagrowthmachine/n8n-nodes-lagrowthmachine.laGrowthMachine",
      "position": [
        960,
        260
      ],
      "parameters": {
        "target": {
          "leadId": "={{ $('When Message Received').item.json.leadId }}"
        },
        "message": "={{ $json.message.content }}",
        "memberId": "REPLACE_WITH_MEMBER_ID",
        "resource": "message",
        "operation": "sendLinkedIn",
        "identityId": "={{ $('When Message Received').item.json.identityId }}",
        "additionalFields": {
          "source": "n8n"
        }
      },
      "credentials": {
        "laGrowthMachineApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    }
  ],
  "settings": {
    "executionOrder": "v1"
  },
  "connections": {
    "OpenAI Draft Reply": {
      "main": [
        [
          {
            "node": "Send Reply with LGM",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Campaign Details": {
      "main": [
        [
          {
            "node": "OpenAI Draft Reply",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When Message Received": {
      "main": [
        [
          {
            "node": "Filter Inbound Messages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Inbound Messages": {
      "main": [
        [
          {
            "node": "Set Campaign Details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

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.

Pro

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

About this workflow

This workflow listens for new La Growth Machine inbox messages, uses OpenAI to draft a context-aware reply based on the lead and recent thread history, and sends the response back via La Growth Machine as a LinkedIn message. Triggers when a new inbox message is received in La…

Source: https://n8n.io/workflows/17946/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

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

AI & RAG

Ask questions like “How much did I spend on food last month?” and get instant answers from your financial data — directly in Telegram.

Telegram Trigger, OpenAI, Google Sheets +2
AI & RAG

Analyze incoming support requests, classify intent and priority with AI, create Jira tickets, assign the correct team, send Slack notifications, and track SLA deadlines. Supports Gmail, WhatsApp, form

Gmail Trigger, HTTP Request, Form Trigger +4
AI & RAG

The Problem That it Solves

Google Drive Trigger, OpenAI, Google Drive +5
AI & RAG

This intelligent email automation workflow helps you maximize engagement through domain-based outreach. It utilizes AI-powered personalization and strategic follow-ups to increase response rates. The

Gmail, HTTP Request, Google Sheets +1
AI & RAG

Note: Now includes an Apify alternative for Rapid API (Some users can't create new accounts on Rapid API, so I have added an alternative for you. But immediately you are able to get access to Rapid AP

Form Trigger, Google Sheets Trigger, OpenAI +2