Update device asset fields from incoming admin webhook
When an admin submits device details, the matching Notion record gets its asset number and model filled in automatically, so the asset list stays complete.
Install it
Set up this Zap for me, read how here: https://zapier.sh/zapier/awesome-zaps/update-device-asset-fields-from-incoming-admin-webhook/
Paste into Claude, ChatGPT, Cursor or any agent.
- Category
- IT · IT operations
- Author
- Zapier
- Source
- zapier/awesome-zaps, folder zaps/update-device-asset-fields-from-incoming-admin-webhook
Set it up with the CLI
- Add it. Copies the folder into
zaps/update-device-asset-fields-from-incoming-admin-webhook/. Outside a project, it makes one first.npx zap-pack add awesome-zaps/update-device-asset-fields-from-incoming-admin-webhook - 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 update-device-asset-fields-from-incoming-admin-webhook - Check it. Its recent runs, with status and errors.
npx zap-pack logs update-device-asset-fields-from-incoming-admin-webhook
zaps/update-device-asset-fields-from-incoming-admin-webhook/
- 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
- connections/notion.tsThe
notionaccount it uses - triggers/hook.tsWhat starts it:
webhookhook_v2 - 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: an admin submission arrives at a catch hook (
webhook,hook_v2), which a form, script or check-in system posts to. The payload must carrypage_id(the Notion page to update) anddevice_text(the raw device description). - Parse: the asset number and model are read from
device_textby finding the words "asset" and "model" and taking the value after each. If neither is found, the run stops and writes nothing. - Notion (
notion) updates the page named bypage_id, writingAsset:andModel:lines into its body as Markdown.
The Zap only updates the page it is given. It never searches for a page or changes any other one.
Ask the user
This zap has no REPLACE_… values to fill in per person. Review these defaults in config.ts with the user:
ASSET_LABEL: the word before the asset number indevice_text. Defaults to"asset".MODEL_LABEL: the word before the model indevice_text. Defaults to"model".CONTENT_FORMAT: the format of the text written to the page. Defaults to"markdown".
Then ask:
- What exact fields does the admin submission send? The build assumes
page_idanddevice_text. If the sender uses other names, changeInputSchemabefore installing. - Which Notion database and properties hold the asset number and model? The build writes them into the page body, not into property columns (see Notes).
- Should a payload with no asset or model in its text stop silently, or raise an alert?
Build it
If you can run shell commands, set it up with zap-pack: run npx zap-pack add awesome-zaps/update-device-asset-fields-from-incoming-admin-webhook, replace each REPLACE_… value as this file says, then run npx zap-pack deploy update-device-asset-fields-from-incoming-admin-webhook, 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
notionto the user's Notion connection for the workspace that holds the asset records.webhook(Webhooks by Zapier) needs no account, so itsauthentication_idisnull. - Source: publish
workflow.tsandconfig.ts, with eachREPLACE_…replaced by the user's answer.triggers/hook.tsandconnections/are settings, not code: set the workflow's trigger and connection bindings from them. 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 Notion action's fields with the user's connection, and sample the webhook trigger to confirm its payload carries
page_idanddevice_text, before the first test run. Fix any key inworkflow.tsthat doesn't match.
Test it
Run it once as a draft test with a test page in the user's own Notion workspace:
{
"page_id": "TEST_NOTION_PAGE_ID",
"device_text": "Laptop, Asset: AST-TEST-001, Model: MBP-14"
}
Check that the page body has Asset: AST-TEST-001 and Model: MBP-14 on their own lines, and that no other page changed. If run-status tools aren't available, check the result in Notion directly. Then publish, confirm the trigger is active, and give the user their webhook URL to point their submission system at. Ask the user to delete the test lines from the test page.
Notes
- The Zap writes into the page body, not property columns. Writing properties needs the database's property names, which can only be read through a connected Notion account.
- The asset and model come only from the submitted text: there is no lookup to a device directory or API. If
device_textnames more than one device, the first value of each label is used. - Ideas for later: alert when a submission has an asset but no model (Slack or email), or create a follow-up task when
device_textnames more than one device. - Anyone with the webhook URL can change Notion pages, so never commit a real page ID or webhook URL.