polymorphic-labs / bulk-slack-dms-extension

0 stars 0 forks source link

Unable to create/send Blocks based DMs because I don't know what to put in the "attachments" field #2

Open mubashirtareenmotive opened 6 months ago

mubashirtareenmotive commented 6 months ago

Hi!

Firstly, thank you for developing such a necessary tool, it is amazing.

Secondly, I am facing an issue - I can send simple "Text" based DMs. However, I cannot utilize the "Attachments" and "Blocks" based DMs. I tried copy-pasting the Payload from Block Kit Builder into the "Blocks" field. But I don't know what to write in the "Attachments" field.

It is giving me an error (please see the attached screenshot).

Please tell me what to write in the "Attachments" field, and from where can I copy what needs to go in the "Attachments" field. Thank you in advance

Screenshot 2024-04-09 at 1 33 38 PM

noitcudni commented 6 months ago

Can you send copy and paste the the json blocks here, so I can just copy and paste them in myself? Thanks. I will get back to you on this.

mubashirtareenmotive commented 6 months ago

Thank you for the quick reply, appreciate your swift support

Attachments:

["pretext": "pre-hello", "text": "text-world")]

Blocks:

{ "blocks": [ { "type": "section", "text": { "type": "plain_text", "text": "This is a plain text section block.", "emoji": true } } ] }

FYI - I copy pasted the input in Attachments from your YouTube video that is there on the Chrome Extensions Section, so there is a good chance it is not correct. Please let me know where to find the correct input to be written in the "Attachments" field.

noitcudni commented 6 months ago

Try removing the outer {} and the "blocks" attribute

[
    {
        "type": "section",
        "text": {
            "type": "plain_text",
            "text": "This is a plain text section block.",
            "emoji": true
        }
    }
]
mubashirtareenmotive commented 6 months ago

Excellent! I can send them now. Thank you very much!

Could you also please explain how to use the "Attachments" field?