--- title: "Build your first workflow | Lansweeper Platform" slug: "build-your-first-workflow" description: "Learn to create workflows in Lansweeper, fetch asset data, and send location updates to Slack with this comprehensive tutorial." tags: ["Lansweeper Platform", "Flow Builder", "Automation", "Get started"] status: "update" updated: 2026-11-19T22:15:43Z published: 2026-11-19T22:15:43Z canonical: "docs.lansweeper.com/build-your-first-workflow" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lansweeper.com/llms.txt > Use this file to discover all available pages before exploring further. # Build your first workflow Plan availability: Available on Pro and Enterprise plans > [!TIP] > Learn this in the Academy > > > > > > Want more than this tutorial? The free [Automate workflows with Flow Builder](https://academy.lansweeper.com/content-details/97955/1) learning path in the Lansweeper Customer Academy covers design patterns, connecting external tools, and troubleshooting. This tutorial will walk you through some basic concepts of workflow creation. You will: - Fetch data from the Lansweeper connector - Learn how data flows between steps of a workflow - Use a loop to iterate over the records you fetch - Use logical branches to determine what to do with each record - Send certain records to another system (this example uses Slack) ![](https://cdn.document360.io/21d5935c-1b73-44fa-bf5a-a8b0f5c67f25/Images/Documentation/first-workflow.png?sv=2026-02-06&spr=https&st=2026-12-06T02%3A00%3A39Z&se=2026-12-06T03%3A00%3A39Z&sr=b&sp=r&sig=IydBwcEZQXYlhx9T81gSnNyxXjOs3SpUvH4CaGgQfgM%3D) The workflow you build will fetch data (a list of assets) from your Lansweeper Site, loop over the list, determine which assets have a location, and notify you via Slack of the corresponding assets and their location. ## Add location to assets If you do not have any assets with a location in your inventory, you can edit a few assets in your Lansweeper Site to test this workflow. 1. In your Lansweeper Site, go to **Inventory**. 2. Select a few assets, then select **Bulk edit**. 3. Select **Location** from the dropdown. 4. Enter a location, then select **Save and apply**. ## Create a Slack app and have access to a Slack workspace You must create a Slack app before creating a workflow to connect Lansweeper and Slack. 1. To create a free Slack app, follow the instructions under [Slack OAuth 2.0](/docs/slack-connector#slack-oauth-20). 2. While creating the app, ensure to assign your Slack app the `chat:write`, `chat:write.public`, and `channels:read` scopes. ## Create a new workflow 1. In your Lansweeper Site, go to **Flow Builder > Add new WorkFlow**. 2. Select **Quickstart** to create a new workflow from scratch. 3. Enter a name for your workflow, such as “My First Workflow.” 4. Select **Universal webhook** as your trigger, then **Create trigger**. ![universal webhook](https://cdn.document360.io/21d5935c-1b73-44fa-bf5a-a8b0f5c67f25/Images/Documentation/universal-webhook(5).png?sv=2026-02-06&spr=https&st=2026-12-06T02%3A00%3A39Z&se=2026-12-06T03%3A00%3A39Z&sr=b&sp=r&sig=b4aBanp4bahZi0GcMuwoK7Im5hOViztVmGOLHR4MIg8%3D) ## Fetch assets’ data from Lansweeper 1. Add a new step to your workflow by selecting the **+** icon below your trigger. 2. Enter **Lansweeper** in the search. 3. Select **List of assets** from the list to add it as a step. ![](https://cdn.document360.io/21d5935c-1b73-44fa-bf5a-a8b0f5c67f25/Images/Documentation/lansweeper-list-of-assets(6).png?sv=2026-02-06&spr=https&st=2026-12-06T02%3A00%3A39Z&se=2026-12-06T03%3A00%3A39Z&sr=b&sp=r&sig=PEv5McmzxFrYR7JDrNGxi5cuyyH%2BuhaAouJ%2FcN0Yrlc%3D) 4. Select **Add a string input**. 5. From the dropdown, select **asset.location.location**. ![](https://cdn.document360.io/21d5935c-1b73-44fa-bf5a-a8b0f5c67f25/Images/Documentation/lansweeper-list-of-assets(1)(4).png?sv=2026-02-06&spr=https&st=2026-12-06T02%3A00%3A39Z&se=2026-12-06T03%3A00%3A39Z&sr=b&sp=r&sig=KYKgEoCpH1W46lXJuvnpZ8C6a7FaVbjUCB9j5BiqNSo%3D) ## Test the Lansweeper connector 1. Select **Run**. 2. Under **Steps**, select **List of assets**. 3. In the Output tab, you can view the data fetched from the Lansweeper connector. ![](https://cdn.document360.io/21d5935c-1b73-44fa-bf5a-a8b0f5c67f25/Images/Documentation/test-run(5).png?sv=2026-02-06&spr=https&st=2026-12-06T02%3A00%3A39Z&se=2026-12-06T03%3A00%3A39Z&sr=b&sp=r&sig=%2F7isT5MPtHabNzMfnoRcYq0sApWyuGh8QozfrGAcyrA%3D) > **Important notes regarding execution and visualization** > > > - In the Items list, there is a maximum number of 250 elements shown. This is just a visual limitation. > - If you get a message like `<data (123456 bytes)>`, it’s a known visualization constraint. Temporarily reduce the number of records via Max Records to preview data. ## Create a Loop over items Now that we're fetching a list of assets, we need to loop over each asset to determine if they have a location. 1. Under the **List of assets** step, select the **+** button. 2. Enter **Loop** in the search. 3. Select the **Loop > Repeat for each** action. 4. Select the Reference icon in the Items textbox. ![](https://cdn.document360.io/21d5935c-1b73-44fa-bf5a-a8b0f5c67f25/Images/Documentation/reference-icon.png?sv=2026-02-06&spr=https&st=2026-12-06T02%3A00%3A39Z&se=2026-12-06T03%3A00%3A39Z&sr=b&sp=r&sig=PWn7KAAxgeXwM9l5vlTU0RGMwWKVq3RkCkhbdliuNQI%3D) 5. Select the **Items** property, then **Save**. ![](https://cdn.document360.io/21d5935c-1b73-44fa-bf5a-a8b0f5c67f25/Images/Documentation/loop-items(5).png?sv=2026-02-06&spr=https&st=2026-12-06T02%3A00%3A39Z&se=2026-12-06T03%3A00%3A39Z&sr=b&sp=r&sig=5kJ61hsPhtC0TcuYIOTKnsHM69XKFWLn7BMErf3SCI8%3D) 6. Select **Run**. 7. Under **Steps**, select **Repeat for each**. The loop step will have a `currentItem` property which we'll use next. ![](https://cdn.document360.io/21d5935c-1b73-44fa-bf5a-a8b0f5c67f25/Images/Documentation/loop-items-run(5).png?sv=2026-02-06&spr=https&st=2026-12-06T02%3A00%3A39Z&se=2026-12-06T03%3A00%3A39Z&sr=b&sp=r&sig=E0x1ZBilmGfhpykV1WzgSy4WpgB9WS%2FkatCSzsAXTts%3D) ## Identify assets with a location Now that we're looping over each item, we need to determine whether the current item has a location. 1. Under the **Repeat for each** step, select the **+** button. 2. Enter **Branch** in the search. 3. Select **Branch > IF condition is met**. 4. Under **Condition**, enter **Has a location?** 5. Under **Field**, select **Reference**. 6. In Reference path, use: `currentItem.asset.location.location` and select **Save**. ![](https://cdn.document360.io/21d5935c-1b73-44fa-bf5a-a8b0f5c67f25/Images/Documentation/loop-item-current-item(5).png?sv=2026-02-06&spr=https&st=2026-12-06T02%3A00%3A39Z&se=2026-12-06T03%3A00%3A39Z&sr=b&sp=r&sig=PJd6HwHGW9y%2FRmJH5x3wxtVjiJ4mjWY3q169BMSLvw0%3D) 7. Under **Operator**, select **Exists**. Steps with `asset.location.location` set will follow the *Has a location?* branch. --- ## Send assets with location to Slack Next, we want to send a message to Slack for each asset with a location. > **Ensure you have a Slack app created** You’ll need credentials setup now for Slack (Client ID, Secret, etc.). See [Create a Slack app and have access to a Slack workspace](/docs/build-your-first-workflow#create-a-slack-app-and-have-access-to-a-slack-workspace) 1. In the **Has a location?** branch, select the **+**. 2. Enter **Slack** in the search. 3. Select **Post message**. 4. Select **Add connection**. 5. Enter your **Client ID**, **Client Secret**, and **Signing Secret**. ![](https://cdn.document360.io/21d5935c-1b73-44fa-bf5a-a8b0f5c67f25/Images/Documentation/slack-connection(5).png?sv=2026-02-06&spr=https&st=2026-12-06T02%3A00%3A39Z&se=2026-12-06T03%3A00%3A39Z&sr=b&sp=r&sig=fp8jUpxsS0wq9eWYgLEwIdWaoVmJTTDldzDoiQiTUZQ%3D) 6. Select **Connect** to allow access to your Slack application. Now configure the Slack step: 1. For the **Message** input, you can format it like: `The asset "currentItem.asset.general.name" is located in "currentItem.asset.location.location".` To reference previous steps, you need to click on the **Reference** icon, select **Repeat for each**, and add the corresponding path in the reference path field. ![](https://cdn.document360.io/21d5935c-1b73-44fa-bf5a-a8b0f5c67f25/Images/Documentation/slack-message(6).png?sv=2026-02-06&spr=https&st=2026-12-06T02%3A00%3A39Z&se=2026-12-06T03%3A00%3A39Z&sr=b&sp=r&sig=JGkDmZEpL6nvR%2F2bIjqArZSFsFVnUcrDJtTv26iNNKc%3D) 2. Select **Run** to test. 3. Under **Channel Name or ID**, select the channel you want to post the message to. ![](https://cdn.document360.io/21d5935c-1b73-44fa-bf5a-a8b0f5c67f25/Images/Documentation/slack-message(1)(1).png?sv=2026-02-06&spr=https&st=2026-12-06T02%3A00%3A39Z&se=2026-12-06T03%3A00%3A39Z&sr=b&sp=r&sig=qNQ7cC8noIO3xr4hNLPcmGsWssjH%2F8TU1w9yo0Q2aOg%3D) ## Next steps Congratulations! You created your first workflow! Here are a few things you should try next: - Send your message to a different system, like [Microsoft Teams](/docs/microsoft-teams-connector). - Swap out the **List of Assets** action for something else like Software or Vulnerability list. - Write your messages out to a file in [Dropbox](/docs/dropbox-connector) or [Amazon S3](/docs/amazon-s3-connector). A paid Lansweeper Platform plan that includes features the Free plan doesn't, such as creating dashboards and exporting views. For what each plan includes, see https://www.lansweeper.com/pricing/. Compare with the Free and Enterprise plans.The highest Lansweeper Platform plan. Some features are available only on Enterprise. For what each plan includes, see https://www.lansweeper.com/pricing/. Compare with the Free and Pro plans.