See the Channel Catalog to see which Plans have access to this channel.
Formstack Documents is a data management system that helps collect information through various types of online forms. With the Formstack Documents service you can auto-populate documents in PDF, Word, and PowerPoint formats to create printable event tickets, online applications, contracts, employment offer letters, and more.
Please note that terms used in the Formstack channel categories are Formstack specific terminology
How to Connect
- On the My pipelines page, click Create Pipelines.
- Search for the first step for your new pipeline. You can always add more steps later.
- To use the legacy builder, click the Pipeline Designer toggle to use the legacy version of the pipeline builder.
For more information about connections, see How to connect to a channel.
Connect to Formstack
- Expand Formstack in the list of channels on the right side of the page and click Connect.
- Enter your API Key and API Secret. When finished, click Connect.
How to reconnect
You may need to reconnect your account to a channel. Reasons may be (but not limited to):
- If you need to connect a different account.
- Authorization updates, such as a changed password.
- Editing the access rights that Pipelines has to the channel.
To reconnect:
- Select a pipeline that already has this channel in it.
- Open a step that contains this channel.
- Under account, select Connect (or reconnect) and follow the process above, How to connect.
Steps
The steps you can use with Formstack fall into a single category: Merges
Note: You cannot use jinja expressions in trigger conditions unless explicitly specified as possible.
Type | Name | Description |
---|---|---|
Merges | ||
Trigger | Data Route Merge Created | Triggers when you create a data route merge with webhook delivery set up. |
Trigger | Document Merge Created | Triggers when you create a document merge with webhook delivery set up. |
Action | Data Route Merge | Merges multiple data routes. |
Action | Document Merge |
Document Merge merges data from a previous pipeline step with a document template you have uploaded to your Formstack Documents account. It does not merge multiple documents together. What happens to your newly-generated document and the document merge depends which delivery options you have selected in Formstack Documents. You can add it to your Stash file repository or use one of Formstack's many integration channels to send the document to another system, including Quickbase. For more information see Formstack Documents help. |
Use case examples
The following are some examples of using the Formstack Documents channel.
Tracking inventory
Imagine that an auto manufacturer uses Quickbase to track their inventory of parts. Their procurement team receives a design document whenever a new car model is ready. The document lists each part needed to build the car. The procurement team figures out how many pieces to order, for each part, and writes up a purchase order for their supplier.
To streamline the procurement process, their suppliers require that a standard purchase order form be submitted as a PDF file. Currently, the procurement team manually builds each purchase order, saves it as a PDF, and then emails it to the appropriate supplier. Since this is a manual process, there have been delays in sending out the purchase orders as well as some missing parts.
The company also uses Formstack Documents, so they’ve decided to automate this process using Quickbase Pipelines. The plan is to build a pipeline which will take the purchase order and its line items in Quickbase and send it to Formstack to generate the PDF. Formstack will then email the file to the supplier.
You can see what the purchase order will look below. Next you'll learn how to build your own.
Creating the document template
Before thinking about the pipeline, you’ll need a document template where Formstack can fill in your purchase order details. You’ll design and lay out your form in Word, including what Formstack calls “merge fields” anywhere you need data to be filled in dynamically. See the image below for the format you’ll need to use:
Somewhere in the middle of your document, you’ll want to display the list of all line items included in the purchase order. To do this, we’ll use the Formstack tablerow feature as seen below:
ITEM NO | DESCRIPTION | UNIT PRICE | QUANTITY | LINE ITEM TOTAL |
---|---|---|---|---|
{tablerow from=$items item=_lineitem} {$_lineitem.item_number} |
{$_lineitem.description} |
{$_lineitem.unit_price} |
{$_lineitem.quantity} |
{$_lineitem.line_item_total}{/tablerow} |
Note: Within the list, the name of each attribute must match the name of the Quickbase field you’re using to populate it. The merge field’s name can’t include spaces. If some of your field names do include spaces, replace each space with an underscore in your document template. For example, if the name of your field in Quickbase is Line Item Total then the name of the merge field within the list should be{$_lineitem.line_item_total}
Next, you need to upload your template. To do so, open Formstack Documents and click Documents in the toolbar at the top of the page. Next, click New Document and follow the prompts to import your file. When prompted to choose where the data will come from, select Integrate with an external service.
Setting up email delivery
Now that you have a document template loaded into Formstack Documents, you need to set up the delivery so your purchase orders will be emailed to the appropriate supplier once they are generated. A Delivery is a Formstack object which sends out a document. To set up your email delivery, click + New Delivery while on the Deliver tab and then select Email. This feature should feel familiar as it is very similar to Quickbase email notifications. The PDF will be sent as an email attachment. You can customize the subject and body of your email. Also, you can include dynamic data from your form. You simply use the same merge field formatting here as you did in your document template.
Note: Any field you want to include in your email must be included in your document as well.
Overview of example pipeline
The document template has now been set up. It’s been designed and uploaded to Formstack Documents, with automatic email delivery ready to go. Now it’s time to build the pipeline which will generate the purchase orders.
Before designing the pipeline in Quickbase, the auto manufacturer's procurement team defined in detail how the automated process should work. The overall goal of the pipeline is to build the PDF version of the form in Formstack Documents when a purchase order in Quickbase enters the Ready status.
After considering how the data is stored for the purchase orders and line items, the procurement team planned these three steps:
- Step A: Trigger the pipeline when a purchase order in Quickbase is updated, where its Order Status becomes “Ready”.
- Step B: Search the Line Items table for all line items that are part of the purchase order.
- Step C: Take supplier details from the purchase order, and the item / quantity / price from each line item, and use it to generate a purchase order PDF.
NOTE: This method can be used with up to 100 line items.
Pipeline Step A: Trigger when purchase order is ready
The goal of Step A is to trigger the pipeline when a purchase order in Quickbase enters the Ready status.
Here’s how to set it up:
- Create a new pipeline and give it a name.
- Open the Quickbase channel on the right.
- Connect to your Quickbase account if you haven’t already done so (click here to learn how).
- Click Records, then drag the Record Updated trigger onto the canvas as Step A.
- Under Table, select Purchase Orders.
- Under Trigger on Any of These Fields, select Order Status.
- Under Specify Fields for Use in Subsequent Steps, select the Order Status field since we’ll be using it for the trigger condition in a minute. Then, select each field that you want to appear on your purchase order (Payment Term, Supplier Email, Grand Total, etc).
- Click Add Conditions.
- Build a condition that reads like this:
(Order Status) (is) (Ready)
.
Pipeline Step B: Search for all line items within the purchase order
The goal of Step B is to search the Line Items table for all records related to the purchase order. This allows us to include all line items in our PDF.
Here’s how to set it up:
- From the Quickbase channel on the right, drag the Search Records query onto the canvas as Step B.
- Under Account, select the appropriate user token.
- Under Table, select Line Items.
- Under Fields, select Related Purchase Order, Item Number, Description, Unit Price, Quantity, and Line Item Total.
- Click Add Conditions.
- Start building the condition so the first line reads: (Related Purchase Order) (equals)
- From the box in the middle of this page, drag Record ID from the purchase order in the bottom line of the condition.
- Quickbase automatically adds a FOR EACH loop after query steps, but in this case we do not need it. Click the trash can icon next to FOR EACH to remove the loop.
Pipeline Step C: Generate purchase order PDF
The goal of Step C is to take the info from the Purchase Order table and from the Line Items table, and combine them to generate the purchase order PDF in Formstack Documents.
Here’s how to set it up:
- Open the Formstack Documents channel on the right.
- Connect to your Formstack Documents account.
- Drag the Document Merge action as Step C.
- Under Account, select your Formstack Documents account.
- Under Merge URL, select the document template you want to use. In this case, we’ll use Purchase Order.
- After selecting the document template, a series of boxes appears below, with one box for each merge field you’ve included in your document template.
- Drag fields from the box in the middle of the page into their corresponding boxes on the left.
- Under Custom JSON, we’ll pass Formstack Documents the list of line items associated with the purchase order. You can do this by typing the following jinja expression in the box:
{"items": {{b|to_json}}}
Note: This may cause an error if more than 100 records returned by the search, returning this error: Invalid Step: Query step produced too many items too allow inline indexed access.
Check with your account team for other options.
Testing your pipeline
To test your pipeline, first click the toggle next to Pipeline off to turn it on. Next, switch to your Quickbase app, and set up a test purchase order with line items to make sure the pipeline is working properly. The activity log in Pipelines will show you the progress of the pipeline, and give you details about each step the pipeline is taking.