Skip to main content
Best answer

Status 404 w/ HarvestApp Authentication

  • August 27, 2024
  • 5 replies
  • 46 views

Can anyone shed some light on why i’m getting a 404 error when trying to test a Step in my Zap that is connecting to Harvest?  

  1. I’ve completed the Setup > Configure correctly w/ my Step
  2. When i test my step it says: The error message indicates a "404 Not Found" issue, which often occurs if the user account connected to Harvest does not have "admin" permissions. Ensure that the account used in the Zap has the necessary permissions to access the API.

 

I’m def an Admin.  I’m assuming it’s an authentication error and i need to change how this step authenticates.  any help would be great.  

Harvest API: Authentication – Harvest API V2 Documentation (getharvest.com)

Common Problems with Harvest – Zapier: I am an admin :(

 

Best answer by Troy Tessalone

@Speckren 

Options:

  • You can us Looping followed by a Filter step to compare values.
    • Limit of 500 loops
  • You can use a Code step.
    • Advanced but more efficient
This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

5 replies

Troy Tessalone
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+14
  • Zapier Orchestrator & Solution Partner
  • August 27, 2024

Hi @Speckren 

For us to have more info, post these screenshots:

  • the encountered error
  • how your Zap steps are outlined and configured in EDIT mode

  • Author
  • Beginner
  • August 29, 2024

Thank you. 

This issue has grown a bit.  I see now that i was passing in the Harvest Invoice Number and not the Harvest Invoice ID.  My question is, from Step 3, how can i get the invoice id by the invoice number from Step 2?

Step 1: Contains the Invoice Number

Step 2: List of all invoices 

GET /v2/invoices

faux examples:  

"invoices":[
{
  "id":13150378,
      "client_key":"9e97f4a65c5b83b1fc02f54e5a41c9dc7d458542",
      "number":"1000",
      "purchase_order":"1234",
      "amount":10700.0,
}
{
  "id":131503568,
      "client_key":"9e97f4a65c5b83b1fc02f54e5a41c9dc7d458542",
      "number":"1000",
      "purchase_order":"1234",
      "amount":10700.0,
}
]

     

Step 3: How can i “Pick from List” where the QB Invoice Number and Harvest Number Invoice matches (contains) and returns the “ID of that object?  I thought Formatter Utilites but that did not work.  any thoughts on how to accomplish this would be appreciated.  

Step 4: Find invoice by ID 

Step 5: Mark ask Paid. 

 

appreciate the help in architecting this Zap.

Best!


Troy Tessalone
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+14
  • Zapier Orchestrator & Solution Partner
  • Answer
  • August 29, 2024

@Speckren 

Options:

  • You can us Looping followed by a Filter step to compare values.
    • Limit of 500 loops
  • You can use a Code step.
    • Advanced but more efficient

  • Author
  • Beginner
  • August 29, 2024

Thanks again @Troy Tessalone .  That worked liked a charm.  I wrote some quick javascript to grab the id.  

here is a quick code snippet if it helps anyone else.  just change your constants.

const invoices = (inputData.invoices || '').split(',');
const searchValues = (inputData.searchValue || '').split(',');
const docNumber = inputData.docNumber || '';

// Find the index of the docNumber in the searchValues array
const index = searchValues.indexOf(docNumber);

// Prepare the output based on whether a matching index was found
if (index !== -1) {
output = { invoiceID: invoices[index] }; // Return the corresponding invoice ID
} else {
output = { message: 'No matching invoice found for the provided docNumber.' };
}

 


SamB
Community Manager
Forum|alt.badge.img+11
  • Community Manager
  • August 30, 2024

Yay! Thanks so much for following up here @Speckren to confirm that worked. And thanks also for sharing the code you used - this will be super helpful to others in the Community here that are looking to do the same thing! 🤗

And a big shout out to Troy for helping out here, it’s truly appreciated. 🧡