Resources »

Guides »

Integrations »

LinkedIn »

Cerb + LinkedIn

Introduction

In this guide we’ll walk through the process of linking Cerb to LinkedIn. You’ll be able to use LinkedIn’s full API from bots in Cerb to automate whatever you need.

Create an app at LinkedIn

Next, you need to create a new app on LinkedIn for Cerb to connect to.

  1. Log in to LinkedIn’s developer portal.

  2. Click the green Create New App button.

  3. Click My Apps in the top menu.

  4. Click the yellow Create Application button.

  5. Enter the following details:
    • Company Name: (your company)
    • Name: Cerb
    • Description: Integration with Cerb
    • Application Logo: image
    • Application Use: Sales (CRM), Marketing
    • Website URL: https://cerb.ai/
    • Business Email: (your email address)
    • Business Phone: (your phone number)
  6. Review the API Terms of Use and check agree.

  7. Click the Submit button.

Configure authentication for your LinkedIn App

  1. In the Authentication panel, under Authentication Keys, copy your Client ID and Client Secret. You’ll need to input these into Cerb.

  2. For Default Application Permissions, select everything.

  3. Under OAuth 2.0, add an Authorized Redirect URL with the following format and click the Add button: https://YOUR-CERB-HOST/oauth/callback

  4. Scroll down to App Credentials and make a note of your Client ID and Client Secret for the next step.

  5. Select OAuth & Permissions from the left sidebar.

  6. Click the Add Redirect URL button and enter the base URL to your Cerb install (e.g. https://YOUR-CERB-HOST/).

  7. Click the blue Update button.

Create the LinkedIn service in Cerb

  1. Navigate to Setup » Configure » Import Package.

  2. Paste the following package:

     
    	
     {
       "package": {
         "name": "LinkedIn Connected Service",
         "revision": 1,
         "requires": {
           "cerb_version": "9.1.0",
           "plugins": []
         },
         "configure": {
           "placeholders": [],
           "prompts": [
             {
               "type": "text",
               "label": "Client ID",
               "key": "prompt_client_id",
               "params": {
                 "default": "",
                 "placeholder": "(paste your Client ID)"
               }
             },
             {
               "type": "text",
               "label": "Client Secret",
               "key": "prompt_client_secret",
               "params": {
                 "default": "",
                 "placeholder": "(paste your Client Secret)"
               }
             }
           ]
         }
       },
       "records": [
         {
           "uid": "service_linkedin",
           "_context": "connected_service",
           "name": "LinkedIn",
           "extension_id": "cerb.service.provider.oauth2",
           "params": {
             "grant_type": "authorization_code",
             "client_id": "{{{prompt_client_id}}}",
             "client_secret": "{{{prompt_client_secret}}}",
             "authorization_url": "https://www.linkedin.com/oauth/v2/authorization",
             "access_token_url": "https://www.linkedin.com/oauth/v2/accessToken",
             "resource_owner_url": "",
             "scope": "r_basicprofile r_emailaddress rw_company_admin w_share",
             "approval_prompt": ""
           }
         },
         {
           "uid": "account_linkedin",
           "_context": "connected_account",
           "name": "LinkedIn",
           "service_id": "{{{uid.service_linkedin}}}",
           "owner__context": "cerberusweb.contexts.app",
           "owner_id": "0",
           "params": {}
         }
       ]
     }
    	
     
     
  3. Click the Import button.

  4. Enter your client ID and secret from LinkedIn.

  5. Click the Import button again.

Link the connected account to LinkedIn in Cerb

  1. Click on the LinkedIn bubble in the Connected Accounts section after importing the above package.

  2. Click on the Edit button in the card popup.

  3. Click the blue Link to LinkedIn button.

  4. Accept consent on LinkedIn.

  5. Click the Save Changes button.

Use the connected account in bot behaviors

You can use the connected account you just created to access LinkedIn’s REST API from bot behaviors in Cerb. This is typically accomplished using the Execute HTTP Request action from a bot, and selecting the connected account in the Authentication: section.

You can import the LinkedIn Bot package for a working example.