Skip to main content

Perform an API call in Monday.com

Perform a GraphQL API call in Monday.com. Please refer to the API documentation for more details on configuration.

API doc: https://developer.monday.com/api-reference/docs/account

Note: You must install the Wrk App to your monday.com account before you can connect your account. To do so open this link then follow the instructions to install.

Application

  • monday.com

Inputs (what you have)

NameDescriptionData TypeRequired?Example
Monday.com API EndpointThe URL of the API endpoint to accessLinkYeshttps://api.monday.com/v2
GraphQL queryThe query to be sent to the GraphQL endpointText (Long)Yes
FileA file to be included in the requestFileNo
File variable nameThe name of the variable where the file will mapped to in the GraphQL query. See configuration details below.Text(Short)Nofile
API-VersionSpecific version of the API to be usedText(Short)No2024-01

Note: the value of inputs can either be a set value in the configuration of the Wrk Action within the Wrkflow, or a variable from the Data library section. These variables in the Data library section are the outputs of previous Wrk Actions in the Wrkflow.

Outputs (what you get)

NameDescriptionData TypeRequired?Example
Response status codeThe HTTP status code returned in the responseIntegerYes200
Response headersAdditional information provided in the response headersText (Long)YesContent-Type: application/json
Response bodyThe main content of the responseText (Long)Yes{"message": "Success"}

Note: The "Fields to Capture" input feature can be used to create new outputs for the Wrk Action with the value of the corresponding key name in the first-level JSON output of the Wrk Action.

Example: If the "Response Body" output is equal to {"message": "Success"} Then you are able to add a "Fields to capture" input with the name "message" that will add an output to the Wrk Action called "message" which will have the value "Success"

Outcomes

NameDescription
SuccessThis status is selected in the event of that the API call returns with a status between 200-399
UnsuccessfulThis status is selected in the event of that the API call returns with a status of 400+
Impossible to CompleteThis status is selected in the event of the following scenario:Couldn't resolve hostnameThe external system is not accessible

Configuring File Based API Calls

When uploading a file through the monday.com API, your GraphQL query must define a File variable and reference it inside the mutation.

To ensure the file attaches correctly, the File variable name in your inputs must exactly match the variable name used in the GraphQL query.


Example Configuration

GraphQL query:

mutation ($file: File!) { add_file_to_column( item_id: 7550928591 column_id: "file_mkx78msw" file: $file ) { id }}

File variable name:

file

File:

Upload or map a file from a previous step (for example: Step Launch - myfile).


How It Works

  • The File variable name connects the uploaded file to the $file variable declared in your GraphQL query.
  • Wrk automatically constructs a multipart/form-data request using the variable name you provide.
  • If the name does not match, monday.com will return an error such as Variable "$file" of required type "File!" was not provided.

✅ Correct Example

Input FieldExample Value
GraphQL querymutation ($file: File!) {add_file_to_column(item_id: 7550928591column_id: "file_mkx78msw"file: $file) {id}}
File variable namefile
FileStep Launch - myfile

⚠️ Common Mistakes

IssueExampleFix
Variable name mismatchQuery uses $upload, field set to fileChange file variable name to upload
Missing variable in queryQuery omits $fileAdd $file: File! to the mutation parameters