Automating connection refreshes is essential to streamlining data centralization and movement into the Workiva Platform, especially when multiple connections exist. In this Connected Learning Path, we will learn how to create a Chain that refreshes a list of Connections between Wdata and the Workiva Platform using a Spreadsheet ID. This Chain will generate a list of Connections on a single Spreadsheet and then provide us with the list of IDs of those Connections, so that we can automate refreshing each Connection in the Spreadsheet.
Primary Business Use Case | Data connectivity between Workiva and Wdata |
Primary Learning Objective | Learn how to refresh a list of Connections using Chains |
Secondary Learning Objectives | Learn the essentials of Group Iterators |
Prerequisites |
Complete the CLP | Refresh Connections with a Parameter Provide permissions to the Spreadsheet for the associated OAuth Grant User |
Supporting Template | CLP | Refresh List of Connections |
Step 1: Create a Chain
- Add a new Chain
- Name the Chain: CLP | Refresh List of Connections
- Save the Chain
Step 2: Runtime Inputs
We use the Runtime Inputs Command to kick off the Chain. This allows us to specify which Spreadsheet we want to refresh all the Connections for.
- Add a Runtime Inputs Chain Event from Chain Trigger Events the Start Node
- Edit the Runtime Inputs Chain Event by double clicking on the Command
- Type: TextField
- Display Name: Spreadsheet ID
- Required: Checked
- Save the Command
Step 3: List Connections
We will use the List Connections Command to retrieve the list of Connection IDs associated to the Spreadsheet ID. The List Connections Command output will be a JSON file consisting of each Connection in the Spreadsheet with details relating to the Connection, including the Connection ID.
- Add a List Connections Command from the Workiva Connector to the Chain canvas
- Connect the Runtime Inputs Command to the List Connections Command
- Double click the Command to configure it
- Destination Type: Spreadsheet
- Destination ID: Use the Spreadsheet ID variable from Runtime Inputs - this allows us to push the value specified at Chain run time through to the Refresh Connections command
- Click on the Destination ID field
- In the left panel, expand the Trigger dropdown
- Expand the Runtime Inputs dropdown
- Select the Spreadsheet ID variable
- Save the Command
Step 4: Command Group
We will use a Command Group to enable iteration over each Connection. The Group Iterator will push each Connection on the Spreadsheet through the following steps, one by one.
- Add a Command Group to the Chain canvas
- Connect the List Connections Command to the In section of the Command Group
- Double click the Command to configure it
- Name the Group: Connections Iteration
- Navigate to the Iterators tab
- Enable the Iterations toggle and click on the Iterations field
- Within the Select a Variable panel, click the down arrow to expand List Connections
- Select the Connections output
- Enable the Iterations toggle and click on the Iterations field
- Save the Command Group
Step 5: Refresh Connection
We will use the Refresh Connection Command to refresh our Connections using the Connection ID from the iteration.
- Add a Refresh Connection Command from the Workiva Connector to the Chain canvas
- Connect the Start section from the Group Iterator to the Refresh Connection Command
- Double click the Command to configure it
- Connection ID: use the Connection ID from the Group iterator - Connections Iteration. This allows us to push the ID for the current iteration through to the Refresh Connections Command
- Click on the Connection ID field
- In the left panel, expand the Group Iterator dropdown
- Expand the Connections Iteration dropdown
- Select the ConnectionId variable
- Use Previous Source Parameters: Checked
- This allows us to refresh a Connection using the previous Parameter values from the Source - in our case, the Query with the Country Parameter will still refresh with Brazil as the filter value
- Connection ID: use the Connection ID from the Group iterator - Connections Iteration. This allows us to push the ID for the current iteration through to the Refresh Connections Command
Step 6: Test the Exercise
Now that the Chain is complete, test the result
- Publish the Chain
- Click Execute and then select Run With Inputs
- Find the Spreadsheet ID
- Navigate to the CLP Employee Overview Spreadsheet
- In the URL, select the Spreadsheet ID, which is found after “spreadsheet/” and before “/sheet”.
- For example, the Spreadsheet ID is bolded here: app.wdesk.com/a/QWNjb3VudB8yMDkwNzExMDQ0/spreadsheet/de9a4ab1374f4d438c9585a94dd9acf4/-1/sheet/3161ee0402ec4b9fa4e937e6f0f63b13
- Navigate back to Chain Builder and paste the Spreadsheet ID into the Spreadsheet ID field
- Click Start
- Once the Chain has completed, navigate back to the Spreadsheet and see that both Connections have successfully refreshed!
Successful Chain Run with two iterations:
Successful Connection refresh:
To learn more about using Chains to streamline data collection, check out the rest of the Data Centralization Paths!