Get Screenshots of LinkedIn Pages in Airtable

In this guide, we'll create screenshots for a list of LinkedIn pages in Airtable. We'll use the Data Fetcher Airtable app along with the Urlbox service to turn LinkedIn URLs into screenshots. Then we'll use the Scripting app to convert these screenshots into attachments within Airtable.

Set up Pages table

Create a table called 'Pages'. Create a field called 'URL' and add the LinkedIn pages you want to screenshot as records.

Then create a field called 'Screenshot' with type 'Attachment'.

linkedin-pages-table.png

Create a new Grid view called 'Needs screenshot' with the following filters:

  • The 'URL' field is not empty.
  • The 'Screenshot' field is empty.
linkedin-needs-screenshot-view.png

Install Data Fetcher

Install Data Fetcher from the Airtable app marketplace. After the app launches, sign up for a free Data Fetcher account by entering a password and clicking 'Sign up for free'.

Group 1Data Fetcher Sign Up .png

Get Screenshots of LinkedIn pages in Airtable

On the home screen of the Data Fetcher app, click 'Create your first request'. Requests in Data Fetcher are how you import data to or send data from your Airtable base.

click-create-your-first-request.png

On the create request screen in Data Fetcher, for Application, select 'Urlbox'.

urlbox-application-selected.png

You will need to get an API key from Urlbox. You can sign up to a free trial here, then get your API key in the Dashboard.

urlbox-dashboard-get-api-key.png

Paste this API key into the API Key input in Data Fetcher.

google-maps-authorization-api-key.png

For Endpoint, select 'Create screenshots from URLs'.

urlbox-endpoint-screenshots.png

Enter a Name for your request, e.g. 'Import LinkedIn Screenshots'. Then click 'Save & Continue'.

linkedin-screenshots-save-continue.png

For URL, we want to insert a reference to our 'URL' field. First click the + button.

microlink-url-add-icon.png

Then, on the modal that opens, 'URL' for Field, 'Needs screenshot' for Run for every record in view. Then click 'Confirm'.

apiflash-url-reference-modal.png

The URL field should now contain a reference to the table.

apiflash-url-reference.png

Select the Format you want to use, e.g. 'PNG'.

urlbox-format.png

We need to make LinkedIn think we are logged in when we capture the screenshot. Otherwise, we will just get a screenshot of the signin screen! To do this, sign in to LinkedIn, open your browser's network tab and navigate somewhere in LinkedIn, e.g. someone's profile. Then go to the network tab, click on a request 'Cookies' and copy the value for the li_at cookie.

linkedin-li-at-cookie.png

Back in Data Fetcher, click on 'More options for this Urlbox endpoint'.

urlbox-more-options.png

Scroll to Cookie. Enter the following:

li_at=YOUR_LINKEDIN_LI_AT_COOKIE

urlbox li_at cookie.png

Make sure the Output Table & View is set to 'Pages' and 'Needs screenshot'.

output-table-view-needs-screenshot.png

Click 'Save & Run'.

urlbox linkedin save run.png

The request will run and the Response field mapping modal will open. This is where you set how the available fields from Urlbox should map to the fields in the output table. Make sure the 'Screenshot' field is mapped to our existing 'Screenshot' field. Then click 'Save & Run'.

urlbox-rfm.png

Data Fetcher will then run the request for every record in 'To process' and convert the LinkedIn page URL to screenshots in Airtable.

apiflash-linkedin-imported-data.png

Create Screenshots from LinkedIn Page URLs on a Schedule

At the moment, we have to manually run the request to create the screenshots. We can use Data Fetcher's scheduled requests feature to automatically create them every 15 minutes/ hour/ day etc.

In Data Fetcher, scroll to Schedule and click 'Upgrade'.

table-1-schedule-upgrade-button.png

A new tab will open where you can select a plan and enter your payment details to upgrade.

Screenshot 2021-12-29 at 10.25.19.png

Return to the Data Fetcher app and click "I've done this".

table-1-schedule-ive-done-this-button.png

Click 'Add API key' in order to add your Airtable API key. You can find your Airtable API key here.

Group 11(1).png

Enter your Airtable API key and click 'Save'.

save-airtable-api-key.png

Enable Schedule this request.

schedule-data-fetcher-request.png

Select how often you want the request to run, e.g. 'Every 15 mins'. Click 'Save' The request will now run create the screenshots from URLs automatically on this schedule.

Group 11(2).png