web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Impossible de Créer un...
Power Automate
Answered

Impossible de Créer un fichier avec du contenu dynamique

(0) ShareShare
ReportReport
Posted on by 22

Bonjour à tous,

Je rencontre un problème bloquant avec un flux Power Automate qui doit enregistrer des pièces jointes d’e-mails sur SharePoint.

J’ai déjà consulté la documentation et testé plusieurs solutions, mais je n’arrive pas à résoudre cette erreur persistante. Sachant que ça fonctionnait avant.

Je fais donc appel à la communauté !

Contexte du flux

  • Je récupère une pièce jointe depuis un e-mail (Outlook) d'une boite partagé

  • J’utilise directement le contenu dynamique fourni par l’action "Obtenir la pièce jointe" ou "obtenir l'email" dans le champ "Contenu du fichier" de l’action "Créer un fichier" (SharePoint).

Le problème

  Dès que j’ajoute une seconde condition dans mon flux (plusieurs branches conditionnelles), l’action "Créer un fichier" échoue systématiquement avec l’erreur suivante :
 
ResponseSwaggerSchemaValidationFailure

The API 'sharepointonline' returned an invalid response for workflow operation 'Créé_la_PJ_sous_SP_-Poste_n°XX' of type 'OpenApiConnection'.

Error details: 'The API operation 'CreateFile' requires the property 'body' to be of type 'Object' but is of type 'String'.'
 
  • Avant la condition, le type du contenu est correct à l'intérieur de la boucle.

  • Dans la condition et après, le contenu dynamique n’est plus reconnu comme valide, ce qui provoque l’erreur.

  Ce que j’ai déjà essayé
 
  • Utiliser directement le contenu dynamique "Contenu du fichier" retourné par "Obtenir la pièce jointe" dans l’action "Créer un fichier".

  • Éviter de stocker le contenu dans une variable string.

  • Mutualiser l’action "Créer un fichier" après les conditions, ou la dupliquer dans chaque branche.

  • Vérifier dans l’historique d’exécution : avant la condition, le type est correct ; après, il ne l’est plus.

  Questions
 
  • Pourquoi le type du contenu dynamique est-il perdu après une condition supplémentaire ?

  • Comment garantir que le contenu reste du bon type à travers plusieurs branches conditionnelles ?

  • Existe-t-il une bonne pratique pour mutualiser l’action "Créer un fichier" après plusieurs conditions sans perdre le typage ?

Exemple de structure de mon flux

 
Merci d’avance !

Je suis preneur de toute piste, astuce ou exemple de flux fonctionnel dans ce cas précis.

Merci à tous pour votre aide et vos retours d’expérience !

Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,479 Super User 2025 Season 2 on at
     
    Please provide a very clear image of the flow run, pointing out what is failing
     
    The error is super specific, its telling you that you are passing a String instead of the Object, IN whatever action is failiing.
     
    So you need to show the specific flow, where it fails, go to the Action that is failing (in this case Create File) and show us what you are passing, as I cannot see that in the blurry picture. And while French is no problem, what I cannot do :-( is guess what the stuff is inside the actions.
     
    I have no idea what you are talking about related to Dynamic content lost, that error isn't about it being lost, its about you passing it the wrong information. 
     
    Can I suggest you do this.. for your own sanity sake.
     
    Create a new flow (and this is aside from the fact that you need to share the failed flow, with the action open, showing row inputs and outputs). This will tell us what you really passed in. Also the expression you are using.
     
    Turn off this flow
    In your new one just do the Get Attachments and loop...
    Then add in your create file (without any other actions)
    Then add your action back, if the same thing happens then its something you are doing :-(
  • AdrienR Profile Picture
    22 on at
    Bonjour @Michael E. Gernaey,

    Mes excuses si ce n'était pas assez clair, je vous mets ci dessous les captures d'écrans que vous avez demandé :

    Les données qui sont mis dans "Créer fichier" :
     
    Voici pour ce qui est du flux et de son message qui est celui que j'avais préalablement insérer dans mon premier post :
     
    I have no idea what you are talking about related to Dynamic content lost, that error isn't about it being lost, its about you passing it the wrong information. 
    -> Le flux fonctionnait très bien auparavant avec le contenue dynamique, je ne comprends pas pourquoi d'un seul coup le bloc demanderai une autre information.
     
    Désolé pour le floutage je dois cacher certaines informations d'entreprise. 
     
    Je vais créer un second flow et vous tenir au courant, sachant que je dois récupérer les connexion d'une autre personne, ce qui peut prendre du temps.
     
    Merci.
  • AdrienR Profile Picture
    22 on at
     
    Après avoir recréé le flow, j'obtiens toujours la même erreur au même endroit : "Créé la PJ sous SP".
     
    ResponseSwaggerSchemaValidationFailure. The API 'sharepointonline' returned an invalid response for workflow operation 'Créé_la_PJ_sous_SP_-Poste_n°XX' of type 'OpenApiConnection'. Error details: 'The API operation 'CreateFile' requires the property 'body' to be of type 'Object' but is of type 'String'.'
     
    Avez vous une autre idée pour résoudre ce problème ?
     
    Cordialement,
  • AdrienR Profile Picture
    22 on at
     
    Avez vous une idée pour débloquer mon flow ?
     
    Merci par avance,
    Cordialement
  • Verified answer
    AdrienR Profile Picture
    22 on at
    Bonjour,
     
    Voici la solution après maintes tentatives :
     
    Cordialement.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard