# nv.doForPeople

This action allows you to apply the actions specified in its `then` parameter to each person provided by the parent action in Sales Navigator.

> There is a limit of 20 people that this action can be applied to. If the parent action provides more than 20 people, only the first 20 will be processed.

## Constraints

> ⏺️ **Root Start:** not allowed.

> ⬆️ **Parent Actions:** [nv.searchPeople](/docs/action-nv-search-people), [nv.retrieveCompanyEmployees](/docs/action-nv-retrieve-company-employees), [nv.retrieveCompanyDMs](/docs/action-nv-retrieve-company-dms).

> ⬇️ **Child Actions:** [nv.openPersonPage](/docs/action-nv-open-person-page).

## Parameters

```json
{
  "actionType": "nv.doForPeople",
  "then": { ... }
}
```

- `then` – object or array of child actions to apply to each person from the parent action.

## Result options

This action doesn't produce its own distinct result. The effects are visible in the people that were involved, as they will contain a `then` field with the results of the applied actions. See usage examples for more details.

## Usage examples

1. **Retrieving basic information about the first 2 people from the Sales Navigator search results:**

**Workflow:**

```json
{
  "actionType": "nv.searchPeople",
  "term": "John Doe",
  "limit": 2,
  "filter": {
    "position": "CEO",
    "locations": ["New York", "San Francisco", "London"]
  },
  "then": {
    "actionType": "nv.doForPeople",
    "then": {
      "actionType": "nv.openPersonPage",
      "basicInfo": true
    }
  }
}
```

**Completion:**

```json
{
  "actionType": "nv.searchPeople",
  "success": true,
  "data": [
    {
      "name": "John Doe",
      "hashedUrl": "https://www.linkedin.com/in/SInQBmjJ015eLr8",
      "position": "Founder & CEO",
      "location": "San Francisco, USA",
      "then": {
        "actionType": "nv.openPersonPage",
        "success": true,
        "data": {
          "name": "John Doe",
          "publicUrl": "https://www.linkedin.com/in/johndoe",
          "hashedUrl": "https://www.linkedin.com/in/SInQBmjJ015eLr8",
          "headline": "Software Engineer at TechCorp",
          "location": "San Francisco, USA",
          "countryCode": "US",
          "position": "Software Engineer",
          "companyName": "TechCorp",
          "companyHashedUrl": "https://www.linkedin.com/company/12345678"
        }
      }
    },
    {
      "name": "John Doe",
      "hashedUrl": "https://www.linkedin.com/in/CoAA2DdsSV83B48",
      "position": "Product Manager",
      "location": "New York, USA",
      "then": {
        "actionType": "nv.openPersonPage",
        "success": true,
        "data": {
          "name": "John Doe",
          "publicUrl": "https://www.linkedin.com/in/johnyd",
          "hashedUrl": "https://www.linkedin.com/in/Hs763KsjdB153e",
          "headline": "Product Manager at TechCorp",
          "location": "New York, USA",
          "countryCode": "US",
          "position": "Product Manager",
          "companyName": "TechCorp",
          "companyHashedUrl": "https://www.linkedin.com/company/12345678"
        }
      }
    }
  ]
}
```
