Build Your First Integration

Samuel Fresia
Samuel Fresia
  • Updated

Overview

This tutorial will walk you through some basic concepts of automation development. You will:

  • Fetch data from the Proposify connector
  • Learn how data flows between steps of an automation
  • Use logical branches to determine what to do with each record
  • Send certain records to another system (this example uses Slack)

Automation overview

The automation you build here will trigger from a Proposify event, fetch data from Proposify,  structure a message, and then notify you via Slack of the event.

Let's build!

Create a new automation

From the Workflow Builder page, click the Add Workflow button. Select Quickstart to create a new Automation from scratch.

Screenshot 2024-09-26 at 11.21.32 AM.png


Give your integration a name like "Notify Slack" and then search for "Proposify" for the Webhook. Select Proposify to create the workflow with Proposify as the trigger.

Integration Marketplace 2024-09-26 at 11.23.20 AM.jpg

Setup Proposify

Trigger from Proposify

You should already have Proposify as your Trigger from step the previous step, but just in case you skipped that part you can still update the trigger.

Click on the three dots next to the Trigger and "Change step action" to pick Proposify as the trigger.
Integration Marketplace 2024-09-26 at 11.25.56 AM.jpg

There may be some configuration data in the Trigger from the previous Trigger. Click on the trigger block and delete the old configuration fields:

Integration Marketplace 2024-09-26 at 11.27.29 AM.jpg

Now that we have Proposify as the Trigger, click into the trigger to give it some event values. You can click on "Add a string input" multiple times to trigger from multiple Proposify events. Select from the dropdown to choose which event(s) you want.

In this example, lets start with Document Viewed.
Integration Marketplace 2024-09-26 at 11.31.17 AM.jpg

 

Authentication

Before we move on, we're going to want to set this workflow up to be able to test. For that, we need to update the configuration, and add trigger data.

Setting up authentication

To set up the authentication, click on the middle icon next to the flow to access the Configuration Wizard. This is where you'll configure the authentication for any apps you connect to, or add setup steps for configuration variables to use throughout the workflow.

For now, we'll only worry about setting up the Proposify connection. Integration Marketplace 2024-09-26 at 12.00.14 PM.jpg

 

You can optionally rename the authentication to something simpler, but it must include the words "Proposify Connect" for the authentication to auto populate.  Integration Marketplace 2024-09-26 at 12.04.15 PM.jpg

 

Scopes

Scroll down until you see Scopes, Client ID, Client Secret, and Redirect URI

For scopes, we want to add permissions to get events from Proposify, and to read document details. All scopes should be included by default, but you can replace them with just the two we need for this example.

prismatic read_documents

 

Client ID/Secret

Now scroll down until you see Client ID and Client Secret.

Integration Marketplace 2024-10-07 at 5.01.06 PM.jpg

Click on the gear icon next to each and click on the dropdown to change the permission to “Embedded”. This allows Proposify to autopopulate the Client ID and Secret when Proposify is connected.

After updating the fields, make sure to scroll to the bottom and hit Save.

Proposal Software Proposify 2024-10-07 at 7.03.57 PM.jpg

You may need to enter in some random text in the Client Secret and ID as a placeholder. This will be replaced with the proper values when the workflow or automation is connected.

 

Now that the configuration is complete, we can enable the connection. Click on Test Configuration and then Test-instance configuration. Integration Marketplace 2024-09-26 at 12.20.18 PM.jpg

You should be presented with a simple screen to connect Proposify. Click Connect on the Proposify icon and then Finish in bottom-right corner.

 

Setting up testing data

Now that we can authenticate Proposify, we need to set up trigger testing data. This allows you to run tests of the workflow without having to deploy and trigger from Proposify.

Start by clicking on “Test Configuration” at the bottom of your page and then selecting “Trigger payload”

Integration Marketplace 2024-09-26 at 11.39.16 AM.jpg

Copy this code and put it into the Trigger payload. Depending on what you are trying to test, replace the number for "document_id", "user_id", or "client_id" as needed. This doc lists all the ID types in Proposify and where to get them.

{
"id": "4bf3bef5-4277-4d40-acf7-83def8970ef6",
"type": "documentv2.won",
"time": "2024-09-20T12:39:40.847118Z",
"document_id": 1234,
"name": "test name",
"user_id": 1234,
"client_id": 1234
}

For this example, find a document ID from one of your documents and replace it in here. Go to the Snapshot page for any of your docments and get the ID from the URL

Proposal Snapshot 2024-09-26 at 11.50.30 AM.jpg


You should see something like this. Make sure to hit Save before closing!

Integration Marketplace 2024-09-26 at 11.53.54 AM.jpg

 

Fetch data from Proposify

Now that we have everything authenticated and test data ready, lets build the next part of the workflow.

The data from the trigger only contains a bit of information, so our first action will be to fetch the rest of the document details using the document ID. Start by clicking the + button below your trigger. Search for Proposify and add the action for "Documents Get V2"

Integration Marketplace 2024-09-26 at 11.36.45 AM.jpg

 

We want to change the input for Id in the Document Get action to be based on the output of the first step. To change the input type, click on the icon to the left of the input field and select Reference.

Click back into the input and you'll get options for pulling the data from previous steps (in this case there is only the trigger as an option).

Integration Marketplace 2024-09-26 at 4.08.04 PM.jpg

You'll notice that there's no data here yet. That's because we haven't "Run" the workflow yet. If you haven't done the steps for authentication and setting up Trigger data yet you'll want to make sure those are done!

To get sample data to work with, click Run in the bottom left of the page. You may need to change the Document Get step back to a Value input and add a temporary value. Integration Marketplace 2024-09-26 at 4.10.52 PM.jpg

You can click on Test Runs to view all your test and the data output from each step. Don't worry if Document Get has an error, we just need to make sure the trigger has output data.

Integration Marketplace 2024-09-26 at 4.17.42 PM.jpg

Going back to the Document Get input, we can update the reference path to results->body->data->document_id.

Zight Recording 2024-09-26 at 04.13.46 PM.gif

If you used a document ID from your account in the trigger test data, re-run to test again and you should see data for the document:
Integration Marketplace 2024-09-26 at 4.23.03 PM.jpg

 

Setup Slack

Now that we have our event and document data, let's set up a simple notification to Slack!

Add a new action, search for Slack, and select the option for Post Message

Slack Authentication

Before we move on to setting up the Slack message, let's make sure Slack is authenticated too.

Click on the Configuration wizard option again and then on Slack

Integration Marketplace 2024-09-26 at 4.29.45 PM.jpg

Steps for Authenticating Slack can be found here: https://automation-docs.proposify.com/docs/components/slack/#connections

The second option for Webhook URL is the easier option, but you can also create a Slack App. https://automation-docs.proposify.com/docs/components/slack/#webhook-url

You can finish Authenticating Slack by going back to Test Configuration and then Test instance configuration:

Integration Marketplace 2024-09-26 at 4.40.44 PM.jpg

With Slack integrated, let's finish up the workflow with a simple Slack message based on the event.

Click into the Slack action to edit and start by adding the Slack channel ID for the channel you want to send these messages to.

 

For the message, we want to change the input type to Template. This will allow us to mix text with references to older steps.

Proposal Software Proposify 2024-09-26 at 5.07.07 PM.jpg

In this example, I want my message to look something like "{Document Name} was viewed :tada:"
The :tada: at the end is for a slack emoji and just to add a bit of fun!

To add this, start by clicking on the "+" button to the right of the input area, then select Reference

Proposal Software Proposify 2024-09-26 at 5.12.00 PM.jpg

Select the Reference Step as the output from Get Documents, and then find name in the output data. Select name and then scroll to the very bottom and hit Save.

You should now see something like this: Proposal Software Proposify 2024-09-26 at 5.14.30 PM.jpg

Click to the right of the input are and then type out the remainder of the message.

Proposal Software Proposify 2024-09-26 at 5.15.51 PM.jpg

Now it's ready to go! Click Run one last time and if all was done correct you should see a message in Slack!

 

Publish and Deploy

With the workflow complete, the final piece is to Publish a version of the workflow and then add it to the Automations list so you can get it connected to live events from your account. Automations created by your team will only be visible in the Automation list for your account, only Automations built by Proposify will be available to all accounts.

 

Steps for publishing and deploying are in this article: Publish to Automations