If you're looking to build your own LinkedIn Sequence system, you're in the right spot.
This article is solely dedicated to implementing every required automation to smoothly run a sequence.
Requirements:
- Make sure to follow the article Managing Users using Captain Data API
- A clear idea of your data model :)
Overall Architecture
Overview Schema
To build campaigns you need a combination of three different stages with their own business logic to implement:
- Sequence Initialisation
- Enrich the leads to send a sequence to
- Identify leads connexion degree with user sending the sequence
- Schedule connection requests
- Detect accepted connection requests
- This process is "scheduled" on Captain Data and repeats at a frequency of your choice (recommended - every 3 hours)
- It allows to detect connection request that are accepted
- Sequence running:
- It describes the logic of sending message and detecting answers
Legend
Prerequisite
Before starting building the sequence logic, make sure you have done to the following:
- Connect the LinkedIn Account of the user who will send out the sequence - head here if you did not manage this yet.
- You have access to the LinkedIn profile url of the leads to launch the sequence on
Sequence Initialisation
You first need to initialise the sequence. This is the step where we will determine the connection degree between your user and the leads to interact with (more on connexion degrees here)
Based on this knowledge, we will schedule the connection requests or move the lead to the next step.
Detect accepted connection requests (repeat logic)
You need to know at all time, when connection requests are accepted.
To do this we will extract the net new LinkedIn connections of the end-user regularly and compare them with the leads to engage to identify them.
At the end if the Sequence initialisation, we recommended triggering the Extract Connection Requests workflow on Captain Data with a "repeat" option and a frequency. Check the full documentation of Extract Connection Requests here.
The recommended setup is:
- Frequency: every 3 (three) hours
- Parameter: max_minutes=180
To manage the schedule repeat - append this JSON to the body at the same level as the job name.
"job_name": ""
"repeat_option": {
"type":"minute/hour/day/week/month",
"value": "", // must be a, integer
}
Here is the API Reference to help you do that.
This process allows knowing when you enrol leads to the next steps of the campaign. See “Sequence running” process detailed below.
Sequence running process
What triggers this process is knowing a connection request we previously sent has been accepted.
Then you will have to send a LinkedIn message.
The Message LinkedIn Profile step is taking care of detecting the replies for you. For this to happen, you will have to pass the "check_reply" parameter to "true" (see full documentation here).
⚠️When sending the message the first-time (left-branch), you will get the "thread_id" as a return from the Message LinkedIn Profile Step.
It is important to save this data and re-use it later down the line for the reply detection to work in an optimal way.
More features
Some users like to add an action of Visiting a profile through their sequences. It is the same logic here and it can run as a stand-alone process.
- Launch Workflow for Profile Visit
- Await success Webhook
- Get results
- Update data model to track the visit action as part of the campaign report
Data Models
Overview
The following data model is, again, just a quick recommendation.
Long-story short, you'll need leads that you add to campaigns.
lighter version
In the lighter version above, all attribute are attached to the Leads and everything is managed from this table.
ideal version - recommended
Connections
You should probably "centralize" connections, i.e. there's a high probability that User A has similar connections that User B.
We recommend creating a join between Users and Connections, as described in UsersConnections.
Not doing this would mean that you'll handle duplicates - given the fact that a user can have up to 30,000 connections, this can quickly become a burden for your database.
Don't forget to save & add "connected_at" to know when both accounts connected.
Messages
Make sure to save "delivered_at" under the timestamp format - it is very important because there are no message's ID so this is the only way to sort messages by time and veryfing you didn't save the message previously.
Automation APIs to use
- Extract LinkedIn People Profile
- Visit LinkedIn Profile
- Connect LinkedIn Profile
- Message LinkedIn Profile
- Extract LinkedIn Connections
- (Optional) Withdraw LinkedIn Pending Invitations
- (Optional) Extract LinkedIn Conversations
- (Optional) Extract LinkedIn Messages
- (Optional) Enrich LinkedIn User Contact Information
Best practices
🚨 Make sure to validate incoming LinkedIn URLs:
- A linkedin_profile_url always has this pattern "linkedin.com/in/"
- A linkedin_company_url always has this pattern linkedin.com/company/
A simple validity check will make sure you don't end up pushing useless leads in a campaign.
🚨 Make sure to differentiate IDs for LinkedIn and Sales Navigator.
You'll see that we differentiate the two, there's a reason for that!
You should track leads interaction with linkedin_profile_id when possible since it's immutable. Make sure to save the sales_navigator_profile_id as it will help you trigger some automations later down the line and always regenerate the linkedin_profile_url.
Note: that you can't use this in a URL like "www.linkedin.com/in/linkedin_profile_id",but you can use "www.linkedin.com/in/sales_navigator_profile_id".
👨💻 Implementation Guides
Basics
👾 Enrich Leads to enrol
You basically use the LinkedIn Account of the sender of the sequence to extract the profile of the contacts to enrol.
You will get many data field to save amongst which you will find the connexion degree between the lead and the sender.
When your sender is not connected to the lead, you will schedule the connexion requests. to achieve this, use this automation: Extract LinkedIn People Profile
💬 Send connection requests
Use this workflow to trigger the action of sending a connexion request: Connect LinkedIn Profile
You can schedule all your request at once, we will queue and manage the daily limits for you.
🕐 Pending requests
We recommend that you implement a system to keep track of pending requests.
For example, inside the Leads schema, you could have a "pending_over_age_limit" field to track if the request had been initiated more than 20 days ago.
To unclutter your user's sent invitations, you may want to use the automation (optional) Withdraw LinkedIn Pending Invitations.
Make sure to track if an invitation has been withdrawn, and update accordingly the lead's status.
📊 Building a report
To give your users a great experience, we recommend keeping track of the following:
- sent or invited once an invite has been sent
- you could also "double" this by adding the pending notification status
- accepted once a lead is connected and/or has accepted
- then it's a mix of follow-up's status that we'll let you implement depending on how you implemented this :)
- replied which is pretty obvious
- exit if you have exit conditions
💽 Data to store on your back-end
Mostly described above in your recommended simplified data model, you'll need to store:
- linkedin_profile_id - great for de-dup & general ID
- linkedin_profile_handle - great to generate a profile's URL
- sales_navigator_profile_id - can always be useful
- linkedin_thread_id - to fetch conversation's messages
- delivered_at - for messages under the timestamp format is very important because there are no message's ID so this is the only way to sort messages by time and verifying you didn't save the message previously
More
👥 Extract your user's connections
In our own simplified sequence system, we refresh sync connections every 6 hours.
The reason are multiple:
- every account will be limited to 100 new connections per week, the default batch is 25 / day sending 5 requests every 30 minutes
- the pagination returns 40 connections
So even in a day, you've got the time to optimize this.
Also it's generally a good idea to wait a bit before sending a follow-up message.
So if your lead accepted the connection Monday at 10pm, the optimal next message would be in a day or so.
As we mentioned, this totally up to you anyway!
💬 Extract your user's conversations & messages
You can easily get all conversations and messages to leverage within your product.
Use the following automations:
Here is how you can handle the process:
🤖 More Actions: Profiles Visits, Liking a post, ... let use know!
Many more actions are possible to do. A few examples to enhance your sequence system:
- Visit LinkedIn Profile: does the action of visiting a LinkedIn profile on behalf of the user
- Like LinkedIn Post: allows to like a post of behalf of a user