Save new build artifacts into organized release folder
When a new build artifact lands in your source folder, a timestamped copy is saved into your release folder, so teams can find reproducible files without filing them by hand.
Install it
Set up this Zap for me, read how here: https://zapier.sh/zapier/awesome-zaps/save-new-build-artifacts-into-organized-release-folder/
Paste into Claude, ChatGPT, Cursor or any agent.
- Category
- Engineering · Software delivery
- Author
- Zapier
- Source
- zapier/awesome-zaps, folder zaps/save-new-build-artifacts-into-organized-release-folder
Set it up with the CLI
- Add it. Copies the folder into
zaps/save-new-build-artifacts-into-organized-release-folder/. Outside a project, it makes one first.npx zap-pack add awesome-zaps/save-new-build-artifacts-into-organized-release-folder - Fill in the values in
config.ts, and in any other file the list marks. Replace each one as its comment and SKILL.md say. - Deploy it. Asks for any value still left, signs you in to Zapier if you aren't, then publishes it to your account.
npx zap-pack deploy save-new-build-artifacts-into-organized-release-folder - Check it. Its recent runs, with status and errors.
npx zap-pack logs save-new-build-artifacts-into-organized-release-folder
zaps/save-new-build-artifacts-into-organized-release-folder/
- README.mdWhat it does, for people
- SKILL.mdHow an agent sets it up: what to ask you, and how to test it
- config.tsIts settings 2 to fill in
- connections/google-drive.tsThe
google-driveaccount it uses - triggers/file-in-folder.tsWhat starts it:
google-drivefile_in_folder_v21 to fill in - workflow.tsThe code; each
ctx.stepis a step in the Zap
Agents: add --yes to any command so it never prompts. When it needs an answer only the user can give, it stops and names the flag that supplies it.
SKILL.md
View MarkdownWhat it does
- Trigger: a new file appears in the source folder in Google Drive (
google-drive,file_in_folder_v2). Subfolders are not watched. - Google Drive copies that file into the release folder, named
<ISO timestamp> <original filename>. Each run makes a new copy, so nothing is overwritten.
The Zap only copies files. It never changes or moves the source file.
Ask the user
Each REPLACE_… value is set per person. Resolve names to IDs with the user's own connections; don't ask them to paste an ID you can look up.
| Setting | Where | What goes there |
|---|---|---|
SOURCE_FOLDER_ID |
config.ts, and folder in triggers/file-in-folder.ts |
The Google Drive folder that build artifacts land in. Use the same answer in both places. |
RELEASE_FOLDER_ID |
config.ts |
The Google Drive folder that holds the timestamped release copies. |
Also review the trigger's settings with them: Include Subfolders is off and Include Deleted Files is set to non-deleted files only, both in triggers/file-in-folder.ts.
Build it
If you can run shell commands, set it up with zap-pack: run npx zap-pack add awesome-zaps/save-new-build-artifacts-into-organized-release-folder, replace each REPLACE_… value as this file says, then run npx zap-pack deploy save-new-build-artifacts-into-organized-release-folder, which signs the user in to Zapier when it gets there. Otherwise build with Zapier MCP, as the steps below say. No Zapier MCP tools? Read https://docs.zapier.com/mcp/get-started/quickstart.md and follow the page for the app you are running in to get the user connected, then continue with this build.
- Accounts: bind
google-driveto the user's Google Drive connection for the account that owns both folders. The trigger and the action use the same one. No other app needs a connection. - Source: publish
workflow.tsandconfig.ts, with eachREPLACE_…replaced by the user's answer.triggers/file-in-folder.tsandconnections/are settings, not code: set the workflow's trigger and connection bindings from them, and set the trigger'sfolderto the same answer asSOURCE_FOLDER_ID. The trigger file names the app by its slug; for the trigger'sselected_api, callsearch_triggerswith that slug, find the row whosekeyis the trigger'sevent, and use<app_key>@<app_version>from it. - Build guide: load Zapier's build guide with
get_zapier_skill("zapier:build-workflows")and follow it to create, test and publish the workflow. - Fields: inspect the Google Drive action's fields with the user's connection and sample the trigger before the first test run, and fix any key in
workflow.tsthat doesn't match.
Test it
Run it once as a draft test with a small test file the user owns in the source folder, using that file's ID as id:
{
"id": "<test file ID>",
"title": "[install-test] app-1.2.3.zip",
"originalFilename": "[install-test] app-1.2.3.zip"
}
Check that one copy appears in the release folder, named with the run's ISO timestamp followed by the original filename, and that the source file is unchanged. If run-status tools aren't available, check the release folder in Google Drive directly. Ask the user to delete the test copy, since the agent does not delete test data.
Notes
- Copy File has no description field, so the copy has no description.
- The trigger payload has no separate build identifier, so the timestamp and original filename are the only parts of the name.
- Folder IDs are per person. Don't commit real ones.
- To share the release folder with a release group, add a Google Drive step that sets sharing on it.
- To skip small files, add a conditional step that ignores files below a size threshold.