Use the purple command block
Link the first command block to the second command block using the comparator
I suggest use comparator link one more command block and type /execute @e [type=arrow] ~ ~ ~ detect ~ ~ ~ grass -1 kill @e [type=arrow]
so it won't keep explode