Hello, Pipefy Community,
We have great news: now, you can integrate Pipefy with your reports tool, such as PowerBI or DataStudio, through API! Here’s how:
With Reports, you can filter data from your processes in real time, organize them into columns and export them as a spreadsheet to analyze the information you want.
If your team needs to export reports frequently and within a certain period of time, you can automate that process!
Configure an API Scheduler routine to automate report extraction using a mutation. The report will be exported in the time period you set in your scheduler.
To extract the report, two calls are needed, the first is a mutation that will obtain an ID in the response to be used in the extraction, and the second is a query, which will use the response obtained in the first to obtain the download URL of the report.
The initial call, as follows, must inform the ID of the Pipe where the report is saved and the ID of the report already formatted with all the columns and filters that you want to view in the extracted worksheet. Both IDs can be obtained from the page URL.
mutation { exportPipeReport(input: { pipeId: 1, pipeReportId: 1}) { pipeReportExport { id } } } |
The response of this call will contain a numeric ID. Using this ID obtained in the previous call, you can run the following query:
{ pipeReportExport(id: 20) { fileURL state startedAt requestedBy { id } } } |
The call response will contain the URL (fileURL) that you can access to download the report from your integration platform.
It is important to point out that it may take a while for the report to be available to be exported depending on the volume of information. Stay tuned and, if necessary, leave a period of time for the download. When the report is formatted for export, the information “state” should return as “done”.
All done, just upload it to your BI tool or send it to an email as an attachment!
Update!
Rate Limits
Pipe Reports Exportation feature relies on Rate Limits, a common technique to ensure security, reliability, and a consistent developer experience, by limiting the number of requests in a time interval.
For Pipe Reports Export the rate limit is 25 requests in 24 hours, for each pipe.
In case of reaching this limit, you must wait for 24 hours from the time the last request was made. Any request in this time interval won't be processed and will contain a rate limit reached message displayed on "errors" in the response payload.