Copy new records from one tool into another every few minutes, with the API keys kept in a secrets store
Published 2026-11-19
Most small teams run on a handful of tools that do not talk to each other. New orders land in one place, customers live in another, and payments show up in a third. Someone ends up copying each new record across by hand, and the copy is always a little late or a little wrong.
ChatGPT can help with part of this today. With connected apps it can read and update supported services, and a recurring scheduled task can repeat the work, up to once an hour on paid plans. An event-triggered task can also start when a new Gmail message, Slack message, or GitHub pull request arrives. If both tools have a ChatGPT app and an hourly copy is fine, that may be enough.
The gap that remains
The gap is the plumbing. Many tools have an API but no ChatGPT app, and calling that API needs a key. A task has no secrets store, so the key ends up pasted into a prompt. Each run wakes a model to read records and decide what to copy, which costs usage even when nothing is new, and an update to another service may pause until you approve it. Most of all, nothing remembers which records already moved, so a rerun can copy the same order twice or skip one.
What your assistant builds with Sails
Sails is a coding agent you connect over MCP, with cloud deployment built in. Your assistant writes the code and Sails runs it in the cloud. For a sync between two tools it builds four pieces.
A secrets store that holds the API key for each tool. Your assistant asks you to paste each key into a private link, and the code reads it at run time, so the key never sits in a chat or a file.
A sync table with one row for every record copied: the source ID, the new ID on the other side, the time it moved, and any error. A cursor row keeps the last point the job reached in each source.
A scheduled job that runs every few minutes. It is ordinary shell code with no model in the loop. It asks the source for records newer than the cursor, skips any source ID already in the sync table, writes the rest to the other tool, and moves the cursor only after each write succeeds.
A mailbox your assistant owns that emails you a short note when a write fails three times in a row, plus a private page on your own domain that shows today's copies and errors.
Why it works
A sync is only as good as its memory. When the keys, the log, and the job share one workspace, every run starts where the last one stopped, a record moves once, and a failure is visible the same day instead of a month later.
Hand it off
Copy this into your assistant:
Add Sails from https://sails.app/start. I want new records copied from one tool into another every five minutes. Store each tool's API key in the Sails secrets store using secret open. Keep a sync table with source ID, destination ID, copied time, and error, plus a cursor per source. Run a plain shell job with no model involved that fetches records newer than the cursor, skips any already copied, writes the rest, and moves the cursor only after a write succeeds. Email me from a Sails inbox when a write fails three times in a row. Host a private page on my domain with today's copies and errors. Ask me anything you need before you start.