All Collections
APIs, Security and IT Management
APIs
How to generate reports' download link via API
How to generate reports' download link via API
Douglas Aliot avatar
Written by Douglas Aliot
Updated over a week ago

🔐 Available on all plans

🎯 For those who want to make a report download link available on emails or anywhere else

⏩ Content Summary:

Learn how to make the most of Pipefy's API and make a report download link available.

How to generate a report download link

You can generate it using Pipefy’s API (GraphiQL) to make queries and mutations (actions) in your processes. Learn how to use Pipefy’s API.

📢 Keep in mind: To be able to use the API, you have to have administrator permissions in your organization. Learn more about roles and permissions in Pipefy.

You’ll be doing a bit of coding here, but this article includes all the necessary steps to make these updates.

Inside the pipe containing your reports

To start, you will need the pipe ID containing your reports. Open the pipe. The ID is located in the end of the URL:

In Pipefy’s API

Access the API and follow the instructions below.

Now that you have the ID of the pipe, you will need to make three queries to generate the report download link.

In the first one, you will find each of your report IDs. Replace the Pipe ID with the one found in the last step:

query{ pipe(id:Pipe ID){ reports{   name   id } } }

The query will look like this:

After running the query, on the right side, you will find the information of report name and ID:

After obtaining the report ID, you will build the second query, which will export your report. Replace the information with the pipe ID and report ID:

mutation { exportPipeReport(input: {pipeId: pipe ID, pipeReportId: report ID}) {clientMutationId pipeReportExport {id state} } }

The mutation must look like this:

After running the mutation, on the right side, you will obtain the export ID:

After obtaining the export ID, you will build the third query, which will generate the report download link. Replace the information with the report export ID:

query{ pipeReportExport(id:export ID){   state   fileURL } }

The mutation must look like this:

After running the query, on the right side, you will obtain the report download link. You can make it available on the email body or anywhere else.

📢 Keep in mind: Be careful when making updating in mass, as it’s possible for the API to exceed your plan’s volume. Learn more about plan limits.

Related content

🎓 Learn how to do more with less with free Pipefy Academy courses!

🌎 Join the Pipefy Community to ask questions, share ideas, stay tuned for product updates and events, and showcase your knowledge with professionals from around the globe!

Did this answer your question?