Running the pipeline

Pushing to Lemlist

When you approve a sequence in Kai, it is immediately pushed live to Lemlist. This guide explains what happens during that push, how to verify it worked, and how to diagnose the most common push failures.

What happens during a push

Approving a contact in Kai triggers these steps in sequence:

1
Lead creation

Kai calls the Lemlist API to create the contact as a lead in your campaign. If the contact already exists in Lemlist (for example, if they were previously added manually), Kai finds the existing lead and updates it rather than creating a duplicate.

2
Variable injection

Kai sends every token variable to Lemlist alongside the lead. The personalised email bodies, subject lines, LinkedIn messages, and call brief are all written onto the lead as custom variables. Lemlist stores them against the lead and injects them into each step at send time.

3
Sequence start

The lead enters the sequence in Lemlist and the first step fires according to its configured schedule. From this point, Lemlist manages the timing and execution. Kai tracks the contact's status and watches for replies.

Verifying a push worked

After approving a contact, the contact row in Kai should show status Injected within a few seconds. If it stays on Approved or shows an error, the push failed.

In Lemlist, go to your campaign's Leads tab and search for the contact's email. If the push worked, you will see them listed with all the Kai variables populated. You can preview the first email step to confirm the body and subject are showing the personalised content, not the raw token variable names.

Check one before running a batch. After setting up a new campaign, always approve and push a single contact first, then check them in Lemlist before approving the rest. This confirms the tokens are in the right fields and the personalisation is flowing through correctly.

Common push failures

Empty variable in Lemlist

If a step in Lemlist shows the raw token name (for example {{kai_email1_body}}) rather than the actual email copy, one of three things happened:

  • The token was placed in the wrong field in Lemlist. Check the subject field has a subject token and the body field has a body token.
  • The sequence structure changed after the last pull in Kai. Re-pull the steps and check the token names match what is in Lemlist.
  • The sequence failed to generate fully. Go to Approvals in Kai and check that the contact's sequence shows content in every tab.

Lead already in another Lemlist campaign

Lemlist does not allow the same email address to be active in two campaigns simultaneously. If a contact is already active in a different Lemlist campaign, the push will fail. Remove them from the other campaign first, or wait until they have finished that sequence.

Lemlist API error

If the push fails with an API error, check your Lemlist API key is correct in the .env file on the server, and that your Lemlist account is active and not over its contact limit.

Missing Lemlist Campaign ID

If the campaign in Kai has no Lemlist Campaign ID set, the push will fail immediately. Go to the campaign settings, add the cam_ ID, save, and try approving again.

After the push

Once a contact is in sequence in Lemlist, Kai continues to track them. When Lemlist receives a reply, it fires a webhook back to Kai. Kai classifies the reply (interested, not interested, out of office, referral, or other) and updates the contact's status accordingly. Interested replies trigger an alert and move the contact into your handoff flow.

You can see all contacts currently in sequence in the In Sequence tab in Kai, and all replies in the Replies tab.

Previous The approval flow