How to pipe JotForm Data to CSV in PowerShell



Use standard PowerShell cmdlets to access JotForm tables.

The CData Cmdlets Module for JotForm is a standard PowerShell module offering straightforward integration with JotForm. Below, you will find examples of using our API Cmdlets with native PowerShell cmdlets.

Creating a Connection to Your JotForm Data

Start by setting the Profile connection property to the location of the JotForm Profile on disk (e.g. C:\profiles\JotForm.apip). Next, set the ProfileSettings connection property to the connection string for JotForm (see below).

JotForm API Profile Settings

You will need to find your JotForm API Key in order to authenticate. To obtain an API Key, go to 'My Account' > 'API Section' > 'Create a New API Key'. Once you've created your new API Key, you can set it in the ProfileSettings connection property.

Custom Enterprise API Domains

Enterprise customers of JotForm are given custom API domains to connect to, rather than the default 'api.jotform.com' domain. If you are an enterprise JotForm customer, then set Domain to you custom API hostname, such as 'your-domain.com' or 'subdomain.jotform.com', inside the ProfileSettings connection property. Conversely, if you do not have a custom domain and still need to connect to 'api.jotform.com', then leave Domain undefined and set only APIKey.

$conn = Connect-API  -Profile "$Profile" -ProfileSettings "$ProfileSettings" -Domain "$Domain"

Selecting Data

Follow the steps below to retrieve data from the Forms table and pipe the result into to a CSV file:

Select-API -Connection $conn -Table Forms | Select -Property * -ExcludeProperty Connection,Table,Columns | Export-Csv -Path c:\myFormsData.csv -NoTypeInformation

You will notice that we piped the results from Select-API into a Select-Object cmdlet and excluded some properties before piping them into an Export-Csv cmdlet. We do this because the CData Cmdlets append Connection, Table, and Columns information onto each "row" in the result set, and we do not necessarily want that information in our CSV file.

The Connection, Table, and Columns are appended to the results in order to facilitate piping results from one of the CData Cmdlets directly into another one.

Ready to get started?

Connect to live data from JotForm with the API Driver

Connect to JotForm