Step-by-step guide on how to create a custom integration with Nango.
nango.yaml
configurationnango-integrations
folder, open the nango.yaml
configuration file (reference).
nango.yaml
configuration describes a sync that continuously fetches contacts from Salesforce:
nango.yaml
configuration describes an action that synchronously fetches a contact by ID from Salesforce:
nango.yaml
configuration, run:
[sync-name].ts
) which should contain the following scaffolding :
fetchData
method with your integration code (in the example here, we fetch tasks from Salesforce):
nango.lastSyncDate
is the last date at which the sync has runawait nango.batchSave()
to persist external data in Nango’s cacheawait nango.get()
to perform an API request (automatically authenticated by Nango)await nango.log()
to print console logs (replaces console.log()
)[action-name].ts
) which should contain the following scaffolding :
runAction
method with your integration code (in the example here, we fetch available contact fields from Salesforce):
await nango.get()
to perform an API request (automatically authenticated by Nango)nango.ActionError()
to report errors in the execution of the scriptawait nango.log()
to print console logs (replaces console.log()
)return
will synchronously return results from the action trigger requestdryrun
function of the CLI (reference):
dryrun
retrieves connections from your Dev
environment.