Ready to get started?

Download a free trial of the Monday.com Data Provider to get started:

 Download Now

Learn more:

Monday.com Icon Monday.com ADO.NET Provider

Rapidly create and deploy powerful .NET applications that integrate with Monday.com.

Automate Monday.com Integration Tasks from PowerShell



Are you in search of a quick and easy way to access Monday.com data from PowerShell? This article demonstrates how to utilize the Monday.com Cmdlets for tasks like connecting to Monday.com data, automating operations, downloading data, and more.

The CData Cmdlets for Monday.com are standard PowerShell cmdlets that make it easy to accomplish data cleansing, normalization, backup, and other integration tasks by enabling real-time access to Monday.com.

PowerShell Cmdlets or ADO.NET Provider?

The Cmdlets are not only a PowerShell interface to Monday.com, but also an SQL interface; this tutorial shows how to use both to retrieve Monday.com data. We also show examples of the ADO.NET equivalent, which is possible with the CData ADO.NET Provider for Monday.com. To access Monday.com data from other .NET applications, like LINQPad, use the CData ADO.NET Provider for Monday.com.

Once you have acquired the necessary connection properties, accessing Monday.com data in PowerShell can be enabled in three steps.

You can connect to Monday.com using either API Token authentication or OAuth authentication.

Connecting with an API Token

Connect to Monday.com by specifying the APIToken. Set the AuthScheme to Token and obtain the APIToken as follows:

  • API tokens for admin users
    1. Log in to your Monday.com account and click on your avatar in the bottom left corner.
    2. Select Admin.
    3. Select "API" on the left side of the Admin page.
    4. Click the "Copy" button to copy the user's API token.
  • API tokens for non-admin users
    1. Click on your profile picture in the bottom left of your screen.
    2. Select "Developers"
    3. Click "Developer" and then "My Access Tokens" at the top.
    4. Select "Show" next to the API token, where you'll be able to copy it.

Connecting with OAuth Authentication

Alternatively, you can establish a connection using OAuth (refer to the OAuth section of the Help documentation).

PowerShell

  1. Install the module:

    Install-Module MondayCmdlets
  2. Connect:

    $monday = Connect-Monday -APIToken "$APIToken"
  3. Search for and retrieve data:

    $status = "SENT" $invoices = Select-Monday -Connection $monday -Table "Invoices" -Where "Status = `'$Status`'" $invoices

    You can also use the Invoke-Monday cmdlet to execute SQL commands:

    $invoices = Invoke-Monday -Connection $monday -Query 'SELECT * FROM Invoices WHERE Status = @Status' -Params @{'@Status'='SENT'}

ADO.NET

  1. Load the provider's assembly:

    [Reflection.Assembly]::LoadFile("C:\Program Files\CData\CData ADO.NET Provider for Monday.com\lib\System.Data.CData.Monday.dll")
  2. Connect to Monday.com:

    $conn= New-Object System.Data.CData.Monday.MondayConnection("APIToken=eyJhbGciOiJIUzI1NiJ9.yJ0aWQiOjE0MTc4NzIxMiwidWlkIjoyNzI3ODM3OSwiaWFkIjoiMjAyMi0wMS0yMFQxMDo0NjoxMy45NDFaIiwicGV;") $conn.Open()
  3. Instantiate the MondayDataAdapter, execute an SQL query, and output the results:

    $sql="SELECT Id, DueDate from Invoices" $da= New-Object System.Data.CData.Monday.MondayDataAdapter($sql, $conn) $dt= New-Object System.Data.DataTable $da.Fill($dt) $dt.Rows | foreach { Write-Host $_.id $_.duedate }