---
title: "Autolaunched Flows - Appiphony"
url: "https://appiphony.com/docs/merge-connect/features/automation/autolaunched-flows"
---

# Autolaunched Flows

1. Navigate to **Salesforce Setup** > **Process Automation** > **Flows**.
2. From the Flows page, click **New Flow**.
3. Select **Autolaunched Flow (No Trigger)**, then click **Create**.
4. To create the flow, we first need to create a **RecordID variable**. To create a new variable, click the box in the top left corner.
5. Click on **New Resources** and select **Resource Type as Variable**. Then set the **Data Type** as **Text**. For **Availability Outside the Flow**, check **Available for input**. Finally, click **Done**.
6. In order for the flow to trigger on any record, we will need to add a **Get Records element** to capture the **RecordID**. Below the starting node, select **Add Element**, then select **Get Records**. This will auto-display the Get Records section to the right.
7. For the **Get Records** action you will need to select the **Object** you want this Autolaunched Flow to trigger on. Next, for **Filter Account Records**, set the **Field input value** to the **Object Id** with the value **equal** to the **RecordID variable** that was created. For **How Many Records to Store**, select **All Records**.
8. Below the **Get Records** node, click **Add Element**, and select **Action**. This will auto-display the Action section to the right.
9. In the **Action** field, search and select **Automate Merge (apex-mergeconnect__AutomateMerge)**.
10. Fill out the required fields for **Label** and **API Name**. Before continuing, you will need to select the **Object** this flow will trigger on and a **RecordID Variable**.
11. Now you can create your **New File from Template** Merge Connect Operation. Once completed, click **Save**.
12. Click **Activate**.
13. For an Autolaunched Flow, you will need a method to trigger the flow, in this example we will be using a **custom button**. To create a custom button, go to **Salesforce Setup**, and click on **Object Manager**.
14. Select your desired **Object**.
15. From the right-hand side, select **Buttons, Links, and Actions**.
16. Select **New Button or Link**.
17. Provide a **Label** and **Name** for your button. For this scenario, the following settings are recommended:
    - **Display Type =** Detail Page Button
    - **Behavior =** Display in existing window without sidebar or header
    - **Content Source =** URL
18. For the button link in the text field, you will need to get the **Flow URL**. This can be obtained by navigating to **Salesforce Setup** > **Flows** > **View Details and Versions**. The construction of the button link is: **[flow url]?[created variable in flow]=[object id]**.
19. Finally, you will need to add your button to your page layouts. Click on **Page Layouts**, then select the desired page layout.
20. Select **Mobile & Lightning Actions**. Under **Salesforce Mobile and Lightning Experience Actions**, select **O****verride the Predefined Actions**. Drag and drop your created button into the section, then click **Save**.
21. Now you will be able to trigger your Merge Connect Autolaunched Flow through a button.
