Send a Webhook to Salesforce: Transform & Forward Any Payload
Send any webhook to Salesforce. Transform an incoming webhook into the Salesforce API format in flight and forward it — no glue server, no code to maintain.

You have a service that fires webhooks — a form, a payment provider, a CI pipeline, a monitoring tool — and you want each event to create a record (a Lead, Contact or custom object) in Salesforce. The problem: the Salesforce API won't accept the raw webhook. It expects its own JSON shape and authentication, and the payload your source sends never matches.
Webhook Relay sits in the middle. It receives the incoming webhook at a stable public URL, transforms the payload into the format Salesforce expects, and delivers it — no glue server, no Lambda, no maintenance.
How it works
- Your source service POSTs its webhook to a Webhook Relay endpoint.
- A transformation function parses the payload and builds a Salesforce API request.
- Webhook Relay forwards it to Salesforce, and the record is created.
Step 1: Get your Salesforce credentials
You need an OAuth access token from a Connected App (Salesforce → Setup → App Manager).
Step 2: Create a Webhook Relay output to the Salesforce API
Create a bucket with a public input, then add an output pointing at the Salesforce API:
- Output destination:
https://YOUR_INSTANCE.salesforce.com/services/data/v60.0/sobjects/Lead - Headers:
Authorization: Bearer <your-access-token>Content-Type: application/json
Step 3: Add a transformation function
Attach a function that reshapes the incoming webhook. Salesforce's REST API expects a JSON object whose keys are the sObject's field API names (LastName, Company, Email for a Lead).
-- incoming payload is in r.RequestBody
local body = json.decode(r.RequestBody)
local lead = {
LastName = body.last_name or body.name or "Unknown",
Company = body.company or "Unknown",
Email = body.email
}
r:SetRequestBody(json.encode(lead))
Step 4: Point your source at the URL and test
Configure your source service's webhook to point at the Webhook Relay public URL. Trigger an event — or replay one from the Webhook Bin — and the record appears in Salesforce within seconds. If the API rejects the request, the Webhook Relay logs show Salesforce's exact error so you can fix the mapping.
Going further
- Fan out: send the same event to HubSpot or Email at the same time with multiple destinations.
- Filter: use forwarding rules so only the events you care about reach Salesforce.
- Inspect first: see the raw payload in the Webhook Bin before writing the mapping.
Get started
Create a free Webhook Relay account and turn any webhook into Salesforce records — no servers to run. New to webhooks? Start with what is a webhook and how to transform webhooks.
