Sync employee roles from MySQL via API
Recipe ToolsDatabaseMarketing
What it does
When someone calls the Get fe_lib_employee_role endpoint, this automation queries the fe_lib_employee_role table in MySQL. It returns the results to the caller, or returns an error response without retry if something goes wrong.
Who it's for
IT and HR teams who need to retrieve employee role data from MySQL through a real-time API endpoint.
Apps used
How teams use this
Retrieve roles for access control
Call the endpoint to fetch current employee roles from MySQL and use the data to enforce role-based access policies across systems. The automation handles the lookup in real time without manual database queries.
Sync roles to identity management
Integrate this endpoint with an HR directory or identity system so employee roles sync automatically when requested. Only the consuming system changes while the automation logic stays the same.
Filter roles by department
Add a condition to the MySQL query so only active employees or a specific department's roles are returned. Include a department parameter in the endpoint request to narrow the result set.
Check role status before returning
Set a condition in the query to exclude inactive or pending roles from the results. Only roles with an active status are sent back to the caller.
How it works
- Receive the role lookup request. A real-time call to the Get fe_lib_employee_role endpoint initiates this automation and waits for the employee role data to be returned.
- Query the employee role table. Select rows from the fe_lib_employee_role table in MySQL and retrieve the requested employee role information for the caller.
- Return the role data or error. Send the employee role results back through the Workato Service endpoint. If an error occurred during the query, return the error response without retrying.