> ## Documentation Index
> Fetch the complete documentation index at: https://docs.smooth.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Social media automation

> Automate actions on social media using Smooth

## 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.

<Steps>
  <Step title="Launch Session and Authenticate">
    Create a profile and session for LinkedIn. The profile will persist your authentication cookies.

    ```python Python theme={null}
    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.
  </Step>

  <Step title="Reuse the Profile">
    In future runs, use the same profile ID to skip manual authentication.

    ```python Python theme={null}
    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}")
    ```
  </Step>
</Steps>

## 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.

<Note>
  Always follow LinkedIn's Terms of Service and use automation responsibly. Manual authentication ensures compliance with security policies while enabling powerful automation capabilities.
</Note>

## Community

<Card title="Join Discord" icon="discord" href="https://discord.gg/VcdgMwUmMG">
  Join our community for support and showcases
</Card>
