# Slack

**Send Slack Message**

This is a tutorial to connect via Slack API to send Slack messages from the Flow Studio. In order to do this you need to be a Slack Workspace administrator so that you can edit the API integrations.

Your first step is to go to <https://api.slack.com/apps> and create a new App from scratch

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeobaW3LCy2vWwZVMWzxAo3BneJNsn7XYCw19gHS0Uv3q01NdDkuWY__4Cc8gr6iOZwCJoTXixscIkjtfyNFyccNwSCEVGgIQxtoLemm7ad8hYo9gRCqIQkYv7JX-3y8kZA6HrGsQ?key=WOBNB_rJfOlCxAUb1kQyYCgN" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfkOz_0La-lrLlussZ3wpv3mTrn9z3lWJ3EIYidE0jHarEBemLxwFV-Q7BAliK5w5EBhRPoMehCFAzGsIJ-KybBSGeMhFUVjeIhyDX8xvMNghmNjl_AnsP8NUiK1KDsiGK9NEfpDw?key=WOBNB_rJfOlCxAUb1kQyYCgN" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXerZxkMfcS4AyVNLYP_t4P5kQz-piSpSfJ6A-WrEPokb2WKQW92VVBpPUYzRZKlLyxGnU2VUj8-qc6X7FTZ4T7afVfZ-9Fq2odvwXjakjnKQDSCP_qgHlB9nAm2Xz91fzktdzm53A?key=WOBNB_rJfOlCxAUb1kQyYCgN" alt=""><figcaption></figcaption></figure>

This is going to create the new app where you can set up all of the visual components of the integration to make sure the name that will appear on each message and the image are to your liking.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcU3AlRt_dBuJzhQtBOphw06u-KG47FIsQZyyR7VcM3D48DKCmxhB28zsUJH0VOgp3CmZ7KkfOC7Iy8UfleUzYNNawxjg845dT2MyPwCqaWEF4XMCPca7SnLyAEyiHDnsQeb-VlxA?key=WOBNB_rJfOlCxAUb1kQyYCgN" alt=""><figcaption></figcaption></figure>

It’s important to note that the first step you need to take is to add the Permissions and Scopes so that you can actually send messages via the API.

![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXcjMDK4qAvB1yrMYwQRYPKSrymGt0KphYZ6QPjKyarPijqwNkOQvIl2hvPzx1Ba9LyAeJv5cpRw6_QXV3_ZOWlEcsz0uEsXtlBdP-R8ZHjgF6ficCF5Dpz9s-3__BYLHi2sA-5M?key=WOBNB_rJfOlCxAUb1kQyYCgN)

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXd8Q5mtfBYzs_lbR3AEba5T84b5bKJMcpA9opi_dA3kjmXIgamG8L46kdUo8yZtGcdqD4aKDnh16ihmdkXul9WC57hcL6ikoQ2I23O_7_ggIulTbHT7qcD8FxIyAezPvFu7lR5AyQ?key=WOBNB_rJfOlCxAUb1kQyYCgN" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcYUsIxolHKDaUBFoDlYZsv-a-KPNWesdXyFDS2ktbFHiu5YR1t9WQYPtVQHPamH-fEgLeZQmSKpKkLR_J4LpJahnp7kULu0sHrxCJzug-k3lKwV7LiHguVG6Zb0xDnJkApqooC?key=WOBNB_rJfOlCxAUb1kQyYCgN" alt=""><figcaption></figcaption></figure>

To send messages the most important Scope is the “chat:write”, but you can add any scopes that you see fit.

Once you’ve set your Scopes, you can go ahead and proceed to install the app to your workspace

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfBnXHnh6ibfUDRA_Z7wARSvRrmteqieuSpkt52ilWC-oxEQg5kAeOZsEQMC0_QRldCML0yui4gregWX5jP4jmTZQgDhm4exMIO02NQ8NcAz5YcbEP49iIBoZ5tuttVFbnbxKKAwg?key=WOBNB_rJfOlCxAUb1kQyYCgN" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXe158eygor5c-DhBCYIaEX10BLPZqZ4Bfk6F2l8nn5FEx4Umz73vgHbfLwCh85TjpdNJSedAqHQ8zWpltCURpsE4mcNUWyTObb0oEJRvqgVBvDSnVnkZI-MNrtPacwORb16U5tNVg?key=WOBNB_rJfOlCxAUb1kQyYCgN" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdlcrplkg8S8akJdYCyl29LSkBDTcyDZvp3XphVDc73GjuIZVmDeuLhgBNKgoQgtXlj9thiUOASBIBpoLB-9Pi8NtAAsWpXrhwrRC13jWhpiyz-4Pw8HOtzRK1ysuvDqK3w-CNCvA?key=WOBNB_rJfOlCxAUb1kQyYCgN" alt=""><figcaption></figcaption></figure>

This will generate your “Bot User OAuth Token”, which is you key to sending messages from the Slack API

Once you have this token, you have to invite the application into the channel you want messages to be sent. To to this, go to the channel and type “/invite” and go to the option to add applications to channel

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfpz5tILfltKztOpQNdmJKH6BCkSWg1uoC3-eM9QS0y78VvA5CHfka3I7HM7g7nDznpvMrXYi9rwfOuYxX_48UFt-FidWeBJSXBkVNVxhjnpM8vFS2r_IjOd6rbQgx0NwfQK1VL?key=WOBNB_rJfOlCxAUb1kQyYCgN" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcESf7nFuw31sucKadWMc-6xaSnKp8Tc-uDZZK1oCaV1sfECAjqk7kxiMglGQzHAD3XgUwnU0HN7brmMHiyWSEBIvIejtJ4fCPC0YCbgRReQR26DU-0YJ6pvu5lH1h-75qO4ruwnQ?key=WOBNB_rJfOlCxAUb1kQyYCgN" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeqA82s3YDTzZh9eA_4U3QFypzljHo2hmGRQeUGvXwqqVZn_ZpHBDp85Dpq7qA4lUliemWTAyBXeavjkttvYAaZCthCC15H4qE6GD4zwPvJgwdKS_rMAfl8yahIUVuJHqyTqkgSIw?key=WOBNB_rJfOlCxAUb1kQyYCgN" alt=""><figcaption></figcaption></figure>

Once this is set, you need to get the channel ID. TO get this ID you need to sign in to Slack online, navigate to the channel and get the URL. This ID is located in the URL between the end of the URL and the last slash. In this case, the ID would be C08PU07PY5R

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdH1bMuO234QvZSSGe-EugShJwuCPYrZynwxUnhUa_-CJmk8OSje_Yg_SsT0AgwuKIZrQ6vlEDwj23d2KLpGHHDi8MpW4OwZ3TX6EeefI3wM-ZqWmrzVumcghsW5fHBph-onikNxw?key=WOBNB_rJfOlCxAUb1kQyYCgN" alt=""><figcaption></figcaption></figure>

Now we’re all set to send the message via the API from Dapta.

Go to the Flow Studio section and create a new flow. The proceed to add an API node

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdSZZB5mEzI9hRvXs5habRWtFW933sCzr6hmBKkZp8JPycXzrdY5c8lFFGIQTypaBm1T9hKnzw3Lice3yyYlnn2r48fqVztIiikn8YmEvbottrhn61ix-d3RNquT6qmBSeAJz-NgQ?key=WOBNB_rJfOlCxAUb1kQyYCgN" alt=""><figcaption></figcaption></figure>

In the API make sure to add this URL and set it as a Post method: <https://slack.com/api/chat.postMessage>. Now go to the Headers tab and add a Header for “Authorization”, and type “Bearer” and the token value gotten from the Slack API page

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXff2yraoFp-bM2CU_OkUmYFiG1f1QnBFk3-P42cUkxS-YL5-Ysc8670Ol7cCMsh7S9DNC74v5fJ-9xat698zwtOSS4LWYFfx7qkzh0ExmbOyGl4k7uiXxXYDgPyaQaVtD3TIfhXDQ?key=WOBNB_rJfOlCxAUb1kQyYCgN" alt=""><figcaption></figcaption></figure>

Now go to the Body tab, paste your channel ID and set the message that you want to send

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdKgpS_ev1U9QH4AsFovAON7-IikNQJ4AfZ1SdbH7800fwybHPaIQRBZ0UJ3I9GKdXB0y7-cHekeGUjn6g0CXe8_b6gZsw1LGC0pXyTfeDcXBB3-Y4s0BLd1tQZTCJLm0Th_cJvnQ?key=WOBNB_rJfOlCxAUb1kQyYCgN" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfbHNFf5GAcQXv3OlhXeUBQaWy2I0XK2kER4G1px-qKASRivFLauHeDqXpFZva7YN5ovGuTyWxLz8qEIPGa9EGKaR-hk-wCBYKP_9PkYWSUUdKQ4uPUfXzUPy1EGaaWnbHFGBxe?key=WOBNB_rJfOlCxAUb1kQyYCgN" alt=""><figcaption></figcaption></figure>

Now you’re all set! You can also change the icon and name of the app from the Basic Information in case you want your integration to have a more dynamic look

![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXe7iyj4I30zdnHptOzETRuk3z3wJKvJtsXW9rznueOCXkpfqnWSyvazcYThjyU2Smg-g-VcexFgGViw3y_53TXK01fuGILhdkYoVicedWFJITWb3MiYUoTJTPXLYfBOq1NvGgJRQw?key=WOBNB_rJfOlCxAUb1kQyYCgN)

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeMkfav_bCgsp7D-4bQ6fP6htCWD0k4yE7yTvnEoENunTuo6GtcjlKBsCmJloTkFRFx8H5DN51D7mdSiIYrHbq3OJmgxJ3FxHUeAKMOj_BlIdlQ0fMn7HVsBOH6U_cRbpP17hqi0w?key=WOBNB_rJfOlCxAUb1kQyYCgN" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXci2kiDW1L--_aSZIpf_RE5yBcI4Xf-hNmwwBo5jm9kkWB1ZHUa-EGh9NMgwXATvtr1oD7VVmEVFnTQ7joCN4VTa0-kgctQBeaOSkWr3r4x-fYsxc9R6TeJCcmRM-mbsWfaq_yioA?key=WOBNB_rJfOlCxAUb1kQyYCgN" alt=""><figcaption></figcaption></figure>

\
\
\
\ <br>
