How to do automation in ShotGrid

Hi all ,

I planned to do some automation on ShotGrid .But first , I need to know how to code . Any masters can share some effective ways of learning python to used on ShotGrid ? I tried to follow this step by step , but I don’t even know what is shotgun class .

NEED some guidance here please . Thanks in advanced !

Perhaps the best way is to read the documentation Shotgun Python API3 — python-api v3.3.0 documentation
There are some limited examples there.

If you are only going to be querying and updating information on Shotgun, you will only be using a single object - Shotgun. You use its methods (such as find_one) to do the work.
If you have to deal with the filesystem integrations (the Toolkit Core part) it becomes a bit more involved.

It takes time, do not rush it. If you have an idea of what your automation should be doing you are halfway there.

@mmoshev ,

Thanks for the tips ! I want automate the status change . For example , after modeling status updated to “done/ final” , texture task status will automatically change from “waiting to start” to “ready to start” .

Does it mean that i imported wrong python class that doesn’t have “find_one” method ? :sweat_smile:
Seems like i do have a lot to catch up

You have an error,
it should look like this

from shotgun_api3 import Shotgun
sg = Shotgun("tecdmy...", "test", "rdd...")

Note the capital letter on Shotgun, and below
Shotgun() means that you are creating an instance of the class Shotgun. It is just like a function call.

1 Like

Take a look at the Event Daemon framework:

There are example plugins here:

Notably, the plugin automates the downstream Task status updating, provided the dependencies between Tasks has been set up.

1 Like