Home » n8n» Connect SAP SuccessFactors to n8n — Beginner’s Guide

Connect SAP SuccessFactors to n8n?

You can connect SAP SuccessFactors to n8n using n8n’s HTTP Request node and OAuth2 client credentials. This guide shows how to run n8n in Docker, fetch tokens, and call the SuccessFactors API with concrete commands and a sample Node.js script.

What You Need

  • n8n running (Docker recommended).
  • Docker and docker-compose installed.
  • SuccessFactors API client credentials (client_id and client_secret).
  • Basic knowledge of HTTP and OAuth2.

How to Connect SAP SuccessFactors to n8n

The basic flow is simple. Run n8n in Docker. Obtain an OAuth2 token from SuccessFactors. Use that token inside an n8n HTTP Request node to call the OData endpoints.

Step 1: Run n8n with Docker

Start n8n with a simple Docker command. This exposes the UI on port 5678 and stores data locally.

docker run -it --rm \
  -p 5678:5678 \
  -e N8N_BASIC_AUTH_ACTIVE=true \
  -e N8N_BASIC_AUTH_USER=admin \
  -e N8N_BASIC_AUTH_PASSWORD=change_me \
  -v ~/.n8n:/home/node/.n8n \
  n8nio/n8n:latest

Or use docker-compose for persistent setups.

version: '3'
services:
  n8n:
    image: n8nio/n8n:latest
    ports:
      - "5678:5678"
    environment:
      - N8N_BASIC_AUTH_ACTIVE=true
      - N8N_BASIC_AUTH_USER=admin
      - N8N_BASIC_AUTH_PASSWORD=change_me
    volumes:
      - ~/.n8n:/home/node/.n8n

Step 2: Obtain an OAuth2 token

Request a client credentials token from your SuccessFactors token URL. Replace placeholders with your values. Save the token securely.

# Using curl
export CLIENT_ID="your_client_id"
export CLIENT_SECRET="your_client_secret"
export SF_TOKEN_URL="https://{your_successfactors_token_url}/oauth/token"

curl -X POST "$SF_TOKEN_URL" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "grant_type=client_credentials&client_id=$CLIENT_ID&client_secret=$CLIENT_SECRET"

The response returns an access_token in JSON. Extract it for use in API calls.

Alternative: Node.js token fetch

If you prefer Node.js, use this small script. Install node and run it locally to get a token.

// save as get-token.js
const fetch = require('node-fetch');
const params = new URLSearchParams();
params.append('grant_type','client_credentials');
params.append('client_id', process.env.CLIENT_ID);
params.append('client_secret', process.env.CLIENT_SECRET);

(async () => {
  const res = await fetch(process.env.SF_TOKEN_URL, { method: 'POST', body: params });
  const data = await res.json();
  console.log(data);
})();

# run with
# CLIENT_ID=... CLIENT_SECRET=... SF_TOKEN_URL=... node get-token.js

Step 3: Build the n8n workflow

Open the n8n editor at http://localhost:5678. Create a workflow with these nodes.

  • Start node.
  • HTTP Request node to call the SuccessFactors API.
  • Optional: Function node to parse the JSON and map fields.

Configure the HTTP Request node like this:

Method: GET
URL: https://{your_successfactors_api}/odata/v2/PerPerson
Authentication: None (use header)
Headers:
  Authorization: Bearer {{$json["access_token"]}}   # or paste token
  Accept: application/json

For dynamic flows, create a credential in n8n and store the token in credentials or use an OAuth2 credential template if available.

Update

To update n8n when using Docker, pull the latest image and restart the container. Keep your volume for persistent data.

docker pull n8nio/n8n:latest
# stop old container then run the docker run command again

Security

Store client_id and client_secret in n8n credentials or environment variables. Do not hardcode secrets in workflows.

Use HTTPS for any public endpoints. Enable n8n basic auth or OAuth for the editor. Limit IP access with a firewall.

Rotate keys regularly and log API access. Use least privilege for the SuccessFactors client.

Done

You now have a working path to connect SAP SuccessFactors to n8n. Run the workflow in n8n and verify API responses. Adjust mapping and schedules as needed.


If you need a sample workflow file or help with specific SuccessFactors endpoints, export the node JSON from n8n and update the HTTP Request node with your token and endpoint.

Neil
Written by Neil

Neil is a true n8n geek who lives and breathes workflow automation. He dives deep into nodes, triggers, webhooks, custom logic, and self-hosting setups, sharing everything he learns about n8n on AutomationCompare.com. As part of a broader team of automation specialists, Neil focuses purely on mastering n8n and helping others unlock its full potential.

Keep Reading

Scroll to Top