Modules

LinkedInLinkedIn connection requests with a note

How OpenSequence puts LinkedIn connection requests in a sequence: a linkedin_connect step writes the note, the sender opens the profile in one click and the task completes itself.

Edit on GitHub

The LinkedIn module adds connection requests to a sequence. A linkedin_connect step writes the note for each contact and gives the sender a task with the profile link. The sender opens the profile, pastes the note and clicks Send. Opening the task marks it done, so there is nothing to tick afterwards.

What it gives you

  • A linkedin_connect step with a templated note, like any other step on the canvas.
  • One task per contact, of kind linkedin_connect, with the profile as link and the rendered note as body.
  • The task completes as sent the moment the sender opens it (POST /v1/tasks/{id}/open), and the sequence moves on.
  • Contacts with no LinkedIn URL take the step's skipped branch instead of waiting.

What you need

  • Each contact's linkedin_url. linkedin.com/in/dana and https://www.linkedin.com/in/dana/ are both accepted and stored as https://www.linkedin.com/in/dana.
  • An app that shows the sender their tasks: your CRM, or anything that calls the tasks API.
  • Nothing to connect. OpenSequence never logs in to LinkedIn and stores no LinkedIn credentials.

Steps

Give contacts their LinkedIn URL

curl
curl -X PUT $SEQ/v1/contacts/p_7 -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -d '{"first_name":"Dana","linkedin_url":"linkedin.com/in/dana-whitfield"}'

A URL that is not on linkedin.com is a 422 INVALID_CONTACT.

Add the step to a sequence

"li_connect": {
  "type": "linkedin_connect",
  "params": {
    "note": "Hi {{ contact.first_name | \"there\" }}, I work with teams like {{ attrs.company.name | \"yours\" }} on outbound. Happy to connect.",
    "expire": "5bd"
  },
  "next": { "completed": "wait_3d", "no_answer": "email_2", "skipped": "email_2" }
}
ParamMeaning
noteThe connection note, a template. Rendered notes over 300 characters are cut at a word. Without Premium or Sales Navigator, LinkedIn takes 200; the validator warns above that.
titleThe task's title. Default: Connect with {{ contact.first_name | "them" }} on LinkedIn.
dueA duration on the sender's calendar. Default: due as soon as the step runs.
expireWhen the task takes no_answer if nobody opens it. Default: seven days after due.
TransitionWhen
completedThe sender opened the task (outcome sent), or your app completed it with another outcome. branches_by_outcome works as on a task.
no_answerThe task expired or was cancelled.
skippedThe contact has no linkedin_url.

Show the tasks

List a sender's open LinkedIn tasks:

curl
curl "$SEQ/v1/tasks?sender=u_42&status=open&kind=linkedin_connect" -H "Authorization: Bearer $KEY"

Each task carries what the button needs:

{ "id": "task_01J…", "kind": "linkedin_connect", "title": "Connect with Dana on LinkedIn",
  "link": "https://www.linkedin.com/in/dana-whitfield",
  "body": "Hi Dana, I work with teams like Example Inc on outbound. Happy to connect.",
  "status": "open", "completeOnOpen": "sent", "openedAt": null }

Open it in one click

When the sender clicks the task, copy body to the clipboard, open link in a new tab and tell OpenSequence:

curl
curl -X POST $SEQ/v1/tasks/task_01J…/open -H "Authorization: Bearer $KEY"

The task is now done with outcome sent, and the enrollment follows completed. Opening it again changes nothing. On LinkedIn the sender clicks Connect, then Add a note, pastes and sends.

If the sender could not send it (already connected, no Connect button), complete it with your own outcome before opening, or route that outcome with branches_by_outcome:

await oseq.tasks.complete(task.id, { outcome: 'already_connected' });

Check it works

  1. Enroll a test contact with a linkedin_url in a sequence whose first step is linkedin_connect.
  2. GET /v1/tasks?kind=linkedin_connect&status=open lists one task with the profile and the note.
  3. POST /v1/tasks/{id}/open returns it with status: "done", outcome: "sent" and openedAt set, and the contact's journey shows the step as done.

Why not automatic

LinkedIn's User Agreement forbids sending invitations or messages with bots or other automated tools, and LinkedIn offers no API that sends a connection request for a member. Tools that automate it act as the member and put the member's account at risk of restriction. OpenSequence leaves the click to the sender: the step does the writing, the timing and the follow-up, and LinkedIn sees a person using LinkedIn.

A connection request is not a touch and not a reply. The step does not detect acceptance; follow it with a wait and the next step, or report what you learn with a contact event.

Common errors

ErrorCauseFix
422 INVALID_CONTACT on linkedin_urlThe URL is not on linkedin.com.Send the profile URL, like linkedin.com/in/dana.
The step always takes skippedThe contact has no linkedin_url.Upsert the contact with one before the step runs.
TOO_LONG warningThe note is over 200 (free accounts) or 300 characters.Shorten it; variables make it longer once rendered.

On this page