Can a cyclic amine form an amide?
The heterocycle in this question is indole and is aromatic. This means that the N lone pair is delocalised and not readily available for nucleophilic attack. Think of it as similar in reactivity to a secondary amide nitrogen RCONHR. Generally you need to formally deprotonate to functionalise, though there are some interesting techniques using carbonyl azoles catalysed by DBU[1] and others using aldehyde and alcohol substrates.[2] Note that 3-unsubstituted indoles react with acyl halides by F-C acylation at the 3 position.[3] 

References:


Heller, S. T.; Schultz, E. E.; Sarpong, R. Chemoselective N-Acylation of Indoles and Oxazolidinones with Carbonylazoles. Angew. Chem. Int. Ed. 2012, 51 (33), 8304–8308 DOI: 10.1002/anie.201203976.
Maki, B. E.; Scheidt, K. A. Single-Flask Synthesis ofN-Acylated Indoles by Catalytic Dehydrogenative Coupling with Primary Alcohols. Org. Lett. 2009, 11 (7), 1651–1654 DOI: 10.1021/ol900306v. PMID: 19320508 (with free text available).
Okauchi, T.; Itonaga, M.; Minami, T.; Owa, T.; Kitoh, K.; Yoshino, H. A General Method for Acylation of Indoles at the 3-Position with Acyl Chlorides in the Presence of Dialkylaluminum Chloride. Org. Lett. 2000, 2 (10), 1485–1487 DOI: 10.1021/ol005841p.