Weekday LinkedIn invites with a personalized icebreaker

By General Input

Every weekday at 9am, send each pending contact in your Google Sheet a personalized LinkedIn invite and log the outcome back to the row.

Integrations

  • Google Sheets
  • Unipile

Type

Deterministic Code

Categories

  • Sales

Build a code workflow that works through my LinkedIn outbound queue in Google Sheets every weekday at 9am ET and sends each pending contact a personalized connection invitation.

Trigger: cron, weekdays (Mon-Fri) at 9:00 America/New_York.

Inputs I supply at run configuration: the Google Sheets spreadsheet ID and the queue tab name (default "Queue"). Assume row 1 is headers with columns: LinkedIn URL, Name, Reason, Status, Sent At, Icebreaker Sent, Error.

Step 1: Use Google Sheets Get Values on the queue tab to read all rows. Filter in code to rows where Status is empty or exactly "Pending" and the LinkedIn URL column is non-empty. Cap the batch at 20 rows per run so we stay well below LinkedIn's daily invite ceiling.

Step 2: For each pending row, extract the LinkedIn public handle from the profile URL (e.g. https://www.linkedin.com/in/satyanadella/ becomes satyanadella). Call Unipile Retrieve User Profile with that handle to pull the recipient's first name, title (headline job), current company, and full headline.

Step 3: Feed the recipient's name, title, company, headline, and the row's Reason column into a built-in AI generation step. Ask it to write a two-sentence icebreaker under 300 characters (LinkedIn's connection-note limit), warm and specific to the Reason, no emojis, no exclamation marks, no em dashes. Trim to 297 characters if longer, appending an ellipsis.

Step 4: Call Unipile Send Invitation with the profile identifier returned by Retrieve User Profile and the generated note as the message body.

Step 5: Use Google Sheets Update Values to write back to the same row: Status = "Invited", Sent At = current ISO timestamp in America/New_York, Icebreaker Sent = the exact note that was sent, Error = blank. On any error from Unipile, instead set Status = "Failed: <short reason>" and put the full error message in the Error column, then continue with the next row (never abort the whole run).

Between invites, sleep 3-5 seconds so the pacing looks human. At the end of the run, log a summary line to the workflow output with counts for sent, failed, and skipped.

Both integrations are already public: Google Sheets (Get Values, Update Values) and Unipile (Retrieve User Profile, Send Invitation). Use those exact operations.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentLocal listing health board for every location you manageLet support send one-off Loops emails without an engineerStop cold emails to anyone with a live deal in PipedriveiMessage campaign console with pre-flight checks and delivery boardLinkedIn Ads budget pacing dashboard for every client accountFront desk appointment confirmation board for the next 3 daysGive your team Looker numbers without buying more seatsBuild audience segments from product usage and push to LoopsTurn the people who engage with your posts into Pipedrive leads