How to upload attachments and attach to a Card / Record

This guide demonstrates how to upload attachments using the Pipefy GraphQL API and attach that information to cards and table records.

All the process to get a new file attached to a card/record consists of three steps, you will need to get a pre-signed URL from Pipefy, upload the file to this URL generated by the API and after use this URL to attach the file to a card field or directly to a card/record.

1. Generate pre-signed URL using the GraphQL API

You will need to use the createPresignedUrl to get the URL, this mutation returns the URL where will be possible to upload. We have two required parameters in this mutation, organizationId and the fileName.

Sample Mutation

mutation {
  createPresignedUrl(input: { organizationId: 123, fileName: "MyDocument.pdf" }){


You will get a URL like that in theurl return field:

You will use this URL to make PUT request with the file data in the next step.

2. Upload data

After you got the URL to upload, you will need to do a PUT request to this URL and sending along the file.

Sample cURL commands

curl --request PUT
--url ''
--header 'Content-Type: application/pdf'
--data 'BINARY_DATA'

curl -v --upload-file SampleFile.pdf ''

3. Assign file to Card/Record

After you got a 200 OK from the AWS S3 server, you can get the final path that you use to send to Pipefy. You need to send the path from the URL to Pipefy, excluding domain and parameters.


Upload URLPath to send to Pipefy

You can use this Path inside the createCard, updateCardField, setTableRecordFieldValue and createTableRecord mutations, to update attachment fields or card/record attachments.\


mutation {
  updateCardField(input: {card_id: 123, field_id: "attachment_field", new_value: ["orgs/8bd9ce63-a26b-412f-9d27-3a5776e3e16e/uploads/45da74d5-0e92-4e1c-a04e-26acc97169a3/SampleFile.pdf"]}) {