Apps Client SDK

  • 27 March 2021
  • 0 replies
Apps Client SDK
Userlevel 7
Badge +5

📌 Introduction

Use the Client SDK to interact with the our Apps framework directly from your iframe. The SDK provides a PipefyApp  global object that allows cross-frame communication between your app and the host Pipefy product. 


🔎 Getting the SDK

Import the Pipefy Client SDK from  Example:


🔎 Using Client SDK

On your Initial page defined by 



🔎 On your iframes inside dropdownsmodalstabs and  sidebars



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 


🔎 Visibility 


🔎 p.get(scope, visibility, key) - Get data that the App stored, based on scope, visibility and key passed by parameters.


🔎 p.attach({url, name}) - Attach a link to card sending URL and name. Apps can claim these attachments later and render properly.

🔎 p.detach(id) - Detach a link from the current card. Apps can only detach attachments that the same App attached.





🔎 p.card(ID) - Return Promise with current card in the context as result

Example Call



🔎 p.fields() - Return fields of current Pipe

Example Call


🔎 p.pipe() - Return current Pipe attributes


🔎 p.cardAttachments() - Return current card Apps attachments, those attached using p.attach function.

Promise will resolve to an array with list of card app attachments object. This object contains the attachment id, url and name.


 🔎 p.timezone() - Return current user timezone (tz database timezone name)

🔎 p.locale - Return current user locale, example: en-gb, pt-br, en, ru, es and fr.




🔎  p.sidebar({ title, url }) - Open a sidebar using Pipefy UI. Just need to send the IFrame URL and Sidebar title.

🔎  p.closeSidebar() - Close the sidebar in the current context.

🔎 p.modal({ url, width, height }) - Open a new modal using Pipefy UI. App needs to specify the IFrame URL, width and height of modal.

url: Relative URL to page that will be rendered inside the modal
height: Height of modal, accepts pixels or percentage: Ex.: 500px or 50%
width: Width of modal, accepts pixels or percentage: Ex.: 500px or 50%


🔎 p.closeModal() - Close the modal in the current context.


🔎  p.openCard(id) - Send a message to Pipefy to open a Card by sending the Card ID.


🔎   p.closeCard() - Send a message to Pipefy close the current open Card.

🔎  p.dropdown(options) - Open a dropdown using Pipefy UI. Every dropdown have a title attribute, you can use dropdown to display a simple list of items using the items attribute or render an IFrame using the url attribute.



🔎 p.closeDropdown() - Close the dropdown in the current context. You can use to close dropdown after an item callback.

Open a dropdown with predefined UI for search, you just need to define which items will be displayed based on the query. You can filter using Javascript and pass the query to an external API to get filtered results.

  • Parameters
    1. title: Title that will be displayed on top of dropdown
    2. placeholder: Placeholder will be displayed inside search input
    3. empty: Text will be displayed when no items are returned
    4. loading: Loading text, will be displayed while Promise is not resolved.
    5. items: Function that receives the p(Pipefy Client) and query that user entered, expect to return a Promise that resolves and return an array of items with titleand callback.
  • Example from Emoji App


🔎  p.showNotification(text, type) - Send an in-app notification to user using the same kind of Pipefy notifications.


🔎 Parameters: text: Notification message | type: Type of notification, accepts error and success


🔎p.render(callback) - Building…


🔎PipefyApp.resizeTo(selector); - Call this function to resize the current iFrame inside dropdown or modal to the current element width and height from selector.




Since all communication between Apps and Pipefy return a Promise, we provide Bluebird Promise with Pipefy Apps Clients SDK.

For more info about Bluebird and Promises:

0 replies

Be the first to reply!