Skip to main content
Best answer

How do I attach all Slack attachments to a Zendesk ticket during creation without a message using Zapier?


We are using a flow to create a Zendesk ticket when a new message posted to channel in Slack, is it possible to attach all the Slack attachments in a message to Zendesk ticket during creation and I am unable to create a flow to create a Zendesk ticket with a bot notification without a message.

Best answer by SamBBest answer by SamB

Thanks for getting back to me @Gayathri S 🙂

1. mapping dynamic number of attachments posted in a slack message eg. in case we don't know the number of attachments as it will be dynamic

The approach suggested of using a Attach File to Ticket (Zendesk) action within a loop would be able to dynamically handle any number of attachments (from 1 to a maximum of 500).

2. mapping a bot notification that will not contain a message eg.

Ah, ok it’s a message attachment rather than a file attachment that looking to work with here. Like the example message attachments referenced here: https://api.slack.com/reference/messaging/attachments

In which case the help guide here seems to indicate that for bot notifications added without a message will automatically use the text from the message attachment: Extracting an attachment from Slack messages
a5824f556be8a50f3d39eed5bea998c1.png
So it seems that it should be possible to pass the attachment over to Zendesk regardless of whether it has a message or not. Can you try pulling in a test record from Slack to see if it’s able to get the desired message attachment that’s posted by the bot? 

Looking forward to hearing from you on this!

View original
Did this topic help you find an answer to your question?
This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

11 replies

ken.a
Forum|alt.badge.img+6
  • Zapier Staff
  • 6388 replies
  • June 18, 2024

Hi there @Gayathri S,

Welcome to the Community! 🎉

Here is how I see the Zap for the workflow that you have in mind:

  1. Trigger: Slack - New Message Posted to Channel
  2. Action: Zendesk - Create Ticket

Would this help you out? Please let me know if you need more information or details regarding the suggested workflow. Also, you can check out suggested workflows for Slack and Zendesk from our website: https://zapier.com/apps/slack/integrations/zendesk


  • Author
  • Beginner
  • 5 replies
  • June 18, 2024

I were unable to attach all the Slack attachments in a message to Zendesk ticket during creation and unable to create a flow to create a Zendesk ticket with a bot notification without a message, please can you share a solution.


ken.a
Forum|alt.badge.img+6
  • Zapier Staff
  • 6388 replies
  • June 19, 2024

Hi @Gayathri S,

You can map any "Attachment" data from Slack to the "Attachment" field of the Zendesk action. Just make sure that the sample data you're using contains the "Attachment" data to be able to map it to the Zendesk action step.

Additionally, are you trying to only trigger on bot messages on Slack? If so, you can use a filter step for the Zap to only continue on Bot messages.

I'll be keeping an eye out for your response!


  • Author
  • Beginner
  • 5 replies
  • June 21, 2024

Hi @ken.a,

     Please can you share the steps for mapping dynamic number of attachments posted in a slack message and mapping a bot notification that will not contain a message eg.

Thanks

Gayathri S


ken.a
Forum|alt.badge.img+6
  • Zapier Staff
  • 6388 replies
  • June 25, 2024

Hi @Gayathri S,

I’m sorry for the delayed response here.

I’m sorry, but I’m quite confused are you referring to the “Attachments” as a file or as the content of the Slack message?

Could you please elaborate a little bit more so that I can provide you the best possible solution to your question.

Thank you so much!


  • Author
  • Beginner
  • 5 replies
  • June 25, 2024

Hi @ken.a,

please find the updates, attachments are some image or pdf or text files that are posted along with some messages.

 

Thanks
Gayathri S


SamB
Community Manager
Forum|alt.badge.img+11
  • Community Manager
  • 7487 replies
  • June 26, 2024

Hi @Gayathri S 👋

It sounds like the issues here are that you’re unable to add multiple attachments when creating a new ticket in Zendesk and that an attachment can’t be added without a comment. Am I understanding that correctly? 

If so, it looks like this is due to the Create Ticket action for Zendesk only being able to accept a single attachment file, and judging by the help text a comment is required when attaching files: 
ddbcf2e58092a7ad63f810aa3fbfe806.png

To add multiple files you could try creating the ticket without an attachment, then use a Attach File to Ticket (Zendesk) action within a loop (see our Loop your Zap actions guide to learn more about how to use loops). A loop would allow you to run the Attach File to Ticket action multiple times - once for each file.

That said, the attachment would still require a comment to be added. If you’d like the files and comment to not be publicly visible you can set the Should the comment be public? option to No which would add the file attachment and comment as an internal note. But if the files need to be publicly visible on the ticket then you’d need to set the Should the comment be public? option to Yes. For the comment itself you could have something generic like “Attachment:” or “See attachment:” or select the filename from Slack to be used as the comment perhaps?
 

Do you think that approach could work for your needs here? If I’ve misunderstood things or you run into any trouble on that do let me know! 🙂


  • Author
  • Beginner
  • 5 replies
  • June 26, 2024

Hi @SamB,

     Both the questions are different one.

  1. mapping dynamic number of attachments posted in a slack message eg. in case we don't know the number of attachments as it will be dynamic
  2. mapping a bot notification that will not contain a message eg.

Thanks
Gayathri S


SamB
Community Manager
Forum|alt.badge.img+11
  • Community Manager
  • 7487 replies
  • Answer
  • June 27, 2024

Thanks for getting back to me @Gayathri S 🙂

1. mapping dynamic number of attachments posted in a slack message eg. in case we don't know the number of attachments as it will be dynamic

The approach suggested of using a Attach File to Ticket (Zendesk) action within a loop would be able to dynamically handle any number of attachments (from 1 to a maximum of 500).

2. mapping a bot notification that will not contain a message eg.

Ah, ok it’s a message attachment rather than a file attachment that looking to work with here. Like the example message attachments referenced here: https://api.slack.com/reference/messaging/attachments

In which case the help guide here seems to indicate that for bot notifications added without a message will automatically use the text from the message attachment: Extracting an attachment from Slack messages
a5824f556be8a50f3d39eed5bea998c1.png
So it seems that it should be possible to pass the attachment over to Zendesk regardless of whether it has a message or not. Can you try pulling in a test record from Slack to see if it’s able to get the desired message attachment that’s posted by the bot? 

Looking forward to hearing from you on this!


  • Author
  • Beginner
  • 5 replies
  • June 28, 2024

Thanks for the support @SamB 


SamB
Community Manager
Forum|alt.badge.img+11
  • Community Manager
  • 7487 replies
  • July 1, 2024

You are most welcome @Gayathri S. 🤗

If there’s anything else I can assist with do let me know. In the meantime, happy Zapping! ⚡