Set a source to be automatically added to created entries? [Source-based processing]

I have experimented with the Forms addon to solve my original problem (automate as much as possible the mass input of similar data structures, e.g. hundreds of baptism records), but realized that the Forms also require me to manually click a lot to define persons, etc. when actually filling the predefined form. Hence the Forms addon does not automate much of my workload when I am scanning through 100+ pages of records. Am I missing something with Forms that would help me more?

Then I figured that I am better off by converting my external data to GEDCOM or XML, attaching the same source to all the related pieces of information in a given record, and mass-import them directly into my Gramps database. However, can Gramps intelligently (or interactively) detect clashes on import, i.e. that a person/family/event/etc. already exists, to merge new data to it, without generating duplicates?

So practically I am down to the point where I have implemented my own GEDCOM/XML parser in my preferred choice of programming language (Wolfram Mathematica). Now I can fully handle my family tree outside of Gramps (import, visualization, search, filter, addition, deletion, editing, merging, etc.), and I can detect and merge identical entries during mass-import. This is nice, but it also means that I only use Gramps for low-efficiency tinkering. I would (have) preferred a method that is domestic to Gramps. Is there one?