Connect Oracle HCM to n8n?
This tutorial shows how to connect Oracle HCM to n8n using the Oracle HCM Cloud REST API. You can connect Oracle HCM to n8n by configuring OAuth2 credentials and using the n8n HTTP Request node to call HCM endpoints. The steps below use Docker for n8n and sample curl commands to test the API.
What You Need
- Oracle HCM Cloud account with API access and OAuth2 client credentials.
- n8n running in Docker or on a server (Node.js runtime available).
- Basic knowledge of REST, JSON, and HTTP headers.
- curl or Postman for testing.
Connect Oracle HCM to n8n workflow setup
This section gives a clear sequence to install n8n, obtain tokens, and create a workflow that calls Oracle HCM APIs.
Step 1: Install n8n with Docker
Run n8n locally with Docker. This example uses a named container and persists data.
docker run -d --name n8n \
-p 5678:5678 \
-v ~/.n8n:/home/node/.n8n \
-e N8N_HOST=localhost \
-e N8N_PORT=5678 \
n8nio/n8n
Step 2: Create OAuth2 client in Oracle HCM
Create an OAuth2 client in Oracle Cloud to get a client_id and client_secret. Note the token endpoint URL from your Oracle HCM Cloud tenancy.
Step 3: Get an access token (example)
Use client credentials to request a token. Replace placeholders with your values.
curl -X POST "https://your-oracle-hcm-host/oauth2/v1/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-u "CLIENT_ID:CLIENT_SECRET" \
-d "grant_type=client_credentials&scope=urn:opc:idm:__myscopes__"
The response returns an access_token. Use that token to call HCM REST API endpoints.
Step 4: Call an Oracle HCM REST endpoint
Test a sample API call with curl. Replace ACCESS_TOKEN and endpoint path.
curl -X GET "https://your-oracle-hcm-host/hcmRestApi/resources/11.13.18.05/workers" \
-H "Authorization: Bearer ACCESS_TOKEN" \
-H "Accept: application/json"
Step 5: Create the n8n workflow
In n8n, add an HTTP Request node. Configure method, URL, and headers. Use the Bearer token from the OAuth2 step or use n8n credentials to refresh tokens automatically.
// Example n8n HTTP Request node settings (conceptual)
{
"method": "GET",
"url": "https://your-oracle-hcm-host/hcmRestApi/resources/11.13.18.05/workers",
"headers": {
"Authorization": "Bearer {{ $json["access_token"] }}",
"Accept": "application/json"
}
}
How to Install Node.js tools
If you need to run scripts or custom functions in n8n, install Node.js locally. Use nvm to install a stable Node.js version.
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
nvm install --lts
node -v
npm -v
Update
Keep n8n and dependencies up to date. Update Docker images and Node.js periodically. This avoids bugs and improves security.
docker pull n8nio/n8n
docker stop n8n && docker rm n8n
# then re-run the docker run command from Step 1
Security
- Store client_id and client_secret in n8n credentials, not in plain workflows.
- Use HTTPS and validate Oracle host certificates.
- Limit OAuth scopes to the minimum required for your workflow.
- Rotate credentials periodically and use IAM controls in Oracle Cloud.
Done
You now have a working plan to connect Oracle HCM to n8n. Use the token request and HTTP Request node to fetch or update HCM data. Test each step with curl before automating in n8n.