Test Salesforce Outbound Integrations with Ngrok and Node.js

In this hands-on walkthrough, I demonstrate how to simulate a real external system and test Salesforce outbound callouts using Ngrok and Node.js

Instead of abstract mock servers or dummy endpoints, we spin up a fully functional local Node.js API, tunnel it securely with Ngrok, and capture exactly what Salesforce sends during the integration — including headers, payloads, and authentication.

This demonstration was originally meant to be part of my previous video on Custom Authentication using Named Credentials, but I had to create a separate video as that one became too long.


🔍 What You’ll Learn:

  • How to create a lightweight Node.js API
  • How to expose your local server publicly using Ngrok
  • How to configure Named Credentials in Salesforce
  • How to capture & inspect the raw HTTP request from Salesforce

This approach gives you full visibility and control over the integration — perfect for debugging, learning, or preparing for production integrations.

Timestamps
0:00 Introduction
1:05 What is Node.js
2:00 What is Ngrok
3:55 Why use tools like Node.js and Ngrok
10:09 How to install Node.js
12:24 JavaScript code to build custom API
25:25 Invoke the custom API in localhost
30:23 How to setup Ngrok
37:16 How to use Ngrok to tunnel custom API on to public internet
41:07 Testing end to end

Link to all the files used in this walkthrough – Github

This Post Has 2 Comments

  1. Viska Clanella

    The tutorial is comprehensive and informative, but it could be enhanced by including common troubleshooting scenarios, such as handling authentication failures, timeout issues, or Ngrok connection limitations.

  2. Aniket Srivastava

    Glad you liked the video Viska ! Yes you are right – there are scope of improvements in this video and I will try to cover those in some future videos.

Leave a Reply