Skip to main content

Overview

This guide demonstrates how to use Smooth to automate sending a LinkedIn connection. You’ll learn to authenticate to LinkedIn via a live URL and then run automated tasks to connect with specific professionals.
1

Launch Session and Authenticate

Create a profile and session for LinkedIn. The profile will persist your authentication cookies.
Python
from smooth import SmoothClient

client = SmoothClient()

# Create the profile first (only needed once)
client.create_profile(profile_id="linkedin-automation")

with client.session(profile_id="linkedin-automation", url="https://www.linkedin.com") as session:
    # Get the live URL for manual authentication
    print(f"Please log in at: {session.live_url()}")

    # Wait for user to authenticate
    input("Press Enter after you've logged in to LinkedIn...")

    # Now run tasks in the authenticated session
    result = session.run_task(
        task="""
        Search for "Antonio Vespoli Circlemind" on LinkedIn.
        Find his profile and send a connection request with the message:
        "Hi Antonio, I love Smooth. Would love to connect!"
        """
    )

    print(f"Agent response: {result.output}")
Open the live_url in your browser and log in to LinkedIn. Once authenticated, press Enter to continue.
2

Reuse the Profile

In future runs, use the same profile ID to skip manual authentication.
Python
with client.session(profile_id="linkedin-automation", url="https://www.linkedin.com/feed") as session:
    result = session.run_task(
        task="Like the first 3 posts"
    )

    print(f"Agent response: {result.output}")

Advanced Use Cases

  • Bulk Connections: Connect with multiple professionals in your industry
  • Content Engagement: Automatically like and comment on posts from your network on Twitter, Linkedin, and more
  • Lead Generation: Find and connect with potential customers or partners
  • Profile Management: Update your status, share content, or manage your profile

Best Practices

  • Respect Rate Limits: LinkedIn has strict limits on daily connection requests
  • Respect Website Terms: Use your best judgment to respect the website Terms of Service.
Always follow LinkedIn’s Terms of Service and use automation responsibly. Manual authentication ensures compliance with security policies while enabling powerful automation capabilities.

Community

Join Discord

Join our community for support and showcases