Post Image from a location to Teams channel using python

%3CLINGO-SUB%20id%3D%22lingo-sub-2479183%22%20slang%3D%22en-US%22%3EPost%20Image%20from%20a%20location%20to%20Teams%20channel%20using%20python%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2479183%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%3CP%3E%26nbsp%3B%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
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()

 

0 Replies