Greetings, Archanaa, and welcome to the Forums! Your sentence features subject-operator inversion after an adverbial with a limitive meaning ( only ). It is correct save for the comma - you don't need one here: Only if we scan the document will we be able to process it.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.