Post Image to Teams channel from local path using python

%3CLINGO-SUB%20id%3D%22lingo-sub-2484798%22%20slang%3D%22en-US%22%3EPost%20Image%20to%20Teams%20channel%20from%20local%20path%20using%20python%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2484798%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20All%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20trying%20to%20post%20an%20image(.png)%20to%20Microsoft%20teams%20channel%20using%20webhooks%20but%20i%20am%20seeing%20empty%20box%20in%20channel%20instead%20of%20image%20using%20below%20code.%20Please%20let%20me%20know%20if%20there%20any%20solution%20to%20fix%20this.%3C%2FP%3E%3CPRE%3EmyMessageSection%20%20%20%3D%20pymsteams.cardsection()%3CBR%20%2F%3EmyMessagemessage%20%3D%20pymsteams.connectorcard(%3CSPAN%3E%22webhook%20url%22%3C%2FSPAN%3E)%3CBR%20%2F%3EmyMessageSection.activityImage(filepath)%3CBR%20%2F%3EmyMessageSection.send()%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2484798%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2502945%22%20slang%3D%22en-US%22%3ERe%3A%20Post%20Image%20to%20Teams%20channel%20from%20local%20path%20using%20python%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2502945%22%20slang%3D%22en-US%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1086610%22%20target%3D%22_blank%22%3E%40syamsundhar%3C%2FA%3E%26nbsp%3B%20%26nbsp%3B%3CSPAN%3ESince%20there%20has%20been%20no%20response%20yet%20from%20this%20community%2C%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3EI%20recommend%20that%20you%20contact%20Microsoft%20support%20or%20answers.microsoft.com%2C%20where%20support%20agents%20are%20available%20to%20help%20troubleshoot%20issues%20until%20resolution.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hi All, 

 

I am trying to post an image(.png) to Microsoft teams channel using webhooks but i am seeing empty box in channel instead of image using below code. Please let me know if there any solution to fix this.

myMessageSection   = pymsteams.cardsection()
myMessagemessage = pymsteams.connectorcard("webhook url")
myMessageSection.activityImage(filepath)
myMessageSection.send()

 

2 Replies

Hello @syamsundhar   Since there has been no response yet from this community, I recommend that you contact Microsoft support or answers.microsoft.com, where support agents are available to help troubleshoot issues until resolution.

Thanks @ThereseSolimeno, just did that hope i will get response.