[✅ Solution] Help on Update collected action

Hi guys, I really fell in love with Tape and I read your great topics almost everyday.

I’m trying to connect my billing system via webhooks and APIs, but I’m stuck.

In this automation I started from a webhook and I should manage 3 different cases:

  1. Create a record with its related customer
  2. Create a record by inserting the customer’s name in the description (when the customer does not exist in Tape)
  3. Update a record whose ID already exists

After that I need only that record to be sent to another automation that populates the PDF attachment starting from the URL.

For points 1 and 2 I don’t find any difficulties, but I can’t get the update all collected to work in any way. The search correctly finds the item, but the action does not find any records in the collection (??). Then the run fails returning the following error:

Error while execution of match condition:
[400] input_validation: Invalid input for parameter "body": data/trigger_on_record_id must be >= 1 ([{"instancePath":"/trigger_on_record_id","schemaPath":"#/properties/trigger_on_record_id/minimum","keyword" :"minimum","params":{"comparison":">=","limit":1},"message":"must be >= 1"}])

Can anyone give me some pointers?
Thanks in advance

2 Likes

Ok so Jason tried to help me, taking a look at the entire worflow and recreating some basic logic to reproduce the issue. On his side everything worked great.

We tried to convert the if condition (where ItemID = @Webhook payload / document_ID) into a script ( jsonata("document_ID").evaluate(webhook_payload_parsed) === null || (collected_preventivi_field_item_id_decimal_value === jsonata("document_ID").evaluate(webhook_payload_parsed)) ) but this didnt’t help unfortunately.

So maybe I’m missing something really stupid.

4 Likes

Hi @Michele

first of all a very warm welcome to the Tape community! We are really happy that you are here! :tada: :100: :grinning:

We will definitely look into your problem and try to find a solution so that you can connect your billing system! I will get back to you as soon as we have the first insights.

Cheers
Leo

1 Like

@Michele can you try to replace the @document_ID with static data (something that you know exists?)


Then run it to see if you’re still receiving the same error.

If that works as expected, then try putting your @document_ID in a cal field and calling that in the if/else and search fields to try to narrow down the discrepancy. Only think I can think of is that maybe there is an invisible character (a space maybe?)

Also, welcome to the party :metal::tada:

2 Likes

Hey @1F2Ns thanks for your suggestion!

I tried, but unfortunately still nothing :frowning:
I moved the Search clients action down into the else statement as well, but with no luck. A this point I don’t know if it’s a bug or something.

1 Like

Hi @Michele,

first of all: Great to hear that you love Tape - we’re also really happy to see you sharing your challenges here. I am certain the community will find a solution together with you. :blue_heart:

It seems like you are getting pretty close to achieving your goal. As your screenshot suggests with the “collected 1 records” log output on the right, the proper record was apparently indeed found via the search. Also, it seems like your conditional action did also work as the underlying nested actions were executed.

However, your screenshots display some “Skipped” labels in yellow, indicating that you were running a simulation run. Could you try to execute an action run, either by sending a payload to your webhook URL or by triggering a manual run with the most recent or a custom payload via the menu on the top right:

Screenshot 2024-02-26 at 18.31.43

Could you provide more info on what the output is for an actual workflow run then?

Also, it would be great to see your whole workflow definition (also via direct message if it may contain sensitive info).

It seems like you are really close. Would be happy to help you more - also our sophisticated partners and community champions such as @Jason and @1F2Ns will be able to assist better the more info we have.

Thank you & looking forward
Tim

1 Like

Ehi super @Tim,

first of all thank you for this warm welcome :smiling_face_with_three_hearts:
It’s a great opportunity to meet brilliant minds like yours.

Yeah, you’re right: I’m actually really close to my goal! Nothing is obvious when we talk about coding, cause sometimes you’re so tired or focused on small details that you can miss something dumb.

So magically it turns out that running manually the automation everything works as expected :joy:
I was avoiding to run the automation for real because I’m lazy and I didn’t duplicate the app as a backup.

Thank you!

1 Like

Very happy to hear, @Michele. Meeting brilliant users like you is also an inspiring opportunity! :blue_heart:

Thanks for sharing your issue and feel free to reach out to the community anytime :partying_face:

Cheers
Tim