ConnectSafely
Workflows by ConnectSafely
Send personalized LinkedIn DMs to profile visitors with ConnectSafely.ai and Google Sheets
# Send Personalized DMs to LinkedIn Profile Visitors ## Who's it for This workflow is built for sales professionals, recruiters, founders, and networkers who want to automatically reach out to people who viewed their LinkedIn profile. Perfect for anyone who knows that profile visitors are warm leads but doesn't have time to manually check who visited, craft personalized messages, and send outreach one by one. If you're doing outbound sales, recruiting talent, building partnerships, or simply want to convert curiosity into conversations, this automation turns passive profile views into active outreach opportunities. ## How it works The workflow automatically identifies LinkedIn profile visitors and sends them personalized messages based on their connection status. **The process flow:** 1. Scheduled trigger runs weekly (or manually) to fetch recent profile visitors 2. ConnectSafely.ai API retrieves all visitors from the past 7 days 3. Splits visitors into individual records for processing 4. Checks Google Sheets to avoid messaging the same person twice 5. Routes based on connection degree: - **1st-degree connections** → Sends a personalized DM - **2nd/3rd-degree connections** → Sends a connection request with message 6. Logs all outreach to Google Sheets for tracking 7. Waits between messages to maintain natural activity patterns 8. Loop continues until all visitors are processed --- ## Setup steps ### Step 1: Configure ConnectSafely.ai API Credentials #### Obtain API Key 1. Create an account at [ConnectSafely.ai](https://connectsafely.ai) 2. Connect your LinkedIn account in the dashboard 3. Navigate to **Settings** → **API Keys** 4. Generate a new API key #### Add Bearer Auth Credential in n8n 1. Go to **Credentials** in n8n 2. Click **Add Credential** → **HTTP Bearer Auth** 3. Name it "ConnectSafely.ai API" 4. Paste your API key 5. Save the credential This credential is used by all three HTTP Request nodes: Fetch Profile Visitors, Send DM, and Send Connection Request. ### Step 2: Configure Google Sheets Integration #### 2.1 Create Your Tracking Sheet Create a new Google Sheet with the following columns: | Column Name | Description | |-------------|-------------| | `Name` | Visitor's full name | | `Linkedin URL` | Visitor's profile URL | | `Status` | Outreach status (DONE) | #### 2.2 Connect Google Sheets Account 1. Go to **Credentials** → **Add Credential** → **Google Sheets OAuth2** 2. Follow the OAuth flow to connect your Google account 3. Grant access to Google Sheets #### 2.3 Update All Google Sheets Nodes There are three Google Sheets nodes that need configuration: 1. **Check if Already Contacted** - Looks up existing contacts 2. **Log DM Sent to Sheet** - Records DMs sent 3. **Log Connection Request to Sheet** - Records connection requests For each node: 1. Open the node 2. Replace `YOUR_GOOGLE_SHEET_ID` with your actual sheet ID (from the URL) 3. Select the correct sheet name 4. Save ### Step 3: Customize Your Message Templates The workflow includes two Code nodes with message templates that you **must customize**: #### For Connected Users (DMs) Open the **"Generate DM for Connected User"** node and update: ```javascript // Sender footer - CUSTOMIZE THIS const footer = `\n\n— Your Name`; // Message bodies - CUSTOMIZE THESE const messages = [ "Noticed you recently checked out my profile... I've been working on [YOUR PRODUCT] — [BRIEF DESCRIPTION].", // Add more variations... ]; ``` #### For New Connections (Connection Requests) Open the **"Generate Message for New Connection"** node and update the same sections with your product/service details. **Tips for good messages:** - Keep under 300 characters for connection requests - Personalize with their name (already included) - Mention something specific about why you're reaching out - Include a clear but soft call-to-action - Have 3-5 variations to avoid repetitive messaging ### Step 4: Adjust the Schedule 1. Open the **Weekly Schedule Trigger** node 2. Adjust based on your profile traffic: - High traffic: Daily - Medium traffic: Every 3 days - Low traffic: Weekly (default) ### Step 5: Test the Workflow 1. Click **Test Workflow** on the Schedule Trigger or add a Manual Trigger 2. Verify: - Profile visitors are fetched correctly - Deduplication works (no existing contacts get messaged) - Connection degree routing works properly - Messages are personalized with visitor names - Google Sheets logs entries correctly --- ## Customization ### Time Range for Visitors Edit the JSON body in the **Fetch Profile Visitors** node: ```json {"timeRange":"past_7_days","start":0,"fetchAll":true} ``` Options: - `past_7_days` - Last week's visitors (default) - `past_30_days` - Last month's visitors - `past_90_days` - Last quarter's visitors ### Message Personalization Both Code nodes support multiple message variations. The workflow randomly selects one for each visitor, making your outreach feel more natural. To add more variations: 1. Open the relevant Code node 2. Add new message strings to the `messages` array 3. Use placeholders like `[YOUR PRODUCT]` and replace with your actual content ### Wait Time Between Messages The **Wait Between Messages** node adds delays between outreach. Adjust the duration to: - Increase if you want more conservative pacing - Decrease if you have premium LinkedIn and higher limits Recommended: 1-5 minutes between messages ### Add More Tracking Fields To track additional data in Google Sheets: 1. Add columns to your sheet (e.g., `Message Sent`, `Connection Degree`, `Date`) 2. Update the Google Sheets nodes to map these new fields 3. Pull data from the workflow context using expressions ### Filter by Company or Title Want to only message visitors from specific companies or with certain titles? 1. Add an **IF** node after **Skip if Already Contacted** 2. Add conditions based on visitor data fields 3. Route non-matching visitors directly to the Wait node --- ## Use Cases - **Sales Prospecting**: Automatically reach out to decision-makers who are researching you before a sales cycle - **Recruiting**: Engage passive candidates who are checking out your profile after seeing job posts - **Founder Networking**: Connect with investors, partners, and potential hires who show interest - **Consulting/Freelance**: Convert profile visitors into discovery calls by reaching out while you're top of mind - **Personal Branding**: Build your network by engaging everyone who takes time to view your profile --- ## Troubleshooting ### Common Issues & Solutions **Issue**: No visitors returned from API - **Solution**: Ensure your LinkedIn account is connected in ConnectSafely.ai dashboard. Also verify you've had recent profile views (check LinkedIn's native viewer count). **Issue**: Duplicate messages being sent - **Solution**: Verify the Google Sheets lookup is working correctly. Check that the `Linkedin URL` column matches exactly what the API returns. Make sure all three Google Sheets nodes point to the same sheet. **Issue**: Messages not sending - **Solution**: Check your ConnectSafely.ai API key is valid. Verify the HTTP Request nodes have the Bearer Auth credential attached. Check the API response for error messages. **Issue**: Wrong message type sent (DM vs Connection Request) - **Solution**: The routing is based on `connectionDegree` field. Verify this field is being returned correctly from the API. Check the **Check if 1st Degree Connection** node conditions. **Issue**: Profile ID extraction failing - **Solution**: The **Extract Profile ID from URL** Code node parses the LinkedIn URL. Check that visitors have valid `navigationUrl` values. **Issue**: Google Sheets not updating - **Solution**: Verify your Google Sheets credential has write access. Check that the sheet ID is correct and the sheet name matches. **Issue**: Rate limit errors - **Solution**: Increase the wait time in the **Wait Between Messages** node. Consider reducing the frequency of the schedule trigger. --- ## Rate Limiting Best Practices LinkedIn monitors automated activity. To stay safe: - **Start slow**: Begin with 10-15 messages per day - **Gradually increase**: Add 5 more per week up to 50/day max - **Use random delays**: The workflow includes built-in waits - **Pause if warned**: If LinkedIn shows any warnings, stop for 24-48 hours - **Keep messages personal**: Avoid spammy, salesy language - **Don't run 24/7**: Schedule during business hours --- ## Costs & Considerations | Service | Cost | |---------|------| | ConnectSafely.ai | Free trial available, then subscription | | Google Sheets | Free | | n8n | Free (self-hosted) or cloud pricing | **No per-message costs** - ConnectSafely.ai subscription includes API access for messaging. --- ## Documentation & Resources ### Official Documentation - **ConnectSafely.ai Docs**: [https://connectsafely.ai/docs](https://connectsafely.ai/docs) - **ConnectSafely.ai API Reference**: Available in dashboard - **Google Sheets API**: [https://developers.google.com/sheets](https://developers.google.com/sheets) ### Support Channels - **Email Support**: [[email protected]](mailto:[email protected]) - **Documentation**: [https://connectsafely.ai/docs](https://connectsafely.ai/docs) - **Custom Workflows**: [Contact us for custom automation](https://connectsafely.ai/contact) --- ## Connect With Us Stay updated with the latest automation tips and LinkedIn strategies: - **LinkedIn**: [linkedin.com/company/connectsafelyai](https://www.linkedin.com/company/connectsafelyai) - **YouTube**: [youtube.com/@ConnectSafelyAI-v2x](https://www.youtube.com/@ConnectSafelyAI-v2x) - **Instagram**: [instagram.com/connectsafely.ai](https://www.instagram.com/connectsafely.ai/) - **Facebook**: [facebook.com/connectsafelyai](https://www.facebook.com/people/ConnectSafelyAI/61582550884724/) - **X (Twitter)**: [x.com/AiConnectsafely](https://x.com/AiConnectsafely) - **Bluesky**: [connectsafelyai.bsky.social](https://bsky.app/profile/connectsafelyai.bsky.social) - **Mastodon**: [mastodon.social/@connectsafely](https://mastodon.social/@connectsafely) --- ## Need Custom Workflows? Looking to build sophisticated LinkedIn automation workflows tailored to your business needs? **[Contact our team](https://connectsafely.ai/contact)** for custom automation development, strategy consulting, and enterprise solutions. We specialize in: - Multi-channel engagement workflows - AI-powered personalization at scale - Lead scoring and qualification automation - CRM integration and data synchronization - Custom reporting and analytics pipelines
Add LinkedIn post commenters to HubSpot CRM with Apify enrichment
# Add LinkedIn Post Commenters to HubSpot CRM ## Who's it for This workflow is built for content creators, sales professionals, founders, and marketers who post regularly on LinkedIn and want to convert engaged commenters into CRM leads automatically. Perfect for anyone who gets decent engagement on their posts but struggles to manually capture and follow up with everyone who comments. If you're running thought leadership campaigns, generating inbound interest through content, or simply want to build relationships with people who engage with your posts, this automation captures every commenter and enriches them with full professional data before syncing to your CRM. ## How it works The workflow automatically captures LinkedIn post commenters and adds them to HubSpot CRM with enriched professional data. **The process flow:** 1. Submit a LinkedIn post URL via a simple form trigger 2. ConnectSafely.ai fetches all comments from the specified post 3. Splits commenters into individual records for processing 4. Loops through each commenter one at a time 5. Apify actor enriches each profile with complete LinkedIn data (email, company, title, location) 6. Email validation filters contacts - only those with valid emails proceed 7. HubSpot integration creates or updates contacts with full enriched information 8. Loop continues until all commenters are processed --- Watch the complete step-by-step implementation guide: [](https://www.youtube.com/watch?v=hzYsKUDVffo) --- ## Setup steps ### Step 1: Install the ConnectSafely Community Node This workflow requires the ConnectSafely community node, which is only available on self-hosted n8n instances. 1. In n8n, go to **Settings** → **Community Nodes** 2. Click **Install a community node** 3. Enter: `n8n-nodes-connectsafely-ai` 4. Click **Install** 5. Restart n8n if prompted **Note:** Community nodes are not available on n8n Cloud. You'll need a self-hosted instance. ### Step 2: Configure ConnectSafely.ai API Credentials #### Obtain API Key 1. Create an account at [ConnectSafely.ai](https://connectsafely.ai) 2. Connect your LinkedIn account in the dashboard 3. Navigate to **Settings** → **API Keys** 4. Generate a new API key #### Add Credential in n8n 1. Go to **Credentials** in n8n 2. Click **Add Credential** → Search for **ConnectSafely API** 3. Paste your API key 4. Save the credential #### Connect to the Node 1. Open the **🔍 Fetch All Comments** node 2. Select your ConnectSafely API credential ### Step 3: Configure Apify Integration #### Get Apify API Key 1. Sign up at [Apify.com](https://apify.com) 2. Go to **Settings** → **Integrations** → **API** 3. Copy your API token #### Add Apify Credential in n8n 1. Go to **Credentials** → **Add Credential** → **Apify API** 2. Paste your Apify API token 3. Save the credential #### Configure the Apify Node 1. Open the **Run an Actor and get dataset** node 2. Select your Apify credential 3. The actor URL is pre-configured to use the LinkedIn enrichment actor: `https://console.apify.com/actors/UMdANQyqx3b2JVuxg` ### Step 4: Configure HubSpot Integration #### Create HubSpot App Token 1. Go to HubSpot **Settings** → **Integrations** → **Private Apps** 2. Click **Create a private app** 3. Name it "n8n LinkedIn Commenters Sync" 4. Under **Scopes**, enable: - `crm.objects.contacts.read` - `crm.objects.contacts.write` 5. Click **Create app** and copy the access token #### Add HubSpot Credential in n8n 1. Go to **Credentials** → **Add Credential** → **HubSpot App Token** 2. Paste your access token 3. Save the credential #### Connect to HubSpot Node 1. Open the **Create or update a contact** node 2. Select your HubSpot App Token credential ### Step 5: Test the Workflow 1. Click **Test Workflow** to get the form URL 2. Open the form URL in your browser 3. Paste a LinkedIn post URL that has comments 4. Submit the form 5. Verify: - Comments are fetched correctly - Enrichment returns full profile data - Contacts with emails are created in HubSpot - Contacts without emails are skipped gracefully --- ## Customization ### Additional HubSpot Fields The **Create or update a contact** node maps these fields by default: - First Name - Last Name - Email - Job Title - Company Name - City - Country - Street Address To add more fields: 1. Open the **Create or update a contact** node 2. Click **Add Field** under Additional Fields 3. Map Apify output fields to HubSpot properties Available Apify fields include: - `06_Linkedin_url` - LinkedIn profile URL - `07_Title` - Current job title - `08_Summary` - Profile summary - `16_Company_name` - Current company - `17_Company_industry` - Industry ### Add Lead Source Tracking To track that these contacts came from LinkedIn comments: 1. Open the **Create or update a contact** node 2. Add a custom field: `leadSource` = `LinkedIn Post Comment` 3. Optionally add the post URL as a note ### Filter by Comment Quality Want to skip low-effort comments like "Great post!" or emoji-only responses? 1. Add an **IF** node after **📤 Split Comments Array** 2. Filter based on comment text length or content 3. Only process comments with meaningful engagement ### Different CRM Integration To use a different CRM instead of HubSpot: 1. Delete the **Create or update a contact** node 2. Add your CRM node (Salesforce, Pipedrive, Zoho, etc.) 3. Map the enriched fields to your CRM's contact properties 4. Connect it to the "Check if Contact is eligible" true output ### Add Slack Notifications Get notified when high-value commenters are captured: 1. Add a Slack node after **Create or update a contact** 2. Filter for specific job titles (VP, Director, CEO, etc.) 3. Send a message to your sales channel with commenter details --- ## Use Cases - **Content-Led Sales**: Automatically capture decision-makers who engage with your thought leadership posts - **Event Promotion**: Sync everyone who comments on event announcements to your follow-up list - **Product Launches**: Build a list of interested prospects from launch announcement engagement - **Recruiting**: Capture professionals who engage with hiring posts or company culture content - **Community Building**: Track engaged community members across multiple posts over time --- ## Troubleshooting ### Common Issues & Solutions **Issue**: ConnectSafely node not appearing in n8n - **Solution**: Restart n8n after installing the community node. If still missing, verify the installation in Settings → Community Nodes. **Issue**: "Comments not loading" or empty results - **Solution**: Ensure the post URL is the full URL from LinkedIn (e.g., `https://www.linkedin.com/posts/username_activity-1234567890/`), not a shortened version. Also verify the post actually has comments. **Issue**: Apify enrichment returning empty results - **Solution**: Verify the LinkedIn URL format from the commenter profile is correct. Check your Apify actor is running properly and hasn't hit rate limits. **Issue**: HubSpot contact not created - **Solution**: Check that your HubSpot App Token has `crm.objects.contacts.write` scope enabled. Verify the email field is mapping correctly. **Issue**: Duplicate contacts in HubSpot - **Solution**: HubSpot uses email as the unique identifier. The node is configured to "Create or Update" so duplicates should be updated, not created. **Issue**: Rate limit errors from Apify - **Solution**: The loop processes one commenter at a time, but you can add a **Wait** node inside the loop with 2-5 second delays if needed. **Issue**: Missing email addresses for most commenters - **Solution**: This is normal - enrichment typically finds emails for 60-70% of profiles. Consider adding LinkedIn URL as a fallback identifier in your CRM. --- ## Costs & Considerations | Service | Cost | |---------|------| | ConnectSafely.ai | Free trial available, then subscription | | Apify Enrichment | ~$1 per 1,000 records | | HubSpot | Free tier works, or existing subscription | | n8n | Free (self-hosted required for community nodes) | **Estimated cost per post with 50 commenters**: ~$0.05 for Apify enrichment --- ## Documentation & Resources ### Official Documentation - **ConnectSafely.ai Docs**: [https://connectsafely.ai/docs](https://connectsafely.ai/docs) - **Apify LinkedIn Actors**: [https://apify.com/store](https://apify.com/store) - **HubSpot API**: [https://developers.hubspot.com](https://developers.hubspot.com) ### Support Channels - **Email Support**: [[email protected]](mailto:[email protected]) - **Documentation**: [https://connectsafely.ai/docs](https://connectsafely.ai/docs) - **Custom Workflows**: [Contact us for custom automation](https://connectsafely.ai/contact) --- ## Connect With Us Stay updated with the latest automation tips and LinkedIn strategies: - **LinkedIn**: [linkedin.com/company/connectsafelyai](https://www.linkedin.com/company/connectsafelyai) - **YouTube**: [youtube.com/@ConnectSafelyAI-v2x](https://www.youtube.com/@ConnectSafelyAI-v2x) - **Instagram**: [instagram.com/connectsafely.ai](https://www.instagram.com/connectsafely.ai/) - **Facebook**: [facebook.com/connectsafelyai](https://www.facebook.com/people/ConnectSafelyAI/61582550884724/) - **X (Twitter)**: [x.com/AiConnectsafely](https://x.com/AiConnectsafely) - **Bluesky**: [connectsafelyai.bsky.social](https://bsky.app/profile/connectsafelyai.bsky.social) - **Mastodon**: [mastodon.social/@connectsafely](https://mastodon.social/@connectsafely) --- ## Need Custom Workflows? Looking to build sophisticated LinkedIn automation workflows tailored to your business needs? **[Contact our team](https://connectsafely.ai/contact)** for custom automation development, strategy consulting, and enterprise solutions. We specialize in: - Multi-channel engagement workflows - AI-powered personalization at scale - Lead scoring and qualification automation - CRM integration and data synchronization - Custom reporting and analytics pipelines
Sync LinkedIn profile visitors into HubSpot CRM leads with ConnectSafely.ai and Apify
# Sync LinkedIn Profile Visitors to HubSpot CRM ## Who's it for This workflow is built for sales professionals, recruiters, founders, and marketers who want to automatically capture LinkedIn profile visitors and convert them into actionable CRM leads. Perfect for anyone tired of manually checking who viewed their profile, copying data one by one, and losing warm leads because they never made it into your pipeline. If you're running outbound sales, recruiting talent, building partnerships, or simply want to know who's checking you out on LinkedIn, this automation captures every visitor and enriches them with full professional data before syncing to your CRM. ## How it works The workflow automatically syncs your LinkedIn profile visitors to HubSpot CRM with enriched professional data. **The process flow:** 1. Scheduled trigger runs weekly (or manually) to fetch recent visitors 2. ConnectSafely.ai API retrieves all profile visitors from the past 7 days 3. Splits visitors into individual records for processing 4. Apify actor enriches each visitor with complete LinkedIn profile data (email, company, title, location) 5. Email validation filters contacts - only those with valid emails proceed 6. HubSpot integration creates or updates contacts with full enriched information 7. Loop continues until all visitors are processed --- ## Setup steps ### Step 1: Configure ConnectSafely.ai API Credentials #### Obtain API Key 1. Log into [ConnectSafely.ai Dashboard](https://connectsafely.ai/dashboard) 2. Navigate to **Settings** → **API Keys** 3. Generate a new API key #### Add Bearer Auth Credential in n8n 1. Go to **Credentials** in n8n 2. Click **Add Credential** → **Header Auth** or **HTTP Bearer Auth** 3. Name it "ConnectSafely.ai API" 4. Paste your ConnectSafely.ai API key 5. Save the credential This credential is used by the "Fetch Profile Visitors" HTTP Request node. ### Step 2: Configure Apify Integration #### Get Apify API Key 1. Sign up at [Apify.com](https://apify.com) 2. Go to **Settings** → **Integrations** → **API** 3. Copy your API token #### Find the LinkedIn Enrichment Actor 1. Go to [Apify Store](https://apify.com/store) 2. Search for "LinkedIn Profile Scraper" or use actor ID: `UMdANQyqx3b2JVuxg` 3. Copy the actor URL #### Add Apify Credential in n8n 1. Go to **Credentials** → **Add Credential** → **Apify API** 2. Paste your Apify API token 3. Save the credential #### Configure the Apify Node 1. Open the **Enrich LinkedIn Profile** node 2. Select your Apify credential 3. Update the Actor ID URL with your chosen LinkedIn scraper actor ### Step 3: Configure HubSpot Integration #### Create HubSpot App Token 1. Go to HubSpot **Settings** → **Integrations** → **Private Apps** 2. Click **Create a private app** 3. Name it "n8n LinkedIn Sync" 4. Under **Scopes**, enable: - `crm.objects.contacts.read` - `crm.objects.contacts.write` 5. Click **Create app** and copy the access token #### Add HubSpot Credential in n8n 1. Go to **Credentials** → **Add Credential** → **HubSpot App Token** 2. Paste your access token 3. Save the credential #### Connect to HubSpot Node 1. Open the **Create HubSpot Contact** node 2. Select your HubSpot App Token credential ### Step 4: Configure the Schedule 1. Open the **Run Weekly** node 2. Adjust the schedule based on your needs: - Default: Every week - High traffic profiles: Every day - Low traffic: Every 2 weeks ### Step 5: Test the Workflow 1. Click the **Test Manually** node 2. Click **Test Workflow** 3. Verify: - Profile visitors are fetched correctly - Enrichment returns full profile data - Contacts with emails are created in HubSpot - Contacts without emails are skipped gracefully --- ## Customization ### Time Range Adjustment Edit the JSON body in the **Fetch Profile Visitors** node to change the lookback period: ```json {"timeRange":"past_7_days","start":0,"fetchAll":true} ``` Options: - `past_7_days` - Last week's visitors (default) - `past_30_days` - Last month's visitors - `past_90_days` - Last quarter's visitors ### Additional HubSpot Fields The **Create HubSpot Contact** node maps these fields by default: - First Name - Last Name - Email - Job Title - Company Name - City - Country - Street Address - LinkedIn URL - Lead Status (set to "NEW") To add more fields: 1. Open the **Create HubSpot Contact** node 2. Click **Add Field** under Additional Fields 3. Map Apify output fields to HubSpot properties ### Different CRM Integration To use a different CRM instead of HubSpot: 1. Delete the **Create HubSpot Contact** node 2. Add your CRM node (Salesforce, Pipedrive, Zoho, etc.) 3. Map the enriched fields to your CRM's contact properties 4. Connect it to the "Has Valid Email" true output ### Add Slack Notifications Want to get notified when high-value visitors are captured? 1. Add a Slack node after **Create HubSpot Contact** 2. Filter for specific job titles or companies 3. Send a message to your sales channel --- ## Use Cases - **Sales Prospecting**: Automatically capture decision-makers who are researching you before outreach - **Recruiting**: Build a passive candidate pipeline from people checking out your profile - **Founder Networking**: Know when investors, partners, or potential hires are interested - **Account-Based Marketing**: Track when target account contacts view your profile - **Event Follow-up**: Capture visitors who checked you out after conferences or webinars --- ## Troubleshooting ### Common Issues & Solutions **Issue**: No visitors returned from API - **Solution**: Ensure your LinkedIn account is connected in ConnectSafely.ai dashboard and has had recent profile views **Issue**: Apify enrichment returning empty results - **Solution**: Verify the LinkedIn URL format is correct (should be full URL like `https://www.linkedin.com/in/username`). Check your Apify actor is running properly. **Issue**: "Profile not found" errors - **Solution**: Some LinkedIn profiles may be private or have restricted visibility. These will be skipped automatically. **Issue**: HubSpot contact not created - **Solution**: Check that your HubSpot App Token has `crm.objects.contacts.write` scope enabled **Issue**: Duplicate contacts in HubSpot - **Solution**: HubSpot uses email as the unique identifier. The node is configured to "Create or Update" so duplicates should be updated, not created. Verify the email field is mapping correctly. **Issue**: Rate limit errors from Apify - **Solution**: Add a Wait node after the loop with 2-5 second delays between enrichment calls **Issue**: Missing email addresses for most visitors - **Solution**: This is normal - enrichment typically finds emails for 60-70% of profiles. Consider adding LinkedIn URL as a fallback identifier in your CRM. --- ## Costs & Considerations | Service | Cost | |---------|------| | ConnectSafely.ai | Free trial available, then subscription | | Apify Enrichment | ~$1 per 1,000 records | | HubSpot | Free tier works, or existing subscription | | n8n | Free (self-hosted) or cloud pricing | **Estimated monthly cost for 200 visitors/month**: ~$0.20 for Apify enrichment --- ## Documentation & Resources ### Official Documentation - **ConnectSafely.ai Docs**: [https://connectsafely.ai/docs](https://connectsafely.ai/docs) - **Apify LinkedIn Actors**: [https://apify.com/store](https://apify.com/store) - **HubSpot API**: [https://developers.hubspot.com](https://developers.hubspot.com) ### Support Channels - **Email Support**: [[email protected]](mailto:[email protected]) - **Documentation**: [https://connectsafely.ai/docs](https://connectsafely.ai/docs) --- ## Connect With Us Stay updated with the latest automation tips and LinkedIn strategies: - **LinkedIn**: [linkedin.com/company/connectsafelyai](https://www.linkedin.com/company/connectsafelyai) - **YouTube**: [youtube.com/@ConnectSafelyAI-v2x](https://www.youtube.com/@ConnectSafelyAI-v2x) - **Instagram**: [instagram.com/connectsafely.ai](https://www.instagram.com/connectsafely.ai/) - **X (Twitter)**: [x.com/AiConnectsafely](https://x.com/AiConnectsafely) --- ## Need Custom Workflows? Looking to build sophisticated LinkedIn automation workflows tailored to your business needs? **[Contact our team](https://connectsafely.ai/contact)** for custom automation development, strategy consulting, and enterprise solutions. We specialize in: - Multi-channel engagement workflows - AI-powered personalization at scale - Lead scoring and qualification automation - CRM integration and data synchronization - Custom reporting and analytics pipelines
Export LinkedIn search results to Google Sheets using ConnectSafely.ai API
## Who's it for This workflow is built for sales professionals, recruiters, founders, and growth marketers who need to build targeted prospect lists from LinkedIn without risking their accounts. Perfect for anyone who wants to find decision-makers, build lead lists, or research target audiences at scale. If you're running outbound campaigns, building ABM lists, sourcing candidates, or doing competitive research, this automation handles LinkedIn searches and exports results directly to your Google Sheet—no browser cookies, no session hijacking, no ban risk. ## How it works The workflow automates LinkedIn people searches by leveraging ConnectSafely.ai's compliant API, then exports structured results to Google Sheets or JSON files. **The process flow:** 1. Define your search parameters (keywords, location, job title, result limit) 2. Execute the search via ConnectSafely.ai API 3. Process and normalize the response data 4. Export to Google Sheets for CRM import or further automation 5. Optionally save as JSON file for data backup or processing No LinkedIn cookies required. No browser automation. Platform-compliant searches that won't get your account restricted. **Watch the complete step-by-step implementation guide:** [LinkedIn Search Export Automation Tutorial](https://www.youtube.com/watch?v=N4kZ3YiLh2Q) --- ## Setup steps ### Step 1: Get Your ConnectSafely.ai API Credentials **Obtain API Key:** 1. Log into [ConnectSafely.ai Dashboard](https://connectsafely.ai/dashboard) 2. Navigate to **Settings → API Keys** 3. Generate a new API key 4. Copy your API key (you'll need this in the next step) **Add Bearer Auth Credential in n8n:** 1. Go to **Credentials** in n8n 2. Click **Add Credential → HTTP Bearer Auth** 3. Paste your ConnectSafely.ai API key 4. Save the credential --- ### Step 2: Configure Search Parameters Open the **Set Search Parameters** node and customize your search: | Parameter | Description | Example | |-----------|-------------|---------| | keywords | Search terms for profiles | `CEO SaaS`, `Marketing Director` | | location | Geographic filter | `United States`, `San Francisco Bay Area` | | title | Job title filter | `Head of Growth`, `VP Sales` | | limit | Maximum results to return | `100` (max varies by plan) | **Pro Tips:** - Use specific keywords for better targeting - Combine title + keywords for precision (e.g., keywords: "B2B" + title: "VP Sales") - Start with smaller limits (25-50) for testing --- ### Step 3: Configure Google Sheets Integration **3.1 Connect Google Sheets Account** 1. Go to **Credentials → Add Credential → Google Sheets OAuth2** 2. Follow the OAuth flow to connect your Google account 3. Grant access to Google Sheets **3.2 Prepare Your Google Sheet** Create a new Google Sheet with the following columns (the workflow will auto-populate these): | Column Name | Description | |-------------|-------------| | profileUrl | LinkedIn profile URL | | fullName | Contact's full name | | firstName | First name | | lastName | Last name | | headline | LinkedIn headline/tagline | | currentPosition | Current job title | | company | Company name (extracted from headline) | | location | Geographic location | | connectionDegree | 1st, 2nd, or 3rd degree connection | | isPremium | LinkedIn Premium member (true/false) | | isOpenToWork | Open to work badge (true/false) | | profilePicture | Profile image URL | | extractedAt | Timestamp of extraction | **3.3 Configure the Export Node** 1. Open the **Export to Google Sheets** node 2. Select your Google Sheets credential 3. Enter your Document ID (from the sheet URL) 4. Select the Sheet Name 5. The column mapping is pre-configured for auto-mapping --- ### Step 4: Test the Workflow 1. Click the **Manual Trigger** node 2. Click **Test Workflow** 3. Verify: - Search executes successfully - Results appear in the Format Results output - Data exports to your Google Sheet - JSON file is generated (optional) --- ## Customization ### Search Parameter Combinations **Sales Prospecting:** ``` keywords: "B2B SaaS" location: "United States" title: "VP of Sales" limit: 100 ``` **Recruiting:** ``` keywords: "Python Machine Learning" location: "San Francisco Bay Area" title: "Senior Engineer" limit: 50 ``` **Founder Networking:** ``` keywords: "Seed Series A" location: "New York City" title: "Founder CEO" limit: 100 ``` ### Extending the Workflow **Add to CRM:** Connect the Format Results output to HubSpot, Salesforce, or Pipedrive nodes **Enrich Data:** Add a loop to fetch full profile details for each result using the `/linkedin/profile` endpoint **Chain with Outreach:** Connect to the [LinkedIn Connection Request Workflow](https://connectsafely.ai/templates) to automatically send personalized invites to your search results **Schedule Searches:** Replace Manual Trigger with a Schedule Trigger to run daily/weekly searches --- ## Output Data Format Each result includes: ```json { "profileUrl": "https://www.linkedin.com/in/johndoe", "profileId": "johndoe", "profileUrn": "urn:li:member:123456789", "fullName": "John Doe", "firstName": "John", "lastName": "Doe", "headline": "VP of Sales at TechCorp | B2B SaaS", "currentPosition": "VP of Sales", "company": "TechCorp", "location": "San Francisco, California", "connectionDegree": "2nd", "isPremium": true, "isOpenToWork": false, "profilePicture": "https://media.licdn.com/...", "extractedAt": "2024-01-15T10:30:00.000Z" } ``` --- ## Use Cases **Sales Prospecting:** Build targeted lead lists of decision-makers at companies matching your ICP **Recruiting & Talent Sourcing:** Find passive candidates with specific skills and experience levels **Market Research:** Analyze competitor employee profiles and organizational structures **Event Planning:** Build invite lists for webinars, conferences, or virtual events **Partnership Development:** Identify potential partners and integration opportunities **Investor Research:** Find founders and executives at companies in specific stages/verticals --- ## Troubleshooting ### Common Issues & Solutions **Issue:** "No results found" error - **Solution:** Broaden your search parameters; try removing one filter at a time **Issue:** Empty company field in results - **Solution:** Company is extracted from headline; some profiles may not include company in their headline format **Issue:** API authentication errors - **Solution:** Verify your ConnectSafely.ai API key is valid and has proper permissions; check Bearer Auth credential format **Issue:** Google Sheets not updating - **Solution:** Confirm OAuth credentials are valid; check that the sheet has write permissions **Issue:** Fewer results than expected - **Solution:** LinkedIn limits search results; try more specific parameters or upgrade your ConnectSafely.ai plan **Issue:** Rate limit errors - **Solution:** Add delay between multiple searches; check your API plan limits --- ## Documentation & Resources ### Official Documentation - **ConnectSafely.ai Docs:** [https://connectsafely.ai/docs](https://connectsafely.ai/docs) - **API Reference:** Available in ConnectSafely.ai dashboard - **n8n HTTP Request Node:** [https://docs.n8n.io/nodes/n8n-nodes-base.httpRequest](https://docs.n8n.io/nodes/n8n-nodes-base.httpRequest) ### Support Channels - **Email Support:** [email protected] - **Documentation:** [https://connectsafely.ai/docs](https://connectsafely.ai/docs) - **Custom Workflows:** Contact us for custom automation --- ## Connect With Us Stay updated with the latest automation tips, LinkedIn strategies, and platform updates: - **LinkedIn:** [linkedin.com/company/connectsafelyai](https://linkedin.com/company/connectsafelyai) - **YouTube:** [youtube.com/@ConnectSafelyAI-v2x](https://youtube.com/@ConnectSafelyAI-v2x) - **Instagram:** [instagram.com/connectsafely.ai](https://instagram.com/connectsafely.ai) - **Facebook:** [facebook.com/connectsafelyai](https://www.facebook.com/people/ConnectSafelyAI/61582550884724/) - **X (Twitter):** [x.com/AiConnectsafely](https://x.com/AiConnectsafely) - **Bluesky:** [connectsafelyai.bsky.social](https://connectsafelyai.bsky.social) - **Mastodon:** [mastodon.social/@connectsafely](https://mastodon.social/@connectsafely) --- ## Need Custom Workflows? Looking to build sophisticated LinkedIn automation workflows tailored to your business needs? **Contact our team** for custom automation development, strategy consulting, and enterprise solutions. We specialize in: - Multi-channel prospecting workflows - AI-powered lead scoring and qualification - CRM integration and data synchronization - Custom search and enrichment pipelines - Bulk outreach automation with personalization
Rewrite viral LinkedIn posts in your voice with Google Gemini and Telegram approval
# Rewrite viral LinkedIn posts in your voice with AI and Telegram approval using Google Gemini ## Who's it for This workflow is designed for LinkedIn creators, personal brand builders, thought leaders, and content marketers who want to consistently create engaging content without starting from scratch. Perfect for professionals who admire viral posts from others but want to adapt those ideas to their own unique voice and style. If you're struggling to maintain a consistent posting schedule, looking for content inspiration, or want to repurpose trending ideas while keeping your authentic voice, this automation handles the creative heavy lifting while giving you full control over what gets published. ## How it works The workflow transforms viral LinkedIn posts into personalized content that matches your writing style, complete with AI-generated images, all controlled through Telegram. **The process flow:** 1. Send any LinkedIn post URL to your Telegram bot 2. Security check validates your Telegram user ID 3. ConnectSafely.ai scrapes the original post content and engagement metrics 4. Your custom persona profile is loaded (tone, phrases, formatting preferences) 5. Google Gemini AI rewrites the post to match YOUR voice 6. Gemini generates a professional, on-brand image for the post 7. Preview is sent to Telegram for your review 8. Approve or reject with a simple reply 9. On approval, the post goes live on LinkedIn automatically --- ## Setup steps ### Step 1: Create a Telegram Bot 1. Open Telegram and search for **@BotFather** 2. Send `/newbot` and follow the prompts to create your bot 3. Save the **API token** provided by BotFather 4. Get your Telegram User ID by messaging **@userinfobot** ### Step 2: Configure Telegram Credentials in n8n 1. Go to **Credentials** → **Add Credential** → **Telegram API** 2. Paste your bot token from BotFather 3. Save the credential 4. Update all Telegram nodes to use this credential ### Step 3: Set Up Security Check 1. Open the **🔒 Security Check** node 2. Replace `YOUR_TELEGRAM_USER_ID` with your actual Telegram user ID 3. This ensures only YOU can trigger the workflow ### Step 4: Configure ConnectSafely.ai API 1. Sign up at [ConnectSafely.ai](https://connectsafely.ai) 2. Navigate to **Settings** → **API Keys** in your dashboard 3. Generate a new API key 4. In n8n, go to **Credentials** → **Add Credential** → **ConnectSafely API** 5. Paste your API key and save 6. Connect this credential to the **🔍 Scrape LinkedIn Post** node ### Step 5: Configure Google Gemini API 1. Go to [Google AI Studio](https://aistudio.google.com/) 2. Create or select a project 3. Generate an API key 4. In n8n, go to **Credentials** → **Add Credential** → **Google Gemini (PaLM) API** 5. Paste your API key and save 6. Connect this credential to both: - **Google Gemini Chat Model** node - **Generate an image** node ### Step 6: Connect Your LinkedIn Account 1. In n8n, go to **Credentials** → **Add Credential** → **LinkedIn OAuth2 API** 2. Follow the OAuth flow to connect your LinkedIn account 3. Connect this credential to the **Create LinkedIn Post** node 4. Update the `person` parameter with your LinkedIn Person ID (URN) ### Step 7: Customize Your Persona 1. Open the **👤 Load Your Persona** node 2. Edit the `PERSONA` object to match YOUR writing style: - Update `name` with your name - Modify `expertiseAreas` with your topics - Adjust `commonPhrases` with phrases you actually use - Set `preferredEmojis` to your favorites - Customize `styleNotes` to capture your unique voice ### Step 8: Activate the Workflow 1. Save your workflow 2. Toggle the workflow to **Active** 3. Your Telegram bot is now ready to receive LinkedIn URLs --- ## Customization ### Persona Customization The **👤 Load Your Persona** node is where you define your unique voice. Key areas to customize: | Field | Description | Example | |-------|-------------|---------| | `tone` | Overall communication style | "Professional yet approachable, data-driven" | | `voice` | Perspective and personality | "First-person, authentic, vulnerable" | | `formatting` | Structure preferences | "Short paragraphs, emoji bullets, line breaks" | | `hooks` | Opening style | "Start with contrarian takes or personal stories" | | `expertiseAreas` | Your niche topics | ["SaaS growth", "Leadership", "Remote work"] | | `commonPhrases` | Signature expressions | ["Here's the truth:", "I learned this the hard way:"] | ### Image Generation The **📝 Create Image Prompt** node generates the image prompt. Modify the style parameters to match your brand: - **Current style**: Modern, clean, corporate, vector art - **Customize**: Change to photography, illustrations, or abstract visuals ### Post Length In the persona configuration, adjust `postLength`: - `"short"` - Quick insights (under 500 characters) - `"medium"` - Standard posts (500-1500 characters) - `"long"` - Deep dives (1500-3000 characters) ### AI Model Selection The workflow uses `gemini-2.5-pro` for text. You can switch to other models in the **Google Gemini Chat Model** node based on your needs. --- ## Requirements | Requirement | Details | |-------------|---------| | **n8n Version** | 1.0+ recommended | | **Telegram Bot** | Created via @BotFather | | **ConnectSafely.ai Account** | API key required | | **Google AI Studio Account** | Gemini API key required | | **LinkedIn Account** | OAuth2 connected in n8n | | **Community Node** | `n8n-nodes-connectsafely-ai` (self-hosted only) | ⚠️ **Note**: This workflow uses the ConnectSafely community node, which requires a self-hosted n8n instance. --- ## Use cases - **Content Repurposing**: Transform competitor or industry leader posts into your own perspective - **Consistent Posting**: Maintain a regular posting schedule without content creation burnout - **Style Consistency**: Ensure every post matches your established personal brand - **Trend Riding**: Quickly create content around viral topics while they're still relevant - **A/B Testing**: Test different approaches by approving or rejecting variations --- ## Troubleshooting ### Common Issues & Solutions **Issue**: Bot not responding to messages - **Solution**: Verify the Telegram webhook is active; check the Telegram Trigger node is properly configured **Issue**: "Profile not found" from ConnectSafely.ai - **Solution**: Ensure the LinkedIn URL is complete and public. Some posts on private profiles can't be scraped **Issue**: Image generation fails - **Solution**: Verify your Gemini API key has access to image generation models. Check quota limits in Google AI Studio **Issue**: LinkedIn post fails to publish - **Solution**: Confirm your LinkedIn OAuth2 credentials are valid and haven't expired. Re-authorize if needed **Issue**: AI generates posts that don't match your style - **Solution**: Be more specific in your persona configuration. Add more example phrases and detailed style notes **Issue**: Security check blocks your messages - **Solution**: Double-check your Telegram User ID is correctly entered (must be a number, not username) --- ## Documentation & Resources ### Official Documentation - **ConnectSafely.ai Docs**: [https://connectsafely.ai/docs](https://connectsafely.ai/docs) - **Google Gemini API**: [https://ai.google.dev/docs](https://ai.google.dev/docs) - **Telegram Bot API**: [https://core.telegram.org/bots/api](https://core.telegram.org/bots/api) - **LinkedIn API**: [https://docs.microsoft.com/linkedin/](https://docs.microsoft.com/linkedin/) ### Support - **ConnectSafely Support**: [[email protected]](mailto:[email protected]) - **n8n Community**: [https://community.n8n.io](https://community.n8n.io) --- ## Connect With Us Stay updated with the latest automation tips, LinkedIn strategies, and platform updates: - **LinkedIn**: [linkedin.com/company/connectsafelyai](https://www.linkedin.com/company/connectsafelyai) - **YouTube**: [youtube.com/@ConnectSafelyAI-v2x](https://www.youtube.com/@ConnectSafelyAI-v2x) - **Instagram**: [instagram.com/connectsafely.ai](https://www.instagram.com/connectsafely.ai/) - **Facebook**: [facebook.com/connectsafelyai](https://www.facebook.com/profile.php?id=61582550884724) - **X (Twitter)**: [x.com/AiConnectsafely](https://x.com/AiConnectsafely) - **Bluesky**: [connectsafelyai.bsky.social](https://bsky.app/profile/connectsafelyai.bsky.social) - **Mastodon**: [mastodon.social/@connectsafely](https://mastodon.social/@connectsafely) --- ## Need Custom Workflows? Looking to build sophisticated LinkedIn automation workflows tailored to your business needs? **[Contact our team](https://connectsafely.ai/contact)** for custom automation development, strategy consulting, and enterprise solutions. We specialize in: - Multi-channel engagement workflows - AI-powered personalization at scale - Lead scoring and qualification automation - CRM integration and data synchronization - Custom reporting and analytics pipelines
Auto-send DMs to LinkedIn keyword commenters with ConnectSafely.AI
# Auto-Send DMs to LinkedIn Commenters Who Type a Specific Keyword using ConnectSafely.AI API ## Who's it for This workflow is built for content creators, coaches, course sellers, and marketers who use the "comment X to get the link" engagement strategy on LinkedIn. Perfect for anyone who wants to deliver lead magnets, code samples, templates, or resources automatically without spending hours manually DMing every commenter. If you're tired of the manual grind—reading comments, checking connections, copy-pasting messages—this automation handles the entire fulfillment process while you focus on creating more content. Works especially well for viral posts where comment volume makes manual responses impossible. ## How it works The workflow monitors your LinkedIn post for specific keyword triggers and automatically sends personalized DMs to commenters who request your content. **The process flow:** 1. You submit your post URL, trigger keyword, and resource link via a simple form 2. Fetches all comments from the specified LinkedIn post via ConnectSafely.ai API 3. Loops through each comment individually for processing 4. Detects if the comment contains your trigger keyword (case-insensitive) 5. Checks if the commenter is a 1st-degree connection (required for DMs) 6. Sends a personalized direct message with their name and your resource link 7. Applies random rate limiting (15-30 minutes) between messages for account safety 8. Continues until all matching comments are processed The rate limiting and connection checks are built-in to protect your LinkedIn account from automation detection. --- ## Setup steps ### Step 1: Get Your ConnectSafely.ai API Key #### Obtain API Key 1. Sign up at [ConnectSafely.ai](https://connectsafely.ai) 2. Log into your dashboard 3. Navigate to **Settings** → **API Keys** 4. Generate a new API key and copy it #### Add Credential in n8n 1. Go to **Credentials** in n8n 2. Click **Add Credential** → Search for **ConnectSafely API** 3. Paste your API key 4. Save the credential This credential is used by all ConnectSafely nodes in the workflow. ### Step 2: Connect Your LinkedIn Account 1. In your ConnectSafely.ai dashboard, click **Connect LinkedIn** 2. Follow the authorization flow 3. Ensure your account shows as "Connected" with a green status 4. Your LinkedIn is now accessible via the API ### Step 3: Import and Configure the Workflow 1. Download the workflow JSON file 2. In n8n, go to **Workflows** → **Import from File** 3. Select the downloaded JSON 4. Open each ConnectSafely node and select your credential from the dropdown ### Step 4: Test the Workflow 1. Click the **Test Workflow** button in n8n 2. Copy the form URL that appears in the Form Trigger node 3. Open the URL in a new browser tab 4. Fill in the form: - **LinkedIn Post URL**: Full URL of your post with comments - **Trigger Keyword**: The word commenters type (e.g., "code", "link", "example") - **Content Link**: The URL you want to send them - **Your Name**: For the message signature 5. Submit and watch the execution **Pro Tip**: Test with your own post first where you've left a test comment containing the keyword. ### Step 5: Activate for Production 1. Review the test execution to ensure messages sent correctly 2. Toggle the workflow to **Active** 3. Use the form URL whenever you post new "comment for link" content 4. The workflow processes comments and sends DMs automatically --- ## Customization ### Message Template Edit the **Send DM with Link** node to customize your message: ``` Hey {{name}}! 👋 Thanks for your comment on my post! As promised, here's the link you requested: 👉 {{link}} If you have any questions or want more resources like this, just let me know! Best, {{your_name}} ``` **Variables available:** - `{{ $('Loop: Process Each Comment').item.json.authorName }}` - Commenter's name - `{{ $('Form: Enter Post Details').item.json['Content Link to Send'] }}` - Your resource link - `{{ $('Form: Enter Post Details').item.json['Your Name (for signature)'] }}` - Your name ### Multiple Keywords Edit the **Detect Keyword Match** code node to check for multiple trigger words: ```javascript // Multiple keyword detection const keywords = ['code', 'example', 'template', 'link', 'send']; const commentLower = commentText.toLowerCase(); const isMatch = keywords.some(keyword => commentLower.includes(keyword.toLowerCase()) ); return [{ json: { isKeywordMatch: isMatch, commentText } }]; ``` ### Rate Limiting Adjustment Edit the **Wait: Rate Limiting** node to change delays: | Risk Level | Wait Time | Formula | |------------|-----------|---------| | 🟢 Safest | 30-60 min | `Math.floor(Math.random() * (3600 - 1800 + 1)) + 1800` | | 🟡 Moderate (Default) | 15-30 min | `Math.floor(Math.random() * (1800 - 900 + 1)) + 900` | | 🔴 Faster (Risky) | 5-15 min | `Math.floor(Math.random() * (900 - 300 + 1)) + 300` | **Warning**: Shorter delays increase the risk of LinkedIn flagging your account. ### Add Connection Requests (Optional) To also send connection requests to non-connected commenters: 1. Add a **ConnectSafely LinkedIn** node after the "If: Connected?" FALSE path 2. Set operation to `sendConnectionRequest` 3. Map the `publicIdentifier` from the loop 4. Add a personalized connection message --- ## Use Cases - **Lead Magnet Distribution**: Automatically deliver PDFs, guides, or checklists to everyone who comments - **Code Sample Sharing**: Share GitHub repos, code snippets, or template files to developers who request them - **Course Previews**: Send free lesson links or course previews to interested commenters - **Template Giveaways**: Distribute Notion templates, spreadsheets, or design files - **Webinar Registrations**: Send signup links to commenters interested in your events - **Community Building**: Deliver exclusive Discord/Slack invite links to engaged followers - **Podcast Promotion**: Share episode links or show notes with interested listeners - **Newsletter Growth**: Send subscription links with a teaser of your best content --- ## Troubleshooting ### Common Issues & Solutions **Issue**: No comments returned from post - **Solution**: Verify the post URL is correct and complete (should include the full linkedin.com/posts/... URL) - **Solution**: Ensure the post is public or you're the post author - **Solution**: Check that the post actually has comments **Issue**: "Cannot send message" errors - **Solution**: You can only DM 1st-degree connections on LinkedIn; non-connections are automatically skipped - **Solution**: The commenter may have messaging disabled in their settings **Issue**: Messages not being sent - **Solution**: Verify your ConnectSafely.ai credentials are valid and connected - **Solution**: Check that your LinkedIn account is properly connected in ConnectSafely dashboard - **Solution**: Review the execution log for specific error messages **Issue**: Keyword not matching comments - **Solution**: Keywords are case-insensitive, but check spelling - **Solution**: Ensure the keyword appears exactly in the comment (partial matches work) - **Solution**: Test with a simple, unique keyword first **Issue**: Workflow seems slow - **Solution**: This is intentional! The 15-30 minute delays between messages protect your account - **Solution**: Large batches (50+ comments) will take several hours to complete safely **Issue**: LinkedIn account warnings - **Solution**: Stop the workflow immediately - **Solution**: Wait 24-48 hours before resuming - **Solution**: Increase rate limiting delays when you restart - **Solution**: Reduce daily volume **Issue**: Duplicate messages sent - **Solution**: Don't run the workflow multiple times on the same post - **Solution**: Consider adding a Google Sheets node to track processed commenters --- ## Safety Best Practices ### LinkedIn Account Protection | Do ✅ | Don't ❌ | |-------|---------| | Use random delays (built-in) | Send messages without delays | | Process 20-30 comments per batch | Process 100+ comments at once | | Run during business hours | Run 24/7 continuously | | Stop if you see warnings | Ignore LinkedIn restrictions | | Keep messages helpful | Send salesy/spammy content | | Respond to genuine requests | Use for cold outreach | ### Daily Limits (Approximate) | Account Type | Recommended Max DMs/Day | |--------------|------------------------| | Free Account | 30-50 | | Premium | 50-80 | | Sales Navigator | 80-100 | *These are conservative estimates. LinkedIn doesn't publish exact limits.* --- ## Documentation & Resources ### Official Documentation - **ConnectSafely.ai Docs**: [https://connectsafely.ai/docs](https://connectsafely.ai/docs) - **API Reference**: Available in ConnectSafely.ai dashboard - **n8n Form Trigger**: [https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.formtrigger/](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.formtrigger/) - **n8n Code Node**: [https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.code/](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.code/) ### Support Channels - **Email Support**: [[email protected]](mailto:[email protected]) - **Documentation**: [https://connectsafely.ai/docs](https://connectsafely.ai/docs) - **Custom Workflows**: [Contact us for custom automation](https://connectsafely.ai/contact) --- ## Connect With Us Stay updated with the latest automation tips, LinkedIn strategies, and platform updates: - **LinkedIn**: [linkedin.com/company/connectsafelyai](https://www.linkedin.com/company/connectsafelyai) - **YouTube**: [youtube.com/@ConnectSafelyAI-v2x](https://www.youtube.com/@ConnectSafelyAI-v2x) - **Instagram**: [instagram.com/connectsafely.ai](https://www.instagram.com/connectsafely.ai/) - **Facebook**: [facebook.com/connectsafelyai](https://www.facebook.com/profile.php?id=61582550884724) - **X (Twitter)**: [x.com/AiConnectsafely](https://x.com/AiConnectsafely) - **Bluesky**: [connectsafelyai.bsky.social](https://bsky.app/profile/connectsafelyai.bsky.social) - **Mastodon**: [mastodon.social/@connectsafely](https://mastodon.social/@connectsafely) --- ## Need Custom Workflows? Looking to build sophisticated LinkedIn automation workflows tailored to your business needs? **[Contact our team](https://connectsafely.ai/contact)** for custom automation development, strategy consulting, and enterprise solutions. We specialize in: - Multi-channel engagement workflows - AI-powered personalization at scale - Lead scoring and qualification automation - CRM integration and data synchronization - Custom reporting and analytics pipelines
Send personalized connection requests to LinkedIn post commenters with ConnectSafely.ai
# Send Connection Requests to LinkedIn Post Commenters - Automated Outreach with Personalized Messages using ConnectSafely.AI ## Who's it for This workflow is built for content creators, founders, sales professionals, and LinkedIn thought leaders who want to convert post engagement into real connections. Perfect for anyone who creates content that attracts comments but doesn't have time to manually connect with every person who engages. If you're publishing LinkedIn content regularly and want to build your network with warm leads (people already interested in what you're saying), this automation handles the tedious work of sending personalized connection requests while you focus on creating more content. ## How it works The workflow automates the entire connection request process by combining intelligent filtering with personalized messaging through ConnectSafely.ai's API. **The process flow:** 1. Displays a web form where you paste your LinkedIn post URL 2. Fetches all comments from the specified post via ConnectSafely.ai API 3. Splits commenters into individual items for sequential processing 4. Loops through each commenter one at a time 5. Checks relationship status (already connected? pending request?) 6. Filters out existing connections and pending invitations 7. Generates unique personalized messages using spin text variations 8. Sends connection request with the personalized message 9. Waits 1-2 hours between requests for rate limiting 10. Loops back to process the next commenter until complete The smart filtering ensures you never send duplicate requests or spam existing connections. --- ## Setup steps ### Step 1: Install ConnectSafely.ai Community Node #### Install the Package 1. Go to **Settings** → **Community Nodes** in your n8n instance 2. Search for `n8n-nodes-connectsafely.ai` 3. Click **Install** 4. **IMPORTANT**: Restart n8n completely after installation **Alternative (Command Line):** ```bash npm install n8n-nodes-connectsafely.ai ``` **Documentation:** [https://connectsafely.ai/n8n-docs](https://connectsafely.ai/n8n-docs) ### Step 2: Configure ConnectSafely.ai API Credentials #### Obtain API Key 1. Log into [ConnectSafely.ai Dashboard](https://connectsafely.ai/dashboard) 2. Navigate to **Settings** → **API Keys** 3. Generate a new API key 4. Copy your **Account ID** from the Accounts section #### Add Credentials in n8n 1. Go to **Credentials** in n8n 2. Click **Add Credential** → **ConnectSafely API** 3. Paste your API key 4. Save the credential This credential is used by all ConnectSafely nodes in the workflow. ### Step 3: Configure the Form Trigger The workflow uses a Form Trigger to capture your LinkedIn post URL: | Field | Configuration | |-------|---------------| | Form Title | 🔗 LinkedIn Post Engagement Automation | | Form Description | Enter your LinkedIn post URL below to automatically send personalized connection requests | | Field Label | LinkedIn Post URL | | Placeholder | https://www.linkedin.com/posts/your-post-url... | | Required | Yes | **To get your form URL:** 1. Click **Test Workflow** button 2. Copy the webhook URL that appears 3. Open this URL in your browser to access the form ### Step 4: Customize Your Connection Message Edit the spin text template in the **Generate Personalized Message** code node: ```javascript const template = `{Thanks for|Really appreciate|Awesome to see|Loved seeing|Grateful for} {you|you taking a moment to|you recently} {liking|engaging with|reacting to|showing interest in|checking out} {my|our|the} {post|recent post|latest content piece|content|update} on {this topic|that topic|the subject}. {Would love to|Happy to|Let's definitely|Open to|Excited to} connect {and|so we can|to} {exchange ideas|share insights|continue the conversation|explore potential collaborations|stay connected professionally}. {Always enjoy connecting with|Always excited to meet|Love meeting|Great connecting with} {like-minded people|professionals in the space|people exploring similar topics|others in this domain}. {Cheers|Best regards|Thanks again|Looking forward|Talk soon|Warm regards}, YourName `; ``` **Spin Text Syntax:** - Use `{option1|option2|option3}` for random variations - Each request gets a unique combination - Keep total message under 300 characters (LinkedIn limit) ### Step 5: Configure Rate Limiting The **Wait (Rate Limiting)** node controls the delay between connection requests: | Setting | Recommended Value | Description | |---------|-------------------|-------------| | Wait Time | 1-2 hours | Time between each connection request | | Unit | Hours | Keeps your account safe from spam detection | **Pro Tip**: Start with 2-hour delays for new accounts, reduce to 1 hour once your account is warmed up. ### Step 6: Test the Workflow 1. Click **Test Workflow** to get the form URL 2. Open the form URL in your browser 3. Paste a LinkedIn post URL with comments 4. Submit the form 5. Verify each step: - Comments are fetched correctly - Relationship check returns status - Messages generate with variations - Connection request sends successfully **First Run Tips:** - Start with a post that has 5-10 comments - Test during off-hours - Monitor closely for any errors --- ## Customization ### Message Personalization The workflow automatically includes the commenter's name in the greeting: ```javascript customMessage: "Hi {{ $('🔄 Loop Over Items').item.json.authorName }},\n\n{{ $json.generatedMessage }}" ``` Add more personalization by referencing the comment text: ```javascript // Access the actual comment they left const theirComment = $('🔄 Loop Over Items').item.json.commentText; ``` ### Filter Logic Edit the **Should Send Request?** IF node conditions: **Current Logic (Both must be TRUE):** - `connected` = false (not already connected) - `invitationSent` = false (no pending request) **Additional Filters You Can Add:** - Filter by connection degree (2nd vs 3rd degree) - Filter by profile completeness - Filter by follower count ```javascript // Example: Only connect with 2nd degree connections $json.connectionDegree === "DISTANCE_2" ``` ### Rate Limiting Adjustments | Account Status | Recommended Delay | Daily Limit | |----------------|-------------------|-------------| | New Account | 2 hours | 10-12 requests | | Warmed Up (1-2 weeks) | 1 hour | 20-24 requests | | Established (1+ month) | 45 minutes | 30-35 requests | --- ## Use Cases - **Content Creator Growth**: Convert every engaged follower into a connection automatically - **Thought Leadership**: Build relationships with people who resonate with your ideas - **Sales Prospecting**: Connect with warm leads who already showed interest in your content - **Community Building**: Expand your network with like-minded professionals - **Event Promotion**: Connect with commenters before launching webinars or courses - **Recruiting**: Reach candidates who engage with your company culture posts --- ## Troubleshooting ### Common Issues & Solutions **Issue**: ConnectSafely node not appearing after install - **Solution**: Completely restart n8n (not just refresh). Kill the process and start again. **Issue**: "Invalid Profile ID" error - **Solution**: The workflow uses `publicIdentifier` (username), not the full URL. Verify the mapping is correct. **Issue**: Connection request fails with "already connected" - **Solution**: The relationship check should filter these out. Verify the IF node conditions are set correctly. **Issue**: Messages appear identical - **Solution**: Check that the spin text syntax uses `{option1|option2}` format with the pipe character, not commas. **Issue**: Workflow stops after first person - **Solution**: Ensure the Wait node connects back to the Loop node, and the Loop node has `Reset: FALSE` configured. **Issue**: Form URL not appearing - **Solution**: You must click "Test Workflow" first to generate the webhook URL. **Issue**: Rate limiting warnings from LinkedIn - **Solution**: Increase the wait time between requests. Start with 2-hour delays and ensure your account is warmed up. --- ## Documentation & Resources ### Official Documentation - **ConnectSafely.ai Docs**: [https://connectsafely.ai/docs](https://connectsafely.ai/docs) - **n8n Package Docs**: [https://connectsafely.ai/n8n-docs](https://connectsafely.ai/n8n-docs) - **API Reference**: Available in ConnectSafely.ai dashboard ### Support Channels - **Email Support**: [[email protected]](mailto:[email protected]) - **Documentation**: [https://connectsafely.ai/docs](https://connectsafely.ai/docs) - **Custom Workflows**: [Contact us for custom automation](https://connectsafely.ai/contact) --- ## Connect With Us Stay updated with the latest automation tips, LinkedIn strategies, and platform updates: - **LinkedIn**: [linkedin.com/company/connectsafelyai](https://www.linkedin.com/company/connectsafelyai) - **YouTube**: [youtube.com/@ConnectSafelyAI-v2x](https://www.youtube.com/@ConnectSafelyAI-v2x) - **Instagram**: [instagram.com/connectsafely.ai](https://www.instagram.com/connectsafely.ai/) - **Facebook**: [facebook.com/connectsafelyai](https://www.facebook.com/profile.php?id=61582550884724) - **X (Twitter)**: [x.com/AiConnectsafely](https://x.com/AiConnectsafely) - **Bluesky**: [connectsafelyai.bsky.social](https://bsky.app/profile/connectsafelyai.bsky.social) - **Mastodon**: [mastodon.social/@connectsafely](https://mastodon.social/@connectsafely) --- ## Need Custom Workflows? Looking to build sophisticated LinkedIn automation workflows tailored to your business needs? **[Contact our team](https://connectsafely.ai/contact)** for custom automation development, strategy consulting, and enterprise solutions. We specialize in: - Multi-channel engagement workflows - AI-powered personalization at scale - Lead scoring and qualification automation - CRM integration and data synchronization - Custom reporting and analytics pipelines
Extract premium & verified LinkedIn group members to Google Sheets with ConnectSafely.AI
# Extract LinkedIn Group Members to Google Sheets - Premium & Verified Only using ConnectSafely.AI API ## Who's it for This workflow is built for sales professionals, community managers, recruiters, and growth marketers who want to extract high-quality leads from LinkedIn groups without the manual grind. Perfect for anyone who needs to identify decision-makers, founders, and serious professionals within large LinkedIn communities. If you're running targeted outreach campaigns, building prospect lists, researching competitor communities, or looking to connect with verified industry leaders, this automation filters the noise and delivers only Premium and Verified members straight to your spreadsheet. ## How it works The workflow automates LinkedIn group member extraction by combining pagination handling with intelligent filtering through ConnectSafely.ai's API. **The process flow:** 1. Initializes pagination variables with your target group ID 2. Fetches group members in batches of 50 via ConnectSafely.ai API 3. Filters each batch for Premium OR Verified members only 4. Extracts profile data (name, headline, follower count, profile URL, etc.) 5. Checks if more pages exist and loops back automatically 6. Once complete, splits all members into individual items 7. Appends or updates records in Google Sheets (deduplicates by Profile ID) The pagination loop handles groups of any size - whether 500 or 50,000 members. --- ## Setup steps ### Step 1: Prepare Your Google Sheet Structure your Google Sheet with the following columns: | Column Name | Description | Required | |------------|-------------|----------| | `Profile ID` | Unique LinkedIn profile identifier | Yes | | `First Name` | Member's first name | Yes | | `Last Name` | Member's last name | Yes | | `Full Name` | Combined first and last name | Yes | | `Headline` | Professional headline/tagline | Yes | | `Public Identifier` | LinkedIn username | Yes | | `Profile URL` | Direct link to LinkedIn profile | Yes | | `Follower Count` | Number of followers | Yes | | `Is Premium` | Premium subscription status | Yes | | `Is Verified` | Verification badge status | Yes | | `Relationship Status` | Connection degree (1st, 2nd, 3rd) | Yes | **Pro Tip**: The workflow uses "Append or Update" operation with Profile ID as the matching column, so running it multiple times won't create duplicates. ### Step 2: Configure ConnectSafely.ai API Credentials #### Obtain API Key 1. Log into [ConnectSafely.ai Dashboard](https://connectsafely.ai/dashboard) 2. Navigate to **Settings** → **API Keys** 3. Generate a new API key #### Add Bearer Auth Credential in n8n 1. Go to **Credentials** in n8n 2. Click **Add Credential** → **Header Auth** or **Bearer Auth** 3. Paste your ConnectSafely.ai API key 4. Save the credential This credential is used by the "Fetch Group Members" HTTP Request node. ### Step 3: Configure Google Sheets Integration #### 3.1 Connect Google Sheets Account 1. Go to **Credentials** → **Add Credential** → **Google Sheets OAuth2** 2. Follow the OAuth flow to connect your Google account 3. Grant access to Google Sheets #### 3.2 Configure "Append to Google Sheets" Node 1. Open the **Append to Google Sheets** node 2. Select your Google Sheets credential 3. Enter your **Document ID** (from the sheet URL) 4. Select the **Sheet Name** 5. Configure column mapping to match the extracted fields 6. Set **Matching Column** to `Profile ID` for deduplication ### Step 4: Set Your Target LinkedIn Group 1. Open the **Initialize Pagination** node 2. Locate the `groupId` variable in the code 3. Replace `"9357376"` with your target group ID **Finding Your Group ID:** - Go to your LinkedIn group - Look at the URL: `linkedin.com/groups/XXXXXXX/` - The numbers are your group ID ```javascript // Change this value to your target group groupId: "9357376", // Replace with your group ID ``` ### Step 5: Test the Workflow 1. Click the **Start Workflow** manual trigger node 2. Click **Test Workflow** 3. Verify: - API returns member data correctly - Filtering captures only Premium/Verified members - Pagination loops for additional pages (if applicable) - Google Sheets populates with extracted data --- ## Customization ### Filter Criteria Edit the filter logic in the **Process & Filter Members** node to adjust: - **Premium Only**: Remove the `isVerified` checks to capture only Premium subscribers - **Verified Only**: Remove the `isPremium` checks to capture only Verified profiles - **All Members**: Remove the filter entirely to extract everyone (modify the `return` statement) - **Minimum Followers**: Add a follower count threshold for influencer targeting ```javascript // Example: Filter for Premium members with 1000+ followers const filteredMembers = members.filter(member => { const isPremium = member.isPremium === true; const hasMinFollowers = member.followerCount >= 1000; return isPremium && hasMinFollowers; }); ``` ### Batch Size - **Default**: 50 members per API request - **Adjust**: Modify the `count` value in Initialize Pagination node - **Note**: 50 is the maximum allowed by the API ### Additional Fields The API returns more fields than extracted by default. Edit the **Process & Filter Members** node to include: - `creator` - Whether they're a LinkedIn creator - `badges` - Full list of profile badges - `fetchedAt` - Timestamp of extraction --- ## Use Cases - **Sales Prospecting**: Build targeted prospect lists from industry-specific groups with verified decision-makers - **Competitor Research**: Analyze who's active in competitor communities and their professional backgrounds - **Influencer Identification**: Find Premium creators and verified professionals for partnership opportunities - **Recruiting**: Source passive candidates who are active in professional development groups - **Event Marketing**: Identify engaged professionals in niche communities for webinar and conference promotion - **Content Strategy**: Research headlines and titles to understand what resonates in your industry --- ## Troubleshooting ### Common Issues & Solutions **Issue**: Empty results returned - **Solution**: Verify you're a member of the target group; API can only access groups you've joined **Issue**: "401 Unauthorized" errors - **Solution**: Check that your ConnectSafely.ai API key is valid and the Bearer Auth credential is properly configured **Issue**: Pagination loop seems infinite - **Solution**: This is expected behavior until `hasMore` returns false; large groups may take several minutes to fully process **Issue**: Duplicate entries in Google Sheets - **Solution**: Ensure the "Append or Update" operation is selected with `Profile ID` as the matching column **Issue**: Missing data in certain columns - **Solution**: Not all profiles have complete data; the workflow handles null values gracefully **Issue**: Google Sheets not updating - **Solution**: Verify OAuth credentials are valid and the sheet/document IDs are correctly configured --- ## Documentation & Resources ### Official Documentation - **ConnectSafely.ai Docs**: [https://connectsafely.ai/docs](https://connectsafely.ai/docs) - **API Reference**: Available in ConnectSafely.ai dashboard - **n8n Google Sheets Node**: [https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googlesheets/](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googlesheets/) ### Support Channels - **Email Support**: [[email protected]](mailto:[email protected]) - **Documentation**: [https://connectsafely.ai/docs](https://connectsafely.ai/docs) - **Custom Workflows**: [Contact us for custom automation](https://connectsafely.ai/contact) --- ## Connect With Us Stay updated with the latest automation tips, LinkedIn strategies, and platform updates: - **LinkedIn**: [linkedin.com/company/connectsafelyai](https://www.linkedin.com/company/connectsafelyai) - **YouTube**: [youtube.com/@ConnectSafelyAI-v2x](https://www.youtube.com/@ConnectSafelyAI-v2x) - **Instagram**: [instagram.com/connectsafely.ai](https://www.instagram.com/connectsafely.ai/) - **Facebook**: [facebook.com/connectsafelyai](https://www.facebook.com/profile.php?id=61582550884724) - **X (Twitter)**: [x.com/AiConnectsafely](https://x.com/AiConnectsafely) - **Bluesky**: [connectsafelyai.bsky.social](https://bsky.app/profile/connectsafelyai.bsky.social) - **Mastodon**: [mastodon.social/@connectsafely](https://mastodon.social/@connectsafely) --- ## Need Custom Workflows? Looking to build sophisticated LinkedIn automation workflows tailored to your business needs? **[Contact our team](https://connectsafely.ai/contact)** for custom automation development, strategy consulting, and enterprise solutions. We specialize in: - Multi-channel engagement workflows - AI-powered personalization at scale - Lead scoring and qualification automation - CRM integration and data synchronization - Custom reporting and analytics pipelines
Send AI-personalized LinkedIn connection requests from Google Sheets with Gemini
# Send AI-personalized LinkedIn connection requests from Google Sheets using ConnectSafely.AI API ## Who's it for This workflow is built for sales professionals, recruiters, founders, and growth marketers who want to scale their LinkedIn outreach without sacrificing personalization. Perfect for anyone tired of sending generic connection requests that get ignored, or manually crafting individual messages for hundreds of prospects. If you're running ABM campaigns, building a sales pipeline, recruiting talent, or expanding your professional network, this automation handles the heavy lifting while keeping your outreach authentic and human. ## How it works The workflow automates personalized LinkedIn connection requests by combining Google Sheets prospect tracking with AI-powered message generation through ConnectSafely.ai's API. **The process flow:** 1. Reads pending prospects from your Google Sheet 2. Immediately marks them "IN PROGRESS" to prevent duplicate sends 3. Fetches complete LinkedIn profile data via ConnectSafely.ai API 4. Generates a personalized, authentic message using Google Gemini AI 5. Sends the connection request with your custom message 6. Updates your sheet with "DONE" status and stores the message sent Random delays between requests mimic human behavior and maintain LinkedIn compliance. --- Watch the complete step-by-step implementation guide: [](https://www.youtube.com/watch?v=ZCnXr3-W8xs) --- ## Setup steps ### Step 1: Prepare Your Google Sheet Structure your Google Sheet with the following columns: | Column Name | Description | Required | |------------|-------------|----------| | `First Name` | Contact's first name | Optional | | `LinkedIn Url` | LinkedIn profile URL or username | Yes | | `Tagline` | Contact's headline/title | Optional | | `Status` | Processing status (PENDING/IN PROGRESS/DONE) | Yes | | `Message` | Stores the AI-generated message sent | Yes | **Sample Data Format:** ``` First Name: John LinkedIn Url: https://www.linkedin.com/in/johndoe Tagline: VP of Sales at TechCorp Status: PENDING Message: (left empty - will be filled by workflow) ``` **Pro Tip**: Use LinkedIn Sales Navigator export or a prospecting tool to populate your sheet with qualified leads. ### Step 2: Configure ConnectSafely.ai API Credentials #### Obtain API Key 1. Log into [ConnectSafely.ai Dashboard](https://connectsafely.ai/dashboard) 2. Navigate to **Settings** → **API Keys** 3. Generate a new API key #### Add Bearer Auth Credential in n8n 1. Go to **Credentials** in n8n 2. Click **Add Credential** → **Header Auth** or **Bearer Auth** 3. Paste your ConnectSafely.ai API key 4. Save the credential This credential is used by both the "Fetch LinkedIn Profile" and "Send Connection Request" HTTP nodes. ### Step 3: Configure Google Sheets Integration #### 3.1 Connect Google Sheets Account 1. Go to **Credentials** → **Add Credential** → **Google Sheets OAuth2** 2. Follow the OAuth flow to connect your Google account 3. Grant access to Google Sheets #### 3.2 Configure "Get Pending Prospect" Node 1. Open the **Get Pending Prospect** node 2. Select your Google Sheets credential 3. Enter your **Document ID** (from the sheet URL) 4. Select the **Sheet Name** 5. Add a filter: - **Lookup Column**: `Status` - **Lookup Value**: `PENDING` 6. Enable **Return First Match Only** under Options #### 3.3 Configure "Mark as In Progress" Node 1. Open the **Mark as In Progress** node 2. Select the same document and sheet 3. Configure column mapping: - **Matching Column**: `row_number` - **Status**: `IN PROGRESS` #### 3.4 Configure "Mark as Complete" Node 1. Open the **Mark as Complete** node 2. Select the same document and sheet 3. Configure column mapping: - **Matching Column**: `row_number` - **Status**: `DONE` - **Message**: `{{ $('Generate Personalized Message').item.json.message }}` ### Step 4: Configure Google Gemini AI #### Get Gemini API Key 1. Go to [Google AI Studio](https://aistudio.google.com/) 2. Create or select a project 3. Generate an API key #### Add Gemini Credential in n8n 1. Go to **Credentials** → **Add Credential** → **Google Gemini (PaLM) API** 2. Paste your API key 3. Save the credential #### Connect to Google Gemini Node 1. Open the **Google Gemini** node 2. Select your Gemini credential ### Step 5: Customize the AI Prompt The **Generate Personalized Message** node contains the system prompt that controls how messages are written. Customize it for your personal brand: 1. Open the **Generate Personalized Message** node 2. Find the **System Message** in Options 3. Replace the placeholder text: ``` MY CONTEXT: [CUSTOMIZE THIS: Add your name, role, and what you're looking for in connections] ``` With your actual information, for example: ``` MY CONTEXT: I'm Sarah, founder of a B2B SaaS startup. I'm interested in connecting with other founders, VCs, and sales leaders to exchange ideas and explore potential partnerships. ``` 4. Update the sign-off instruction from `"- [YOUR NAME]"` to your actual name ### Step 6: Test the Workflow 1. Add a test prospect to your Google Sheet with `Status: PENDING` 2. Click the **Manual Trigger (for testing)** node 3. Click **Test Workflow** 4. Verify: - Profile data is fetched correctly - AI generates an appropriate message - Connection request is sent - Sheet updates to `DONE` with the message stored --- ## Customization ### Message Personalization Edit the system prompt in the **Generate Personalized Message** node to adjust: - **Tone**: Formal, casual, or industry-specific language - **Length**: Modify character limits (LinkedIn allows up to 300 characters) - **Focus**: Emphasize mutual connections, shared interests, or achievements - **Sign-off**: Change the signature format to match your brand ### Timing Adjustments - **Schedule Trigger**: Currently set to run every minute. Adjust the interval in the **Run Every Minute** node - **Random Delay**: The **Random Delay (1-5 min)** node adds 1-5 minutes of random wait time. Modify the formula `{{ Math.floor(Math.random() * 4) + 1 }}` to change the range ### Rate Limiting Best Practices - Start with 10-20 connection requests per day - Gradually increase over 2-3 weeks - Never exceed 100 requests per day - Consider pausing on weekends --- ## Use Cases - **Sales Prospecting**: Connect with decision-makers at target accounts with personalized outreach - **Recruiting**: Reach out to passive candidates with messages that reference their specific experience - **Founder Networking**: Build relationships with fellow entrepreneurs, investors, and advisors - **Event Follow-up**: Send personalized connection requests to conference attendees and speakers - **Partnership Development**: Connect with potential partners by referencing their company achievements --- ## Troubleshooting ### Common Issues & Solutions **Issue**: AI generating messages over 300 characters - **Solution**: Add explicit character count requirement in the system prompt; the current prompt specifies 200-250 characters **Issue**: "Profile not found" errors from ConnectSafely.ai - **Solution**: Ensure LinkedIn URLs are complete (include `https://www.linkedin.com/in/`) **Issue**: Generic-sounding AI messages - **Solution**: Enhance the system prompt with more specific context about your background and goals **Issue**: Duplicate connection requests sent - **Solution**: Verify "Mark as In Progress" node runs before "Fetch LinkedIn Profile"; check that `row_number` column exists in your sheet **Issue**: Google Sheets not updating - **Solution**: Confirm `row_number` column exists and the matching column is correctly configured **Issue**: Bearer Auth errors - **Solution**: Verify your ConnectSafely.ai API key is valid and has proper permissions --- ## Documentation & Resources ### Official Documentation - **ConnectSafely.ai Docs**: [https://connectsafely.ai/docs](https://connectsafely.ai/docs) - **API Reference**: Available in ConnectSafely.ai dashboard - **Google Gemini API**: [https://ai.google.dev/docs](https://ai.google.dev/docs) ### Support Channels - **Email Support**: [[email protected]](mailto:[email protected]) - **Documentation**: [https://connectsafely.ai/docs](https://connectsafely.ai/docs) - **Custom Workflows**: [Contact us for custom automation](https://connectsafely.ai/contact) --- ## Connect With Us Stay updated with the latest automation tips, LinkedIn strategies, and platform updates: - **LinkedIn**: [linkedin.com/company/connectsafelyai](https://www.linkedin.com/company/connectsafelyai) - **YouTube**: [youtube.com/@ConnectSafelyAI-v2x](https://www.youtube.com/@ConnectSafelyAI-v2x) - **Instagram**: [instagram.com/connectsafely.ai](https://www.instagram.com/connectsafely.ai/) - **Facebook**: [facebook.com/connectsafelyai](https://www.facebook.com/profile.php?id=61582550884724) - **X (Twitter)**: [x.com/AiConnectsafely](https://x.com/AiConnectsafely) - **Bluesky**: [connectsafelyai.bsky.social](https://bsky.app/profile/connectsafelyai.bsky.social) - **Mastodon**: [mastodon.social/@connectsafely](https://mastodon.social/@connectsafely) --- ## Need Custom Workflows? Looking to build sophisticated LinkedIn automation workflows tailored to your business needs? **[Contact our team](https://connectsafely.ai/contact)** for custom automation development, strategy consulting, and enterprise solutions. We specialize in: - Multi-channel engagement workflows - AI-powered personalization at scale - Lead scoring and qualification automation - CRM integration and data synchronization - Custom reporting and analytics pipelines
Automate LinkedIn Profile Following with Google Sheets and ConnectSafely
# Follow LinkedIn profiles from Google Sheets via ConnectSafely ## Who's it for This workflow is designed for sales professionals, recruiters, marketers, and business development teams who need to scale their LinkedIn networking efforts. Perfect for anyone managing lead generation campaigns, building industry connections, or conducting competitor research at scale. ## How it works The workflow automates LinkedIn profile following by reading a list of target profiles from Google Sheets, processing each profile through ConnectSafely.ai's platform-compliant automation, and tracking completion status back to your spreadsheet. The automation maintains LinkedIn's compliance standards while eliminating manual clicking. --- Watch the complete step-by-step implementation guide: [](https://www.youtube.com/watch?v=b4G47AJX418) --- ## Setup steps ### Step 1: Install ConnectSafely.ai n8n Package Install the official ConnectSafely.ai community node: ```bash Package name: n8n-nodes-connectsafely.ai ``` **Installation Methods:** **Option A: Via n8n Interface** 1. Navigate to **Settings** → **Community Nodes** 2. Search for `n8n-nodes-connectsafely.ai` 3. Click **Install** **Option B: Via npm** ```bash npm install n8n-nodes-connectsafely.ai ``` **Important**: A complete n8n restart is required after installation for the nodes to appear. ### Step 2: Prepare Your Google Sheet Structure your Google Sheet with the following columns: | Column Name | Description | Required | |------------|-------------|----------| | `LinkedIn Url` | LinkedIn profile URL or ID | Yes | | `First Name` | Contact's first name | Optional | | `Tagline` | Contact's headline/title | Optional | | `Status` | Processing status (pending/done) | Yes | | `row_number` | Auto-generated row identifier | Yes | **Sample Data Format:** ``` LinkedIn Url: https://www.linkedin.com/in/username Status: pending ``` ### Step 3: Configure Google Sheets Integration 1. Add **Google Sheets** node (Get Rows operation) 2. Authenticate with Google OAuth: - Client ID - Client Secret - OAuth Token 3. Select your document and sheet 4. Configure to pull all rows with pending status ### Step 4: Configure ConnectSafely.ai Credentials #### Obtain API Credentials 1. Log into [ConnectSafely.ai Dashboard](https://connectsafely.ai/dashboard) 2. Navigate to **Settings** → **API Keys** 3. Generate a new API key 4. Copy your **Account ID** from the **Accounts** section #### Configure n8n Node 1. Add **ConnectSafely LinkedIn** node 2. Select **Follow a User** operation 3. Add credentials: - **API Key**: Paste your ConnectSafely API key - **Account ID**: Your LinkedIn account ID from dashboard 4. Map **Profile ID** field: - Use expression: `{{ $json['LinkedIn Url'] }}` - This dynamically pulls the profile URL from each row ### Step 5: Configure Status Tracking Add a second **Google Sheets** node for status updates: 1. Select **Update Row** operation 2. Choose the same Google Sheet 3. Configure column mapping: - **Matching Column**: `row_number` - **Update Field**: `Status` → `done` 4. Map row_number expression: `{{ $('Get row(s) in sheet').item.json.row_number }}` This ensures accurate tracking of processed profiles and enables workflow resumption. --- ### Customization - Add delay nodes for large batches (500+ profiles) - Implement error handling for failed attempts - Extend to CRM integration or connection requests - Add analytics tracking for follow-back monitoring ## Use Cases - **Lead Generation**: Follow prospects and potential customers at scale - **Network Building**: Expand your LinkedIn network with relevant industry professionals - **Competitor Analysis**: Track and follow key players in your market - **Influencer Outreach**: Connect with thought leaders and content creators - **Event Networking**: Follow attendees and speakers from conferences and webinars --- ## Troubleshooting ### Common Issues & Solutions **Issue**: ConnectSafely node not appearing after installation - **Solution**: Ensure complete n8n restart (not just workflow refresh) **Issue**: Authentication errors with ConnectSafely API - **Solution**: Verify API key has proper permissions in dashboard **Issue**: Profile ID format errors - **Solution**: Ensure you're passing LinkedIn profile IDs or full URLs, not partial paths **Issue**: Google Sheets not updating status - **Solution**: Confirm `row_number` column exists and mapping is correct **Issue**: Workflow stops mid-execution - **Solution**: Check Google Sheets has `Status` column with "pending" values; verify rate limits --- ## Advanced Configuration ### Scaling Considerations - **Batch Processing**: Add delay nodes between executions for large lists (500+ profiles) - **Error Handling**: Implement error workflows for failed follow attempts - **Retry Logic**: Configure automatic retries for temporary failures - **Logging**: Add nodes to track execution metrics and performance ### Integration Extensions This workflow can be extended to include: - **CRM Integration**: Update contact records with follow status - **Connection Requests**: Modify to send personalized connection requests - **Engagement Tracking**: Monitor who follows back - **Multi-Platform**: Expand to other social networks - **Analytics Dashboard**: Feed data to BI tools for reporting --- ## Documentation & Resources ### Official Documentation - **ConnectSafely.ai Docs**: [https://connectsafely.ai/docs](https://connectsafely.ai/docs) - **n8n Package Details**: [https://connectsafely.ai/n8n-docs](https://connectsafely.ai/n8n-docs) - **API Reference**: Available in ConnectSafely dashboard ### Support Channels - **Email Support**: [[email protected]](mailto:[email protected]) - **Documentation**: [https://connectsafely.ai/docs](https://connectsafely.ai/docs) - **Custom Workflows**: [Contact us for custom automation](https://connectsafely.ai/contact) --- ## Connect With Us Stay updated with the latest automation tips, LinkedIn strategies, and platform updates: - **LinkedIn**: [linkedin.com/company/connectsafelyai](https://www.linkedin.com/company/connectsafelyai) - **YouTube**: [youtube.com/@ConnectSafelyAI-v2x](https://www.youtube.com/@ConnectSafelyAI-v2x) - **Instagram**: [instagram.com/connectsafely.ai](https://www.instagram.com/connectsafely.ai/) - **Facebook**: [facebook.com/connectsafelyai](https://www.facebook.com/profile.php?id=61582550884724) - **X (Twitter)**: [x.com/AiConnectsafely](https://x.com/AiConnectsafely) - **Bluesky**: [connectsafelyai.bsky.social](https://bsky.app/profile/connectsafelyai.bsky.social) - **Mastodon**: [mastodon.social/@connectsafely](https://mastodon.social/@connectsafely) --- ## Need Custom Workflows? Looking to build sophisticated LinkedIn automation workflows tailored to your business needs? **[Contact our team](https://connectsafely.ai/contact)** for custom automation development, strategy consulting, and enterprise solutions. We specialize in: - Multi-channel engagement workflows - Lead scoring and qualification automation - CRM integration and data synchronization - Custom reporting and analytics pipelines - Team collaboration and approval workflows