Automatically Set Task Status to Review Pending When a ShotGrid Publish Is Approved
Learn how to configure a ShotGrid Event Daemon listener to change a linked Task’s status to 'Review Pending' as soon as a Publish is marked approved, with a working config, Python callback, limits, and verification steps.
10 Jul 2026, 17:32 UTC

Useful answer
Enable the ShotGrid Event Daemon, subscribe to the Shotgun_Publish_Change event for the sg_status_list field, and when the new value equals approved update the linked Task’s status to Review Pending via the ShotGrid API.
Configuration
Add a listener to the Event Daemon configuration file (commonly eventdaemon.yml). The listener reacts only when the sg_status_list field of a Publish changes.
# eventdaemon.yml snippet
- {description: 'Task status on publish approval', event_type: 'Shotgun_Publish_Change', fields: ['sg_status_list'], callback: 'my_callbacks.update_task_on_publish_approval'}
Callback implementation
Place the following function in a Python module referenced by the callback (e.g., my_callbacks.py). The function receives the ShotGrid connection object (sg), a logger, the event dictionary, and any extra args.
def update_task_on_publish_approval(sg, logger, event, args):
# Find the Publish that triggered the event
publish = sg.find_one('PublishedFile', [['id', '=', event['meta']['entity_id']]], ['sg_task'])
if not publish or not publish.get('sg_task'):
return
task = publish['sg_task']
# Ensure we are reacting to the correct field and value
if event['meta']['attribute_name'] != 'sg_status_list' or event['meta']['new_value'] != 'approved':
return
# Update the linked Task
sg.update('Task', task['id'], {'sg_status_list': 'Review Pending'})
logger.info(f"Updated Task {task['id']} to Review Pending after Publish approval.")
How it works
The Event Daemon continuously polls ShotGrid for events. When a Publish’s sg_status_list field changes to approved, the listener fires, the callback retrieves the Publish’s linked Task, and calls sg.update to set the Task’s status to Review Pending. This keeps the pipeline in sync without manual clicks.
Limits and common mistakes
- Insufficient API privileges – The daemon must run as a user with permission to edit Tasks; otherwise the
sg.updatecall fails silently or raises an error that appears only in the daemon logs. - Infinite loops – Updating a Task can generate its own change events. To avoid the daemon reacting to its own updates, either limit the listener to Publish events (as shown) or add a guard such as checking the event’s user or setting a temporary flag on the Task.
- Missing link – If a Publish is not associated with a Task (
sg_taskis empty), the callback does nothing; ensure your Publish creation process populates this field. - Field name mismatches – The status field on both Publish and Task is typically
sg_status_list, but custom schemas may differ; verify the exact field name in your site.
Verification
- Check the Event Daemon log for a line similar to "Updated Task 12345 to Review Pending after Publish approval." when you change a Publish’s status to Approved.
- In the ShotGrid UI, open the Publish, set its Status to Approved, save, then open the linked Task and confirm its Status column now shows Review Pending without any manual edit.
- Test with a non‑approved status (e.g., Pending) to ensure the Task’s status remains unchanged, confirming the conditional check works.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.