Latin and many other Romance languages do not have perfect aspect, but Greek has perfect aspect and Iberia was a land for Ancient Greek colonies. So how and when Spanish integrates perfect aspect into others existing Latin aspects (like perfective and imperfective aspects which also exist in Greek)?
I think this question is confused
Latin did have a perfect aspect, it was only available in the present, past, and future tenses (these verb forms are usually described as the perfect, pluperfect, and future perfect tenses respectively). This was a true perfect and not a perfective aspect in Classical Latin, that sense developed later as the Classical perfect "tense" evolved into the Spanish preterite (with perfective aspect)
The new perfect aspect using the descendant of habeo (or sum for some verbs, especially intransitive verbs of movement) + inf, which can be conjugated into whatever tense you like, is present in pretty much all Romance languages (although some conservative Romanian varieties prefer the old perfect tense). It seems to be a pretty-much universal feature of Vulgar Latin meaning it would likely already have developed by the end of the Republic
Latin did in fact have a perfective aspect! (I'm going to use the term "perfective" for the aspect here, because "perfect" has a different meaning in traditional Latin grammar, but "perfective aspect" and "perfect aspect" are the same thing.)
Classical Latin had a three-way distinction of tense (past, present, future) and a three-way distinction of aspect (perfective, imperfective, aoristic) which could be mixed and matched freely.
Some combinations looked the same as others:
Imperf. Aoristic Perfective Future amābō amābō amāverō Present amō amō amāvī Past amābam amāvī amāveram
In particular, present perfective ("I have loved") and past aoristic ("I loved") look identical, due to two different PIE "tenses" merging in Proto-Italo-Celtic (*). But we know they were distinct functions, because of certain grammatical features that change if a verb is past vs present tense: present perfective acts like a present, and past aoristic acts like a past.
In Vulgar Latin somewhere around the first few centuries CE, a new form was invented for the present perfective (amātum habeō), and the old form was used only for the past aoristic. This is where most Romance languages got their "perfect" tense, though in many cases its meaning has shifted. I'm not very good at Spanish, but I believe Spanish kept the perfect semantics, while e.g. French and Italian didn't—but I would chalk this up to the vagaries of language change, not to any Greek influence.
(*) If you accept the existence of Proto-Italo-Celtic; if you don't, it happened separately in Proto-Italic and Proto-Celtic.