:wave: Hello, team! I want to add multiple attachm...
# ask-community
r
👋 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
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
Hi @owen, it doesn't work that way. It only takes the first card.