Sync paid time off approval requests to lookup table

Recipe ToolsData Parser

What it does

When someone calls the Insert or Update Paid Time Off Approval Request endpoint, this automation parses the payload and searches the lookup table. It inserts a new entry or updates an existing one, and stops with an error if the request is malformed or the status is already approved or declined.

Who it's for

HR teams who need to keep paid time off approval requests in sync without manual updates.

How teams use this

Insert a new paid time off request

Call the endpoint with a new request ID and pending status. The automation parses the payload, finds no existing entry, and inserts the record into the lookup table so it can be tracked.

Update an existing request with new status

Call the endpoint with an ID that already exists and a new status like approved. The automation finds the entry and updates it in the lookup table.

Prevent updates to closed requests

The automation stops with an error if the status is approved or declined. Only pending and in-progress statuses can be updated, so no one modifies a closed request.

Add manager name to the lookup table

Include a manager name field in the payload so the new or updated paid time off request record contains the approver information. Only the field mapping needs to change.

How it works

  1. Receive the paid time off approval request. Someone calls the Insert or Update Paid Time Off Approval Request endpoint with a payload containing the request ID, status, and other details.
  2. Parse the incoming payload. Json Parser extracts the ID, status, and other fields from the request so the automation can validate and route the data correctly.
  3. Search for an existing entry. Query the Paid Time Off Approval Requests lookup table by ID to check if this request already exists in the table.
  4. Insert or update the entry. Add a new entry to the lookup table or update the existing one with the latest status and details from the request.
  5. Stop if status is final. Stop the job with an error if the status is approved or declined, since no further updates are allowed on closed requests.