Pull the codes first. Most parts stores have code readers you can use to pull them, write them down and post them and we can give some advice.
most of what your describing sounds like a simple vacuum leak issue, but can't really say anything for certain without knowing what codes are being thrown.