These are completely different substances in terms of mechanism of action and psychoactive action, despite the common indole in the chemical structure.
DMT is a powerful psychedelic, the action causes distortion of reality, visual hallucinations, spiritual experience.
Synthetic cannabinoids, like any cannabinoids, affect CB receptors.
Psychoactive action is associated with inhibition, relaxation, changing reality in a different way than in psychedelics.
But there are some common features between them, for example, if you have a strong smoke, then there will be a condition similar to a psychedelic trip.