Aug 27, 2022 10:36 AM
Hello everyone,
I am using webhooks to trigger an Airtable automation from Stripe event.
Then using script to call the Stripe api to pull additional data about event.
My issue, is that the data I need comes back as a list, and I cannot use the info in the next step of the automation…
Is there a script or way to break out the line items of the list (in Airtable), so that I can use them in workflow?
Shout out #aatt for the inspiration and getting me this far.
THANK YOU!
Aug 28, 2022 02:11 AM
Welcome back to Airtable Community @De_La_Campa
You might need to use Zapier to do this with their new Line Item support for Airtable.
Alternatively, you would need to screenshot the response from Stripe so we can help you better
Aug 28, 2022 09:38 AM
Hi,
What kind of list do you have? Can you divide it by value types in automation input?
I mean (for example)
list of doc numbers,
list of doc names,
list of doc types…
anyway, you can probably split it into array of lists above, and then - each element into array of values, receiving 2d-array that can be transponded (like turn the table 90 degrees to receive your desired output)
if yes, check this answer
Aug 28, 2022 03:43 PM
Thank you for the replies, including screen shot.
The api returns a list and I am just not sure about how to work with arrays and scripting in Airtable. I would like to avoid using zapier or Make(Integromat), also I understand they may make this easier.
Any help, guidance, or quick consult is welcomed. Thank you.
Aug 30, 2022 06:23 AM
Hi Mohamed. Did Zapier include test keys back? Zapier created some great no-code integrations (create product, price, and payment link) recently, but they did not include a way to use a Stripe test key with them. So if you want to test these new operations out, you’ll need to use a real credit card. May get pricey just to see if they work.
Aug 30, 2022 06:28 AM
Hi @Benjamin_Watrous ,
Unfortunately they haven’t added the test keys back. They do recommend a workaround however by using Webhooks as described here
Aug 30, 2022 06:38 AM
Right. I’m actually already in that thread saying the same thing :grinning_face_with_smiling_eyes: .
BTW, you mentioned Zapier’s Airtable Line Items support. Stripe’s checkout session events do not include some crucial data (product, description, quantity,…) in a webhook by default. Can we retrieve these objects with it?
Aug 30, 2022 06:46 AM
Hahaha I see :grinning_face_with_big_eyes:
You mean use the stripe product ID to retrieve the products from Airtable? Yes you can do that. But depending on the response you get from Stripe you will probably need to use Formatter to get the product ids transformed to Line Items then use a Loop to search for said items in Airtable
Aug 30, 2022 06:55 AM
Sorry, no. I want to retrieve those Stripe checkout objects from a Stripe Webhook and plug them into my Airtable. Unfortunately, the line items where these objects are found within the checkout session event need to be expanded so they are not included in a checkout.succeeded event webhook by default. It has something to do with large payloads. So I was wondering if the “Zapier Line Items support” you mentioned earlier in this thread addresses that.
Aug 30, 2022 07:09 AM
Sorry for misunderstanding. The Line Item Support is particularly a new update within Zapier for the Airtable integration.
However, for your Stripe problem, I would actually suggest you look into their API (since the Webhooks dont provide the necessary information)