"Hide Insights for non-card owners"

Is there a way to 'Hide Insights for non-card owners' on all cards via workflow? If anyone know the API please share. Thanks, Kathy

Best Answer

  • Zoolander
    Zoolander Admin
    Answer ✓

    Below is your function. Remember that this forum strips out the backticks. You want backticks around the API (as in the screenshot below). Your input is a number. No output

    const codeengine = require('codeengine');

    function disableCardInsights(cardId) {
    const api = /api/social/v1/smart-alerts/disable?resourceId=${cardId}&resourceType=CARD;
    const body = ``;
    return codeengine.sendRequest("POST", api,body).catch(console.error);
    }

    module.exports.disableCardInsights = disableCardInsights;

Answers

  • Zoolander
    Zoolander Admin
    Answer ✓

    Below is your function. Remember that this forum strips out the backticks. You want backticks around the API (as in the screenshot below). Your input is a number. No output

    const codeengine = require('codeengine');

    function disableCardInsights(cardId) {
    const api = /api/social/v1/smart-alerts/disable?resourceId=${cardId}&resourceType=CARD;
    const body = ``;
    return codeengine.sendRequest("POST", api,body).catch(console.error);
    }

    module.exports.disableCardInsights = disableCardInsights;