# Managing existing connections

This page describes how to create workflows for retrieving and removing people from your existing LinkedIn connections.

## Retrieving connections

To retrieve your connections, you need to include [`st.retrieveConnections`](/docs/action-st-retrieve-connections) action in your workflow. Here's an example:

**Workflow:**

```json
{
  "actionType": "st.retrieveConnections",
  "filter": {
    "firstName": "John",
    "lastName": "Doe",
    "position": "CEO",
    "locations": ["New York", "San Francisco", "London"],
    "industries": ["Software Development", "Professional Services"],
    "currentCompanies": ["Tech Solutions", "Innovatech"],
    "previousCompanies": ["FutureCorp"],
    "schools": ["Harvard University", "MIT"]
  }
}
```

**Completion:**

```json
{
  "actionType": "st.retrieveConnections",
  "success": true,
  "data": [
    {
      "name": "John Doe",
      "publicUrl": "https://www.linkedin.com/in/johndoe",
      "headline": "Founder & CEO at Example Company",
      "location": "Lisbon, Portugal"
    },
    {
      "name": "Jane Smith",
      "publicUrl": "https://www.linkedin.com/in/janesmith",
      "headline": "CEO at Tech Solutions",
      "location": "San Francisco Bay Area"
    },
    {
      "name": "Carlos Santos",
      "publicUrl": "https://www.linkedin.com/in/carlossantos",
      "headline": "Project Manager at Startup Hub",
      "location": "Madrid"
    }
  ]
}
```

> 💡 If you want to perform actions on the retrieved connections, use [`st.doForPeople`](/docs/action-st-do-for-people) action.

## Removing connection

To remove a person from your connections, use [`st.removeConnection`](/docs/action-st-remove-connection) action in your workflow. Here's an example:

**Workflow:**

```json
{
  "actionType": "st.removeConnection",
  "personUrl": "https://www.linkedin.com/in/person1"
}
```

**Completion:**

```json
{
  "actionType": "st.removeConnection",
  "success": true
}
```

> 💡 If you need to remove several people from your connections, use this action multiple times within an [array workflow](/docs/building-workflows). This approach is significantly faster than creating separate workflows for each person due to API optimizations.

> This page provides examples of [workflows](/docs/building-workflows) and their [completions](/docs/executing-workflows). For detailed documentation on constraints, parameters, and possible results of specific actions, always refer to the corresponding [action documentation pages](/docs/actions-overview).
