I created a workflow / blueprint to generate personalized, tailor-made LinkedIn messages and add these message in a Google Spreadsheet.
When you combine this with the other post about sending Linkedin messages from within Make.com, you could create your own fully automated LinkedIn outreach agent.
When you want to make this outreach agent I recommand to start with this article first. In this article, I’ll walk you through the steps to generate messages based on someone’s LinkedIn profile. The other post is located here.
Of course you need your Make account to create the scenario. Also we use Browserflow, so it is recommend before start to create your account there at browserflow.io/activate if you don’t have an account. Also you need your ChatGPT API key which you can access here https://openai.com/index/openai-api/
Step 1: Download the Template
- Log In to your Browserflow account at app.browserflow.io/login.
- Get API Key: After logging in, navigate to the settings and copy your API key.
- Download the LinkedIn Profile template:
- In Browserflow, go to the Templates page.
- Search for “Get LinkedIn User Profile Data” and click Download Template.
4. Store LinkedIn Cookies (First-time Setup Only):
- If prompted to store your LinkedIn cookie, click on Get Required Cookies.
- A login session window will open (this may take a minute). When the LinkedIn login page appears, enter your credentials and verify with a security code if required.
- After logging in, click Save Login Cookies to initiate the download of the template.
Step 2: Import Blueprint into Make.com and Set Up Variables
- Log In to your Make.com account and go to the Scenarios section.
- Create a New Scenario:
- Click ‘Create a new scenario’ in the top-right corner.
- In the bottom-center toolbar, click the three dots and select Import Blueprint.
- Upload the downloaded template file.
3. Add Browserflow API Key:
- Click on the ‘Start Browserflow Session’ module in your scenario.
- Select Add Connection and paste your Browserflow API key.
- Input Linkedin URL and Run Flow
- Open the Set Custom Variables Module and change ‘< Profile URL >’ to a Linkedin url of someone that you would like to scrape.
- Now click on Run Once and your flow should run. NOTE: This step is important even if you don’t like to test as later the variable names should be visible which cannot be achieved without running it once.
Step 3: Setup Google Sheets and Scrape Profile
- Set up Google Sheets integration:
- Make a copy of the following Google Sheets file.
- In Make.com add a new Google Sheets module and choose Search Rows (Advanced) right before the Set Custom Variables module.
- Connect your Google account and select the Google Sheets file containing LinkedIn URLs.
2. Input Spreadsheet and Sheet ID:
- If you cannot locate the file, select Enter Manually in the Search Method dropdown.
- Copy the Spreadsheet ID from your Google Sheets URL and paste it into the appropriate field.
Spreadsheet ID
- In the Sheet ID field, enter the name of your sheet tab (
Profiles
).
3. Set Query:
- In the Query field, input:
Select * where (I != “Scraped?” OR I != true ) AND A != “”
- Click OK, then right-click the module and select Run this module only to test the connection.
right-click to open this modal and click on Run this module only
4. Set Up Profile Data Variables:
- In the Set Custom Variables module, set the LinkedIn URL variable to map from the Google Sheets data.
Step 4: Update Google Sheet with Profile
- At the end of the flow, we are going to add a few modules so the flow looks like this:
- Add iterator:
- First add an iterator to the top three paths after the Route module (for Recent Activity, Experience, Education).
- In the iterator specify the output field ‘data’ from the module before as the array.
- Append to Google Sheets:
- For each of these three paths, after the iterator, add a Google Sheets Add a row module. Point it to the same google sheets as the Google Sheets module in Step 3 but now use Activity, Experience and Education as the Sheet IDs respectively to the paths.
- Put the RowId From the Google Sheets Search Row (Built in Step 3) Module as cell A and for the other cells, look at the headers in the Google Sheets file and match the cells in the Google Sheet Modules. Make sure to grab the output of the iterator.
- Last two paths
- For the last two paths use a Google Sheets Update a Row module
- Set the Row number to the RowNr from the module in Step 3.
- Set the SheetID to ‘Profile’ and grab the output of the Tools module and match it with the right cell in the Google Sheet. Also add ‘true’ to the value of field I to mark it as Scraped.
- Run your flow
- You can now run your flow and the data from the profiles will now be stored in the Google Sheets
Step 5: Get Data from Google Sheets
- Get the Data
- Click on the Router to add a new path.
- Add a Google Sheets Search Rows module NOTE: Don’t use the advanced version as it may cause bugs.
- Point to the same Google Sheet as the previous steps
- Fill Profile as the SheetID
- Set A filter on the RowId to match the RowId from Step 3
- Then click on ‘ok’, right-click the module and click Run this module only.
2. Repeat this process 3x
- Repeat the process above for the other Tabs. Also use the Search Rows module, but then with Activity, Experience and Education as the SheetID.
- For each of these, the filter should match Cell A with the RowId from Step 3
- Right click each module and rename them to keep it organized.
- Right click and Run this module once for each of these four Google Sheets modules (use 2 for the row number). Note: I assume that you have ran the full flow in the previous Step and that this has resulted in data for each
- Your new path now looks like this:
- Now after the Get Activity Data, Get Experience Data and Get Education Data, Add a Array Aggregator module to combine the bundles in order to prevent GPT from running multiple times. In the aggregator module, select the previous ‘Get <> Data’ module and select the fields you want to use for GPT. The result should look like this:
Step 6: Generate Message and Update Sheet
- Add the OpenAI integration:
- Add a OpenAI Create a Completion (prompt) module.
- Connect with your OpenAI api key and organizationID
- Select a model and add a message, choose System for the role.
2. Input a System message:
- In the System message, describe the type of message to generate. For example (Be aware that the character limit depends on your Linkedin plan);
You are a friendly and likable employee for …, a company that …(describe what your company does). You are connecting with prospects to make them enthousiastic for …
You should therefore generate a custom message that does not appear to come from a bot. As it is a Linkedin message, it should not exceed the limit of … characters. Use the by the user provided information to make the message custom to the target.
3. Input User message
- Add another message, this time selecting ‘User’ as the role.
- Add the Data from the sheet of which you think it should be used for GPT to generate the custom message. You need to transform the data you wish to include in your message to a json first with the transform to JSON module. Then use the output of that module inside the message.
- Then as a last step add a Google Sheet Update Cell module and hook it to the same spreadsheet again. For the SpreadsheetID use ‘Profiles’.
- For the cell choose J{RowNr} and for the value choose the result of the GPT module.
Step 7: Run the Flow
- Save Run:
- Save your scenario by pressing Ctrl + S.
2. Execute the Flow:
- As you add more LinkedIn URLs to your Google Sheets, Whenever you start this flow, the workflow will automatically retrieve the corresponding profile data and generate personalized messages.
- You can monitor the live progress of your automation in the Browserflow session viewer at app.browserflow.io/advanced.
- Pro Tip:
- There is another guide that helps you to automatically send the message too. Combining these two would be very powerful!