prfeeu
Novice

Upload attachment

Hi,

I'm tring to upload the attachement file from "list A" in a document library on the same site via the workflow action "O365 Upload file".

 

The attachement field in "A" is set, that it accepts onliy one attachment file per item.

 

My question: In the workflow action "O365 Upload File" how could we get the url of the attachment-File. Maybe an XML-Request? could you please help me to build the request.

 

Thanks in advance for your help.

Labels: (1)
0 Kudos
Reply
3 Replies
DimaHijazi
Apprentice

Re: Upload attachment

Hello @prfeeu, follow the below steps: 

  1. Build a dictionary for the request headers, check Action1.png
  2. Call an HTTP web service to get attachments from the current item, check Action2.png
  3. Get the response of the web service call, check Action3.png
  4. Count the number of attachments from the result dictionary,  check Action4.png
  5. Then create a Loop action on the count number, and get  URL of the attachment and filename. check Action5.png and Action6.png
  6. Then call an HTTP web service to copy the attachment to the destination folder. check Action 7.png
0 Kudos
Reply
DimaHijazi
Apprentice

Re: Upload attachment

Find attached Action 7.png and a workflow template for the upload attachment

Reply
prfeeu
Novice

Re: Upload attachment

Hello @prfeeu, follow the below steps: 

  1. Build a dictionary for the request headers, check Action1.png
  2. Call an HTTP web service to get attachments from the current item, check Action2.png
  3. Get the response of the web service call, check Action3.png
  4. Count the number of attachments from the result dictionary,  check Action4.png
  5. Then create a Loop action on the count number, and get  URL of the attachment and filename. check Action5.png and Action6.png
  6. Then call an HTTP web service to copy the attachment to the destination folder. check Action 7.png
0 Kudos
Reply