Log failed function calls to a lookup table
Recipe Tools
What it does
When a function call fails, this automation searches a lookup table for that entry ID. It adds a new record if none exists, or updates the existing one so the team tracks all failures in one place.
Who it's for
Engineering teams who need to monitor and log function failures without manual intervention.
How teams use this
Track all function failures centrally
Log every failed function call to one lookup table so the team can review patterns and root causes without searching logs. The entry ID is the key to finding duplicates.
Alert the team on repeated failures
Extend this automation to include a Slack notification step that fires when the same entry ID fails more than once. That way the team knows a function needs immediate attention.
Archive old entries after 30 days
Extend this automation to add a scheduled job that moves entries older than 30 days to an archive table so the active lookup table stays lean. The search and update logic stays the same.
How it works
- Detect a failed function call. A function call fails in real time and passes the entry ID to this automation so the failure can be logged.
- Search for the entry. Search the Failed Jobs lookup table for an entry with that ID to check if this failure has been logged before.
- Add or update the record. If the entry does not exist, add it to the lookup table. If it does exist, update it with the latest failure details so the log stays current.
- Return the result. Send back a confirmation to the calling function so it knows the failure was logged in the lookup table.