An engine that is running rpoughly is doing so because one or more cylinders are not perfroming their share of the work. There are many possible causes for this to happen; some diagnostic tresting will be required to identify thee xact cause of the problem in your truck. SOme of the possible causes are:
(1) low engine compression on one or more cylinders due to valve leakage or a leaking head gasket
(2) Ignition misfire because of a faulty spark plug, ignition coil, or plug wire (if equipped)
(3) Engine air leak near an intake runner for one particular cylinder
(4) EGR valve sticking open at idle
(5) Lack of fuel to one or more cylinders because of a failed fuel injector or electrical fault affecting that injector circuit.
Autozone really cannot diagnose an engine misfire; all they can do is connect a code reader tool to see what codes are stored in memory. This might be useful, because a code on this model year can indicate which cylinder is experiencing the problem, so you would know where to begin looking. You also have to keep in mind that (despite what the untrained counter guys at the parts store might tell you when trying to sell you expensive replacement parts) fault codes NEVER indicate a specific part has failed, only what system or circuit is behaving normally.... the manufacturer's test procedure for whatever code is stored will still need to be followed to identify the exact problem.
For example, if you have a stored code for a #5 cylinder misfire, you will still need to take a compression measurement for that cylinder, check fuel injector operation on that cylinder, and check to see if spark is occurring on that cylinder. This is the only way to positively identify what the cause of the problem is before buying replacement parts.
If you want to try just replacing parts at random, try buying new spark plugs. If that does not fix it, then buy a new ignition coil (for coil on plug systems); swap it around to try to find out if one coil is not working) . This is not the cheapest or most professional method of trying to find a misfire, but it is about all you can do if you choose not to have the engine tested to find the exact cause first...