In this article, we will provide you with information on integrating your Knack app with Zapier and share tips on working with actions.
This article covers the following topics:
What is Zapier?
Zapier is a user-friendly third-party automation tool that seamlessly connects Knack to various other apps you use in your daily workflow. With Zapier, you can effortlessly create "Zaps" - simple automations that require no coding - to transfer data from one app to another or trigger actions in different apps automatically.
What can you do with a Zapier Integration?
Need to attach a paid invoice to an existing record in Knack? No sweat; there's a Zap for that!
You can even move data out of your Knack app and share it elsewhere. For example, you can get a notification via Twilio SMS whenever a record is updated.
What services are available to connect with?
Zapier offers integrations to over 2,000 other services. You can find and search a full list of services to connect with here.
Some popular services to connect Knack with are:
-
Google Sheets
-
Slack
-
Mailchimp
-
Gmail
-
Xero
-
Trello
-
Dropbox
-
Quickbooks
How does Zapier work?
Zapier uses “Zaps” to make connections between services, and each service has supported “Triggers” and “Actions”. The Trigger is the event that initiates the Zap, and the Action is a set of actions you define.
For example, a new form submission in Knack can trigger the action to send a Slack message.
Which Knack triggers and actions are supported?
Below are the currently supported triggers and actions available with Knack. Other services will have triggers and actions specific to those services.
Tip: See Zapier's "Do More with Knack Integrations" page here.
Supported Triggers
-
New Form Submission: Triggers when a form is submitted in a Live App.
-
Updated Record: Triggers when an existing record is directly updated in a Live App.
-
New Record: Triggers when a new record is directly created in a Live App.
-
Deleted Record: Triggers when an existing record is deleted in a Live App.
Unsupported Triggers
-
Records created on a table (via the Builder or with the API)
-
Records created via form record rules
-
Records created via "insert connected record" on an action link
-
A form where the Data Source is set to be connected to the logged-in user
Supported Actions
-
Update Record: Updates a record in your Knack database
-
Create Record: Creates a new record in your Knack database
-
Find Record: Finds a record in your Knack database and returns all of its field values
How to Get Started Using Knack with Zapier
You will first need to sign up for a Zapier account before you can set up an integration with Zapier.
When setting up your Zap, choose Knack, and then you'll be asked to connect your Knack account:
You will be prompted to add your Knack Application ID and API Key. You can find these in the API & Code section of the App Settings while in your Builder:
Note: If you are a private server customer, you will also need to add your custom private server domain.
Enter the Application ID and API key into their respective fields in the Zapier form and click "Yes, continue". Your Knack app will then appear in the list of available Knack accounts:
Working with Triggers
The “New Form Submission” trigger lets you select one specific form that will trigger the zap. If you want all of your forms to trigger a zap, use the “New Record” or “Update Record” triggers instead.
When using the “New Record”, “Update Record”, or “Deleted Record” triggers, note that only user-driven actions in the Live App will trigger the zap. This means form edits, grid inline edits, calendar inserts/edits, etc.
Note: These triggers are not initiated by API activity, or Builder updates such as tasks and record rules. Payment views also currently do not trigger Zaps.
Working with Actions
Create Record
To create a record from Zapier, first, select the table the new record will belong to.
Then, Zapier lets you map to any field that is not read-only.
Note: Equations and text formulas cannot be written as they have read-only field values.
Update Record
To update an existing Knack record, your table will need a unique field that a specific value can search.
Select the unique field to be used in the record search:
Then, you can choose the search value that will be utilized in the search field to locate the unique record. Once you have a search field and search value configured, you can set the values to be updated.
Note: On an "Update Record" action, the current Zap run will be halted if the record is not found in the search.
Find Record
The “Find Record” action requires a search field and search value as described in the “Update Record” action above. The main difference between these two actions is that “Find Record” does not create/update anything in Knack; it simply returns the field values so you can use them in further Zap steps.
Working with Fields
Knack uses very specific field types to ensure maximum utility within your app. Field types tell Knack what type of data is stored in a field and how to use it.
Some of these fields have multiple components, like person and address fields. For example, a name field can be split into first and last names.
When using Knack as a trigger, you can choose to use the formatted value of these fields, or you can use the individual components. When using a Zap to create a new Knack record, you must fill in the individual components for these fields to ensure they are added to your database correctly.
For example, the “First” and “Last” names of a “Contact” person field can be used when submitting to a service requiring separate name fields:
If you need to submit a full name to a connected service, you can combine these fields:
When using the full field, it will follow the formatting parameters you’ve set for that field. For example, if your person field uses the format “Last, First, Middle,” then your Zap should submit the name in that order.
Files & Images
Physical file transfers are currently not possible with Zapier and Knack.
You can still connect with services like Dropbox and Box to store your images and files and link to these files in your Knack app. This workflow is currently supported for Knack Image field types but is not currently supported for File field types.
In this Dropbox example, you can choose the “Share Link” or the “Direct Media Link” to copy the image URL to a Knack image field.
To utilize the external URL as the image source, it is necessary to update the image field settings in your Knack app by selecting "Load images from an external URL":
When using files and images in triggers, you can use the “File URL” property to pass it on to other services:
Unsupported Field Types
Timer fields are currently not supported in Knack's Zapier integration due to their from/to formatting.
The signature field's .svg format is not currently supported in Knack's Zapier integration.
Notes & Troubleshooting
Some of my Knack app's tables aren't showing up
Because of the way Knack's authentication works, you choose a specific application when you connect Knack to Zapier. Since we need the Application ID to connect to Knack, we aren't able to show tables from multiple Knack apps in the same dropdown.
The tables from the connected app are the only ones you'll see when you're creating a Zap. If you need tables from a different Knack app, just make a new connection to your Knack account, and that will allow your Zap to show the tables from that newly connected app.
New or updated records aren't triggering my Zap
Knack only triggers notifications from actions that happen in your Live App, not actions from the Builder or through the API.
When inserting records, only records from form submissions will trigger a Zap. Records created through form record rules or through an action of "insert connected record" on an action link will not trigger a Zap.
The Update/Find Zaps aren’t finding my record
You must be sure to use a unique field to identify the correct record. If you don't have a unique field in your table, then you can create one using an auto-increment field.
There is no physical limitation to the number of characters in a value that can be used to identify a record, but it is more practical to use a unique and short identification field if possible. Longer and concatenated field values leave more room for differences in values between the Trigger and Action apps.
How do I use a form that works with the logged-in user?
Forms with built-in user access are not available as triggers. You can, however, use regular forms that contain record rules to set the logged-in user. See our article here for an example.
How do Zaps work with values updated on a form and from record rules?
As mentioned above under the Working with Triggers section in this article, Zaps can only be triggered from forms or inline edits, not from value updates from record rules. That being said, it can be a little confusing on which values will be passed along in a Zap setup if values in a table are both being updated on a form and from record rules on that form.
As record rules execute after the form submission, any values updated by the record rules will be the ones transmitted to the Zap.