Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

how can confiforms change submit url like webhooks

Edited

how can confiforms change submit url like webhooks, i will post the form data to some custom url, i known easy form is ok, but the easy form is not support file field, thanks a lot!

1 answer

Hi

ConfiForms has REST APIs for integrations https://wiki.vertuna.com/display/CONFIFORMS/REST+API

Also, any time you can set up a form that will do additional requests to your services as you like - by setting up the ConfiForms IFTTT rules https://wiki.vertuna.com/display/CONFIFORMS/Configuring+ConfiForms+IFTTT+actions+and+rules#ConfiguringConfiFormsIFTTTactionsandrules-WebServiceRequest

Alex

thanks @Alex Medved _ConfiForms_ ,i already  read the docs,have the questions:

1.when do additional requests(to my custom url), how choose action to perform??i see two, i used the post method

   (1). make http request

   (2).webservice request

2.when the form contain the file field, how the iftttt rules send the file to my custom url

i used ${sql filed} or confiform form field, but in my custom url. i just get the file name, not the file self, so how to get the file content in  my custom view??i used the django, request.POST method is failed.

3.in the ifttt rules,  whether or not can contains muti fields?? ex: many text fields and one file filed, when submit that all data can send to my custom url???is that ok ???

i am sorry about the questions, i just the beginer used the confiforms, i really Thank you verry much!  

1. It is better to use "webservice request", as it allows you to hide auth details from end users and support any type of request type (POST,GET.PATCH, etc)

2. I think it could be done the same way as we do it with POSTing to Jira https://wiki.vertuna.com/display/TEST/Create+Jira+issue+with+webservice+connection+with+files+and+remote+links (see how file is transferred)

3. Not sure I understand this completely, but there are no limits on the number of fields you can send/use

Alex

@Alex Medved _ConfiForms_  thanks for your reply!

i read the doc, and set my form like it, but my custom view can't get the file also!

my custom view get null object like this:<MultiValueDict: {}>

normally,it could get file object.

my form's setting like these snapshots:

form_define.jpg

 

ifttt1.jpgifttt2.jpgifttt3.jpg

ws:

ws.jpg

Hi

What request headers do you send to your own service?

I have done a quick test and it works just fine

Here is my sample configuration

Confluence editor

iffttt-send-1.png

And configuration of an IFTTT

iffttt-send-2.pngiffttt-send-3.pngiffttt-send-4.png

Under "file" parameter name I will receive an actual file in my target service, see below

Storage format

<p class="auto-cursor-target"><br /></p><ac:structured-macro ac:name="confiform" ac:schema-version="1" ac:macro-id="b6ee582e-2b2a-46d9-b282-8c6896a214ed"><ac:parameter ac:name="formName">myform</ac:parameter><ac:rich-text-body>
<p class="auto-cursor-target"><br /></p><ac:structured-macro ac:name="confiform-entry-register" ac:schema-version="1" ac:macro-id="16c9d6f7-6aea-452f-b552-6e2b9ec0f85a"><ac:rich-text-body>
<p><br /></p></ac:rich-text-body></ac:structured-macro>
<p class="auto-cursor-target"><ac:structured-macro ac:name="confiform-field-definition" ac:schema-version="1" ac:macro-id="8be21689-23a8-4cce-8256-9393e93a64a6"><ac:parameter ac:name="fieldName">myfile</ac:parameter><ac:parameter ac:name="fieldLabel">My file</ac:parameter><ac:parameter ac:name="type">file</ac:parameter></ac:structured-macro></p><ac:structured-macro ac:name="confiform-ifttt" ac:schema-version="1" ac:macro-id="82e51afd-a9b6-4b86-8211-7b88c6db9e28"><ac:parameter ac:name="action">WebService Request</ac:parameter><ac:parameter ac:name="extras">0aeeba4648780bd6714028c2d3190e83</ac:parameter><ac:parameter ac:name="event">onCreated</ac:parameter><ac:parameter ac:name="title">/quick-action</ac:parameter><ac:parameter ac:name="additionalContext">file</ac:parameter><ac:parameter ac:name="who">POST</ac:parameter><ac:rich-text-body>
<p><ac:structured-macro ac:name="confiform-field" ac:schema-version="1" ac:macro-id="1dc3363e-5cdc-471f-b2e9-aac968f4a05e"><ac:parameter ac:name="fieldName">myfile</ac:parameter></ac:structured-macro></p></ac:rich-text-body></ac:structured-macro>
<p class="auto-cursor-target"><br /></p></ac:rich-text-body></ac:structured-macro>
<p class="auto-cursor-target"><br /></p>

 

Receiving on the target service (request object)

iffttt-send-result.png

 

Alex

thanks! @Alex Medved _ConfiForms_ 
i look the examples like yours and i removed my request headers, i can get the file object now, but i couldn't get other fileds? like text field?

and your examples is just one file filed, so how one  http request to get file and the text filed????

As easy as adding them into the query string...

iffttt-send-params.png

Please note that it would be safer (and making it more robust) to urlencode values you set - https://wiki.vertuna.com/display/CONFIFORMS/Virtual+functions

[entry.mytextfield.urlencode]

Alex

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence Cloud

🏠 Say hello to the new Confluence Home!

Hi Atlassian Community, My name is DJ Chung, and I’m a Product Manager on the Confluence Cloud team. Today, I’m excited to share a new and improved version of Home. The new Home helps you ...

42,641 views 29 133
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you