A simple node project that watches your SalesForce objects for changes and sends webhooks to the URLs of your choice.
- Can watch any SalesForce object, even custom ones.
- Timer can be adjusted so you can control the balance between the time delay of webhooks, and the number of API calls consumed.
- Webhooks are automatically retried with exponential back-off.
- Webhook payload includes the record ID, the object name, the exact keys changed, and a copy of the full record.
- Clone latest repo
git clone https://github.com/internalfx/internalfx-salesforce-webhook-server.git
cd internalfx-salesforce-webhook-server
- Get dependencies
yarn
- Rename example config file and edit to your liking.
rename example.config.js to config.js
- Run database migrations
npx prisma migrate deploy --preview-feature
- Start server!
node app.js
Click "SalesForce Objects" in the left hand menu.
Click the "add salesforce object" button on the top right.
Field | Description |
---|---|
Object Name | The API name in SalesForce |
Enabled | This enables/disables the sync with SalesForce |
Sync Date | The server will query for all records that have been created or changed since this date. This date will move forward as the server runs. You can move this date back to force a sync of older records |
Click "Save" when you are done.
Click "Webhooks" in the left hand menu.
Click the "create webhook" button on the top right.
Field | Description |
---|---|
Name | A friendly name to remind you of what this webhook is for |
URL | The URL the webhook will be "posted" to |
Enabled | This enables/disables the webhook |
Object Interests | The webhook will post changes for any SalesForce objects listed here |
Click "Save" when you are done.