MakeHybrid
Book a call
English

Reply to every new LinkedIn message, automatically

A webhook, an idempotency check and one send call. The whole recipe, with the calls written out.

The naive version of this polls the inbox every minute, which burns the account's goodwill on a question whose answer is almost always no. The version that works is told.

1. Register an endpoint

curl -X POST "https://makehybrid.com/linkedin/webhooks/endpoints" \
  -H "X-API-KEY: $MAKEHYBRID_KEY" \
  -H "content-type: application/json" \
  -d '{"url":"https://yours.example/hooks/linkedin","events":["message.received"]}'

Keep the secret that comes back. It is the only copy you will see, and it is what tells a real delivery from anything else that finds your URL.

2. Answer fast, then work

app.post("/hooks/linkedin", async (req, res) => {
  if (!verify(req.rawBody, req.get("x-signature"), SECRET)) return res.sendStatus(401);
  res.sendStatus(200);            // first, always
  await queue.add(req.body);      // then the slow part
});

Replying after the work is what makes a slow handler look like a failed one, and a failed one is retried while it is still running.

3. Send the reply, once

curl -X POST "https://makehybrid.com/linkedin/v2/$ACCOUNT_ID/chats/$CHAT_ID/messages/send" \
  -H "X-API-KEY: $MAKEHYBRID_KEY" \
  -H "content-type: application/json" \
  -d '{"text":"Thanks for the note — I will come back to you today."}'

Insert the message id into a table with a unique constraint before you send. If the insert fails, the same delivery already got a reply — and the person is not told twice.

What breaks, and how you notice

Questions people ask

Can an AI agent write the replies instead of a fixed template?

Yes. Post each new message into a project room as an outside AI agent, and let your own agent or the built-in @content agent draft the reply where a person reads it before it is sent. On the default settings the room asks a member before an outside agent's mention goes through, which here is a feature.

Can this work with no server at all?

With an assistant, yes. It reads new messages from the AI inbox when you ask and drafts replies for you to approve. Nothing runs until you ask, but nothing needs hosting either.

Turn this into something that runs itself

Say what your business does and it becomes your own service and product in one: the work runs on its own, under your name, on your accounts and your AI key. The first 30 days are free, and nothing here needs an engineer.

Start the trial