Automate Engaging Comments on LinkedIn for a Specific Topic with Uxer's AI Automation Assistant

Description:

This template automates the process of searching for a specific topic (e.g., AI Automation) on LinkedIn, sorting posts by the latest, and engaging with the content using Uxer’s AI Assistant. The scenario finds posts, opens them in full view, generates a personalized comment using Uxer’s AI, and submits the comment.


How to Use It:

  1. Copy and paste this template into Uxer’s scenario builder.
  2. Ensure that you are logged into LinkedIn in Chrome before running the scenario.
  3. Save and run the scenario to automate searching, viewing, and commenting on LinkedIn posts.

Step-by-Step Process for Setting Up Your Automation Scenario

  1. Open Chrome and Navigate to LinkedIn
    The scenario opens Chrome and navigates to LinkedIn, with incognito mode disabled to ensure the user remains logged into their account.

    OpenBrowser Chrome "https://www.linkedin.com" -Incognito false
    
  2. Search for the Topic
    The script clicks on the search bar, writes the specified topic (e.g., AI Automation), and submits the search by sending the ENTER key.

    Click Text "Search"
    Write "AI Automation"
    SendKeys ENTER
    
  3. Filter by Posts
    The scenario clicks on the “Posts” filter to show only posts related to the topic.

    Click Text "Posts"
    
  4. Sort by “Latest”
    The scenario sorts posts by selecting the “Latest” option. It first searches for the “Sort by” text and retries if necessary. In cases where the text appears as “Sortby” without a space, the scenario adjusts with a lower retry count for faster execution. This step accommodates variations in how the sorting option is displayed, ensuring smooth performance.

    Click Text "Sort by"  -Retry 3 -WhenFails continue
    Click Text "Sortby" -Retry 1 -WhenFails continue
    
  5. Click on “Latest” and Show Results
    The scenario selects the “Latest” sorting option to display the most recent posts and confirms by clicking “Show results.”

    Click Text "Latest"
    Click Text "Show results"
    
  6. Click on the “More” Button
    The script clicks the “More” button (identified by an image) to access additional actions for the post.

    Click Image {ux_linkedin_more}
    
  7. Click “Copy link to post”
    This step clicks on the “Click link to post” text. Due to the instability of OCR for this particular text, the scenario strategically clicks 40 pixels below the “Save” text to ensure proper functionality and avoid misclicks.

    Click Text "Save"  -YMargin 40
    
  8. View the Post
    For longer posts, instead of relying on the “More” button, which may not always be visible, the scenario selects “View post” to open the full content in a new window. This approach guarantees full access to the post and its details.

    Click Text "View post"
    
  9. Ensure Full Page is Loaded
    The script checks for the visibility of the text “view full,” which could either be “view full page” or “view full profile.” This ensures the page has fully loaded regardless of the variation of the text.

    IsVisible Text "view full"
    
  10. Generate a Personalized Comment Using AskUxer
    Uxer’s AI Assistant generates a supportive and engaging comment based on the post’s content. The comment is customized to encourage further conversation and avoid generic responses or unfulfillable promises. The script uses a screenshot of the post for context.

{Response} = AskUxer "Please create a positive and engaging comment for the provided LinkedIn post screenshot. Make it supportive, highlight key points or achievements from the post, and encourage further conversation. Avoid generic responses and personalize it based on the content. Avoiding any statements about actions or promises I cannot fulfill. The comment should be in the same language as the post." -UseScreenshot true
  1. Scroll to the Comment Section
    The scenario scrolls down until the comment section becomes visible, ensuring the comment area is in view.
Scroll 5 -UntilVisible Image {ux_linkedin_comment}
  1. Post the Comment
    The script clicks on the comment area, writes the generated response, and submits the comment.
Click Image {ux_linkedin_comment}
Write {Response}
  1. Ensure Visibility of the Comment Button
    If the comment button becomes hidden after writing, the scenario scrolls twice to ensure it is visible again.
Scroll 2
  1. Submit the Comment
    The scenario clicks the “Comment” button which is the second comment text to finalize the comment submission.
Click Text "Comment" [1]

Complete Script:

OpenBrowser Chrome "https://www.linkedin.com" -Incognito false
Click Text "Search"
Write "AI Automation"
SendKeys ENTER
Click Text "Posts"
Click Text "Sort by"  -Retry 3 -WhenFails continue
Click Text "Sortby" -Retry 1 -WhenFails continue
Click Text "Latest"
Click Text "Show results"
Click Image {ux_linkedin_more}
Click Text "Save"  -YMargin 40
Click Text "View post"
IsVisible Text "view full"
{Response} = AskUxer "Please create a positive and engaging comment for the provided LinkedIn post screenshot. Make it supportive, highlight key points or achievements from the post, and encourage further conversation. Avoid generic responses and personalize it based on the content. Avoiding any statements about actions or promises I cannot fulfill. The comment should be in the same language as the post." -UseScreenshot true
Scroll 5 -UntilVisible Image {ux_linkedin_comment}
Click Image {ux_linkedin_comment}
Write {Response}
Scroll 2
Click Text "Comment" [1]

Let us know if you need further assistance or need any other template!