Coupa

Finance OAuth

Read and create requisitions, purchase orders, invoices and suppliers in Coupa from any Windmill script, flow or app.

Set up in 2 steps

1

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.

2

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.

Submit a script →

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.

FieldTypeRequiredWhat it is
instance_urlstringYesBase 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.
tokenstringYesOAuth 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.