card_buttons

Actions/buttons of the addon that will be displayed in the 'Addon Actions' section of the card.

card buttons

Function argument - an object that provides all available functions of the web SDK.

Return value - the function should return array of objects with the following keys:

KeyTypeDescription
textrequiredstringButton text
callbackfunctionThe function that will be called upon clicking the button.
isVisibleForReaderboolean (default false)If the user doesn't have edit access to the card, the button will not be visible by default. To show it, set this field to true. Please note: data in the card's context can only be saved as private (meaning it will only be visible to that specific user).

This result will be used for displaying buttons.

Example :

'card_buttons': (cardButtonsContext) => {
  return [{
    text: 'Test button 1',
    isVisibleForReader: true,
    callback: async (callbackContext, callbackOptions) => {
      console.log('card test button 1 clicked, i will fetch card and simply console log it');
      try {
        const card = await callbackContext.getCard();
        console.log('here is card title: ', card.title);
      } catch (err) {
        console.log('error while fetching card');
      }
    }
  }];
},
logo
FlowFast
If you have any questions or need help with integration feel free to write us at support@flowfast.io