The Knack connector enables you to automate tasks and interact with Knack data within Flows. Discover and learn about the available triggers and actions in this article.
This article contains the following sections:
Overview
The Knack connector serves as a powerful integration tool within Flows, enabling users to streamline their tasks and engage with Knack data effortlessly. It offers a diverse range of triggers and actions designed for the management of records and workflows. In the following sections, we will highlight each available trigger and action associated with the Knack connector.
Triggers:
- Record Created: Initiates the Flow when a new record is added to a specified data table.
- Record Updated: Triggers the Flow when an existing record is modified in a data table.
- Form Submitted: Triggers the Flow when a specified form submission occurs. The form must be selected during setup.
- Record Deleted: Executes the Flow when a record is deleted from your Knack app.
- Get Records: Typically used for data migration or bulk data handling tasks.
Notes:
- Triggers work for changes in the Live App, Builder, and API.
- Learn more about what Knack events can trigger Flows here: What Knack events can trigger Flows?
- Flows do not trigger from batch updates (e.g., updating multiple records at once).
- Flows do not trigger from Tasks.
Actions:
- Create Record: Adds a new record to a selected data table.
- Update Record: Changes the details of an existing record.
- Delete Record: Removes a specified record from the database.
- Search by Record ID: Searches for a record using its unique Record ID, useful for connected data fields. No incremental filtering logic can be applied within this step.
- Search for a Single Record: Finds a specific record based on given criteria for further processing.
- Search for Multiple Records: Retrieves multiple records as an array, which can be processed using an Iterator tool step.
- Custom API Request: Allows users to make custom API calls to the Knack API for advanced integrations.
Knack Search Actions
The Search actions in Knack allow you to efficiently retrieve and interact with records in your database. Understanding how to properly configure these search actions can help ensure your Flows run smoothly and return the desired data. This deep dive covers the three key Search steps available in the Knack connector and provides insights on how to maximize their effectiveness.
Search by Record ID
The Search by Record ID action is a powerful tool for searching for specific records based on their unique Record ID, a hidden system field in Knack. This is especially useful for connected fields where records in a child table (e.g., “Invoices”) are linked to a parent table (e.g., “Customers”).
How it Works:
When triggering an event, such as the creation of an invoice, you can extract the Customer ID from the invoice and use it to search for the related Customer record in the next step. This search action allows you to bridge connected tables by using the Record ID as a lookup reference.
Use Case:
For example, if your Flow triggers when an invoice is created, you can capture the Customer ID from the invoice and use the Search by Record ID step to retrieve the full customer details from the connected Customers table.
Search for a Single Record
The Search for a Single Record action lets you retrieve exactly one record from a specified data table based on filtering criteria.
How it Works:
- You first select the data table to search from.
- Then, you set up operators (e.g., “contains,” “is,” “starts with”) to define your filtering rules. Note: Only 1 operator can be selected.
- Filters can be applied to multiple fields, but note that only one operator can be used across all fields in the search step. For instance, if you use the “contains” operator, it will apply to all fields being filtered.
- You can also specify match conditions like “AND” or “OR” if you’re filtering across multiple fields. Note: Only one match condition, either "AND" or "OR" can be selected.
- Once the search is completed, the Flow expects a single record to be returned.
Key Considerations:
- This action is ideal when you only need one specific record for further actions, such as sending a notification or updating related data.
- If multiple records could match your filters, ensure that the filtering criteria are strict enough to return only one record.
Search for Multiple Records
The Search for Multiple Records action allows you to retrieve an array of records matching specific filtering criteria. This step functions similarly to the Search for a Single Record action but returns multiple records instead of one.
How it Works:
- You configure the same operators and match conditions as in the single record search, but the output is an array of records.
- This array can include several records, and if you want to perform actions on each record, you’ll need to use an Iterator Tool step.
- The Iterator Tool step allows you to loop through the array and perform actions on each individual record, such as updating fields or sending notifications.
Use Case:
For example, if your Flow is designed to retrieve all invoices for a particular customer, you could use the Search for Multiple Records step to gather all matching invoices, and then iterate through each one to perform a specific action, such as marking them as “Paid".
Key Considerations:
- After the Search for Multiple Records step, it is common to immediately follow it with an Iterator Tool step. This ensures that you can act on each record returned in the array.
- As with the single record search, only one operator can be applied across all fields, so choose your filtering criteria carefully to ensure accurate results.