---
title: "Embedding - Appiphony"
url: "https://appiphony.com/docs/drive-connect/features/file-management/file-management-overview/embedding"
---

# Embedding

With the **Drive File** component, users can embed Google files to record pages in Salesforce. Once the component's file is set, users who visit the page will be able to view and edit the file on the layout, provided they have access to the file in Google Drive.

Drive Connect’s **Drive File** component supports selecting existing Drive files using the native Google Picker or merging new Google Docs from templates created with the Template Builder. A URL field is required for the component to store and read the selected file's URL. This field is chosen when configuring the component in the Lightning App Builder.

### Architecture

The (1) **Drive File** component allows users to select a Drive file or a template via the [Google Picker](https://developers.google.com/drive/picker), which is (2) presented by the Drive Service. Upon selecting a file or template, (3) the URL of the existing or generated file is saved back to a Salesforce URL field. The URL is then used to display the Drive file through an iframe. ![File Embed architecture diagram](https://appiphony.com/wp-content/uploads/2024/05/File-embed-architecture.png)

### Adding the Drive Files Component

The Drive File component will store the URL of the file you are embedding to a URL field on the associated record. Before you can add the Drive File component, you must first add a URL field to the object you want to use the component with.

1. To add the Drive Connect Drive File component to a lightning record page, navigate to **Setup** in the **Global Header**. ![Salesforce header with Setup option highlighted](https://appiphony.com/wp-content/uploads/2024/05/Salesforce-header-with-Setup-option-highlighted.png)
2. Go to the **Object Manager** tab and select the Object you want to add the Drive Connect component to. ![Object Manager tab with Account object highlighted](https://appiphony.com/wp-content/uploads/2024/05/Object-Manager-tab-with-Account-object-highlighted.png)
3. From the left-hand side of the Object Manager tab, click **Lightning Record Pages**. ![Object Manager tab with Lightning Record Pages tab selected](https://appiphony.com/wp-content/uploads/2024/05/Object-Manager-tab-with-Lightning-Record-Pages-tab-selected.png)
4. Select a lightning record page, then click **Edit** to add the component to an existing lightning page layout. This will launch the Lightning App Builder. ![Lightning Record Page with Edit button highlighted](https://appiphony.com/wp-content/uploads/2024/05/Lightning-Record-Page-with-Edit-button-highlighted.png)
5. In the Lightning App Builder, navigate to the **Components** tab. Under the **Custom -Managed** heading, look for the **Drive File** component. ![App Builder with Drive File component option highlighted](https://appiphony.com/wp-content/uploads/2024/05/App-Builder-with-Drive-File-component-option-highlighted.png)
6. The **Drive File** component requires a URL field to be added to the page layout. You may need to [add a new URL field](https://help.salesforce.com/s/articleView?language=en_US&id=000358423&type=1) to the object before dragging the component onto the page. ![App Builder with Drive File component and URL Field input highlighted](https://appiphony.com/wp-content/uploads/2024/05/App-Builder-with-Drive-File-component-and-URL-Field-input-highlighted.png)
7. Click **Save** and **Activate. ![Lightning Record Page with Edit button highlighted](https://appiphony.com/wp-content/uploads/2024/05/App-Builder-with-Save-Activate-buttons-highlighted.png)**
