Question

Microsoft Teams Attachments to Slack


Userlevel 1

Hello, we have on Microsoft Teams a “Teams Channel” and we would like send Images (Attachments) to a Slack Channel. Is that possible? The Text Message works good. But when i add a Image then we get in Slack only this Code. Can you help me?

 


16 replies

Userlevel 1

Hi @Troy Tessalone 

Screenshot from Microsoft Teams

 

Screenshot Slack

content: None
contentType: reference
contentUrl: ******/sites/Marketingab2020/Freigegebene Dokumente/General/test.jpg
id: f56d9728-043c-484b-9284-026762c7b518
name: test.jpg
teamsAppId: None
thumbnailUrl: None

 

 

 

Userlevel 7
Badge +13

@nickMarkatus 

We’d need to see the data returned related to the Attachments from the Zap trigger in Step 1, which is not shown in the screenshots, thanks.

Userlevel 1

@Troy Tessalone 

Hi, here is the Screenshot from Step 1 (Trigger), i hope you mean this. Sorry for the many Questions, but we are working with the Software for the first time .

 

Userlevel 7
Badge +13

@nickMarkatus 

We need see the data returned from the Zap trigger step related to the Attachments that you are trying to map into the other Zap steps.

Userlevel 1

@Troy Tessalone can you show me, what do you need? We don't know what you need. Do you need a Screenshot from Slack or a Screenshot from my Zapier Project? It is possible to send you my Account Information via privat Message? 

We have only one Zap project:
 


Is something missing in the settings, what exactly do we have to set and where? Maybe you can send us a picture what exactly is needed. Thank you for your help

Userlevel 7
Badge +13

@nickMarkatus

Please post screenshots with all the data points returned from the Zap trigger step, these will include the data points related to the Attachments.

 

This will come from the Zap trigger step in the Zap editor where you configure the Zap OR the DATA OUT tab for Step 1 in the Zap Runs.

Userlevel 1

 

 

 

 

Teams Data Out:
 

Teams Data Out

id:    1656318691813
etag:    1656318691813
messageType:    message
createdDateTime:    2022-06-27T08:31:31.813Z
lastModifiedDateTime:    2022-06-27T08:31:31.813Z
importance:    normal
locale:    en-us
webUrl:    https://teams.microsoft.com/l/message/19%3Ac2f36257344a4b83a9d543974694b643%40thread.skype/1656318691813?groupId=d3641b26-bb78-4002-91d6-579f3733df72&tenantId=1d4774fc-d15a-4033-8d03-199790d3ac27&createdTime=1656318691813&parentMessageId=1656318691813
from:
application:    null
device:    null
user:
id:    e7b191dc-854e-45f2-b64b-fabd4bb77dea
displayName:    Björn***
userIdentityType:    aadUser
body:
contentType:    text
content:    Testpicture<attachment id="f56d9728-043c-484b-9284-026762c7b518"></attachment>
channelIdentity:
teamId:    d3641b26-bb78-4002-91d6-579f3733df72
channelId:    19:c2f36257344a4b83a9d543974694b643@thread.skype
attachments:
1:
id:    f56d9728-043c-484b-9284-026762c7b518
contentType:    reference
contentUrl:    ***/sites/Marketingab2020/Freigegebene Dokumente/General/test.jpg
content:    
name:    test.jpg
thumbnailUrl:    
teamsAppId:    
Fields with no value:
replyToId
lastEditedDateTime
deletedDateTime
subject
summary
chatId
onBehalfOf
policyViolation
eventDetail
mentions
reactions

 

Slack Data out

message:
type:    message
text:    Testpicture&lt;attachment id="f56d9728-043c-484b-9284-026762c7b518"&gt;&lt;/attachment&gt;
upload:    true
user:    U03L4CT9YHX
display_as_bot:    false
ts:    1656318694.846259
permalink:    ****/archives/C03JXPWNG3D/p1656318694846259
file:
id:    F03LU5BV539
created:    1656318694
title:    content: Non ... 
mimetype:    text/plain
filetype:    text
pretty_type:    Klartext
user:    U03L4CT9YHX
size:    241
is_external:    false
is_public:    true
url_private:    https://files.slack.com/files-pri/TBUM56JQJ-F03LU5BV539/content__non_..._.txt
url_private_download:    https://files.slack.com/files-pri/TBUM56JQJ-F03LU5BV539/download/content__non_..._.txt
permalink:    https://markatus.slack.com/files/U03L4CT9YHX/F03LU5BV539/content__non_..._.txt
permalink_public:    https://slack-files.com/TBUM56JQJ-F03LU5BV539-4a9459c4c0
preview:    content: None
contentType: reference
contentUrl: *****/sites/Marketingab2020/Freigegebene Dokumente/General/test.jpg
id: f56d9728-043c-484b-9284-026762c7b518
name: test.jpg
lines:    7
comments_count:    0
channels:
1:    C03JXPWNG3D
file:    hydrate|||.eJw1jstuwjAURH8luutgh7wI3jWLLqIWCamwtSzHgIVzHcU3AoT495oWljNHOjN30B7JIEm6jQYEfEAKFgMp1EbaHkRRNFmTl3kKeg7khzmY6Q8s81Ve18smBaW1n6Pi3ZZNVqZwsMb1EtXw1B6sM9F8vqjpGEDcYZ5crE9EYxCcP3FgwSl9ZtoP_3kxTpb_tLvvqu623eIzK752VbuvijXv_QWdVz1_v5foUTLGJKMrxaHX7AuLZOMxiTiBx-MXNfROLw:1o5k9f:cirq-1IFGSBpiCVZa-UjcOEn1PI|||hydrate
created_time:    2022-06-27T08:31:34Z
channel:    C03JXPWNG3D
ts:    1656318694.846259
ts_time:    2022-06-27T08:31:34Z


Do you mean this?

Userlevel 7
Badge +13

@nickMarkatus 

Below is why the image is not being sent as expected to Slack...

 

Help article about using Files in Zaps: https://zapier.com/help/create/basics/send-files-in-zaps

 

 The Teams Message content is a reference to an attachment (id), not an actual file URL (http).

 

The referenced attachments related data points don’t include a full URL to the attachment. (notice the ***/sites)


 

Userlevel 7
Badge +8

Hey @nickMarkatus! Were you able to get things working with Troy’s suggestion of using the “contentURL” to get the URL to populate within Slack? Let us know - we want to make sure you’re good to go here!

Userlevel 1

Hi @Troy Tessalone 

 

thank you for the Information. The URL is change by me (****), we have here a complete URL. 
When i add here a fix URL, than it works. When i add the 

then we have only the Attachment-ID. Code. In my Field-List i haven’t another File Items
 

 

Slack looks good (with the fixed URL)

 

 

Userlevel 7
Badge +13

@nickMarkatus 

The Attachments variable is an array of data.

If you only want the URL, then try mapping the contentURL variable to the Slack Message Text field.

 

If you are trying to attach a file to the Slack message then use the file variable.

(may show as file exists but not shown when trying to map the variable)

 

Userlevel 7
Badge +13

Hi @nickMarkatus 

Good question.

Please post screenshots with how you have your Slack step configured in order for us to have more context, thanks.

 

Are you using either of these fields?

 

Userlevel 1

Hi @Troy Tessalone 

here is my Configuration:
 

 

Userlevel 7
Badge +13

@nickMarkatus 

Looks like there is no value for the mapped variable, which may explain.

Make sure to test with a representative value.

 

Userlevel 1

Hi @Troy Tessalone can you explain in more detail what i should do?

Userlevel 7
Badge +13

@nickMarkatus 
Please provide screenshots with the attachment data points returned from the Zap trigger step.

Reply