Connect an on-premises ERP with the edge agent
Read new rows from SAP Business One, Sage 50 or any SQL database inside your network. Send them out as signed events.
- Time:
- 30 minutes
- Plan:
- Free
- Status:
- Beta
- Code:
- Some
Beta: tested against sample payloads, not yet verified on a live account.
office database → hooksnode agent → hooksnode → any destination
The problem
Your ERP runs on a server in the office. It has no webhooks, and IT will not open it to the internet. Its data stays in a silo.
What you get
- New and changed rows become events, such as sales.order.updated.
- Only outbound HTTPS. No open ports.
- A restart does not send the same rows again.
Steps
- 1
Create a webhook source for the agent
In your project, go to Sources, click Add source and pick Webhook URL. Set the signature preset to mantissa. Copy the URL and the signing secret.
- 2
Install the CLI on a machine in the network
Install the Hooksnode CLI on a server that can reach the database. Then make a sample config:
hooksnode agent init > agent.yaml
- 3
Describe what to watch
Edit agent.yaml. Put in the source URL, and set the secret in the HOOKSNODE_AGENT_SECRET variable. Add a SQL watch with a cursor column, or a folder watch for CSV exports:
watches: - name: sales_orders kind: sql driver: sqlserver dsn: "sqlserver://reader:password@localhost:1433?database=SBODEMO" query: > SELECT DocEntry, DocNum, CardName, DocTotal, UpdateDate FROM ORDR WHERE UpdateDate >= :cursor ORDER BY UpdateDate, DocEntry cursor_column: UpdateDate key_column: DocEntry type: sales.order.updated interval: 1m - 4
Check, then run
Check the config and the database connection, then start the agent. Run it as a service so it starts with the machine.
hooksnode agent check --config agent.yaml hooksnode agent run --config agent.yaml
Tips
- Use a read-only database user.
- Folder watches can move each file to a done folder after it is sent.
- Supported databases: PostgreSQL, MySQL and SQL Server.