Custom App Data

p.set(scope, visibility, key, value)

Store data on Pipefy relative to a card, pipe or organization. Apps can only access their own stored data.

Scope

ScopeDescription
organizationStore data that will be available to all pipes across the organization.
pipeStore data relative to the pipe, other pipes will not have access to this data.
cardStore card relative to the card, other cards and pipes will not have access to the same data.

Visibility

VisibilityDescription
privateBased on the scope, only the current user will have access to the stored data. Use that for example for API access tokens that are personal.
publicOther users will have access to the same data
// Store my token, only visible to me and on this pipe
p.set('pipe', 'private', 'token', 'VERY_IMPORTANT_TOKEN');

// Store emoji to card, visible to everyone
p.set('card', 'public', 'emoji', '😈');

p.get(scope, visibility, key)

Get data that the App stored, based on scope, visibility and key passed by parameters.

p.get('pipe', 'private', 'token').then((token) => {
  console.log(token); // return actual value stored
}).catch((error) => {
  // Handle error
  console.log(error);
});

p.attach({url, name})

Attach a link to card sending URL and name. Apps can claim these attachments later and render properly.

p.attach({
  url: 'https://github.com/piedpiper/hotdog-app/pull/1000',
  name: 'Hotdog App PR #1000'
}).then((result) => {
  console.log(result);
});

p.detach(id)

Detach a link from the current card. Apps can only detach attachments that the same App attached.

p.detach('231jasd').then((result) => {
  console.log(result); // true
});