Master Uploading JSON to Slack with Bot Connection on Make.com

Hey there, Make.com users! Today, we're going to tackle a common problem: uploading a JSON file to Slack using a Bot connection and the Make an API Call module. This can be a bit tricky, but don't worry, we've got you covered.

The Problem

When using a Bot connection, you might find that you can't use the Upload a file module of the Slack app. You might have tried creating the JSON using the JSON app and uploading it using the module, which works fine with a personal connection. But with a Bot connection, you might have run into an Error: invalid_form_data (200) from Slack.

The Solution

Here's the thing: the File Upload API endpoints don't need JSON. Instead, the Content Type that you need to use is multipart/form-data. It seems that the Make an API call module for Slack doesn't support form-data and only allows JSON as part of the request. This means that the Slack Make an API Request module will not work for files.upload requests when using a Bot connection.

However, for normal connections, you can use the regular Upload a File module in the Slack app. So, if you're not limited to a Bot connection, that's your solution right there!

Troubleshooting Tips

If you're still having trouble, make sure to check the following:

  • Are you using the correct Content Type? Remember, it should be multipart/form-data, not JSON.
  • Are you using a Bot connection? If so, try switching to a normal connection if possible.

Summary

In conclusion, uploading a JSON file to Slack using a Bot connection can be a bit tricky due to the limitations of the Make an API Call module. However, by using the correct Content Type and switching to a normal connection if possible, you should be able to get your file uploaded. Happy automating!

You do have further questions?

Ask your question via E-Mail: Richard@make-app.de
Book a paid Support & Consulting Session
New Make.com user? Sign up through this Affiliate Link to receive 10.000 operations for FREE.