Meechie
Meechie2mo ago

Getting data from an API File Upload Trigger.

I am sending a JSON along with a file to my workflow. When I return the body of the request, the entire JSON gets returned. When I attempt to try to return the individual components of the JSON, such as (x)Body.varname, I get a blank result. Im sure its something simple Im missing. Any advice
7 Replies
AI Support
AI Support2mo ago
It sounds like you might be having trouble accessing the individual components of your JSON payload in BuildShip. Here are a few steps to ensure you're correctly accessing and returning the individual components of your JSON: 1. Check JSON Structure: Ensure that the JSON payload structure is correct and that the keys you are trying to access exist. 2. Parse JSON: If the JSON is being received as a string, you may need to parse it first using a "Parse JSON" node. 3. Accessing JSON Components: Make sure you are using the correct syntax to access the JSON components. For example, if your JSON payload looks like this:
{
"varname": "value",
"anotherVar": "anotherValue"
}

{
"varname": "value",
"anotherVar": "anotherValue"
}

You should be able to access varname with Body.varname. 4. Node Configuration: Double-check the configuration of the node where you are trying to access the JSON components. Ensure that you are referencing the correct part of the payload. If you continue to face issues, please submit a request via the in-app support button for further assistance. For more information on handling JSON and other workflow configurations, you can refer to the BuildShip documentation: - BuildShip Basics - BuildShip Utility Nodes If these links don't address your specific issue, please submit your question via the in-app support button.
Utility Nodes – BuildShip
A unified resource to start building your backend with low-code. Dive into triggers, nodes, and step-by-step guidance to jumpstart your workflow creation.
Meechie
Meechie2mo ago
@Luis Luis! Any thoughts?
Luis
Luis2mo ago
Can you submit your workflow via in app support so I can check it out?
Meechie
Meechie2mo ago
Submitting now Let me know if you had a chance to view it or if I should book some time on your calendar! @Luis
AI Support
AI Support2mo ago
It looks like you're trying to reach out for assistance. For specific questions or issues, it's best to submit your query via the in-app support button. If you need to book time on someone's calendar, please use the appropriate scheduling tools available to you. Thank you!
Luis
Luis2mo ago
@Meechie - you workflow should be working now. Imagine data key holds the json object you are trying to access in the workflow. First you just need to run it through the Parse JSON node, and then you can access the individual fields of the object.
No description
Meechie
Meechie2mo ago
Okay thank you. Accessing it this way as opposed to the normal REST API JSON is because of the file now being passed through?