This example Zap automatically logs Google Voice calls and voicemails into a Filevine project note. Since Zapier does not have a native Google Voice integration, this workflow uses Gmail as the trigger because Google Voice sends incoming call and voicemail notifications via email, including the caller's phone number, transcript (if available), and a voicemail playback link.
Note: Users must be logged into the Gmail/Google Voice account that received the voicemail in order to access the voicemail playback link.
This Zap contains 10 total steps, but they are grouped below into 8 logical sections for clarity. This Zap workflow is built using the following:
- Trigger Step - New email matching search
- Extract phone from email subject
- Filter step
- Get Filevine Contact
- Get Filevine Projects for Contact
- Filter step
- Extraction/formatting steps - (This section explains Steps 7, 8, and 9 in the Zap).
- Create Filevine Project Note (Custom API Request Step, explains Step 10 in the Zap)
Here's a screenshot of the entire Zap flow which shows the last five steps (Step 6-10) superimposed with a red arrow on the right side in order to combine everything into one image.
1. Trigger Step — Gmail "New Email Matching Search"
First, login to your Zapier account, and create a new Zap. Choose Gmail (or another email client that receives Google Voice voicemail summaries) as the app for the first step (trigger step) in your Zap. For more information on how to connect Zapier to Filevine, please see the following article: Connect Zapier to Filevine (Using PATs)
Once you've chosen Gmail as the app for the trigger step and connected with your account info, for Trigger Event, choose: "New Email Matching Search". Then, press Continue or click on the Configure tab. This trigger will monitor incoming emails. For "Search keywords" use the following to watch for new Google Voice emails that indicate a call or voicemail was received:
Search keywords: from:(voice-noreply@google.com) subject:(New voicemail from)
Test the trigger and pull in a sample event. Note that you may need to manually call your Google Voice number, leave a voicemail message, and pull the sample data into Zapier from the Google Voice email to use for building your Zap.
Here's a screenshot of the "New Email Matching Search" trigger step:
2. Extract Phone from Email Subject
Google Voice emails typically include the caller phone number in the email subject. This step extracts the phone number using a "Formatter" (by Zapier) action with "Text" for the Action event, and configured with the following settings:
- Transform: Extract Pattern
- (Values) Input: Click the + icon on the right side of the box, type "Subject" in the search box, and choose the:
Subjectfrom Step 1. - Pattern:
New voicemail from (.*)$ - Match All: No
- MULTILINE: No
- DOTALL: No
- IGNORECASE: Yes
Here's a screenshot of the Configure tab for the transform step:
3. Filter Step — Only Continue if a Phone Number was Found
We only want this automation to run when the last step was able to extract a phone number from the email subject line. To accomplish this, add a Filter step for Step 3 in your Zap, and configure it as follows:
- Output 0 (from Step 2)
- Exists
Here's a screenshot of the Config tab for the filter step after testing:
4. Find Filevine Contact
Next, we will look up the Filevine contact using the extracted phone number. Create a new Filevine step for Step 4 in your Zap, choose the Find Contact action, and configure the step as follows:
- Field: Phone Number
-
Phone Number:
Output 0(from Step 2). - Successful if no search results are found?: False: step run status is “stopped: halted”. (Default)
-
If multiple search results are found: Return first search result. Step run status is “success”. (Default)
Note that If it's possible for multiple contacts to be returned, you can also choose: Return all results as line items. Step run status is “success”, but then you may need a Code or Looping step process all of the line items. Also, you could choose: Step run status is “stopped: halted” if you would rather not continue with the automation when multiple contacts are returned.
Note: When searching for a Contact by phone number in Filevine, formatting does not matter because Filevine removes all symbols (eg. parentheses, dashes, and spaces) when comparing phone numbers, so that "
(555) 555-5566", "555 555 5566", "5555555566" will all match the same contact.
Be sure to press Continue and test this step to find a contact with a matching phone number in Filevine.
Here's a screenshot of the "Find Contact" action:
5. Get Filevine Projects for Contact (Custom API Request Step)
Next, we need to retrieve a list of projects associated with the Filevine contact so we can later write a project activity note. We will use the "Get Projects For a Contact" endpoint via the API Request (Beta) action within the Filevine Zapier connector.
Create a new Filevine step for Step 5 in your Zap, choose the API Request (Beta) action, and configure the request settings as follows:
- Stop on Error: Yes
- HTTP Method: GET
-
Endpoint URL:
https://api.filevineapp.com/fv-app/v2/Contacts/<Contact Id>/projects
Be sure to replace<Contact ID>in the URL path with the dynamic value from Step 4 for the Contact ID field:ID. - Query String Parameters: ❌ Leave this blank.
- Additional Headers: ❌ Leave this blank.
- Body: ❌ Leave this blank.
Note: Multiple projects could be returned by this endpoint if the contact is associated with more than one project in Filevine, and the
Response Data Countvariable will tell you how many projects were returned.
In this example, we will use the first project in the list, but you could alternatively halt the Zap with a Filter step if more than 1 result is found. Or, you could even precede Step 10 of this Zap with a Looping step to leave a note in every project the contact is associated with (see <insert article link> for an example of how to use loops).
Be sure to press Continue and test this step to get a list of projects associated with the contact in Filevine.
Here's a screenshot of the "Get Filevine Projects" custom API Request:
6. Filter Step — Only Continue if Project(s) Were Found
We only want this automation to run when the last step was successful and able to find at least 1 project associated with the contact who matched the extracted phone number from the email subject line. To accomplish this, add a Filter step for Step 6 in your zap, and configure it as follows:
- Response Status (from Step 5)
- (Text) Exactly matches
- 200
- Response Data Count
- (Number) Greater than
- 0
Here's a screenshot of the Config tab for the filter step after testing:
7. Choose First Project ID from Step 5
This section combines several "Formatter" (by Zapier) steps (Step 7 through 9) to choose the first project found, and to extract and clean up the voicemail information from the email.
In the case where multiple projects were returned in Step 5, we want to grab only the first one in the list in order to prevent errors with the last step of this Zap. For Step 7, create a new "Formatter" (by Zapier) action with "Utilities" for the Action event, and configured with the following settings:
- Transform: Pick from list
- Operation: Choose first
- Input: Click the + icon on the right side of the box, type "project id" in the search box, and choose the:
Response Data Items Project Project Id Nativevariable from Step 5. - Default: (Leave blank)
Here's a screenshot of the Configure tab for the transform Step 7:
Google Voice emails typically include a link to the voicemail message in the email subject and body. Step 8 extracts the link using a "Formatter" (by Zapier) action with "Text" for the Action event, and configured with the following settings:
- Transform: Extract Pattern
- (Values) Input: Click the + icon on the right side of the box, type "body" in the search box, and choose the:
Body Plainfrom Step 1. - Pattern:
<([^>]*https:\/\/voice\.google\.com\/voicemail[^>]*)> - Match All: Yes
- MULTILINE: Yes
- DOTALL: Yes
- IGNORECASE: Yes
Here's a screenshot of the Configure tab for the transform Step 8:
Google Voice emails will also include a transcript of the voicemail message in the email body if possible. Step 9 extracts the transcript using a "Formatter" (by Zapier) action with "Text" for the Action event, and configured with the following settings:
- Transform: Extract Pattern
- (Values) Input: Click the + icon on the right side of the box, type "snippet" in the search box, and choose the:
Raw Snippetfrom Step 1. - Pattern:
Google Voice\s((?!.*YOUR ACCOUNT HELP CENTER HELP FORUM).*) - Match All: No
- MULTILINE: Yes
- DOTALL: Yes
- IGNORECASE: Yes
Here's a screenshot of the Configure tab for the transform Step 9:
10. Create Note in Filevine Project (Custom API Request Step)
Finally, we create a Filevine Project Activity Feed Note using a custom API request. We will use the "Create Note" endpoint via the API Request (Beta) action within the Filevine Zapier connector--which is explained in the following article in more detail: Creating Custom API Requests in Filevine-Zapier.
Create a new Filevine step for Step 10 in your Zap, choose the API Request (Beta) action, and configure the request settings as follows:
- Stop on Error: Yes
- HTTP Method: POST
-
Endpoint URL:
https://api.filevineapp.com/fv-app/v2/Notes - Query String Parameters: ❌ Leave this blank.
- Additional Headers: ❌ Leave this blank.
-
Body: Copy and paste the following code block and be sure to replace
<REPLACE WITH YOUR ------->with the correct values, ie.:
‣<REPLACE WITH PHONE NUMBER>→Output 0from Step 2
‣<Voicemail Link>→Output 0from Step 8
‣<Transcript>→Output 0from Step 9
{ "ProjectId" : {"Native": <Project ID>}, "TypeTag": "phcall", "Body": "Google voice voicemail from \"<REPLACE WITH PHONE NUMBER>\" at: {{=meta["human_now"]}}.\n\nOpen voicemail in Gmail: <Voicemail Link>.\n\nTranscript: {{=Utils.default("<Transcript>","none")}}", "Subject": "New voicemail from Google Voice", "CreatedAt": "{{zap_meta_est_iso}}" }
Be sure to test this step to post a new note to the project activity feed, and review the result in Filevine to confirm it is configured correctly.
Here's a screenshot of the "Create Note" custom API Request:
You can now Publish your Zap, and test out the whole flow by calling your Google Voice number and leaving a voicemail message. Note that the phone number you call from will need to be associated with a client and a project in Filevine for the automation to work.
References:
-
Filevine API v2 Endpoint Documentation
- Get Projects For a Contact: https://filevine.stoplight.io/docs/v2-us/ea9eebf01fbdb-get-projects-for-a-contact
-
Create Note: https://filevine.stoplight.io/docs/v2-us/da00bc90e087f-create-note
-
Filevine-Zapier Connector Documentation:
- Setup Filevine and Create a PAT For Zapier: https://support.vineskills.com/hc/en-us/articles/38482462814861-Setup-Filevine-and-Create-a-PAT-For-Zapier
- Connect Zapier to Filevine (Using PATs): https://support.vineskills.com/hc/en-us/articles/35578443337997-Connect-Zapier-to-Filevine-Using-PATs
- Creating Custom API Requests in Filevine-Zapier: https://support.vineskills.com/hc/en-us/articles/36403841854349-Creating-Custom-API-Requests-in-Filevine-Zapier
Comments
0 comments
Please sign in to leave a comment.