As Hellenists, we often accept the Gods of our pantheon as a solid block, handed down through the ages as a package deal that magically came into being at the start of the Hellenistic era and did not change during it. Nothing could be father from the truth. Many, if not all members of the Hellenic pantheon were imported into it from other places or the remnants of older religions. Zeus is the Greek continuation of '*Di̯ēus', the name of the Proto-Indo-European God of the daytime sky, Hera most likely already existed for the pre-Hellenic people who moved into the area. Archaeologists suspect that Athena, Médousa and Poseidon found their origins in Libya. They came to Hellas through Crete at the dawn of Hellas. In the beginning of Her rein, Athena may have been a snake and fertility Goddess and Poseidon solely a God of horses. Aphrodite's oldest non-Greek temple lay in the Syrian city of Ascalon where she was known as Ourania, an obvious reference to Astarte. Hekate's worship most likely originated in Thrake. I really could go on and on and on.

The process by which elements of one religion are assimilated into another religion resulting in a change in the fundamental tenets or nature of those religions is called syncretism. The ancient Hellenes practiced syncretism in two ways. The first is a straight-up adoption of a deity into the pantheon by way of mythology. Dionysos is a good example. He may have been worshipped as early as 1500–1100 BC by Mycenean Greeks, but traces of Dionysian-type cult have also been found in ancient Minoan Krete. His origins are uncertain, and his cults took many forms; some are described by ancient sources as Thrakian, others as Greek. In some cults, he arrives from the east, as an Asiatic foreigner, and in some, he was simply born into the pantheon as a "late addition".

This form is what is termed "interpretatio graeca", the Hellenic habit of identifying Gods of disparate mythologies with their own. When the proto-Greeks first arrived in the Aegean and on the mainland of modern-day Greece early in the 2nd millennium BCE, they found localized nymphs and divinities already connected with every important feature of the landscape: mountain, cave, grove and spring all had their own locally venerated deity. The countless epithets of the Olympian Gods reflect their syncretic identification with these various figures. Interpretatio graeca was practiced outside of Central Hellas at a very large scale in the Archaic period.

Very roughly speaking, the reign of ancient Hellas can be divided into the periods: The Archaic period (800 BC - 480 BC), the Classical period (480 BC - 323 BC) and the Hellenistic period (323 BC - 146 BC). Before the Archaic period, there was no Hellas. As the Mycenaean civilization fell, it signaled the end of the Dark Ages. The founders of ancient Hellas founded their own script, based off of the Phoenician alphabet and small social hubs began to emerge. Because the land they lived on was divided into islands, or intercut with mountains, many of these hubs were self-governed. Many wars were fought over the next 300 years or so, as the cities Athens, Sparta, Corinth, and Thebes tried to expand their land, work force and supply of raw materials. For the Hellenic religion, this age was a formative age. The various tribes of the Dark Ages brought their Gods with them as they traveled the land and settled in different places. Various Gods with overlapping domains were worshipped in different parts of the region, forming a cohesive but unstructured whole. There are varying incarnations of Gods and Goddesses and their abilities and strength vary greatly across the land.

The Classical period is the best know period. The Classical period was the foundation of modern Western politics, architecture, scientific thought, literature, and philosophy. It was also the age of Athens; most of what we still know about ancient Hellas comes from records from this city who was at its greatest during the two centuries of the Classical period. This was also the Age of the Olympians. Many of the old Gods got merged into single personas with different epithets to accommodate local worship. This more unified faith was introduced to many of the city states and although it was never a unified whole, this was the closest the ancient Hellenic religion ever got to being a solidified faith.

The Classical period was also the time of the Decree of Diopeithes. Diopeithes (Διoπείθης) was an Athenian general who lived during the 4th century BC. Having gone through the horror of the Peloponnesian War, the Athenians, as Thucydides puts, “decided to enjoy their lives as fast as possible, giving in to pleasures, for they were convinced that life and wealth were equally short-termed. […] They believed that there is no difference between piety and impiety […] because no one believed they’d survive, and thus, the time to answer and get punished for their crimes would never come.” It was the rapid spread of immorality and uncivilized behavior that led the Athenians in 431 BCE to casting their vote for the Decree which made asebeia (impiety) illegal.

If anyone disrespected the Gods of the polis, the Decree of Diopeithes would be applied and the individual prosecuted. This is exactly what happened to Socrates: although he was deeply religious, he was sentenced for impiety and executed in 399. Next to impiety becoming a punishable offense, it became illegal to worship any Gods outside of the established pantheon. Exceptions were sometimes made, but there were a lot of hoops one had to jump through to get the building of a temple approved--especially in Athens. In the case of Thrakian Goddess Bendis, it took the decree of the oracle of Dodona to grant land for a shrine or temple in the Attic region. Although Thrakian and Athenian processions remained separate in the city, both cult and festival became so popular that in Plato's time (429-413 BCE) its festivities were naturalized as an official ceremonial of the city-state, called the Bendideia was introduced.On the fringes of the Hellenic nation syncretism was still practiced.

At the start of the Hellenic period, ancient Hellas was at its largest. Alexander the Great had conquered lands as far as Asia Minor, Assyria, the Levant, Egypt, Mesopotamia, Media, Persia, and parts of modern Afghanistan, Pakistan, and the steppes of central Asia. After Alexander the Great died, there was no logical successor. He left his empire to 'the strongest' and thus his generals fought a forty year battle which resulted in four major domains. Next to those four, much of mainland Hellas and the Hellenic islands remained at least nominally independent, although often dominated by Macedon. The four domains, called dynasties, were:

The Antigonid dynasty in Macedon and central Hellas;
The Ptolemaic dynasty in Egypt based at Alexandria;
The Seleucid dynasty in Syria and Mesopotamia based at Antioch;
The Attalid dynasty in Anatolia based at Pergam.

The divide of the rule of Hellas into four dynasties led to a second form of syncretism: one which showed syncretist features, essentially blending Mesopotamian, Persian, Anatolian, Egyptian (and eventually Etruscan–Roman) elements within an Hellenic formula. The Hellenic Gods continued to be worshiped, and the same rites were practiced as before. Athens, Sparta and most cities in the Greek mainland did not see much religious change or new Gods (with the exception of the Egyptian Isis in Athens), while the multi-ethnic Alexandria had a very varied group of Gods and religious practices. Wherever the ancient Hellenes went, they brought their religion, even as far as India and Afghanistan. Non-Hellenes brought Egyptian, Jewish, and a great variety of local Gods into the pantheon. A common practice was to identify Hellenic Gods with native Gods that had similar characteristics and this created new fusions like Zeus-Ammon, Aphrodite Hagne (a Hellenized Atargatis) and Isis-Demeter.

To summarize, during the formative age of the Hellenic state, many local cults were absorbed into a pantheon that solidified into the whole we are so familiar with. This pantheon was protected, especially at the heart of the nation, by decree of lawmakers, but once the Hellenic nation became too large to sustain itself and fell apart, the religion became adaptive. Wherever the ancient Hellenes lived, they saw their Gods in the local cults and thus they adopted Them when they were in great enough numbers to do so.

Syncretism is practiced to this day. Many modern worshippers are drawn to Gods outside of the  pantheon formed in Classical Hellas. In general, the rule of thumb to practice syncretism in a Hellenic fashion is to identify which Hellenic deity the external deity is closest to, to maintain the base Hellenic style of worship for this deity (Ouranic or Khthonic, for example, and by way of the usual steps to proper worship through procession, purification, hymns and prayers, and sacrifice), and then to add elements of the worship of the external deity into that practice. What these are will depend heavily upon the external deity and Their pantheon of origins, so I can't give advice on that. Syncretic practice requires a lot of trial and error to find a blend that respects both Gods and both Their cultures. This is why it's essential to link the external deity to a Hellenic one: it'll allow you to focus the worship by way of domain and/or mythology.