The new Quip Flow Actions for Salesforce Flow open up new ways to combine the shared, universal accessibility of Quip with the power of Salesforce.
Here are some examples:
#1: Update Salesforce with Data From Different Quip Docs
In this example, Quip docs have been created for different Salesforce contacts. One scenario where this can be useful is when an enterprise has employees that don’t have Salesforce licenses. If each of those employees has a Quip document and a Contact representing them, the documents can be used to display data from Salesforce and collect data from the employees. (Note that this uses the new Spring ’19 Flow Builder):
A key element of this is that the name of each quip document is formed using a Flow formula:
To configure the Get Quip Sheet Data flow action, we do the following:
- Provide the name of the corresponding Quip doc. Start with a contact name, generate the ConstructedName using that formula, and pass it in to the flow action:
2) For each piece of data that we want to extract from the quip doc, we reference it by specifying the label value of the cell to its immediate left. This is one of three ways you can specify a specific cell value:
3) Finally, map the retrieved values from the Quip document to flow storage variables so you can use them later in the flow:
Side Discussion 1: Error Messags
Here I’ve created variables to map the Error Message and Is Success outputs. You don’t have to actually use these variables, but if you take the time to define them, then any error messages you get will show up in the debugger like this:
If I try to immediately update the Contact as soon as I get the data out of the Quip document like this:
Side Discussion 2: Mixing Callouts and Transactions
In my first attempt at setting up the flow, it looked like this:
When I ran the flow in the debugger, though, I got this error:
I had forgotten that you can’t use a callout (here, the flow action is “calling out” from Salesforce to the quip api endpoint) in the middle of an open Salesforce transaction. When flow loops, Salesforce prepares a single transaction so it can commit all of the loops with one database action, in the name of resource conservation.
I needed to restructure my flow and got a key hint from a brand new tooltip:
The tooltips in Flow Builder are completely overhauled and have a lot of extremely timely tips; they’re not just simple definitions.
The resulting flow uses a collection operator. Each time we go through the loop, the modified contact is added to a new “updatedContacts” collection variable that can later be used to carry out the update.
#2 Clone a Quip Template and Update the Resulting Quip Sheets with Salesforce Data
Now let’s change direction and go From Salesforce To Quip. The use case is this: Given a set of Contacts, generate a custom Quip sheet for each one and fill it with Contact data. Then email the URL to each of the Contacts.
This might be useful if you want to generate shareable reports for your customers using data stored in Salesforce.
This flow features 2 of the new Quip Flow Actions:
Clone Quip Document is a simple action that duplicates a named document. Store Data in Quip Document does the heavy lifting of inserting flow data into specific Quip cells.
We create a Quip document to act as our template:
The Clone action generates a new quip sheet based on this template, and give it a name using a formula technique like the one described above.
The Store Data in Quip action lets you specify up to ten pieces of data to write to 10 cells. You can use several approaches to specify a target cell:
- Specify a label and indicate that the target cell is immediately to the right of that label (that’s what we’re doing)
- Specify a label and indicate that the target cell is immediately below that label
- Specify both a column label and a row label, in which case the target cell is the intersection of the column and row. This is great for updating a single cell in a table.
- Specify a cell by its absolute address (for example: B2)
The flow produces sheets like this:
and generates emails like this:
You can use the AddRowToQuipSheet action to add a row to a sheet using data from Salesforce or update an existing row.
Here’s an example of an Add:
And here’s a sample showing an Update:
Walkthroughs of these are provided in the video (see link at the top of this article.)
Quip User Management with Flow
There are also Flow Actions to Add a User to a Folder and Remove them from a Folder so you can add quip folder activation to your onboarding flows.
Quip Document Management with Flow
There are also Flow Actions to Rename a Quip Folder and Add a Quip Document to a Folder to make it possible to automate management of your Quip data.