> For the complete documentation index, see [llms.txt](https://docs.gradient.works/kb/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gradient.works/kb/automation-builder-kit-abk/actions/advanced/gwfxrecordmapgetaction.md).

# Get Record from Record Map

Retrieve a particular record from a [RecordMap](/kb/automation-builder-kit-abk/models/recordmap.md) using the specified key. This will commonly be used inside a Flow loop to efficiently retrieve a related record.

For example, consider the following Flow structure:

1. Use `Get Records` to retrieve a collection of Contacts
2. Use [Build Record Map from Lookup](/kb/automation-builder-kit-abk/actions/advanced/gwfxbuildrecordmapfromlookupaction.md) to get a [RecordMap](/kb/automation-builder-kit-abk/models/recordmap.md) of related Accounts using their `Id` as the key
3. Use a `Loop` over the collection of Contacts
4. Use [Get Record from Record Map](/kb/automation-builder-kit-abk/actions/advanced/gwfxrecordmapgetaction.md) inside the loop with `Contact.AccountId` as the key to get the related Account

This approach ensures that your Flow will run efficiently within the [Salesforce Flow limits](https://help.salesforce.com/articleView?id=sf.flow_considerations.htm\&type=5) by reducing queries and CPU time.

## Inputs

| Name      | Required | Type                                                            | Description                                                                                                     |
| --------- | -------- | --------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| key       | Yes      | String                                                          | The key (usually an Id) to use for looking up a particular record                                               |
| recordMap | Yes      | [RecordMap](/kb/automation-builder-kit-abk/models/recordmap.md) | The [RecordMap](/kb/automation-builder-kit-abk/models/recordmap.md) from a previous action to use for retrieval |

## Outputs

| Name   | Type    | Description                                                                                                  |
| ------ | ------- | ------------------------------------------------------------------------------------------------------------ |
| record | SObject | The record retrieved based on the key. This may be null if there is no record assigned to the specified key. |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.gradient.works/kb/automation-builder-kit-abk/actions/advanced/gwfxrecordmapgetaction.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
