In this article, we'll show you how you can send profiles from Linked Helper to a list in Google Sheets directly, without using third-party tools like Zapier or Make.com. This is a cool ability for sellers who want to make their business workflow even more automated.
NOTE: Direct integrations with most popular CRMs are now available via Send person to external CRM action.
In this article, it is implied that you already have a ready-to-go campaign to which you only need to add a Send person to webhook action in order to send profiles to Google Sheets. If you want to send those who replied, you need to install Send replied to Webhook plug-in and enable corresponding option in the Check for replies action.
- Integration
- FAQ
- I do not want to send certain fields, what do I need to do to stop sending them?
- I deleted a column from the list, now I want Linked Helper to send data to that column again. How to do that?
- How can make Linked Helper continue sending data to a new sheet inside the same document?
- How can I rename the sheet after I deployed the script?
Integration
Here are the steps to create a webhook link for sending profiles to a spreadsheet:
- Create a new Google Sheets document and rename its sheet to 'LH'. You can also use already existing document, but in this case you also need to create a new sheet and and rename it to 'LH' (you can use another sheet name in both cases, but for that you will need to change the code line #17 of the script, see step 3 below):
- Go to the Extensions > Apps Script:
If there is no App Script option in the Extensions menu, go to Tools > Script editor: - In the opened Code.gs menu, replace the code with the example shown below. If you used different sheet name at the step #1, for example, "Leads from LinkedIn", then you need to modify line #17 of the script below (const sheetName = "LH";) and replace the LH part with the new name of your sheet (const sheetName = "Leads from LinkedIn";):
function mapValuesToKeys(data, sheetHeaders) {
const orderedData = [];
for (const sheetHeader of sheetHeaders) {
orderedData.push(data[sheetHeader]);
}
return orderedData;
}
function doPost(e) {
const sheetName = "LH";
const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(sheetName);
const data = JSON.parse(e.postData.contents);
const lhHeaders = Object.keys(data);
if (sheet.getFrozenRows() === 0) {
sheet.getRange(1, 1, 1, lhHeaders.length).setValues([lhHeaders]);
sheet.setFrozenRows(1);
}
const sheetHeaders = sheet.getRange(1, 1, 1, sheet.getLastColumn()).getValues()[0];
const mappedValues = mapValuesToKeys(data, sheetHeaders);
sheet.appendRow(mappedValues);
return ContentService.createTextOutput("Data appended successfully");
} - Click the '+' button next to the Services menu:
- Scroll the list in the pop-up, choose 'Google Sheets API' and click Add button:
- In the upper-right corner, click Deply > New deployment
- In the pop-up, click gear icon and then choose the Web app option:
- Make sure the Who has access setting is set to Anyone and click Deploy button:
- Click Authorize access:
- In the pop-up window, click on the Google account which spreadsheet you will be using:
- Click Advanced and then Go to Untitled project (unsafe). In your case, if you gave your project a title, the name will be different:
- Click Allow button in the next pop-up window:
- Once app is deployed, copy the Web app URL:
- Go to your campaign and add the Send person to webhook action:
- In the pop-up, adjust the action settings:
- Add the Web app URL you copied at the step #13.
- Make sure data to be converted to a flat objects and multi-line values are to be converted into a single line.
- Set the number of columns you want to send to the spreadsheet.
- Enable sending messaging history if needed and allowed by your license type.
- Click 'Save & Close' button.
- Start the campaign and wait till at least one profile is sent to the spreadsheet. Once it is done, go to the document and make sure the data was sent correctly.
FAQ
I do not want to send certain fields, what do I need to do to stop sending them?
Simply delete the name of the column.
I deleted a column from the list, now I want Linked Helper to send data to that column again. How to do that?
Simply add a column and give it exactly the same name.
How can make Linked Helper continue sending data to a new sheet inside the same document?
The easiest way is to:
- Change original sheet name, for example, from 'LH' to 'Data from LH received till 2023/12/13'
- Create a new sheet inside the same document.
- Give the new sheet name of the original sheet, 'LH' by default.
New data will be sent to the new list called 'LH', but the previously sent data will be stored in another list called 'Data from LH received till 2023/12/13'.
Another way is to:
- Create a new sheet inside the same document.
- Give it any desired name.
- Go the Extensions > Apps Script
- Change the name of the sheet in the code.
- In the upper-right corner, click Deply > New deployment
- Give it new desctiption, make sure the Who has access setting is set to Anyone and click Deploy button.
- Once app is deployed, copy the Web app URL.
- Replace the webhook URL in every action that used previous version of the script, i.e. previous URL.
How can I rename the sheet after I deployed the script?
You need to:
- Create a new sheet inside the same document.
- Give it any desired name.
- Go the Extensions > Apps Script
- Change the name of the sheet in the code.
- In the upper-right corner, click Deply > New deployment
- Give it new desctiption, make sure the Who has access setting is set to Anyone and click Deploy button.
- Once app is deployed, copy the Web app URL.
- Replace the webhook URL in every action that used previous version of the script, i.e. previous URL.