I agree with Leebo. The proper particle to use here, at least for physically meeting up, would be と. I think に would be used in combination with 合う when you’re talking about a kind of conceptual meeting, e.g. meeting/agreeing on a goal or point of interest.
That minor point aside, the sentence you constructed is perfectly fine for the purpose, Samuel. Although, the “I will” part is somewhat implicit and would have to be inferred from the context, and the construction you have would translate more literally as “I will go to the library and I will meet and study with my friends.” This is one of the issues with Japanese not having a fully-fledged future tense.
The way you use “to” in your sentence implies that you’re going to the library for the sake of studying with your friends, so an alternative I would suggest is something like this:
友達と合って勉強するために図書館に行くつもりです。
The -つもりです part conjugated with the base-form of a verb usually means “Plan to X” or “Will X,” while the ために clause usually means “because” or “for the sake of.” The 合って is kind of redundant in any version of the sentence of sentence, but it’s perfectly fine to use it for practice with the -te form.
Keep in mind the above suggestions are based on lessons I took in Japanese nearly a decade ago, so it’s possible there are more elegant or contemporary constructions to use.