Use Bridge to delete a row on a condition

Delete a row from your sheet on a specific condition using Bridge. 

Who can use this?

Plans:

  • Bridge by Smartsheet

When this workflow runs, it grabs all the data in the row from the source sheet and then deletes the row.

Prerequisites

  • A sheet
    • The source sheet ID (the source sheet where we’ll pull row data from).
    • A checkbox column that indicates when to delete a row. In this example, we’re using a checkbox column named Delete with Bridge. 
  • Bridge
    • Smartsheet integration
    • When Column Values Change trigger
    • Bridge workflow modules:
      • Smartsheet—Get Row
      • State (optional)
      • Smartsheet—Delete Row

Technically, the Get Row module isn’t required, but it’s added here as a backup in case of accidental deletions. Because the Trigger data doesn’t include information from inside the row, you may find it helpful to include Get Row to have the row data in the Run Log for 30 days if you need to troubleshoot or refer back to the data. If you don’t want to have the data for reference later, you can build this workflow with just the trigger and Delete Row module.

Get started

To build this workflow in Bridge, authenticate the Smartsheet Integration for your Bridge workspace.

While building your workflow, keep your sheet and your Bridge workflow open in two separate tabs. This makes navigating the build process easier.


Construct the basic workflow model

  1. Create a new workflow in Bridge
  2. In the workflow builder, use the panel to add modules in this order:
    • Smartsheet — Get Row
    • State 
    • Smartsheet — Delete Row
  3. Save the workflow.

This is what your workflow looks like:

Brandfolder Image
Basic workflow model for the trigger

Set up the trigger

  1. Select the Trigger module.
  2. In the Integrations section, select Integrations Page.
  3. Select Smartsheet from the integration list and expand the Triggers row.
  4. Select Add to Triggers.
  5.  Fill in the following fields:
    • Trigger Name: Create a custom label for your trigger.
    • Sheet ID: Paste the sheet ID for your source sheet.
    • Event Type: Select When Column Values Are Changed
    • Column Name or ID: Type the name of the Smartsheet column that will trigger your row deletion. For this example, we’re using the column Delete with Bridge
    • Select Workflow: Select the new workflow you just created from the dropdown list.
  6. Select Save and return to your workflow.

Test the trigger

We want to test the trigger before starting the module setup. This ensures the workflow will respond correctly and bring the data we need into the workflow’s Run Log. 

  1. Go to your sheet. 
  2. Check the box in the trigger column. In this example, the workflow triggers from the Delete with Bridge column. 

    Brandfolder Image
    Test of the trigger workflow
  3. Save the sheet.

There’s now a workflow run entry in the Run Log of your Bridge workflow. We’ll use the trigger data to populate the modules.


Set up the workflow modules

Set up the Get Row module

In this workflow, the Get Row module pulls the row data and pushes it into the workflow's Run Log. From the Run Log, you can reference data in the next stages of the workflow.

  1. In the Sheet field, paste the runtime reference for the sheet ID
  2. In the Row ID field, paste the runtime reference for the row ID
  3. Save the workflow.

Set up the Delete Row module

In this workflow, the Delete Row module deletes the row that triggered the workflow.  If you set up the Get Row module for this workflow, you can use the same references again in their respective fields. 

  1. In the Sheet field, paste the runtime reference for the sheet ID
  2. In the Row ID field, paste the runtime reference for the row ID.
  3. Save the workflow.

Test the workflow

On your sheet: 

  1. Create a new row.
  2. Check the Delete with Bridge checkbox
  3. Save the sheet. 

In Bridge, the workflow should be triggered, the row data should be obtained (if Get Row is used), and then the row should be deleted.


Sheet automation

Your Bridge workflow will trigger every time the Delete with Bridge column changes. From here, you can check (or uncheck) the box anytime you need a row to be deleted.
If you want this to happen on a specific condition, you can add modules (e.g. Conditional Junctions) to your Bridge workflow to check for conditions or you can create a sheet-level automated workflow to check the box for you and hide the column from view in the sheet, which ensures Bridge will only run when the automated workflow checks the box.