Coupa
Finance OAuthRead and create requisitions, purchase orders, invoices and suppliers in Coupa from any Windmill script, flow or app.
Set up in 2 steps
Connect from the Resources page
Open Resources, click Add a resource/API and pick coupa under Others. Enter your instance name and the client id and secret from Coupa's OAuth2/OIDC Clients page; Windmill fetches and renews the token.
Run your first script
Fork any script below and read before writing anything.
Scripts
Building blocks, if none of the projects above fit. Fork one, run it, or call it as a step inside your own flow.
New Invoices
Update Supplier
Update Purchase Order
List Suppliers
List Requisitions
List Purchase Orders
List Invoices
List Expense Reports
List Contracts
Get Supplier
Get Requisition
Get Purchase Order
Get Invoice
Get Expense Report
Get Contract
Create Supplier
Create Requisition
Create Invoice
Change Purchase Order Status
Change Invoice Status
Trigger flows from Coupa
Coupa is not only a destination. These inbound paths are supported today.
New invoices (scheduled poll)
The New Invoices trigger script returns the invoices created since its last run. In a flow, add a trigger, choose Scheduled Poll, and pick the script and an interval. The steps after it run once per new item, and each flow keeps its own cursor.
Resource type
The shape of the credential every script on this page expects.
coupa
View raw schema →| Field | Type | Required | What it is |
|---|---|---|---|
| instance_url | string | Yes | Base URL of your Coupa instance, e.g. https://yourcompany.coupahost.com (or .coupacloud.com for partner/demo instances). Filled automatically when you connect via Windmill's OAuth. No trailing slash. |
| token | string | Yes | OAuth access token, written and refreshed automatically by Windmill's OAuth (client credentials) connection. |
Questions
Where do the client credentials come from?
Your Coupa instance, under Setup then OAuth2/OIDC Clients. Create a client with the client credentials grant and the scopes your scripts need.
Why does it ask for an instance name?
Coupa gives each customer its own host, so both the token endpoint and every API call are built from it. instance_url is filled in for you when you connect.
There is no Connect button on my instance
Coupa needs no instance admin: each user enters their own client in the coupa row under Others. If that row asks for a token instead of a client id and secret, the instance runs a Windmill version older than managed Coupa connections.
Is my token stored on the hub?
Never. It lives only in your own Windmill workspace, encrypted at rest.