---
schema_version: "1"
id: f2a29b3c5471dcdbce09e3aa964ea8921758e048c8058fd777baddee05f92fda
title: GetPortfolioItem()
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/ampscript/references/content/mc-ampscript-reference-content-get-portfolio-item.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-content/mc-ampscript-reference-content-get-portfolio-item.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 726f3f3d22c9ffea20219bba4b883cbd3b53ba1f2cb806f8e420d9677854bf85
products:
  - AMPscript for Marketing Cloud
  - Marketing Cloud
---
# GetPortfolioItem()

Returns the content of a file in your Portfolio.

## Availability

<table>
  <tr>
    <td>Marketing Cloud Engagement</td>
    <td>✅ Yes</td>
  </tr>
  <tr>
    <td>Marketing Cloud Next</td>
    <td>❌ No</td>
  </tr>
</table>

## Syntax

```
GetPortfolioItem(itemExternalKey)
```

The `GetPortfolioItem(itemExternalKey)` function has this parameter:

- `itemExternalKey` (string): Required. The external key of an item in your Portfolio.

## Usage

To use this function, pass it the external key of an item in your Portfolio. This function is helpful for storing text in an external file, and bringing that text into your content.

This example refers to a text file called hello.txt with an external key of "HelloWorld". The file contains this text.

```
Hello, world!
This is a second line of text.
This is the last line of text.
```

Call the function by passing it the external key of the text file.

```
<p>%%=GetPortfolioItem("HelloWorld")=%%</p>
```

The function returns `Hello, world! This is a second line of text. This is the last line of text.`
