Mutation behind the move to action

I was looking into making a copy action that dupes and moves the item in one action. I have found that dupe mutation which i have working but I cannot find in any documentation for the mutation that is being used to move the item to a different board. Is this a mutation and I am just missing it I have tried to use the move item to group mutation but that only moves it within the current group.

Thank you for any assistance you can provide

Hello @nharviel and welcome to the community!

I hope you like it here :slightly_smiling_face:

Just to be sure we are on the same page here, what you are trying to do is to duplicate the item so that you can have the item in the original board, and then moving the item to another board so the same item appears in both boards.

Is this accurate?

Looking forward to hearing from you!

Cheers,
-Matias

Hello @Matias.Monday,

Yes, that is correct I was looking for the documentation on the but was not able to find anything. I know I can use both of the OOTB actions but I was looking to make this an additional action that I would be able to handle both in one action. This is not dependent on a status or any other value but just when I need to copy the item to a different board I wanted to make my own action that could handle both.

Thank you for any assistance,
Nicholas

Hello again @nharviel!

If you use a simple query to duplicate the item, you will have your original item in the first board and a copy of the item in the second board:

mutation {
  duplicate_item(board_id: 11223344, item_id: 12345678, with_updates: true) {
    id
  }
}

In this case, 11223344 would be the board in which the copy will be created. This new item would not have the same ID as the original one since the IDs are unique.

If instead, what you want is to make a copy in the original board (with a different item ID) and then transfer the original item to another board and maintain that item’s ID in the second board, you could do this by combining requests with our manual automations. You would need to duplicate the item, then do something to trigger an action on the original item (like changing a status for example) and use our built-in action “Move item to board”. The original item would be moved to the second board and it would maintain its ID. You could trigger the trigger with an API request (maybe changing the status column’s value):

Let me know what you think!

Cheers,
Matias

Hello @Matias.Monday,

Sorry, I should have specified I tried option 1 but you are not able to specify a group. What would you do if you had multiple groups in the second board, for example for my test I have my item to be duped and I have a new board with two groups. If I use option 1 it dupes the item to the first group but I want to dupe the item to the group with id of (group_title).

Thank you,
Nicholas

Hello again @nharviel!

It would not be in the same request, but you can use move_item_to_group after the item is moved to the second board.

You can not achieve the same result with only one API call.

What do you think?

Cheers,
-Matias

Hello @Matias.Monday,

Yes, I see what you are talking about. I will test that out and provide feedback.

Thank you,
Nicholas

1 Like