https://dagster.io/ logo
#ask-community
Title
# ask-community
r

Rohan Patil

12/08/2022, 4:59 AM
👋 Hello, team! I want to add multiple attachments to the same card in msteam through dagster.
Copy code
@op(required_resource_keys={"msteams"})
def teams_op(context):
    card = Card()
    card.add_attachment(text_message="Hello There !!")
    context.resources.msteams.post_message(payload=card.payload)
If anyone knows about it, please help me out.
o

owen

12/08/2022, 11:11 PM
hi @Rohan Patil! what happens when you call
card.add_attachment()
multiple times? i.e.
Copy code
@op(required_resource_keys={"msteams"})
def teams_op(context):
    card = Card()
    card.add_attachment(text_message="Hello There !!")
    card.add_attachment(text_message="Another card")
    context.resources.msteams.post_message(payload=card.payload)
r

Rohan Patil

12/09/2022, 5:19 AM
Hi @owen, it doesn't work that way. It only takes the first card.
4 Views