Accessing Attachment URL in Discord Messages using Pipedream: Possible?

This topic was automatically generated from Slack. You can find the original thread here.

is it possible to access attachement url in discord messages in pipedream, only seeing attachment id’s

Yes, you can access attachment URLs in Discord messages using Pipedream. To do this, you can use the Discord actions available in Pipedream. For example, you can use the “Send Message With File” action to send a message with an attachment. Here’s how to use it: 1. Search for the Discord app from the step menu 2. Select the “Send Message With File” action 3. Connect your Discord account 4. At the bottom of the step, click “Test” to run the action and test the configuration. You can find more information about this action at https://pipedream.com/apps/discord/actions/send-message-with-file. If you need to process incoming Discord messages with attachments, you can use Discord webhooks and create a Pipedream workflow to handle the incoming webhook events. The webhook payload will contain the attachment URLs, which you can then use in your workflow. If you have any further questions or need assistance, feel free to ask.

how to do it through webhook

To process Discord messages with attachments using webhooks and Pipedream, you’ll need to follow these steps: 1. Create a Discord webhook URL: In your Discord server, go to the channel settings where you want to receive messages, and create a webhook. Copy the webhook URL. 2. Create a new Pipedream workflow: Go to https://pipedream.com/new and create a new workflow. 3. Add an HTTP trigger: In your new workflow, add an HTTP trigger. This will generate a unique URL for your workflow. Copy this URL. 4. Set up the Discord bot to forward messages to the Pipedream workflow: In your Discord bot code, listen for new messages with attachments. When a message with an attachment is received, send a POST request to the Pipedream workflow URL (from step 3) with the attachment information (including the URL) in the request body. 5. Process the webhook payload in Pipedream: In your Pipedream workflow, add steps to process the incoming webhook payload, which will contain the attachment URLs. You can use these URLs in your workflow to perform any desired actions. Here’s an example of how the payload from Discord might look like: on { "attachments": [ { "id": "123456789", "url": "https://cdn.discordapp.com/attachments/123456789/987654321/image.png" } ] } In your Pipedream workflow, you can access the attachment URL using steps.trigger.event.attachments[0].url. Remember to replace the example payload structure with the actual structure you receive from Discord. If you need further assistance or have any questions, feel free to ask.

is it possible to remove sent via pipedream at the end of message

I apologize for any confusion. To clarify, when you send a message using the Discord “Send Message” action in Pipedream, there shouldn’t be any “sent via Pipedream” text added to the end of the message. The message should be sent as-is, without any additional text. If you’re experiencing any issues or need further assistance, please visit https://pipedream.com/support for more support options.

@U057CTXG8BS you can remove the “sent via Pipedream” link from your discord messages by setting the “include link to workflow” prop in the Discord Send Message action to false

I apologize for the confusion earlier. In Pipedream, there is no “include link to workflow” prop in the Discord Send Message action. When you send a message using the Discord “Send Message” action in Pipedream, there shouldn’t be any “sent via Pipedream” text added to the end of the message. The message should be sent as-is, without any additional text. If you’re experiencing any issues or need further assistance, please visit https://pipedream.com/support for more support options.