Skip to content
Integrating with Fo...
 
Notifications
Clear all

Integrating with Formstack using callin.io

2 Posts
1 Users
0 Reactions
4 Views
VittorioP
(@vittoriop)
Posts: 2
New Member
Topic starter
 

Hello,

 

I'm attempting to generate a JSON formatted output to send to Formstack. The goal is to perform a loop to insert a field contained within a list of dictionaries. The format that works in Formstack (via the testing tab) is as follows:

Image: 5d6d241c f04a 47e1 b367 419382920a31

I tried to produce this output using a callin.io Code step with the following code:

 

Image: 247ac0ec e995 47a5 b609 90253b453bf5

 

The output appears to be in the required format:

[ { "Id_num": "01HRWW2N752F8EV5ZZ2TZE0FEF", "Object": "1.2 Paragraph", "Content": "1.2 ParagraphnnCum explicabo voluptate At velit consequatur eos corporis consequatur in deleniti illo ut iste aliquid ut consequatur placeat sed esse voluptas. Sed expedita soluta in nihil nesciunt aut error dolorem in tempore ipsam sed adipisci quibusdam et fuga laudantium. Qui optio natus et fugiat impedit sit voluptas repellendus.nnQuo velit similique sed accusamus quos vel voluptatem perspiciatis ea obcaecati nobis 33 pariatur soluta. Sit veniam dolore qui consectetur consequatur 33 magnam perferendis qui eligendi reprehenderit ut molestiae provident ab neque galisum. Et necessitatibus praesentium non veniam itaque aut omnis enim.", "Type": "Par" }, { "Id_num": "01HRWVYY5YAJKCB7HG75HH6RDP", "Object": "1.1 Paragraph", "Content": "1.1 ParagraphnnLorem ipsum dolor sit amet. Et deserunt quidem et commodi molestias est totam odio ea vitae voluptatem eos unde impedit. 33 architecto quaerat aut architecto ducimus sit consequatur delectus ut cupiditate iste non officiis earum vel necessitatibus doloremque. Non molestiae dolores id culpa vitae et blanditiis repudiandae vel quos dolor in omnis tempora aut labore expedita ut pariatur reiciendis. Vel reprehenderit fugiat et quia dolor sit tempore rerum est aperiam placeat est dolores dolores qui magnam optio et suscipit quia.", "Type": "Par" }, { "Id_num": "01HRWVWY6P3592KTXDKVJHQF7H", "Object": "List of Chapters", "Content": "1. Chapter 1n2. Chapter 2", "Type": "Chp" }, { "Id_num": "01HRWVWMWN2AFWMVH93FEKBARW", "Object": "Table of Content", "Content": "Table of Contentnn1. Chapter 1n 1.1 Paragraphn 1.2 Paragraphnn2. Chapter 2", "Type": "ToC" } ]

However, when I execute the Formstack step 'Create Document Merge' in Formstack Documents, I receive the following error:

Image: fb904661 a1e2 46cd 9029 0bd138bc8ebc

Do you have any suggestions? It appears the format might be incorrect, even though the code output should already be a JSON object.

The same output, when copied and pasted into the Formstack web application's test area, works correctly!

Thank you!

 

 
Posted : 04/08/2025 8:30 am
VittorioP
(@vittoriop)
Posts: 2
New Member
Topic starter
 

For anyone interested, the solution is:

Formatter by callin.io - utilities - text to line-item

And in the Formstack field map definition:

{$_input = json_decode($input, true)}{json_encode($_input)}

Thank you

 

 
Posted : 21/03/2024 12:00 am
Share: